@import url('https://rsms.me/inter/inter.css');

/* ── Design Tokens ────────────────────────────────────────────────────────── */
:root {
  --indigo-50:  #EEF2FF;
  --indigo-100: #E0E7FF;
  --indigo-500: #6366F1;
  --indigo-600: #4F46E5;
  --indigo-700: #4338CA;
  --indigo-900: #312E81;

  --red-50:     #FEF2F2;
  --red-500:    #EF4444;
  --red-600:    #DC2626;
  --red-700:    #B91C1C;

  --green-50:   #F0FDF4;
  --green-500:  #22C55E;
  --green-600:  #16A34A;

  --amber-50:   #FFFBEB;
  --amber-500:  #F59E0B;
  --amber-600:  #D97706;

  --blue-500:   #3B82F6;
  --blue-600:   #2563EB;

  --zinc-50:    #FAFAFA;
  --zinc-100:   #F4F4F5;
  --zinc-200:   #E4E4E7;
  --zinc-300:   #D4D4D8;
  --zinc-400:   #A1A1AA;
  --zinc-500:   #71717A;
  --zinc-700:   #3F3F46;
  --zinc-900:   #18181B;

  --shadow-xs:  0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-sm:  0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md:  0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg:  0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);

  --radius-sm:  6px;
  --radius-md:  8px;
  --radius-lg:  12px;
  --radius-xl:  16px;
  --radius-2xl: 20px;
  --radius-full: 9999px;

  --topnav-height: 60px;
  --sidebar-width: 240px;
  --transition: 150ms ease-out;
}

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

html { font-size: 15px; -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-feature-settings: 'cv02','cv03','cv04','cv11';
  background: var(--zinc-50);
  color: var(--zinc-900);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; }
ul, ol { list-style: none; }

/* ── Typography ───────────────────────────────────────────────────────────── */
.text-xs  { font-size: 12px; line-height: 1.5; }
.text-sm  { font-size: 14px; line-height: 1.5; }
.text-base{ font-size: 15px; line-height: 1.5; }
.text-lg  { font-size: 17px; line-height: 1.4; }
.text-xl  { font-size: 20px; line-height: 1.3; }
.text-2xl { font-size: 24px; line-height: 1.25; }
.text-3xl { font-size: 30px; line-height: 1.2; }
.text-4xl { font-size: 36px; line-height: 1.15; }

.font-normal  { font-weight: 400; }
.font-medium  { font-weight: 500; }
.font-semibold{ font-weight: 600; }
.font-bold    { font-weight: 700; }

.text-zinc-400 { color: var(--zinc-400); }
.text-zinc-500 { color: var(--zinc-500); }
.text-zinc-700 { color: var(--zinc-700); }
.text-zinc-900 { color: var(--zinc-900); }
.text-indigo-600 { color: var(--indigo-600); }
.text-red-600  { color: var(--red-600); }
.text-green-600{ color: var(--green-600); }

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  transition: background var(--transition), color var(--transition), box-shadow var(--transition), opacity var(--transition);
  white-space: nowrap;
  cursor: pointer;
  border: 1px solid transparent;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; }

