:root {
  --bg: #f4f7fb;
  --panel: #ffffff;
  --panel-2: #f8fafc;
  --text: #172033;
  --muted: #6b778c;
  --line: #dfe6ef;
  --accent: #2563eb;
  --accent-2: #1d4ed8;
  --green: #16a34a;
  --red: #dc2626;
  --orange: #f59e0b;
  --shadow: 0 18px 50px rgba(18, 35, 68, .10);
  --radius: 18px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Inter, Segoe UI, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

a { color: inherit; text-decoration: none; }

.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  background:
    radial-gradient(circle at 15% 15%, rgba(37,99,235,.16), transparent 35%),
    radial-gradient(circle at 85% 20%, rgba(14,165,233,.14), transparent 30%),
    #eef4fb;
}

.login-left {
  padding: 72px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  font-weight: 800;
  font-size: 24px;
  margin-bottom: 42px;
}

.logo {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  display: grid;
  place-items: center;
  color: white;
  font-weight: 900;
}

.hero-title {
  font-size: 48px;
  line-height: 1.04;
  margin: 0 0 20px;
  letter-spacing: -1.5px;
}

.hero-text {
  max-width: 680px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.65;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 34px;
  max-width: 720px;
}

.feature {
  background: rgba(255,255,255,.68);
  border: 1px solid rgba(203,213,225,.85);
  border-radius: 16px;
  padding: 18px;
}

.feature b { display: block; margin-bottom: 6px; }
.feature span { color: var(--muted); font-size: 14px; line-height: 1.45; }

.login-right {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 42px;
}

.auth-card {
  width: 430px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 26px;
  box-shadow: var(--shadow);
  padding: 32px;
}

.auth-card h1 {
  margin: 0 0 8px;
  font-size: 28px;
}

.auth-card p {
  margin: 0 0 24px;
  color: var(--muted);
  line-height: 1.5;
}

.field { margin-bottom: 16px; }

label {
  display: block;
  font-size: 13px;
  color: #40506a;
  margin-bottom: 8px;
  font-weight: 650;
}

input, textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 13px 14px;
  font-size: 15px;
  outline: none;
  background: #fff;
}

textarea { min-height: 120px; resize: vertical; }

input:focus, textarea:focus, select:focus {
  border-color: rgba(37,99,235,.8);
  box-shadow: 0 0 0 4px rgba(37,99,235,.10);
}

.btn {
  border: 0;
  border-radius: 13px;
  padding: 13px 18px;
  background: var(--accent);
  color: white;
  font-weight: 750;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
}

.btn:hover { background: var(--accent-2); }

.btn.secondary {
  background: #eef4ff;
  color: #1d4ed8;
}

.btn.ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
}

.btn.full { width: 100%; }

.auth-links {
  display: flex;
  justify-content: space-between;
  margin-top: 16px;
  color: var(--muted);
  font-size: 14px;
}

.alert {
  border-radius: 14px;
  padding: 13px 14px;
  background: #fff7ed;
  color: #9a3412;
  border: 1px solid #fed7aa;
  margin-bottom: 16px;
  display: none;
}

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

.sidebar {
  background: #0f172a;
  color: white;
  padding: 24px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.sidebar .brand { margin-bottom: 28px; }

.nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nav a {
  padding: 12px 13px;
  border-radius: 12px;
  color: #cbd5e1;
  font-weight: 650;
  display: flex;
  justify-content: space-between;
}

.nav a:hover, .nav a.active {
  background: rgba(255,255,255,.10);
  color: #fff;
}

.sidebar-footer {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 24px;
  color: #94a3b8;
  font-size: 13px;
  line-height: 1.5;
}

.main {
  padding: 30px;
}

.topbar {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 8px 22px rgba(15,23,42,.04);
  margin-bottom: 24px;
}

.topbar h1 { margin: 0; font-size: 26px; }
.topbar p { margin: 5px 0 0; color: var(--muted); }

.userbox {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #dbeafe;
  color: #1d4ed8;
  display: grid;
  place-items: center;
  font-weight: 900;
}

.grid {
  display: grid;
  gap: 18px;
}

.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: 0 8px 22px rgba(15,23,42,.04);
}

.card h2, .card h3 {
  margin-top: 0;
}

.stat {
  font-size: 32px;
  font-weight: 850;
  letter-spacing: -1px;
}

.muted { color: var(--muted); }

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th, .table td {
  text-align: left;
  padding: 14px 10px;
  border-bottom: 1px solid var(--line);
}

.table th {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 750;
  background: #eef4ff;
  color: #1d4ed8;
}

.badge.green { background: #dcfce7; color: #166534; }
.badge.orange { background: #ffedd5; color: #9a3412; }
.badge.gray { background: #f1f5f9; color: #475569; }

.dropzone {
  border: 2px dashed #b8c7dc;
  border-radius: 20px;
  background: #f8fbff;
  padding: 42px;
  text-align: center;
  cursor: pointer;
}

.dropzone:hover {
  border-color: #2563eb;
  background: #f3f7ff;
}

.progress {
  height: 10px;
  border-radius: 999px;
  background: #e5e7eb;
  overflow: hidden;
}

.progress span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #2563eb, #06b6d4);
}

.notice {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e3a8a;
  padding: 16px;
  border-radius: 16px;
  line-height: 1.55;
}

.footer-note {
  margin-top: 26px;
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 960px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-left { padding: 32px; }
  .login-right { padding: 24px; }
  .app { grid-template-columns: 1fr; }
  .sidebar { position: relative; height: auto; }
  .sidebar-footer { position: static; margin-top: 22px; }
  .grid.cols-4, .grid.cols-3, .grid.cols-2 { grid-template-columns: 1fr; }
}
