/* ==========================================================================
   AML SaaS Customer Portal — Professional Stylesheet
   Theme: Blue/Gray · No external CDN · System fonts
   ========================================================================== */

/* ----- Reset & Base ----- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --c-primary: #1a73e8;
  --c-primary-dark: #1557b0;
  --c-primary-light: #e8f0fe;
  --c-secondary: #5f6368;
  --c-success: #1e8e3e;
  --c-success-light: #e6f4ea;
  --c-warning: #f9ab00;
  --c-warning-light: #fef7e0;
  --c-danger: #d93025;
  --c-danger-light: #fce8e6;
  --c-bg: #f8f9fa;
  --c-surface: #ffffff;
  --c-border: #e0e0e0;
  --c-border-light: #f0f0f0;
  --c-text: #1f1f1f;
  --c-text-muted: #5f6368;
  --c-text-light: #9aa0a6;
  --radius: 8px;
  --radius-sm: 4px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.06);
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
  --shadow-lg: 0 4px 12px rgba(0,0,0,.1);
  --nav-h: 56px;
  --max-w: 1200px;
}

html { font-size: 14px; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--c-bg);
  color: var(--c-text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--c-primary); text-decoration: none; }
a:hover { color: var(--c-primary-dark); text-decoration: underline; }
code { font-family: "SF Mono", "Fira Code", Consolas, monospace; font-size: .9em; }

/* ----- Utility Classes ----- */
.text-muted { color: var(--c-text-muted); }
.text-sm { font-size: 12px; }
.text-light { color: var(--c-text-light); }
.inline-form { display: inline; }

/* ----- Navbar ----- */
.navbar {
  background: #fff;
  border-bottom: 1px solid var(--c-border);
  height: var(--nav-h);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}
.nav-container {
  max-width: var(--max-w);
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 24px;
}
.nav-brand a {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--c-text);
  text-decoration: none;
  font-weight: 600;
}
.nav-brand a:hover { text-decoration: none; }
.nav-logo {
  background: var(--c-primary);
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
}
.nav-title { font-size: 15px; white-space: nowrap; }
.nav-links {
  display: flex;
  gap: 4px;
  margin-left: 16px;
  flex: 1;
}
.nav-link {
  color: var(--c-text-muted);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  transition: all .15s;
}
.nav-link:hover {
  background: var(--c-primary-light);
  color: var(--c-primary);
  text-decoration: none;
}

/* User Dropdown */
.nav-user { position: relative; }
.user-dropdown { position: relative; }
.user-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
}
.user-toggle:hover { background: var(--c-bg); }
.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--c-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 13px;
}
.user-name { font-size: 13px; color: var(--c-text); }
.chevron { color: var(--c-text-muted); }
.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 4px;
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  min-width: 220px;
  z-index: 100;
  overflow: hidden;
}
.dropdown-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--c-border-light);
}
.dropdown-email { font-weight: 600; font-size: 13px; }
.dropdown-tenant { margin-top: 2px; }
.dropdown-role { margin-top: 4px; }
.dropdown-item {
  display: block;
  padding: 8px 16px;
  color: var(--c-text);
  font-size: 13px;
}
.dropdown-item:hover { background: var(--c-primary-light); text-decoration: none; }
.dropdown-divider { height: 1px; background: var(--c-border-light); }
.dropdown-danger { color: var(--c-danger); }
.dropdown-danger:hover { background: var(--c-danger-light); }

/* ----- Main Content ----- */
.main-content { min-height: calc(100vh - var(--nav-h) - 48px); }
.content-container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 24px;
}
.footer {
  background: #fff;
  border-top: 1px solid var(--c-border);
  padding: 16px 24px;
}
.footer-container {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
}

/* ----- Page Header ----- */
.page-header { margin-bottom: 24px; }
.page-header h1 { font-size: 22px; font-weight: 600; margin-bottom: 4px; }
.page-header p { color: var(--c-text-muted); }
.breadcrumb {
  font-size: 12px;
  color: var(--c-text-muted);
  margin-bottom: 8px;
}
.breadcrumb a { color: var(--c-text-muted); }
.header-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ----- Card ----- */
.card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}
.card-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.card-footer {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--c-border-light);
  text-align: right;
}
.card-highlight { border-color: var(--c-primary); border-left: 4px solid var(--c-primary); }
.card-info { border-left: 4px solid var(--c-primary); }
.card-amber { border-left: 4px solid var(--c-warning); }
.card-success { border-left: 4px solid var(--c-success); }

