:root {
  /* Tomeco Design System Tokens */
  --primary-navy: #1f3864;
  --primary-navy-dark: #142544;
  --primary-navy-soft: #e8eef8;
  --primary-accent: #2e5496;
  --primary-accent-hover: #25447a;

  --bg-surface: #f4f5f7;
  --panel-bg: #ffffff;
  --border-line: #dfe3e8;
  --border-line-subtle: #edf1f5;

  --text-main: #1e293b;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-light: #94a3b8;

  --status-valid: #1a7f4b;
  --status-valid-bg: #e6f4ea;
  --status-warning: #9a6400;
  --status-warning-bg: #fef7e0;
  --status-danger: #a13333;
  --status-danger-bg: #fce8e6;
  --status-info: #1f5f9e;
  --status-info-bg: #e8f0fe;

  --sidebar-bg: #0f172a;
  --sidebar-border: #1e293b;
  --sidebar-text: #94a3b8;
  --sidebar-hover: rgba(255, 255, 255, 0.08);
  --sidebar-active-bg: #1f3864;
  --sidebar-active-text: #ffffff;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.06);

  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-xl: 12px;
  --radius-full: 9999px;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

/* Base Styles */
*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-main);
  background-color: var(--bg-surface);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--primary-accent);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--primary-navy-dark);
}

.font-mono {
  font-family: var(--font-mono);
}

/* Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.3);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(148, 163, 184, 0.5);
}

/* Layout Architecture */
.app-wrapper {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

/* Sidebar */
.app-sidebar {
  width: 260px;
  background-color: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  z-index: 50;
  transition: width 0.2s ease, transform 0.2s ease;
}

.app-sidebar.collapsed {
  width: 72px;
}

.sidebar-header {
  height: 64px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  border-bottom: 1px solid var(--sidebar-border);
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(8px);
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  overflow: hidden;
  width: 100%;
}

.brand-logo-badge {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #1f3864 0%, #2e5496 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 800;
  font-size: 16px;
  letter-spacing: -0.5px;
  box-shadow: 0 2px 8px rgba(31, 56, 100, 0.4);
  flex-shrink: 0;
}

.brand-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  white-space: nowrap;
}

.brand-title {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.2px;
}

.brand-subtitle {
  font-size: 11px;
  font-weight: 500;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

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

.nav-group-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #475569;
  padding: 4px 12px;
  margin-bottom: 2px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  color: var(--sidebar-text);
  border-radius: var(--radius-md);
  font-weight: 500;
  font-size: 13px;
  transition: all 0.15s ease;
  position: relative;
  text-decoration: none;
}

.nav-item:hover {
  color: #ffffff;
  background-color: var(--sidebar-hover);
}

.nav-item.active {
  color: #ffffff;
  background-color: var(--sidebar-active-bg);
  box-shadow: 0 2px 6px rgba(31, 56, 100, 0.35);
}

.nav-item .icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.nav-item .badge-count {
  margin-left: auto;
  padding: 2px 6px;
  font-size: 10px;
  font-weight: 600;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

/* Main Area */
.app-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow-x: hidden;
}

/* Topbar */
.app-topbar {
  height: 64px;
  background-color: var(--panel-bg);
  border-bottom: 1px solid var(--border-line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 40;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.sidebar-toggle-btn {
  background: transparent;
  border: 1px solid var(--border-line);
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.sidebar-toggle-btn:hover {
  background: var(--bg-surface);
  color: var(--text-main);
  border-color: #cbd5e1;
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
}

.breadcrumbs a {
  color: var(--text-secondary);
}

.breadcrumbs a:hover {
  color: var(--primary-accent);
}

.breadcrumbs .separator {
  color: var(--text-light);
}

.breadcrumbs .current {
  font-weight: 600;
  color: var(--text-main);
}

/* Tenant Badge in Topbar */
.tenant-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  background-color: var(--primary-navy-soft);
  color: var(--primary-navy);
  border: 1px solid rgba(31, 56, 100, 0.15);
}

.tenant-pill .indicator {
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
  background-color: var(--status-valid);
}

/* User Menu Dropdown */
.user-menu-wrapper {
  position: relative;
}

.user-profile-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-lg);
  transition: background-color 0.15s ease;
}

.user-profile-btn:hover {
  background-color: var(--bg-surface);
}

.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, #1f3864 0%, #2e5496 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.user-meta {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.2;
}

.user-sub {
  font-size: 11px;
  color: var(--text-muted);
}

.user-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  width: 220px;
  background: var(--panel-bg);
  border: 1px solid var(--border-line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 6px;
  display: none;
  z-index: 100;
  flex-direction: column;
}

