/* ============================================
   Spine License Server - Design System
   Inspired by WHATs LAB aesthetic
   ============================================ */

:root {
  --bg-root: #09090e;
  --bg-surface: #0e0e18;
  --bg-card: #13131f;
  --bg-card-hover: #181828;
  --bg-input: #0e0e1a;
  --bg-sidebar: #0b0b14;
  --bg-topbar: #0d0d18;

  --border: rgba(99, 102, 241, 0.12);
  --border-hover: rgba(99, 102, 241, 0.3);
  --border-focus: rgba(99, 102, 241, 0.6);

  --text-primary: #e2e8f0;
  --text-secondary: #94a3b8;
  --text-muted: #4b5563;
  --text-inverted: #09090e;

  --accent: #6366f1;
  --accent-hover: #4f46e5;
  --accent-glow: rgba(99, 102, 241, 0.25);
  --accent-cyan: #22d3ee;
  --accent-gradient: linear-gradient(135deg, #6366f1 0%, #22d3ee 100%);

  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  --info: #38bdf8;

  --radius: 8px;
  --radius-lg: 14px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 24px rgba(99, 102, 241, 0.15);

  --sidebar-w: 240px;
  --topbar-h: 60px;
  --transition: 0.18s ease;

  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: 14px;
}

/* ---- Reset ---- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html,
body {
  height: 100%;
}
body {
  background: var(--bg-root);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover {
  color: var(--accent-cyan);
}
button {
  cursor: pointer;
  border: none;
  transition: all var(--transition);
}
input,
select,
textarea {
  outline: none;
}
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(99, 102, 241, 0.3);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(99, 102, 241, 0.5);
}

/* ============================================
   LAYOUT
   ============================================ */
.layout {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ---- Sidebar ---- */
.sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  height: 100vh;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  transition:
    width var(--transition),
    min-width var(--transition);
  z-index: 100;
}

.sidebar-logo {
  padding: 20px 18px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-logo .logo-icon {
  width: 32px;
  height: 32px;
  background: var(--accent-gradient);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.sidebar-logo .logo-text {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text-primary);
  line-height: 1.3;
}
.sidebar-logo .logo-version {
  font-size: 10px;
  color: var(--text-muted);
}

.sidebar-user {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  flex-shrink: 0;
  color: #fff;
}

.user-info {
  flex: 1;
  min-width: 0;
}
.user-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-role-badge {
  display: inline-block;
  font-size: 10px;
  padding: 1px 7px;
  border-radius: 20px;
  font-weight: 600;
  letter-spacing: 0.03em;
  margin-top: 2px;
}
.role-user {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}
.role-admin {
  background: rgba(99, 102, 241, 0.2);
  color: #818cf8;
}
.role-super {
  background: rgba(34, 211, 238, 0.15);
  color: #22d3ee;
}

.sidebar-nav {
  flex: 1;
  padding: 12px 8px;
  overflow-y: auto;
}

.nav-section-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 8px 10px 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: var(--radius);
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  transition: all var(--transition);
  margin-bottom: 2px;
  user-select: none;
}
.nav-item:hover {
  background: rgba(99, 102, 241, 0.1);
  color: var(--text-primary);
}
.nav-item.active {
  background: rgba(99, 102, 241, 0.18);
  color: var(--accent);
}
.nav-item.active .nav-icon {
  color: var(--accent);
}
.nav-icon {
  font-size: 16px;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.sidebar-footer {
  padding: 12px 8px;
  border-top: 1px solid var(--border);
}

/* ---- Main ---- */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg-root);
}

/* ---- Topbar ---- */
.topbar {
  height: var(--topbar-h);
  min-height: var(--topbar-h);
  background: var(--bg-topbar);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  gap: 16px;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.topbar-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ---- Content ---- */
.content {
  flex: 1;
  overflow-y: auto;
  padding: 28px 28px;
}

.section {
  display: none;
}
.section.active {
  display: block;
}

.page-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 4px;
  letter-spacing: -0.02em;
}
.page-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

/* ============================================
   CARDS
   ============================================ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  transition: border-color var(--transition);
}
.card:hover {
  border-color: var(--border-hover);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}
.card-sub {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  transition: all var(--transition);
}
.stat-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-glow);
  transform: translateY(-1px);
}
.stat-card .stat-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.stat-card .stat-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
  margin-top: 6px;
}
.stat-card .stat-note {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* ============================================
   TABLES
   ============================================ */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
}

table {
  width: 100%;
  border-collapse: collapse;
}
thead tr {
  border-bottom: 1px solid var(--border);
}
thead th {
  padding: 10px 14px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: left;
  white-space: nowrap;
}
tbody tr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  transition: background var(--transition);
}
tbody tr:hover {
  background: var(--bg-card-hover);
}
tbody tr:last-child {
  border-bottom: none;
}
tbody td {
  padding: 12px 14px;
  font-size: 13px;
  color: var(--text-primary);
  vertical-align: middle;
}