.btn-primary   { background: var(--indigo-600); color: #fff; border-color: var(--indigo-600); }
.btn-primary:hover { background: var(--indigo-700); border-color: var(--indigo-700); }

.btn-danger    { background: var(--red-500); color: #fff; border-color: var(--red-500); }
.btn-danger:hover { background: var(--red-600); border-color: var(--red-600); }

.btn-success   { background: var(--green-500); color: #fff; border-color: var(--green-500); }
.btn-success:hover { background: var(--green-600); border-color: var(--green-600); }

.btn-outline   { background: #fff; color: var(--zinc-700); border-color: var(--zinc-200); }
.btn-outline:hover { background: var(--zinc-50); }

.btn-ghost     { background: transparent; color: var(--zinc-700); }
.btn-ghost:hover { background: var(--zinc-100); }

.btn-full { width: 100%; justify-content: center; }
.btn-lg   { height: 48px; padding: 0 20px; font-size: 15px; }
.btn-sm   { height: 32px; padding: 0 12px; font-size: 13px; }

.btn-spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

/* ── Inputs ──────────────────────────────────────────────────────────────── */
.input {
  display: block;
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--zinc-200);
  border-radius: var(--radius-md);
  font-size: 14px;
  color: var(--zinc-900);
  background: #fff;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.input::placeholder { color: var(--zinc-400); }
.input:focus {
  border-color: var(--indigo-500);
  box-shadow: 0 0 0 3px rgb(99 102 241 / 0.15);
}
.input.error {
  border-color: var(--red-500);
  box-shadow: 0 0 0 3px rgb(239 68 68 / 0.15);
}

.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-label { font-size: 13px; font-weight: 500; color: var(--zinc-700); }
.form-error { font-size: 12px; color: var(--red-600); }

textarea.input { height: auto; padding: 10px 12px; resize: vertical; min-height: 80px; }

select.input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23A1A1AA' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 36px;
  cursor: pointer;
}

/* ── Cards ───────────────────────────────────────────────────────────────── */
.card {
  background: #fff;
  border: 1px solid var(--zinc-200);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}
.card-sm { padding: 16px; }
.card-flush { padding: 0; }

/* ── Badges / Status Pills ───────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
}
.badge::before {
  content: '';
  display: block;
  width: 6px; height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.badge-active  { background: var(--green-50);  color: var(--green-600); }
.badge-active::before  { background: var(--green-600); }

.badge-locked  { background: var(--red-50);    color: var(--red-600); }
.badge-locked::before  { background: var(--red-600); }

.badge-pending { background: var(--amber-50);  color: var(--amber-600); }
.badge-pending::before { background: var(--amber-600); }

.badge-offline { background: var(--zinc-100);  color: var(--zinc-500); }
.badge-offline::before { background: var(--zinc-400); }

.badge-inactive{ background: var(--zinc-100);  color: var(--zinc-700); }
.badge-inactive::before{ background: var(--zinc-500); }

/* ── Tables ──────────────────────────────────────────────────────────────── */
.table-wrapper { overflow-x: auto; }

.table {
  width: 100%;
  border-collapse: collapse;
}
.table th {
  background: var(--zinc-50);
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: var(--zinc-500);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 12px 16px;
  border-bottom: 1px solid var(--zinc-200);
}
.table td {
  padding: 16px;
  border-bottom: 1px solid var(--zinc-100);
  font-size: 14px;
  vertical-align: middle;
}
.table tbody tr { min-height: 60px; transition: background var(--transition); cursor: pointer; }
.table tbody tr:hover { background: var(--zinc-50); }
.table tbody tr:last-child td { border-bottom: none; }

/* ── Navigation ──────────────────────────────────────────────────────────── */
.topnav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--topnav-height);
  background: #fff;
  border-bottom: 1px solid var(--zinc-200);
  display: flex;
  align-items: center;
  padding: 0 24px;
  z-index: 100;
  justify-content: space-between;
}

.topnav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topnav-logo {
  width: 32px; height: 32px;
  background: var(--indigo-600);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.topnav-wordmark {
  font-size: 16px;
  font-weight: 600;
  color: var(--zinc-900);
  letter-spacing: -0.02em;
}

.topnav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.live-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--green-600);
}
.live-dot {
  width: 8px; height: 8px;
  background: var(--green-500);
  border-radius: 50%;
  animation: pulse-green 2s ease-in-out infinite;
}

.user-menu-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 6px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--transition);
}
.user-menu-btn:hover { background: var(--zinc-100); }

.avatar {
  width: 32px; height: 32px;
  background: var(--indigo-100);
  color: var(--indigo-700);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  flex-shrink: 0;
}
.avatar-lg {
  width: 48px; height: 48px;
  font-size: 18px;
}

.dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  background: #fff;
  border: 1px solid var(--zinc-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  min-width: 180px;
  overflow: hidden;
  z-index: 200;
}
.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  font-size: 14px;
  color: var(--zinc-700);
  cursor: pointer;
  transition: background var(--transition);
}
.dropdown-item:hover { background: var(--zinc-50); }
.dropdown-item.danger { color: var(--red-600); }
.dropdown-divider { height: 1px; background: var(--zinc-100); margin: 4px 0; }

/* ── Sidebar ─────────────────────────────────────────────────────────────── */
.sidebar {
  position: fixed;
  top: var(--topnav-height);
  left: 0;
  bottom: 0;
  width: var(--sidebar-width);
  background: var(--zinc-50);
  border-right: 1px solid var(--zinc-200);
  padding: 16px 12px;
  overflow-y: auto;
  z-index: 90;
}