.user-dropdown.show {
  display: flex;
  animation: fadeInDown 0.15s ease-out;
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.dropdown-header {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-line-subtle);
  margin-bottom: 4px;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  font-size: 13px;
  text-decoration: none;
  background: transparent;
  border: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  transition: all 0.12s ease;
}

.dropdown-item:hover {
  background-color: var(--bg-surface);
  color: var(--text-main);
}

.dropdown-item.danger {
  color: var(--status-danger);
}

.dropdown-item.danger:hover {
  background-color: var(--status-danger-bg);
  color: var(--status-danger);
}

/* Page Content */
.app-content {
  flex: 1;
  padding: 24px;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}

.page-header-title {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.page-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
  letter-spacing: -0.3px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.page-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
}

.page-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Cards */
.card {
  background: var(--panel-bg);
  border: 1px solid var(--border-line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.card:hover {
  box-shadow: var(--shadow-md);
}

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

.card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-main);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  margin: 4px 0 0;
}

.card-body {
  padding: 20px;
}

.card-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border-line);
  background-color: #fafbfc;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Metric / KPI Cards */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.kpi-card {
  background: var(--panel-bg);
  border: 1px solid var(--border-line);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  text-decoration: none;
  color: inherit;
}

.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
}

.kpi-icon-wrapper {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.kpi-icon-navy { background-color: var(--primary-navy-soft); color: var(--primary-navy); }
.kpi-icon-green { background-color: var(--status-valid-bg); color: var(--status-valid); }
.kpi-icon-amber { background-color: var(--status-warning-bg); color: var(--status-warning); }
.kpi-icon-blue { background-color: var(--status-info-bg); color: var(--status-info); }
.kpi-icon-red { background-color: var(--status-danger-bg); color: var(--status-danger); }

.kpi-details {
  display: flex;
  flex-direction: column;
}

.kpi-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.1;
  letter-spacing: -0.5px;
}

.kpi-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Modern Tables */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border-line);
  border-radius: var(--radius-lg);
  background: var(--panel-bg);
}

.table-modern {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}

.table-modern th {
  background-color: #f8fafc;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-line);
  text-align: left;
  white-space: nowrap;
}

.table-modern td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-line-subtle);
  color: var(--text-main);
  vertical-align: middle;
  transition: background-color 0.12s ease;
}

.table-modern tr:last-child td {
  border-bottom: none;
}

.table-modern tbody tr:hover td {
  background-color: #f8fafc;
}

/* Badges & Tags */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.badge-success {
  background-color: var(--status-valid-bg);
  color: var(--status-valid);
  border: 1px solid rgba(26, 127, 75, 0.2);
}

.badge-warning {
  background-color: var(--status-warning-bg);
  color: var(--status-warning);
  border: 1px solid rgba(154, 100, 0, 0.2);
}

.badge-danger {
  background-color: var(--status-danger-bg);
  color: var(--status-danger);
  border: 1px solid rgba(161, 51, 51, 0.2);
}

.badge-info {
  background-color: var(--status-info-bg);
  color: var(--status-info);
  border: 1px solid rgba(31, 95, 158, 0.2);
}

.badge-navy {
  background-color: var(--primary-navy-soft);
  color: var(--primary-navy);
  border: 1px solid rgba(31, 56, 100, 0.2);
}

.badge-neutral {
  background-color: #f1f5f9;
  color: #64748b;
  border: 1px solid #e2e8f0;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--radius-md);
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  line-height: 1.4;
  text-decoration: none;
  user-select: none;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-primary {
  background-color: var(--primary-navy);
  color: #ffffff;
  border-color: var(--primary-navy);
}

.btn-primary:hover:not(:disabled) {
  background-color: var(--primary-accent);
  border-color: var(--primary-accent);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(31, 56, 100, 0.25);
}

.btn-secondary {
  background-color: #ffffff;
  color: var(--text-secondary);
  border-color: var(--border-line);
}

.btn-secondary:hover:not(:disabled) {
  background-color: #f8fafc;
  color: var(--text-main);
  border-color: #cbd5e1;
}

.btn-ghost {
  background-color: transparent;
  color: var(--primary-accent);
  border-color: transparent;
}

.btn-ghost:hover:not(:disabled) {
  background-color: var(--primary-navy-soft);
  color: var(--primary-navy);
}

.btn-danger {
  background-color: #ffffff;
  color: var(--status-danger);
  border-color: rgba(161, 51, 51, 0.3);
}

.btn-danger:hover:not(:disabled) {
  background-color: var(--status-danger-bg);
  border-color: var(--status-danger);
  color: var(--status-danger);
}

.btn-danger-solid {
  background-color: var(--status-danger);
  color: #ffffff;
  border-color: var(--status-danger);
}

.btn-danger-solid:hover:not(:disabled) {
  background-color: #892828;
  color: #ffffff;
}

.btn-sm {
  padding: 5px 10px;
  font-size: 12px;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 10px 20px;
  font-size: 15px;
  font-weight: 600;
}

/* Forms */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-label.required::after {
  content: " *";
  color: var(--status-danger);
}

.form-control, .form-select {
  width: 100%;
  padding: 8px 12px;
  font-size: 13px;
  font-family: inherit;
  color: var(--text-main);
  background-color: #ffffff;
  border: 1px solid var(--border-line);
  border-radius: var(--radius-md);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  outline: none;
}

.form-control:focus, .form-select:focus {
  border-color: var(--primary-accent);
  box-shadow: 0 0 0 3px rgba(46, 84, 150, 0.15);
}

.form-control::placeholder {
  color: var(--text-light);
}

.form-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: flex-end;
}

