:root {
  --bg: #F3F7FC;
  --panel: #FFFFFF;
  --line: #E2E8F0;
  --text: #1E293B;
  --muted: #64748B;
  --primary: #2563EB;
  --primary-hover: #1D4ED8;
  --green: #10B981;
  --red: #EF4444;
  --navy: #0F172A;
  --soft: #EFF6FF;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
  --shadow-modal: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
  --radius: 8px;
  --radius-lg: 12px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--bg);
  background-image: 
    radial-gradient(circle at 100% 0%, rgba(37, 99, 235, 0.05) 0%, transparent 25%),
    radial-gradient(circle at 0% 100%, rgba(37, 99, 235, 0.03) 0%, transparent 25%);
  background-attachment: fixed;
  color: var(--text);
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* Sidebar */
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 260px;
  padding: 24px 20px;
  background-color: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-right: 1px solid rgba(255, 255, 255, 0.5);
  display: flex;
  flex-direction: column;
  gap: 32px;
  box-shadow: 1px 0 15px rgba(0, 0, 0, 0.03);
  z-index: 10;
}

.brand {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 68px;
}

.brand img {
  width: 58px;
  height: 58px;
  object-fit: contain;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 10px 28px rgba(37, 99, 235, 0.13);
}

.brand strong {
  display: block;
  font-size: 22px;
  color: var(--navy);
  font-weight: 800;
  line-height: 1.15;
  text-transform: uppercase;
}

.brand span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.brand-mark {
  width: 58px;
  height: 58px;
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  background-color: var(--primary);
  background-image: linear-gradient(135deg, var(--primary), #3B82F6);
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.2);
}

.brand-mark.large {
  width: 56px;
  height: 56px;
  font-size: 20px;
}

nav {
  display: grid;
  gap: 8px;
}

nav a, .logout button {
  display: block;
  width: 100%;
  border: 0;
  border-radius: var(--radius);
  padding: 12px 16px;
  text-align: left;
  color: var(--muted);
  background: transparent;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

nav a:hover, nav a.active {
  color: var(--primary);
  background-color: var(--soft);
  box-shadow: inset 3px 0 0 var(--primary);
}

.logout {
  margin-top: auto;
}

.logout button {
  border: 1px solid var(--line);
  background-color: var(--panel);
  color: var(--text);
}

.logout button:hover {
  background-color: #F8FAFC;
}

/* Main Area */
.main {
  margin-left: 260px;
  padding: 32px 40px;
  max-width: 1400px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
}

.topbar h1 {
  margin: 6px 0 0;
  font-size: 28px;
  color: var(--navy);
  font-weight: 800;
}

.eyebrow {
  margin: 0;
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-pill, .tag {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 14px;
  color: var(--muted);
  background-color: var(--panel);
  font-size: 12px;
  font-weight: 500;
  box-shadow: var(--shadow-sm);
}

/* Dashboard Metrics */
.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.metric, .panel, .login-panel {
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: var(--radius-lg);
  background-color: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 24px -6px rgba(37, 99, 235, 0.06), 0 0 1px rgba(0,0,0,0.1);
}

.metric {
  padding: 24px;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

.metric::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.metric:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px -8px rgba(37, 99, 235, 0.12), 0 0 1px rgba(0,0,0,0.1);
}

.metric:hover::before {
  opacity: 1;
}

.metric span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}

.metric strong {
  display: block;
  margin-top: 12px;
  font-size: 36px;
  color: var(--navy);
  font-weight: 800;
}

.metric p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
}

/* Panels */
.panel {
  padding: 24px;
  margin-bottom: 24px;
}

.management-panel {
  box-shadow: var(--shadow);
}

.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.panel-title h2 {
  margin: 0;
  font-size: 18px;
  color: var(--navy);
  font-weight: 700;
}

.panel-title span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.list-title {
  align-items: flex-start;
}

.title-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* Workspace Hero */
.workspace-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  margin-bottom: 24px;
  padding: 28px 32px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.6) 100%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 24px -6px rgba(37, 99, 235, 0.06), 0 0 1px rgba(0,0,0,0.1);
}

.workspace-hero h2 {
  margin: 8px 0;
  font-size: 24px;
  color: var(--navy);
  font-weight: 800;
}