.sidebar-section-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--zinc-400);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0 8px;
  margin-bottom: 4px;
  margin-top: 16px;
}
.sidebar-section-label:first-child { margin-top: 0; }

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  color: var(--zinc-700);
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  position: relative;
  margin-bottom: 2px;
}
.sidebar-item:hover { background: var(--zinc-100); }
.sidebar-item.active {
  background: var(--indigo-50);
  color: var(--indigo-700);
}
.sidebar-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 4px; bottom: 4px;
  width: 3px;
  background: var(--indigo-600);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.sidebar-item i, .sidebar-item svg { width: 18px; height: 18px; }

/* ── Main Content ────────────────────────────────────────────────────────── */
.main {
  margin-left: var(--sidebar-width);
  margin-top: var(--topnav-height);
  padding: 32px;
  max-width: calc(1280px + var(--sidebar-width));
  min-height: calc(100vh - var(--topnav-height));
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
}
.page-title {
  font-size: 24px;
  font-weight: 600;
  color: var(--zinc-900);
  letter-spacing: -0.02em;
}
.page-subtitle {
  font-size: 14px;
  color: var(--zinc-500);
  margin-top: 2px;
}

/* ── Stat Cards ──────────────────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
@media (max-width: 1200px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 700px) { .stats-grid { grid-template-columns: 1fr; } }

.stat-card {
  background: #fff;
  border: 1px solid var(--zinc-200);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  box-shadow: var(--shadow-xs);
}
.stat-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--zinc-500);
  margin-bottom: 8px;
}
.stat-value {
  font-size: 30px;
  font-weight: 700;
  color: var(--zinc-900);
  letter-spacing: -0.03em;
  line-height: 1;
}
.stat-trend {
  font-size: 12px;
  margin-top: 6px;
}
.stat-trend.up   { color: var(--green-600); }
.stat-trend.down { color: var(--red-600); }
.stat-trend.neutral { color: var(--zinc-400); }

/* ── Filter Chips ────────────────────────────────────────────────────────── */
.filter-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 14px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid var(--zinc-200);
  background: #fff;
  color: var(--zinc-700);
  transition: all var(--transition);
}
.chip:hover { background: var(--zinc-50); }
.chip.active {
  background: var(--indigo-600);
  border-color: var(--indigo-600);
  color: #fff;
}

/* ── Search Bar ──────────────────────────────────────────────────────────── */
.search-bar {
  position: relative;
  margin-bottom: 16px;
}
.search-bar .input {
  padding-left: 40px;
  background: #fff;
}
.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--zinc-400);
  pointer-events: none;
}

/* ── Command Grid ────────────────────────────────────────────────────────── */
.command-section { margin-bottom: 24px; }
.command-section-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--zinc-500);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--zinc-100);
}
.command-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
}
.command-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 12px;
  height: 90px;
  background: #fff;
  border: 1px solid var(--zinc-200);
  border-radius: var(--radius-lg);
  cursor: pointer;
  text-align: center;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}
.command-card:hover {
  border-color: var(--indigo-500);
  box-shadow: 0 0 0 3px rgb(99 102 241 / 0.1);
  background: var(--indigo-50);
}
.command-card-icon { color: var(--indigo-600); }
.command-card-label { font-size: 12px; font-weight: 600; color: var(--zinc-700); }
.command-card-desc  { font-size: 11px; color: var(--zinc-400); line-height: 1.3; display: none; }

/* ── Drawers ─────────────────────────────────────────────────────────────── */
.drawer-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(2px);
  z-index: 300;
  opacity: 0;
  pointer-events: none;
  transition: opacity 250ms ease-out;
}
.drawer-backdrop.open { opacity: 1; pointer-events: all; }

.drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: 480px;
  background: #fff;
  z-index: 301;
  transform: translateX(100%);
  transition: transform 250ms ease-out;
  display: flex;
  flex-direction: column;
  box-shadow: -20px 0 60px rgb(0 0 0 / 0.15);
  overflow: hidden;
}
.drawer.open { transform: translateX(0); width: fit-content;}

#drawerContent {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.drawer-header {
  padding: 20px 24px 0;
  border-bottom: 1px solid var(--zinc-100);
  flex-shrink: 0;
}
.drawer-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.drawer-close {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-md);
  color: var(--zinc-400);
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  flex-shrink: 0;
}
.drawer-close:hover { background: var(--zinc-100); color: var(--zinc-700); }

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
}