/* ============================================
   BADGES
   ============================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.badge::before {
  content: "●";
  font-size: 8px;
}

.badge-active {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.2);
}
.badge-verifying {
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.2);
}
.badge-suspended {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.2);
}
.badge-inactive {
  background: rgba(107, 114, 128, 0.12);
  color: #9ca3af;
  border: 1px solid rgba(107, 114, 128, 0.2);
}
.badge-pending-approval {
  background: rgba(59, 130, 246, 0.12);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.2);
}
.badge-license-assigned {
  background: rgba(139, 92, 246, 0.12);
  color: #a78bfa;
  border: 1px solid rgba(139, 92, 246, 0.2);
}
.badge-admin {
  background: rgba(99, 102, 241, 0.15);
  color: #818cf8;
  border: 1px solid rgba(99, 102, 241, 0.25);
}
.badge-super {
  background: rgba(34, 211, 238, 0.12);
  color: #22d3ee;
  border: 1px solid rgba(34, 211, 238, 0.2);
}
.badge-cooldown {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.2);
}
.badge-free {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.2);
}
.badge-org {
  background: rgba(99, 102, 241, 0.12);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.2);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  transition: all var(--transition);
  white-space: nowrap;
  user-select: none;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 0 20px var(--accent-glow);
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  background: var(--bg-card);
  color: var(--text-primary);
  border-color: var(--border-hover);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.25);
}
.btn-danger:hover {
  background: rgba(239, 68, 68, 0.25);
}

.btn-success {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.25);
}
.btn-success:hover {
  background: rgba(16, 185, 129, 0.25);
}

.btn-sm {
  padding: 5px 11px;
  font-size: 12px;
}
.btn-icon {
  padding: 7px;
  font-size: 14px;
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none !important;
}

/* ============================================
   FORMS
   ============================================ */
.form-group {
  margin-bottom: 16px;
}
.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  letter-spacing: 0.03em;
}
.form-input,
.form-select {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 14px;
  color: var(--text-primary);
  transition:
    border-color var(--transition),
    box-shadow var(--transition);
}
.form-input::placeholder {
  color: var(--text-muted);
}
.form-input:focus,
.form-select:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.form-select option {
  background: var(--bg-card);
  color: var(--text-primary);
}
.form-hint {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 5px;
}

/* ============================================
   MODAL
   ============================================ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  visibility: hidden;
  opacity: 0;
  transition: all var(--transition);
}
.modal-backdrop.open {
  visibility: visible;
  opacity: 1;
}
.modal {
  background: var(--bg-card);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 480px;
  max-height: 85vh;
  overflow-y: auto;
  padding: 28px;
  transform: scale(0.95) translateY(10px);
  transition: all var(--transition);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.7);
}
.modal-backdrop.open .modal {
  transform: scale(1) translateY(0);
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}
.modal-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--text-primary);
}
.modal-close {
  font-size: 20px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  transition: color var(--transition);
  background: none;
  border: none;
}
.modal-close:hover {
  color: var(--text-primary);
}
.modal-footer {
  margin-top: 22px;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* ============================================
   TOAST
   ============================================ */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border-hover);
  min-width: 280px;
  max-width: 380px;
  box-shadow: var(--shadow);
  animation:
    slideIn 0.2s ease,
    fadeOut 0.3s ease 2.8s forwards;
  pointer-events: auto;
}
.toast-icon {
  font-size: 16px;
  flex-shrink: 0;
  margin-top: 1px;
}
.toast-body .toast-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}
.toast-body .toast-msg {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}
.toast-success {
  border-left: 3px solid var(--success);
}
.toast-success .toast-icon {
  color: var(--success);
}
.toast-error {
  border-left: 3px solid var(--error);
}
.toast-error .toast-icon {
  color: var(--error);
}
.toast-info {
  border-left: 3px solid var(--info);
}
.toast-info .toast-icon {
  color: var(--info);
}
.toast-warning {
  border-left: 3px solid var(--warning);
}
.toast-warning .toast-icon {
  color: var(--warning);
}

@keyframes slideIn {
  from {
    transform: translateX(40px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
    transform: translateY(6px);
    pointer-events: none;
  }
}

/* ============================================
   SEARCH / FILTER BAR
   ============================================ */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.search-input {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 14px;
  font-size: 13px;
  color: var(--text-primary);
  width: 220px;
  transition: all var(--transition);
}
.search-input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 2px var(--accent-glow);
  outline: none;
}
.search-input::placeholder {
  color: var(--text-muted);
}

/* ============================================
   EMPTY STATE
   ============================================ */