.workspace-hero span {
  color: var(--muted);
  font-size: 14px;
}

.hero-stats {
  display: flex;
  gap: 16px;
}

.hero-stats div {
  min-width: 120px;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background-color: var(--bg);
}

.hero-stats strong {
  display: block;
  font-size: 28px;
  color: var(--primary);
  font-weight: 800;
}

/* Brand Settings */
.brand-home-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
  padding: 24px 28px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.6) 100%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 24px -6px rgba(37, 99, 235, 0.06), 0 0 1px rgba(0,0,0,0.1);
}

.brand-home-identity {
  display: flex;
  align-items: center;
  gap: 20px;
}

.brand-home-identity img,
.brand-preview-card img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #fff;
}

.brand-home-identity h2 {
  margin: 0 0 6px;
  color: var(--navy);
  font-size: 20px;
  font-weight: 700;
}

.brand-home-identity span {
  color: var(--muted);
  font-size: 13px;
}

.brand-settings-panel {
  /* clean white panel */
}

.brand-settings-form {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

.brand-preview-card {
  min-height: 260px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 16px;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background-color: var(--bg);
}

.brand-preview-card strong {
  color: var(--navy);
  font-size: 18px;
  text-align: center;
  font-weight: 700;
}

.brand-preview-card span {
  color: var(--muted);
  font-size: 13px;
}

.brand-fields {
  display: grid;
  gap: 20px;
}

.brand-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 8px;
}

/* Tables */
.table-section {
  margin-top: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background-color: var(--panel);
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  background-color: #F8FAFC;
}

.section-heading h3 {
  margin: 0;
  font-size: 15px;
  color: var(--navy);
  font-weight: 700;
}

.section-heading span {
  color: var(--muted);
  font-size: 13px;
}

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

th, td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 14px;
}

th {
  color: var(--muted);
  background-color: #F8FAFC;
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

tbody tr {
  transition: background-color 0.15s;
}

tbody tr:hover {
  background-color: var(--soft);
}

tbody tr:last-child td {
  border-bottom: none;
}

.empty {
  text-align: center;
  color: var(--muted);
  padding: 40px;
}

/* Forms & Inputs */
.grid-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  align-items: end;
}

label {
  display: grid;
  gap: 8px;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
}

input, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background-color: #fff;
  color: var(--text);
  padding: 10px 14px;
  outline: none;
  font-size: 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus, select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

input:disabled {
  background-color: #F1F5F9;
  color: var(--muted);
  cursor: not-allowed;
}

.upload-field {
  display: grid;
  gap: 8px;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
}

.modal-field-wide {
  grid-column: 1 / -1;
}

.upload-input {
  display: none;
}

.upload-dropzone {
  width: 100%;
  min-height: 104px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 8px;
  border: 1px dashed #9CC5FF;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.95), rgba(255, 255, 255, 0.96));
  color: var(--text);
  padding: 18px;
  box-shadow: none;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s, transform 0.2s;
}

.upload-dropzone:hover,
.upload-field:focus-within .upload-dropzone,
.upload-field.is-dragover .upload-dropzone {
  border-color: var(--primary);
  background: linear-gradient(135deg, #EAF3FF, #FFFFFF);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.upload-field.is-dragover .upload-dropzone {
  transform: translateY(-1px);
}

.upload-field.has-file .upload-dropzone {
  border-style: solid;
  border-color: #60A5FA;
}

.upload-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #DBEAFE;
  color: var(--primary);
  font-size: 22px;
  line-height: 1;
}

.upload-dropzone strong {
  color: var(--navy);
  font-size: 14px;
}

.upload-dropzone em {
  max-width: 100%;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Buttons */
button, .action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: var(--radius);
  background-color: var(--primary);
  color: #fff;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
  box-shadow: var(--shadow-sm);
}

button:hover, .action-button:hover {
  background-color: var(--primary-hover);
}

button.upload-dropzone,
button.upload-dropzone:hover {
  width: 100%;
  min-height: 104px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 8px;
  border: 1px dashed #9CC5FF;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.95), rgba(255, 255, 255, 0.96));
  color: var(--text);
  padding: 18px;
  box-shadow: none;
}