/* ── Tabs ────────────────────────────────────────────────────────────────── */
.tabs {
  display: flex;
  border-bottom: 1px solid var(--zinc-200);
  gap: 0;
  margin-bottom: 20px;
}
.tab {
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--zinc-500);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color var(--transition), border-color var(--transition);
  white-space: nowrap;
}
.tab:hover { color: var(--zinc-700); }
.tab.active { color: var(--indigo-600); border-bottom-color: var(--indigo-600); }

/* ── Modals ──────────────────────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  z-index: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease-out;
}
.modal-backdrop.open { opacity: 1; pointer-events: all; }

.modal {
  background: #fff;
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 560px;
  box-shadow: var(--shadow-lg);
  transform: scale(0.95);
  transition: transform 200ms ease-out;
  overflow: hidden;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}
.modal-backdrop.open .modal { transform: scale(1); }

.modal-header {
  padding: 20px 24px 0;
  flex-shrink: 0;
}
.modal-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--zinc-900);
}
.modal-subtitle {
  font-size: 14px;
  color: var(--zinc-500);
  margin-top: 4px;
}
.modal-body {
  padding: 20px 24px;
  overflow-y: auto;
  flex: 1;
}
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--zinc-100);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-shrink: 0;
}

/* ── Toasts ──────────────────────────────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 500;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 360px;
}

.toast {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: #fff;
  border: 1px solid var(--zinc-200);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  box-shadow: var(--shadow-lg);
  animation: toast-in 200ms ease-out forwards;
  position: relative;
  overflow: hidden;
}
.toast::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
}
.toast.success::before { background: var(--green-500); }
.toast.error::before   { background: var(--red-500); }
.toast.info::before    { background: var(--indigo-500); }
.toast.warning::before { background: var(--amber-500); }

.toast-icon { flex-shrink: 0; margin-top: 1px; }
.toast.success .toast-icon { color: var(--green-500); }
.toast.error   .toast-icon { color: var(--red-500); }
.toast.info    .toast-icon { color: var(--indigo-500); }
.toast.warning .toast-icon { color: var(--amber-500); }

.toast-content { flex: 1; min-width: 0; }
.toast-title { font-size: 14px; font-weight: 600; color: var(--zinc-900); }
.toast-message { font-size: 13px; color: var(--zinc-500); margin-top: 2px; }

.toast-close {
  flex-shrink: 0;
  color: var(--zinc-400);
  cursor: pointer;
  padding: 2px;
  transition: color var(--transition);
}
.toast-close:hover { color: var(--zinc-700); }

/* ── Skeletons ───────────────────────────────────────────────────────────── */
.skeleton {
  background: var(--zinc-100);
  border-radius: var(--radius-md);
  animation: skeleton-pulse 1.5s ease-in-out infinite;
}
.skeleton-text { height: 16px; margin-bottom: 8px; }
.skeleton-text:last-child { width: 60%; }

@keyframes skeleton-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ── Empty States ────────────────────────────────────────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 64px 24px;
  text-align: center;
  gap: 12px;
}
.empty-icon { color: var(--zinc-300); margin-bottom: 4px; }
.empty-title { font-size: 15px; font-weight: 500; color: var(--zinc-700); }
.empty-desc  { font-size: 14px; color: var(--zinc-400); max-width: 320px; }

/* ── Stepper ─────────────────────────────────────────────────────────────── */
.stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 24px;
  padding: 20px 24px 0;
}
.step {
  display: flex;
  align-items: center;
  gap: 8px;
}
.step-dot {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  background: var(--zinc-100);
  color: var(--zinc-500);
  transition: background var(--transition), color var(--transition);
}
.step-dot.active { background: var(--indigo-600); color: #fff; }
.step-dot.done   { background: var(--green-500);  color: #fff; }
.step-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--zinc-400);
  transition: color var(--transition);
}
.step-label.active { color: var(--zinc-900); }
.step-connector {
  flex: 1;
  height: 1px;
  background: var(--zinc-200);
  margin: 0 16px;
  max-width: 48px;
}

/* ── Info Grid ───────────────────────────────────────────────────────────── */
.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.info-item { }
.info-key   { font-size: 12px; font-weight: 500; color: var(--zinc-400); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 4px; }
.info-value { font-size: 14px; color: var(--zinc-900); font-weight: 500; }