.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
}
.empty-state .empty-icon {
  font-size: 40px;
  margin-bottom: 12px;
  opacity: 0.5;
}
.empty-state .empty-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-secondary);
}
.empty-state .empty-sub {
  font-size: 13px;
  margin-top: 6px;
}

/* ============================================
   LOADING
   ============================================ */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  gap: 10px;
  color: var(--text-secondary);
  font-size: 13px;
}
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ============================================
   GRID UTILITIES
   ============================================ */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.flex-center {
  display: flex;
  align-items: center;
}
.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.gap-8 {
  gap: 8px;
}
.gap-12 {
  gap: 12px;
}
.gap-16 {
  gap: 16px;
}
.mt-4 {
  margin-top: 4px;
}
.mt-8 {
  margin-top: 8px;
}
.mt-16 {
  margin-top: 16px;
}
.mt-24 {
  margin-top: 24px;
}
.mb-16 {
  margin-bottom: 16px;
}
.mb-24 {
  margin-bottom: 24px;
}

/* ============================================
   LOGIN PAGE
   ============================================ */
.login-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  height: 100vh;
  overflow: hidden;
}

.login-left {
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 40px;
  position: relative;
  overflow: hidden;
}

.login-left::before {
  content: "";
  position: absolute;
  top: -120px;
  left: -120px;
  width: 400px;
  height: 400px;
  background: radial-gradient(
    circle,
    rgba(99, 102, 241, 0.15) 0%,
    transparent 70%
  );
  pointer-events: none;
}
.login-left::after {
  content: "";
  position: absolute;
  bottom: -120px;
  right: -120px;
  width: 350px;
  height: 350px;
  background: radial-gradient(
    circle,
    rgba(34, 211, 238, 0.08) 0%,
    transparent 70%
  );
  pointer-events: none;
}

.login-brand {
  position: relative;
  z-index: 1;
}
.login-brand-logo {
  width: 48px;
  height: 48px;
  background: var(--accent-gradient);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 16px;
}
.login-brand-name {
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.03em;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.login-brand-tagline {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 6px;
  max-width: 280px;
  line-height: 1.7;
}

.login-features {
  position: relative;
  z-index: 1;
}
.login-feature {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid var(--border);
}
.login-feature:last-child {
  border-bottom: 1px solid var(--border);
}
.login-feature-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.login-feature-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}
.login-feature-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.login-footer-note {
  font-size: 11px;
  color: var(--text-muted);
  position: relative;
  z-index: 1;
}

.login-right {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  background: var(--bg-root);
}

.login-form-wrap {
  width: 100%;
  max-width: 420px;
}

.login-tabs {
  display: flex;
  gap: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 4px;
  margin-bottom: 24px;
}
.login-tab {
  flex: 1;
  padding: 9px;
  border-radius: calc(var(--radius-lg) - 4px);
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
  background: none;
}
.login-tab.active {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 12px rgba(99, 102, 241, 0.4);
}

.login-welcome {
  margin-bottom: 26px;
}
.login-welcome h1 {
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}
.login-welcome p {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 6px;
}

.login-submit {
  width: 100%;
  padding: 12px;
  font-size: 14px;
  font-weight: 700;
  background: var(--accent-gradient);
  color: #fff;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  margin-top: 6px;
  position: relative;
  overflow: hidden;
}
.login-submit:hover {
  opacity: 0.9;
  box-shadow: 0 6px 24px rgba(99, 102, 241, 0.4);
  transform: translateY(-1px);
}
.login-submit:active {
  transform: translateY(0);
}
.login-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.login-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 13px;
  color: #ef4444;
  margin-bottom: 16px;
  display: none;
}
.login-error.show {
  display: block;
}

/* ============================================
   PROFILE SECTION
   ============================================ */
.profile-card {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 24px;
}

.profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
}

.profile-info .profile-name {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
}
.profile-info .profile-email {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 4px;
}
.profile-info .profile-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}
.info-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.info-item .info-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 700;
}
.info-item .info-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 4px;
}

/* ============================================
   LICENSE CARDS (user view)
   ============================================ */
.license-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.license-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.license-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
}
.license-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent-gradient);
}
.license-card-code {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 4px;
}
.license-card-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 14px;
}
.license-seats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.license-seat-bar {
  flex: 1;
  height: 5px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
  margin: 0 10px;
}
.license-seat-fill {
  height: 100%;
  background: var(--accent-gradient);
  border-radius: 3px;
  transition: width 0.4s ease;
}
.license-cooltime {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.cooltime-icon {
  font-size: 14px;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
  .login-layout {
    grid-template-columns: 1fr;
  }
  .login-left {
    display: none;
  }
  :root {
    --sidebar-w: 220px;
  }
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .layout {
    flex-direction: column;
  }
  .sidebar {
    display: none;
  }
  .content {
    padding: 16px;
  }
  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }
}