.form-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-main);
  cursor: pointer;
  user-select: none;
}

.form-check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 1px solid var(--border-line);
  cursor: pointer;
  accent-color: var(--primary-navy);
}

/* Alerts / Flash Messages */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-lg);
  font-size: 13px;
  margin-bottom: 20px;
  border: 1px solid transparent;
  animation: fadeIn 0.2s ease-in;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.alert-success {
  background-color: var(--status-valid-bg);
  border-color: rgba(26, 127, 75, 0.25);
  color: #0f5132;
}

.alert-danger {
  background-color: var(--status-danger-bg);
  border-color: rgba(161, 51, 51, 0.25);
  color: #842029;
}

.alert-warning {
  background-color: var(--status-warning-bg);
  border-color: rgba(154, 100, 0, 0.25);
  color: #664d03;
}

.alert-info {
  background-color: var(--status-info-bg);
  border-color: rgba(31, 95, 158, 0.25);
  color: #055160;
}

.alert-icon {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 1px;
}

.alert-content {
  flex: 1;
}

.alert-close {
  background: transparent;
  border: none;
  font-size: 16px;
  cursor: pointer;
  color: inherit;
  opacity: 0.6;
}

.alert-close:hover {
  opacity: 1;
}

/* Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop.show {
  display: flex;
  animation: fadeIn 0.15s ease-out;
}

.modal-dialog {
  background: var(--panel-bg);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 560px;
  overflow: hidden;
  border: 1px solid var(--border-line);
}

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

.modal-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  padding: 4px;
}

.modal-body {
  padding: 20px;
}

.modal-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border-line);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  background-color: #fafbfc;
}

/* App Launcher Cards (Index.cshtml) */
.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.app-card {
  background: var(--panel-bg);
  border: 1px solid var(--border-line);
  border-radius: var(--radius-xl);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  color: inherit;
  position: relative;
  box-shadow: var(--shadow-sm);
}

.app-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: #cbd5e1;
}

.app-card-top {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.app-logo-badge {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 800;
  font-size: 20px;
  box-shadow: 0 4px 12px rgba(31, 56, 100, 0.25);
  flex-shrink: 0;
}

.app-card-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.app-name {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
}

.app-client-id {
  font-size: 12px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.app-card-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
  min-height: 40px;
}

.app-card-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--border-line-subtle);
  font-size: 13px;
  font-weight: 600;
  color: var(--primary-accent);
}

/* Login Page Styles */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 15% 15%, #142544 0%, #0f172a 100%);
  padding: 24px;
  position: relative;
}

.auth-page::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}

.auth-card-wrapper {
  width: 100%;
  max-width: 440px;
  position: relative;
  z-index: 10;
}

.auth-card {
  background: #ffffff;
  border-radius: var(--radius-xl);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.auth-header {
  padding: 32px 32px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: linear-gradient(180deg, #fafbfc 0%, #ffffff 100%);
  border-bottom: 1px solid var(--border-line-subtle);
}

.auth-brand-badge {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, #1f3864 0%, #2e5496 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 900;
  font-size: 24px;
  box-shadow: 0 8px 16px rgba(31, 56, 100, 0.35);
  margin-bottom: 16px;
}

.auth-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
  letter-spacing: -0.3px;
}

.auth-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin: 6px 0 0;
}

.auth-body {
  padding: 28px 32px 32px;
}

.auth-footer {
  padding: 16px 32px;
  background-color: #f8fafc;
  border-top: 1px solid var(--border-line-subtle);
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
}

/* Responsive */
@media (max-width: 992px) {
  .app-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    transform: translateX(-100%);
  }

  .app-sidebar.show-mobile {
    transform: translateX(0);
  }

  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 45;
    display: none;
  }

  .sidebar-backdrop.show {
    display: block;
  }
}