/* ── QR Display ──────────────────────────────────────────────────────────── */
.qr-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 24px 0;
}
.qr-img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 8px solid white;
}
.qr-token {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 12px;
  color: var(--zinc-500);
  background: var(--zinc-100);
  padding: 8px 16px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  overflow: hidden;
}
.qr-token-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── Hidden Apps ─────────────────────────────────────────────────────────── */
.app-list { display: flex; flex-direction: column; gap: 4px; }
.app-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--transition);
}
.app-item:hover { background: var(--zinc-50); }
.app-item input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--indigo-600); }
.app-item-name { font-size: 14px; font-weight: 500; color: var(--zinc-900); }
.app-item-pkg  { font-size: 12px; color: var(--zinc-400); font-family: monospace; }
.app-item-badge { margin-left: auto; }

/* ── Device Quick Action ─────────────────────────────────────────────────── */
.device-quick-action {
  border-radius: var(--radius-lg);
  height: 56px;
  width: 100%;
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
  cursor: pointer;
  transition: all var(--transition);
  border: none;
}
.device-quick-action.lock    { background: var(--red-500);   color: #fff; }
.device-quick-action.lock:hover { background: var(--red-600); }
.device-quick-action.unlock  { background: var(--green-500); color: #fff; }
.device-quick-action.unlock:hover { background: var(--green-600); }

/* ── Wallpaper Drop Zone ─────────────────────────────────────────────────── */
.drop-zone {
  border: 2px dashed var(--zinc-200);
  border-radius: var(--radius-lg);
  height: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
  position: relative;
  overflow: hidden;
}
.drop-zone:hover, .drop-zone.dragover {
  border-color: var(--indigo-500);
  background: var(--indigo-50);
}
.drop-zone input[type="file"] {
  position: absolute; inset: 0;
  opacity: 0; cursor: pointer; width: 100%; height: 100%;
}
.drop-zone-icon { color: var(--zinc-300); }
.drop-zone-text { font-size: 14px; color: var(--zinc-500); }
.drop-zone-hint { font-size: 12px; color: var(--zinc-400); }
.drop-zone-preview {
  position: absolute; inset: 0;
  object-fit: contain;
  background: var(--zinc-50);
}

/* ── Confirmation Dialog ─────────────────────────────────────────────────── */
.confirm-dialog {
  max-width: 400px;
}

/* ── Login Page ──────────────────────────────────────────────────────────── */
.login-body {
  min-height: 100vh;
  background: var(--zinc-50);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-container {
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.login-card {
  background: #fff;
  border: 1px solid var(--zinc-200);
  border-radius: var(--radius-xl);
  padding: 40px;
  width: 100%;
  box-shadow: var(--shadow-md);
}

.login-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}

.login-header {
  text-align: center;
  margin-bottom: 28px;
}
.login-title {
  font-size: 24px;
  font-weight: 600;
  color: var(--zinc-900);
  letter-spacing: -0.02em;
}
.login-subtitle {
  font-size: 14px;
  color: var(--zinc-500);
  margin-top: 4px;
}

.login-form { display: flex; flex-direction: column; gap: 16px; }

.login-error {
  background: var(--red-50);
  border: 1px solid var(--red-500);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 13px;
  color: var(--red-700);
}

.login-footer {
  font-size: 12px;
  color: var(--zinc-400);
  text-align: center;
}

/* ── Utilities ───────────────────────────────────────────────────────────── */
.relative { position: relative; }
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.gap-4  { gap: 4px; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }
.mt-4  { margin-top: 4px; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.w-full { width: 100%; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cursor-pointer { cursor: pointer; }

/* ── Animations ──────────────────────────────────────────────────────────── */
@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes pulse-green {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.3); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
@keyframes toast-in {
  from { opacity: 0; transform: translateX(24px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes toast-out {
  from { opacity: 1; transform: translateX(0); max-height: 100px; }
  to   { opacity: 0; transform: translateX(24px); max-height: 0; padding: 0; margin: 0; }
}
.toast.removing { animation: toast-out 200ms ease-out forwards; }

/* ── Scrollbar ───────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--zinc-200); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--zinc-300); }

/* ── Responsive adjustments ──────────────────────────────────────────────── */
@media (max-width: 768px) {
  .main { margin-left: 0; padding: 16px; }
  .sidebar { display: none; }
  .drawer { width: 100%; }
}