.upload-field:focus-within button.upload-dropzone,
.upload-field.is-dragover button.upload-dropzone {
  border-color: var(--primary);
  background: linear-gradient(135deg, #EAF3FF, #FFFFFF);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.action-button.secondary {
  background-color: var(--panel);
  color: var(--text);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.action-button.secondary:hover {
  background-color: #F8FAFC;
}

.table-action {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  background-color: var(--soft);
  color: var(--primary);
  box-shadow: none;
  font-weight: 500;
}

.table-action:hover {
  background-color: #DBEAFE;
  color: var(--primary-hover);
}

.ghost-button {
  background-color: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
  box-shadow: none;
}

.ghost-button:hover {
  background-color: #F8FAFC;
  color: var(--text);
}

/* Utilities */
.alert {
  margin-bottom: 20px;
  border: 1px solid #FECACA;
  background-color: #FEF2F2;
  color: #B91C1C;
  border-radius: var(--radius);
  padding: 12px 16px;
  font-size: 14px;
}

.success {
  margin-bottom: 20px;
  border: 1px solid #A7F3D0;
  background-color: #ECFDF5;
  color: #047857;
  border-radius: var(--radius);
  padding: 12px 16px;
  font-size: 14px;
}

.plain-password {
  display: inline-block;
  min-width: 80px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--navy);
  background-color: #F8FAFC;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
}

.check {
  display: inline-flex;
  grid-template-columns: none;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  font-weight: 400;
}

.check input {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
}

.state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 60px;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
}

.state.on {
  color: #059669;
  background-color: #D1FAE5;
}

.state.off {
  color: #DC2626;
  background-color: #FEE2E2;
}

/* Modals */
.admin-modal {
  width: 100%;
  max-width: 640px;
  border: none;
  border-radius: var(--radius-lg);
  padding: 0;
  color: var(--text);
  background-color: var(--panel);
  box-shadow: var(--shadow-modal);
}

.admin-modal::backdrop {
  background-color: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(4px);
}

.modal-shell {
  margin: 0;
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  padding: 0;
  background-color: #F1F5F9;
  color: var(--muted);
  box-shadow: none;
  font-size: 20px;
  line-height: 1;
  display: grid;
  place-items: center;
}

.modal-close:hover {
  background-color: #E2E8F0;
  color: var(--navy);
}

.modal-content {
  padding: 32px;
}

.modal-content h2 {
  margin: 6px 0 24px;
  color: var(--navy);
  font-size: 20px;
  font-weight: 700;
}

