/* DataHub auth & shell — DM Sans + design tokens from portal mock */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #F4F5F9;
  --card-bg: #FFFFFF;
  --border: #E8E9EF;
  --text-primary: #1A1D2E;
  --text-secondary: #6B7080;
  --text-muted: #9EA5B8;
  --purple: #6C5CE7;
  --purple-light: #EEE9FF;
  --purple-dark: #5849C2;
  --blue: #0984E3;
  --blue-light: #E3F2FF;
  --red: #E17055;
  --red-light: #FFF0ED;
  --green: #00B894;
  --green-light: #E0FAF4;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.12);
  --radius-sm: 6px;
  --radius-lg: 16px;
  --sidebar-w: 220px;
  --topbar-h: 60px;
  --font: 'DM Sans', system-ui, sans-serif;
}
html, body { height: 100%; font-family: var(--font); background: var(--bg); color: var(--text-primary); font-size: 14px; line-height: 1.5; }

/* Login */
.login-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #F4F5F9 0%, #EEE9FF 100%);
  padding: 24px;
}
.login-card {
  background: #fff; border-radius: var(--radius-lg); padding: 44px 40px;
  box-shadow: var(--shadow-lg); width: 100%; max-width: 400px;
}
.login-logo { display: flex; align-items: center; gap: 11px; margin-bottom: 30px; }
.logo-icon {
  width: 40px; height: 40px; border-radius: 11px;
  background: linear-gradient(135deg, var(--purple), var(--blue));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 16px; font-weight: 700; flex-shrink: 0;
}
.login-title { font-size: 22px; font-weight: 700; letter-spacing: -.3px; }
.login-intro { font-size: 13.5px; color: var(--text-secondary); margin-bottom: 24px; }
.login-form { display: flex; flex-direction: column; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label, .label-row label { font-size: 12.5px; font-weight: 600; color: var(--text-primary); }
.label-row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 2px; }
.forgot-link { font-size: 12px; color: var(--purple); text-decoration: none; font-weight: 600; }
.forgot-link:hover { text-decoration: underline; }
input[type="email"], input[type="password"], input[type="text"] {
  padding: 9px 13px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-family: var(--font); font-size: 13.5px; color: var(--text-primary);
  background: var(--card-bg); outline: none; width: 100%; transition: border-color .15s;
}
input:focus { border-color: var(--purple); box-shadow: 0 0 0 3px rgba(108,92,231,.08); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 11px 16px; border-radius: var(--radius-sm); font-family: var(--font);
  font-size: 13.5px; font-weight: 600; cursor: pointer; border: none; transition: background .15s;
  text-decoration: none;
}
.btn-primary { background: var(--purple); color: #fff; width: 100%; }
.btn-primary:hover { background: var(--purple-dark); }
.btn-primary.admin-tonal { background: var(--text-primary); }
.btn-primary.admin-tonal:hover { background: #2d3142; }
.login-switch { text-align: center; margin-top: 24px; font-size: 13px; color: var(--text-secondary); }
.login-switch a { color: var(--purple); font-weight: 600; text-decoration: none; }
.login-switch a:hover { text-decoration: underline; }
.login-footer { margin-top: 24px; text-align: center; font-size: 12.5px; color: var(--text-muted); }

.alert {
  padding: 12px 16px; border-radius: var(--radius-sm); font-size: 13.5px;
  display: flex; align-items: flex-start; gap: 10px; margin-bottom: 18px;
}
.alert-info { background: var(--blue-light); color: var(--blue); }
.alert-danger { background: var(--red-light); color: var(--red); }

/* App shell (post-login minimal) */
.app { display: flex; height: 100vh; overflow: hidden; }
.sidebar {
  width: var(--sidebar-w); background: #fff; border-right: 1px solid var(--border);
  display: flex; flex-direction: column; flex-shrink: 0;
}
.sidebar-logo {
  display: flex; align-items: center; gap: 10px; padding: 20px 18px 16px;
  border-bottom: 1px solid var(--border);
}
.logo-text { font-size: 15px; font-weight: 700; }
.logo-version { font-size: 10px; color: var(--text-muted); margin-top: 1px; }
.sidebar-nav { padding: 12px; flex: 1; }
.sidebar-nav a, .sidebar-nav button {
  display: flex; align-items: center; gap: 9px; width: 100%; text-align: left;
  padding: 8px 10px; border-radius: var(--radius-sm); margin-bottom: 4px;
  color: var(--text-secondary); font-size: 13.5px; font-weight: 500;
  text-decoration: none; border: none; background: transparent; cursor: pointer; font-family: var(--font);
}
.sidebar-nav a:hover, .sidebar-nav button:hover { background: var(--bg); color: var(--text-primary); }
.sidebar-nav a.active { background: var(--purple-light); color: var(--purple); }
.main { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.topbar {
  height: var(--topbar-h); background: #fff; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; padding: 0 24px;
}
.topbar h1 { font-size: 15px; font-weight: 600; }
.content { flex: 1; overflow-y: auto; padding: 28px; }
.welcome-banner { font-size: 22px; font-weight: 700; margin-bottom: 8px; }
.muted { color: var(--text-secondary); font-size: 14px; margin-bottom: 24px; }