/* ----- Alert / Messages ----- */
.messages { margin-bottom: 16px; }
.alert {
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}
.alert-error, .alert-danger { background: var(--c-danger-light); color: var(--c-danger); }
.alert-success { background: var(--c-success-light); color: var(--c-success); }
.alert-warning { background: var(--c-warning-light); color: #b06000; }
.alert-info { background: var(--c-primary-light); color: var(--c-primary); }
.alert-close {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: inherit;
  opacity: .6;
  padding: 0 4px;
}
.alert-close:hover { opacity: 1; }

/* ----- Buttons ----- */
.btn {
  display: inline-block;
  padding: 8px 18px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: all .15s;
  line-height: 1.4;
  background: var(--c-surface);
  color: var(--c-text);
}
.btn:hover { text-decoration: none; box-shadow: var(--shadow-sm); }
.btn-primary { background: var(--c-primary); color: #fff; border-color: var(--c-primary); }
.btn-primary:hover { background: var(--c-primary-dark); color: #fff; }
.btn-secondary { background: #fff; color: var(--c-primary); border-color: var(--c-primary); }
.btn-secondary:hover { background: var(--c-primary-light); }
.btn-danger { background: var(--c-danger); color: #fff; border-color: var(--c-danger); }
.btn-danger:hover { background: #b3261e; color: #fff; }
.btn-ghost { background: transparent; color: var(--c-text-muted); border-color: var(--c-border); }
.btn-ghost:hover { background: var(--c-bg); color: var(--c-text); }
.btn-link { background: none; border: none; color: var(--c-primary); padding: 4px 8px; }
.btn-link:hover { text-decoration: underline; }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn-block { display: block; width: 100%; text-align: center; }

/* ----- Badges ----- */
.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
}
.badge-critical { background: var(--c-danger-light); color: var(--c-danger); }
.badge-high { background: #fef0e6; color: #e8700a; }
.badge-medium { background: var(--c-warning-light); color: #b06000; }
.badge-low { background: #eef1f5; color: #5f6368; }
.badge-info { background: var(--c-primary-light); color: var(--c-primary); }
.badge-success { background: var(--c-success-light); color: var(--c-success); }

/* ----- Tags ----- */
.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  margin: 2px;
  background: #f1f3f4;
  color: var(--c-text-muted);
}
.tag-source { background: var(--c-primary-light); color: var(--c-primary); }
.tag-program { background: var(--c-danger-light); color: var(--c-danger); }
.tag-category { background: var(--c-warning-light); color: #b06000; }
.tag-alias { background: #eef1f5; color: var(--c-text); }
.tag-list { display: flex; flex-wrap: wrap; gap: 4px; }

/* ----- Stats Grid ----- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}
.stat-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  transition: box-shadow .15s, border-color .15s;
}
.stat-card:hover { box-shadow: var(--shadow); border-color: var(--c-primary); }
.stat-icon { margin-bottom: 4px; color: var(--c-primary); }
.stat-label { font-size: 12px; color: var(--c-text-muted); }
.stat-value { font-size: 24px; font-weight: 700; }
.stat-link { font-size: 12px; color: var(--c-primary); margin-top: 4px; }
.stat-blue { border-top: 3px solid var(--c-primary); }
.stat-blue .stat-icon, .stat-blue .stat-value { color: var(--c-primary); }
.stat-red { border-top: 3px solid var(--c-danger); }
.stat-red .stat-icon, .stat-red .stat-value { color: var(--c-danger); }
.stat-green { border-top: 3px solid var(--c-success); }
.stat-green .stat-icon, .stat-green .stat-value { color: var(--c-success); }
.stat-amber { border-top: 3px solid var(--c-warning); }
.stat-amber .stat-icon, .stat-amber .stat-value { color: #b06000; }
.stat-purple { border-top: 3px solid #9334e6; }
.stat-purple .stat-icon, .stat-purple .stat-value { color: #9334e6; }
.stat-gray { border-top: 3px solid var(--c-secondary); }
.stat-gray .stat-value { color: var(--c-secondary); }

/* ----- Tables ----- */
.table-wrap { overflow-x: auto; }
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.data-table th {
  text-align: left;
  padding: 8px 12px;
  border-bottom: 2px solid var(--c-border);
  color: var(--c-text-muted);
  font-weight: 600;
  white-space: nowrap;
}
.data-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--c-border-light);
  vertical-align: top;
}
.data-table tbody tr:hover { background: #f8f9fa; }
.row-critical { background: #fff5f5; }
.row-critical:hover { background: #fee; }
.row-high { background: #fff8f0; }
.row-high:hover { background: #ffeede; }
.row-medium { background: #fffcf0; }
.row-medium:hover { background: #fff8e0; }

/* ----- Info Table (key-value) ----- */
.info-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.info-table th {
  text-align: left;
  padding: 6px 12px;
  width: 140px;
  color: var(--c-text-muted);
  font-weight: 600;
  border-bottom: 1px solid var(--c-border-light);
}
.info-table td {
  padding: 6px 12px;
  border-bottom: 1px solid var(--c-border-light);
}
.info-table tr:last-child th, .info-table tr:last-child td { border-bottom: none; }

/* ----- Forms ----- */
.form-group { margin-bottom: 16px; }
.form-label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--c-text);
}
.required { color: var(--c-danger); }
.form-input, .form-select, .form-textarea, .search-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-family: inherit;
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.form-input:focus, .form-select:focus, .form-textarea:focus, .search-input:focus {
  outline: none;
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px rgba(26,115,232,.12);
}
.form-textarea { resize: vertical; min-height: 60px; }
.form-file { padding: 6px; }
.form-hint { margin-top: 4px; font-size: 12px; color: var(--c-text-muted); }
.form-actions { display: flex; gap: 8px; align-items: center; }

/* ----- Search Form ----- */
.search-form { margin: 0; }
.search-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.search-input { flex: 1; padding: 10px 14px; font-size: 14px; }

/* ----- Filter Form ----- */
.filter-form { margin: 0; }
.filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

/* ----- Detail Grid ----- */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.detail-col { display: flex; flex-direction: column; gap: 16px; }

/* ----- Risk Banner ----- */
.risk-banner {
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 16px;
  display: flex;
  gap: 24px;
  align-items: center;
  color: #fff;
}
.risk-critical { background: linear-gradient(135deg, #d93025, #b3261e); }
.risk-high { background: linear-gradient(135deg, #e8700a, #c25e00); }
.risk-medium { background: linear-gradient(135deg, #f9ab00, #d68f00); }
.risk-low { background: linear-gradient(135deg, #1e8e3e, #176b2c); }
.risk-score { display: flex; flex-direction: column; align-items: center; min-width: 120px; }
.risk-label { font-size: 12px; opacity: .8; }
.risk-value { font-size: 48px; font-weight: 800; line-height: 1; }
.risk-tier { font-size: 14px; font-weight: 600; margin-top: 4px; }
.risk-meta { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.risk-meta div { opacity: .9; }

/* ----- Action Bar ----- */
.action-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  align-items: center;
}

/* ----- Action Grid (Dashboard) ----- */
.action-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}
.action-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  color: var(--c-text);
  transition: all .15s;
}
.action-card:hover { border-color: var(--c-primary); box-shadow: var(--shadow-sm); text-decoration: none; }
.action-icon {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.action-icon-blue { background: var(--c-primary-light); color: var(--c-primary); }
.action-icon-purple { background: #f3e8ff; color: #9334e6; }
.action-icon-amber { background: var(--c-warning-light); color: #b06000; }
.action-icon-green { background: var(--c-success-light); color: var(--c-success); }
.action-icon-red { background: var(--c-danger-light); color: var(--c-danger); }
.action-text { display: flex; flex-direction: column; }
.action-text strong { font-size: 13px; }

/* ----- Pagination ----- */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  padding: 16px 0;
}
.pagination-info { font-size: 13px; color: var(--c-text-muted); }

/* ----- Empty State ----- */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--c-text-muted);
  font-size: 14px;
}
.empty-state p { margin-bottom: 12px; }

/* ----- Quota Bar ----- */
.quota-bar-container { padding: 8px 0; }
.quota-bar-info {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 13px;
}
.quota-bar {
  height: 8px;
  background: var(--c-border-light);
  border-radius: 4px;
  overflow: hidden;
}
.quota-bar-fill {
  height: 100%;
  background: var(--c-primary);
  border-radius: 4px;
  transition: width .3s ease;
}
.quota-warning { background: var(--c-warning); }
.quota-danger { background: var(--c-danger); }
.quota-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  align-items: center;
}

/* ----- Charts (CSS Bar Charts) ----- */
.chart-container {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 200px;
  padding: 16px 0;
  overflow-x: auto;
}
.chart-bar-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 40px;
  flex: 1;
  height: 100%;
}
.chart-bar-label { font-size: 11px; color: var(--c-text-muted); margin-bottom: 4px; }
.chart-bar-wrap {
  flex: 1;
  width: 100%;
  display: flex;
  align-items: flex-end;
}
.chart-bar {
  width: 100%;
  min-height: 2px;
  border-radius: 4px 4px 0 0;
  transition: height .3s ease;
}
.chart-bar-blue { background: var(--c-primary); }
.chart-x-label { font-size: 11px; color: var(--c-text-muted); margin-top: 4px; }

/* Horizontal Bars */
.horizontal-chart { display: flex; flex-direction: column; gap: 8px; }
.hbar-group { display: flex; align-items: center; gap: 8px; }
.hbar-label { width: 200px; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar-track { flex: 1; height: 24px; background: var(--c-border-light); border-radius: 4px; overflow: hidden; position: relative; }
.hbar { height: 100%; border-radius: 4px; display: flex; align-items: center; justify-content: flex-end; padding-right: 8px; min-width: 30px; }
.hbar-blue { background: var(--c-primary); }
.hbar-value { font-size: 11px; color: #fff; font-weight: 600; }
.hbar-meta { width: 120px; }

/* ----- Period Tabs ----- */
.period-tabs { display: flex; gap: 4px; align-items: center; }

/* ----- Login Page ----- */
.login-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #1a237e 0%, #0d47a1 50%, #01579b 100%);
  padding: 20px;
}
.login-card {
  background: #fff;
  border-radius: 12px;
  padding: 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 8px 32px rgba(0,0,0,.2);
}
.login-header { text-align: center; margin-bottom: 32px; }
.login-logo {
  width: 56px;
  height: 56px;
  background: var(--c-primary);
  color: #fff;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 20px;
  margin: 0 auto 16px;
}
.login-header h1 { font-size: 20px; margin-bottom: 4px; }
.login-header p { font-size: 13px; color: var(--c-text-muted); }
.login-form { display: flex; flex-direction: column; gap: 16px; }
.login-input { padding: 10px 14px; font-size: 14px; }
.login-btn { padding: 10px; font-size: 14px; margin-top: 8px; }
.login-footer { margin-top: 32px; text-align: center; }
.login-footer p { margin-bottom: 4px; }

/* ----- API Key Result ----- */
.key-result { display: flex; flex-direction: column; gap: 16px; }
.key-result-row { display: flex; flex-direction: column; gap: 6px; }
.copy-row { display: flex; gap: 8px; align-items: center; }
.key-value {
  flex: 1;
  background: #f1f3f4;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  word-break: break-all;
}
.key-secret { background: var(--c-warning-light); border: 1px solid var(--c-warning); }
.key-meta { margin-top: 8px; }

/* ----- Comment Items ----- */
.comment-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--c-border-light);
}
.comment-item:last-child { border-bottom: none; }
.comment-meta { display: flex; gap: 12px; margin-bottom: 4px; }
.comment-author { font-weight: 600; font-size: 13px; }
.comment-time { font-size: 12px; color: var(--c-text-muted); }
.comment-body { font-size: 13px; }

/* ----- Timeline ----- */
.timeline { position: relative; padding-left: 24px; }
.timeline::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--c-border);
}
.timeline-item { position: relative; margin-bottom: 16px; }
.timeline-dot {
  position: absolute;
  left: -22px;
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--c-primary);
  border: 2px solid #fff;
}
.timeline-content { padding-left: 4px; }
.timeline-time { font-size: 12px; color: var(--c-text-muted); }
.timeline-event { font-size: 13px; margin: 2px 0; }
.timeline-actor { font-size: 11px; }

/* ----- Pricing Cards ----- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.pricing-card {
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  background: #fff;
  transition: all .15s;
}
.pricing-card:hover { box-shadow: var(--shadow); }
.pricing-current { border-color: var(--c-primary); border-width: 2px; }
.pricing-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}
.pricing-header h3 { font-size: 16px; font-weight: 600; }
.pricing-price { margin-bottom: 16px; }
.price-amount { font-size: 24px; font-weight: 700; }
.price-period { font-size: 14px; color: var(--c-text-muted); }
.pricing-features { list-style: none; margin-bottom: 20px; flex: 1; }
.pricing-features li {
  padding: 4px 0;
  font-size: 13px;
  color: var(--c-text-muted);
}
.pricing-features li::before { content: '\2713'; color: var(--c-success); margin-right: 8px; }
.pricing-actions { margin-top: auto; }

/* ----- Upload Form ----- */
.upload-form { max-width: 500px; }
.info-list { list-style: disc; padding-left: 20px; font-size: 13px; line-height: 1.8; }

/* ----- Entity Preview ----- */
.entity-preview { padding: 12px; background: var(--c-bg); border-radius: var(--radius-sm); }

/* ----- Current Plan ----- */
.current-plan { display: flex; gap: 24px; }
.current-plan-info, .current-plan-sub { flex: 1; }

/* ----- Responsive ----- */
@media (max-width: 900px) {
  .detail-grid { grid-template-columns: 1fr; }
  .current-plan { flex-direction: column; }
  .hbar-label { width: 120px; }
  .hbar-meta { width: 80px; }
}
@media (max-width: 768px) {
  .nav-container { padding: 0 12px; gap: 8px; }
  .nav-links { display: none; }
  .nav-title { display: none; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }
  .content-container { padding: 16px; }
  .login-card { padding: 24px; }
  .filter-grid { grid-template-columns: 1fr 1fr; }
  .search-row { flex-direction: column; align-items: stretch; }
}
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .filter-grid { grid-template-columns: 1fr; }
  .page-header h1 { font-size: 18px; }
  .risk-banner { flex-direction: column; text-align: center; }
  .risk-meta { align-items: center; }
}
