* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: #0f172a;
  color: #e5e7eb;
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
  background:
    radial-gradient(circle at top left, rgba(56,189,248,.25), transparent 35%),
    radial-gradient(circle at bottom right, rgba(34,197,94,.16), transparent 35%),
    #020617;
}

.login-card {
  width: 100%;
  max-width: 430px;
  background: rgba(15, 23, 42, .96);
  border: 1px solid rgba(148, 163, 184, .25);
  border-radius: 24px;
  padding: 34px;
  box-shadow: 0 25px 80px rgba(0,0,0,.45);
}

.logo {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  background: linear-gradient(135deg, #38bdf8, #22c55e);
  display: grid;
  place-items: center;
  color: #020617;
  font-size: 24px;
  font-weight: 900;
  margin-bottom: 20px;
}

.login-card h1 {
  margin: 0 0 6px;
}

.login-card p,
.login-card small {
  color: #94a3b8;
}

label {
  display: block;
  margin: 14px 0 6px;
  color: #cbd5e1;
  font-size: 14px;
}

input, select, textarea {
  width: 100%;
  border: 1px solid #334155;
  border-radius: 10px;
  background: #020617;
  color: white;
  padding: 10px;
}

button {
  border: none;
  border-radius: 10px;
  padding: 12px 18px;
  font-weight: bold;
  cursor: pointer;
  background: #38bdf8;
  color: #020617;
}

.login-card button {
  width: 100%;
  margin-top: 18px;
}

.error {
  background: #7f1d1d;
  color: #fecaca;
  padding: 12px;
  border-radius: 10px;
  margin: 16px 0;
}

.app {
  display: grid;
  grid-template-columns: 270px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: #020617;
  border-right: 1px solid #1e293b;
  padding: 22px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand h2 {
  margin: 0;
  color: #38bdf8;
}

.brand p {
  color: #94a3b8;
  margin-top: 4px;
}

.nav button {
  width: 100%;
  text-align: left;
  margin: 8px 0;
  background: #111827;
  color: #e5e7eb;
  border: 1px solid #1f2937;
}

.nav button.active {
  background: #38bdf8;
  color: #020617;
}

.logout {
  background: #ef4444 !important;
  color: white !important;
  margin-top: 20px;
  width: 100%;
}

.main {
  padding: 26px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.topbar h1 {
  margin: 0;
}

.panel {
  display: none;
}

.panel.active {
  display: block;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.card {
  background: #111827;
  border: 1px solid #1f2937;
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 8px 25px rgba(0,0,0,.16);
}

.card strong {
  display: block;
  color: #94a3b8;
  font-size: 13px;
  margin-bottom: 7px;
}

.card span {
  font-size: 25px;
  font-weight: bold;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.success { background: #22c55e; color: #052e16; }
.danger { background: #ef4444; color: white; }
.warning { background: #f59e0b; color: #111827; }

.table-wrap {
  overflow-x: auto;
  background: #111827;
  border-radius: 18px;
  border: 1px solid #1f2937;
}

table {
  width: 100%;
  min-width: 1400px;
  border-collapse: collapse;
}

th {
  background: #0284c7;
  color: white;
  padding: 11px;
  font-size: 13px;
  white-space: nowrap;
}

td {
  border-bottom: 1px solid #1f2937;
  padding: 7px;
  text-align: center;
}

.result {
  font-weight: bold;
  background: #1e293b;
  white-space: nowrap;
}

.positive { color: #22c55e; }
.negative { color: #ef4444; }
.neutral { color: #facc15; }

.alert {
  display: none;
  margin-bottom: 16px;
  padding: 14px;
  border-radius: 12px;
  text-align: center;
  font-weight: bold;
}

.alert-green { background: #064e3b; color: #86efac; }
.alert-red { background: #7f1d1d; color: #fecaca; }
.alert-yellow { background: #713f12; color: #fde68a; }

@media (max-width: 900px) {
  .app {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: relative;
    height: auto;
  }

  .main {
    padding: 16px;
  }
}

@media print {
  .sidebar, .actions, .topbar button {
    display: none !important;
  }

  .app {
    display: block;
  }

  body {
    background: white;
    color: black;
  }
}