.modal-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.modal-check {
  align-self: end;
  min-height: 42px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

/* Login Page */
.login-body {
  min-height: 100vh;
  padding: 0;
  margin: 0;
  overflow: hidden;
  position: relative;
  background-color: var(--bg);
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.login-body::before {
  content: "";
  position: absolute;
  inset: 0 540px 0 0;
  background-color: var(--bg);
  background-image: 
    radial-gradient(circle at 20% 30%, rgba(37, 99, 235, 0.12) 0%, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(16, 185, 129, 0.08) 0%, transparent 40%),
    linear-gradient(rgba(37, 99, 235, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37, 99, 235, 0.05) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 40px 40px, 40px 40px;
  background-position: 0 0, 0 0, -1px -1px, -1px -1px;
  border-right: 1px solid var(--line);
}

.login-body::after {
  content: "";
  position: absolute;
  inset: 0 540px 0 0;
  background: 
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.6) 0%, transparent 60%);
  pointer-events: none;
}

.login-brandbar {
  position: absolute;
  top: 44px;
  left: 54px;
  display: flex;
  align-items: center;
  gap: 20px;
  z-index: 2;
}

.login-showcase {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  right: 540px;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px;
  overflow: hidden;
}

.showcase-content {
  position: relative;
  z-index: 2;
  max-width: 520px;
  width: 100%;
}

.showcase-title {
  font-size: 40px;
  font-weight: 800;
  margin: 0 0 16px 0;
  line-height: 1.2;
  color: var(--navy);
  background: linear-gradient(135deg, var(--navy), var(--primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.showcase-subtitle {
  font-size: 16px;
  color: var(--muted);
  line-height: 1.6;
  margin: 0 0 48px 0;
}

.showcase-features {
  display: grid;
  gap: 20px;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 20px;
  box-shadow: 0 10px 40px -12px rgba(37, 99, 235, 0.08);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.feature-item:hover {
  transform: translateX(12px) scale(1.02);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 20px 50px -12px rgba(37, 99, 235, 0.15);
}

.feature-icon-wrapper {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, #EBF2FF 0%, #FFFFFF 100%);
  color: var(--primary);
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.1);
  flex-shrink: 0;
  transition: all 0.3s;
}

.feature-item:hover .feature-icon-wrapper {
  background: var(--primary);
  color: #fff;
  transform: rotate(-8deg) scale(1.1);
}

.feature-icon-svg {
  width: 26px;
  height: 26px;
}

.feature-text {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.feature-text strong {
  font-size: 17px;
  color: var(--navy);
  font-weight: 800;
}

.feature-text span {
  font-size: 13px;
  color: var(--muted);
}

.showcase-decorations {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.decor-glass-panel {
  position: absolute;
  top: 25%;
  right: 15%;
  width: 280px;
  padding: 32px;
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 60px -12px rgba(37, 99, 235, 0.15);
  transform: rotate(8deg);
}

.glass-line {
  height: 10px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 5px;
  margin-bottom: 16px;
}
.glass-line.short { width: 65%; }
.glass-line.half { width: 45%; margin-bottom: 0; }

.login-logo-mark {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  color: #fff;
  border-radius: var(--radius);
  background-color: var(--primary);
  background-image: linear-gradient(135deg, var(--primary), #3B82F6);
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.2);
  font-weight: 800;
  font-size: 22px;
}

.login-brandbar img {
  width: 64px;
  height: 64px;
  display: block;
  object-fit: contain;
  border-radius: var(--radius);
  border: 1px solid rgba(219, 234, 254, 0.9);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 22px rgba(37, 99, 235, 0.14);
}

.login-brandbar strong {
  color: var(--navy);
  font-size: 30px;
  font-weight: 800;
  line-height: 1.08;
  text-transform: uppercase;
}

.login-stage {
  width: 540px;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px;
  background-color: var(--panel);
  z-index: 1;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.05);
}

.login-card {
  width: 100%;
  max-width: 420px;
  background-color: transparent;
  border: none;
  box-shadow: none;
}

.login-card-inner {
  padding: 0;
}

.login-card-head {
  text-align: center;
  margin-bottom: 40px;
}

.login-card-head h2 {
  margin: 0 0 12px;
  color: var(--navy);
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.login-tabs {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-top: 24px;
  border-bottom: 1px solid var(--line);
}

.login-tabs button {
  position: relative;
  padding: 0 0 12px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  font-size: 18px;
  font-weight: 700;
}

.login-tabs button.active {
  color: var(--primary);
}

.login-tabs button.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background-color: var(--primary);
}

.login-form {
  display: grid;
  gap: 20px;
}

.login-form input {
  min-height: 52px;
  font-size: 15px;
  padding: 12px 16px;
}

.login-form button {
  min-height: 52px;
  margin-top: 12px;
  font-size: 16px;
}

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

.login-links a {
  color: var(--primary);
  text-decoration: none;
}

.login-links a:hover {
  text-decoration: underline;
}

.login-card-foot {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  text-align: center;
}

.login-card-foot .hint {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.login-footer {
  position: absolute;
  bottom: 24px;
  left: 0;
  right: 0;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
}

@media (max-width: 900px) {
  .sidebar { position: static; width: auto; flex-direction: row; padding: 16px; align-items: center; border-right: none; border-bottom: 1px solid var(--line); }
  nav { display: flex; flex-direction: row; flex-wrap: wrap; }
  .logout { margin-top: 0; margin-left: auto; }
  .main { margin-left: 0; padding: 24px; }
  .metric-grid, .grid-form, .modal-grid, .hero-stats { grid-template-columns: 1fr; }
  .topbar { flex-direction: column; align-items: flex-start; gap: 16px; }
  .workspace-hero, .panel-title, .brand-home-card { flex-direction: column; align-items: flex-start; gap: 16px; }
  .brand-settings-form { grid-template-columns: 1fr; }
  .admin-modal { width: calc(100vw - 32px); }
  .login-brandbar { top: 24px; left: 24px; }
}
