/* =============================================================
   LasharyAdminPortal — Next-Gen Enterprise Slate Design System
   World-Class Dark UI • Refined Micro-Textures • Zero Tacky Neon
   ============================================================= */

:root {
  /* Surface Layers */
  --bg-app: #070B14;
  --bg-sidebar: #0A0F1D;
  --bg-surface: #0E1528;
  --bg-card: rgba(15, 23, 42, 0.75);
  --bg-card-hover: rgba(22, 33, 58, 0.85);
  --bg-input: #070B16;
  --bg-modal: rgba(4, 7, 15, 0.88);
  --bg-dropdown: #0F172A;

  /* Borders & Specular Highlights */
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-card: rgba(255, 255, 255, 0.08);
  --border-card-hover: rgba(56, 189, 248, 0.3);
  --border-divider: #1E293B;
  --border-focus: #3B82F6;

  /* Typography Colors */
  --text-primary: #F8FAFC;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
  --text-dim: #475569;

  /* Refined Corporate Accents (Strictly Zero Neon) */
  --accent-blue: #2563EB;
  --accent-blue-hover: #1D4ED8;
  --accent-sky: #0284C7;
  --accent-sky-light: #38BDF8;
  --accent-emerald: #10B981;
  --accent-emerald-dim: rgba(16, 185, 129, 0.12);
  --accent-amber: #D97706;
  --accent-amber-dim: rgba(217, 119, 6, 0.12);
  --accent-rose: #E11D48;
  --accent-rose-dim: rgba(225, 29, 72, 0.12);
  --accent-purple: #7C3AED;

  /* Geometry & Shadows */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px -2px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 12px 32px -4px rgba(0, 0, 0, 0.65);
  --shadow-glow-blue: 0 0 24px -6px rgba(37, 99, 235, 0.35);

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
}

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

html, body {
  width: 100%;
  min-height: 100vh;
  font-family: var(--font-sans);
  background-color: var(--bg-app);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Background Micro-Dot Texture */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
  z-index: 0;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #25334D;
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: #3B82F6;
}

/* Tabular figures for numbers, dates, IDs */
.num, .date-cell, .mono, .hwid-code, .kpi-num {
  font-variant-numeric: tabular-nums;
  font-family: var(--font-mono);
}

/* Layout */
#app-container {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 100vh;
}

/* Sidebar Navigation */
.sidebar {
  width: 270px;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-card);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; bottom: 0; left: 0;
  z-index: 60;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(12px);
}

.sidebar-header {
  padding: 22px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border-card);
}

.sidebar-logo-wrap {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #1E293B 0%, #0F172A 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.sidebar-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 8px;
}

.brand-text h1 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.3px;
  line-height: 1.2;
}

.brand-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}

.brand-tag {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent-sky-light);
  letter-spacing: 0.5px;
}

.brand-version {
  font-size: 10px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  padding: 1px 5px;
  border-radius: 4px;
}

.sidebar-nav {
  flex: 1;
  padding: 18px 12px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  overflow-y: auto;
}

.nav-section-label {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 8px 12px 4px 12px;
  letter-spacing: 0.8px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  transition: all 0.15s ease;
  cursor: pointer;
  border: 1px solid transparent;
  user-select: none;
}

.nav-link i, .nav-link svg {
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  transition: color 0.15s ease;
  flex-shrink: 0;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  border-color: var(--border-subtle);
}

.nav-link:hover i, .nav-link:hover svg {
  color: var(--text-primary);
}

.nav-link.active {
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.15) 0%, rgba(37, 99, 235, 0.05) 100%);
  color: #FFFFFF;
  border-color: rgba(37, 99, 235, 0.35);
  font-weight: 600;
}

.nav-link.active i, .nav-link.active svg {
  color: #38BDF8;
}

.nav-badge {
  margin-left: auto;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  font-weight: 600;
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border-card);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(7, 11, 20, 0.5);
}

.admin-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
}

.admin-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1E293B 0%, #0F172A 100%);
  color: var(--accent-sky-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  border: 1px solid rgba(56, 189, 248, 0.3);
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.admin-details {
  overflow: hidden;
}

.admin-email {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 135px;
}

.admin-role {
  font-size: 10.5px;
  color: var(--accent-emerald);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}

.admin-role::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.6);
}

.btn-icon-logout {
  background: transparent;
  border: 1px solid var(--border-card);
  color: var(--text-muted);
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-icon-logout:hover {
  background: var(--accent-rose-dim);
  color: #FB7185;
  border-color: rgba(225, 29, 72, 0.35);
}

/* Main Content Area */
.main-wrapper {
  margin-left: 270px;
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Topbar Header */
.topbar {
  height: 68px;
  background: rgba(10, 15, 29, 0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-card);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  position: sticky;
  top: 0;
  z-index: 40;
}

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

.mobile-menu-btn {
  display: none;
  background: transparent;
  border: 1px solid var(--border-card);
  color: var(--text-primary);
  padding: 7px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

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

.breadcrumb-nav a {
  color: var(--text-muted);
  text-decoration: none;
}

.breadcrumb-nav a:hover {
  color: var(--text-primary);
}

.breadcrumb-separator {
  color: var(--text-dim);
  font-size: 11px;
}

.page-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.2px;
}

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

.utc-clock-badge {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.04);
  padding: 5px 10px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 6px;
}

.live-indicator {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  background: var(--accent-emerald-dim);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  color: #34D399;
  letter-spacing: 0.4px;
}

.pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #34D399;
  box-shadow: 0 0 8px #34D399;
  animation: pulse-ring 2s infinite ease-out;
}

@keyframes pulse-ring {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.btn-refresh {
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  color: var(--text-secondary);
  padding: 7px 13px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-refresh:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.15);
}

.btn-refresh.spinning i, .btn-refresh.spinning svg {
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Content Body */
.content-body {
  padding: 28px 32px;
  flex: 1;
}

.tab-pane {
  display: none;
  animation: paneFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.tab-pane.active {
  display: block;
}

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

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

.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.2s ease;
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

.kpi-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.15) 50%, transparent 100%);
}

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

.kpi-info h4 {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.kpi-val {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.1;
  letter-spacing: -0.5px;
}

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

.kpi-icon-tile.blue {
  background: rgba(37, 99, 235, 0.12);
  color: #60A5FA;
  border: 1px solid rgba(37, 99, 235, 0.25);
}

.kpi-icon-tile.green {
  background: rgba(16, 185, 129, 0.12);
  color: #34D399;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.kpi-icon-tile.amber {
  background: rgba(217, 119, 6, 0.12);
  color: #FBBF24;
  border: 1px solid rgba(217, 119, 6, 0.25);
}

.kpi-icon-tile.rose {
  background: rgba(225, 29, 72, 0.12);
  color: #FB7185;
  border: 1px solid rgba(225, 29, 72, 0.25);
}

.kpi-icon-tile.purple {
  background: rgba(124, 58, 237, 0.12);
  color: #A78BFA;
  border: 1px solid rgba(124, 58, 237, 0.25);
}

/* System Telemetry Bar */
.telemetry-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  padding: 14px 20px;
  margin-bottom: 24px;
}

.telemetry-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.telemetry-item i, .telemetry-item svg {
  width: 16px;
  height: 16px;
  color: var(--accent-sky-light);
}

.telemetry-text {
  display: flex;
  flex-direction: column;
}

.telemetry-label {
  font-size: 10.5px;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
}

.telemetry-value {
  font-size: 12.5px;
  color: var(--text-primary);
  font-weight: 600;
}

/* Panel / Table Card */
.panel {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 24px;
  backdrop-filter: blur(12px);
  position: relative;
}

.panel::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.15) 50%, transparent 100%);
}

.panel-header {
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-card);
  flex-wrap: wrap;
  gap: 16px;
}

.panel-header-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.panel-header-title h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.2px;
}

.panel-header-title p {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.panel-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* Search Box */
.search-wrapper {
  position: relative;
  min-width: 270px;
}

.search-input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 8px 32px 8px 34px;
  font-size: 13px;
  outline: none;
  transition: all 0.15s ease;
  font-family: inherit;
}

.search-input:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.search-icon-svg {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  color: var(--text-muted);
  pointer-events: none;
}

.search-clear-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 13px;
  display: none;
}

.search-clear-btn:hover {
  color: var(--text-primary);
}

/* Filter Segmented Control */
.filter-pills {
  display: flex;
  background: var(--bg-input);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  padding: 3px;
  gap: 2px;
}

.pill-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.pill-btn:hover {
  color: var(--text-primary);
}

.pill-btn.active {
  background: #1E293B;
  color: #FFFFFF;
  box-shadow: var(--shadow-sm);
}

.pill-counter {
  font-size: 10px;
  background: rgba(255, 255, 255, 0.08);
  padding: 1px 5px;
  border-radius: 8px;
  font-weight: 700;
}

/* Export CSV Button */
.btn-export-csv {
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  color: var(--text-secondary);
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.btn-export-csv:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.15);
}

/* Data Table */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.data-table th {
  padding: 12px 18px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.6px;
  border-bottom: 1px solid var(--border-divider);
  background: rgba(10, 15, 29, 0.4);
}

.data-table td {
  padding: 14px 18px;
  font-size: 13px;
  border-bottom: 1px solid var(--border-divider);
  color: var(--text-primary);
  vertical-align: middle;
}

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

.data-table tbody tr {
  transition: background-color 0.15s ease;
}

.data-table tbody tr:hover td {
  background: rgba(255, 255, 255, 0.025);
}

/* User Identity Cell */
.user-info-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1E293B 0%, #0F172A 100%);
  color: #38BDF8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  border: 1px solid var(--border-card);
  flex-shrink: 0;
  position: relative;
}

.user-status-dot-inline {
  position: absolute;
  bottom: 0; right: 0;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1.5px solid var(--bg-surface);
}

.user-status-dot-inline.active { background: var(--accent-emerald); }
.user-status-dot-inline.pending { background: var(--accent-amber); }
.user-status-dot-inline.suspended { background: var(--accent-rose); }
.user-status-dot-inline.expired { background: #64748B; }

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

.user-name-line {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 13.5px;
}

.user-email-line {
  font-size: 12px;
  color: var(--text-secondary);
}

.user-uid-chip {
  font-size: 10px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  margin-top: 2px;
  width: fit-content;
}

.user-uid-chip:hover {
  color: var(--accent-sky-light);
}

/* Status Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.badge-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
}

.badge-active {
  background: var(--accent-emerald-dim);
  color: #34D399;
  border: 1px solid rgba(16, 185, 129, 0.25);
}
.badge-active .badge-dot { background: #34D399; }

.badge-pending {
  background: var(--accent-amber-dim);
  color: #FBBF24;
  border: 1px solid rgba(217, 119, 6, 0.25);
}
.badge-pending .badge-dot { background: #FBBF24; }

.badge-suspended {
  background: var(--accent-rose-dim);
  color: #FB7185;
  border: 1px solid rgba(225, 29, 72, 0.3);
}
.badge-suspended .badge-dot { background: #FB7185; }

.badge-expired {
  background: rgba(148, 163, 184, 0.1);
  color: #94A3B8;
  border: 1px solid rgba(148, 163, 184, 0.2);
}
.badge-expired .badge-dot { background: #94A3B8; }

/* Suspension Alert Preview */
.suspension-preview-box {
  margin-top: 6px;
  font-size: 11px;
  color: #FB7185;
  background: rgba(225, 29, 72, 0.08);
  border: 1px solid rgba(225, 29, 72, 0.2);
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  display: flex;
  align-items: center;
  gap: 5px;
  max-width: 260px;
}

.suspension-preview-box span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Plan & Seats */
.plan-pill {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  background: #070B16;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-card);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.seat-pill-count {
  font-size: 10px;
  background: #1E293B;
  color: #38BDF8;
  padding: 1px 6px;
  border-radius: 6px;
  font-weight: 700;
}

/* Expiry Date */
.expiry-wrap {
  display: flex;
  flex-direction: column;
}

.expiry-date-text {
  font-size: 12.5px;
  font-weight: 600;
}

.expiry-relative-text {
  font-size: 10.5px;
  color: var(--text-muted);
}

/* HWID Button */
.btn-hwid-chip {
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.25);
  color: var(--accent-sky-light);
  padding: 4px 10px;
  border-radius: var(--radius-xs);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s ease;
}

.btn-hwid-chip:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: rgba(56, 189, 248, 0.45);
}

/* Action Buttons Group */
.actions-cell {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-action {
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  color: var(--text-secondary);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s ease;
}

.btn-action i, .btn-action svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

.btn-action:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.15);
}

.btn-action.demo:hover {
  border-color: rgba(56, 189, 248, 0.4);
  color: #38BDF8;
}

.btn-action.extend:hover {
  border-color: rgba(52, 211, 153, 0.4);
  color: #34D399;
}

.btn-action.suspend:hover {
  border-color: rgba(251, 113, 133, 0.4);
  color: #FB7185;
}

.btn-action.unsuspend {
  border-color: rgba(16, 185, 129, 0.3);
  color: #34D399;
  background: var(--accent-emerald-dim);
}

.btn-action.delete:hover {
  background: var(--accent-rose-dim);
  color: #FB7185;
  border-color: rgba(225, 29, 72, 0.35);
}

/* Standard Buttons */
.btn-primary {
  background: var(--accent-blue);
  color: #FFFFFF;
  border: 1px solid transparent;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: background-color 0.15s ease;
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
  background: var(--accent-blue-hover);
}

.btn-secondary {
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  color: var(--text-primary);
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: all 0.15s ease;
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.15);
}

.btn-danger {
  background: var(--accent-rose-dim);
  border: 1px solid rgba(225, 29, 72, 0.35);
  color: #FB7185;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: all 0.15s ease;
}

.btn-danger:hover {
  background: rgba(225, 29, 72, 0.25);
}

/* In-App Broadcast Section */
.broadcast-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 24px;
}

.broadcast-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 700;
}

.broadcast-status-badge.live {
  background: var(--accent-emerald-dim);
  color: #34D399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.broadcast-status-badge.inactive {
  background: rgba(148, 163, 184, 0.1);
  color: #94A3B8;
  border: 1px solid rgba(148, 163, 184, 0.2);
}

/* Desktop Simulator Card */
.desktop-simulator-window {
  background: #0B101E;
  border: 1px solid #1E293B;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.simulator-titlebar {
  background: #070B16;
  padding: 8px 14px;
  border-bottom: 1px solid #1E293B;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sim-traffic-lights {
  display: flex;
  gap: 6px;
}

.sim-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.sim-dot.red { background: #EF4444; }
.sim-dot.yellow { background: #F59E0B; }
.sim-dot.green { background: #10B981; }

.sim-window-title {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
  margin-left: 8px;
}

.sim-content-area {
  padding: 16px;
}

.broadcast-live-banner {
  padding: 14px 16px;
  background: rgba(15, 23, 42, 0.9);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-card);
}

.broadcast-live-banner.type-update {
  border-left: 4px solid var(--accent-sky-light);
}

.broadcast-live-banner.type-maintenance {
  border-left: 4px solid var(--accent-amber);
}

.broadcast-live-banner.type-alert {
  border-left: 4px solid var(--accent-rose);
}

.broadcast-live-banner.type-news {
  border-left: 4px solid var(--accent-blue);
}

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

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

.form-input, .form-select, .form-textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 10px 14px;
  font-size: 13.5px;
  outline: none;
  transition: all 0.15s ease;
  font-family: inherit;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.form-textarea {
  resize: vertical;
  min-height: 85px;
}

.form-help {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Modal Dialog */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--bg-modal);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 20px;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-dialog {
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 520px;
  box-shadow: var(--shadow-lg);
  animation: modalScale 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  overflow: hidden;
  position: relative;
}

.modal-dialog::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.2) 50%, transparent 100%);
}

@keyframes modalScale {
  from { transform: translateY(16px) scale(0.97); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

.modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-divider);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

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

.btn-close-modal:hover {
  color: var(--text-primary);
}

.modal-body {
  padding: 24px;
  max-height: 70vh;
  overflow-y: auto;
}

.modal-footer {
  padding: 14px 24px;
  background: rgba(7, 11, 20, 0.4);
  border-top: 1px solid var(--border-divider);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

/* Toast Container */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  min-width: 300px;
  max-width: 420px;
  background: #0F172A;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-lg);
  font-size: 13px;
  color: var(--text-primary);
  animation: toastSlideIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes toastSlideIn {
  from { transform: translateX(40px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.toast.success {
  border-left: 4px solid var(--accent-emerald);
}
.toast.error {
  border-left: 4px solid var(--accent-rose);
}
.toast.info {
  border-left: 4px solid var(--accent-blue);
}

/* Login Authentication View */
.auth-wrapper {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(circle at top, #131E38 0%, #070B14 70%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 500;
  padding: 20px;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: rgba(14, 21, 40, 0.85);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  padding: 38px 34px;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(16px);
  position: relative;
  overflow: hidden;
}

.auth-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(56, 189, 248, 0.4) 50%, transparent 100%);
}

.auth-logo-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 28px;
}

.auth-logo-img {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  padding: 5px;
  background: linear-gradient(135deg, #1E293B 0%, #0F172A 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  margin-bottom: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.auth-logo-center h2 {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.4px;
}

.auth-logo-center p {
  font-size: 12.5px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.auth-error-banner {
  display: none;
  padding: 11px 14px;
  background: var(--accent-rose-dim);
  border: 1px solid rgba(225, 29, 72, 0.3);
  border-radius: var(--radius-sm);
  color: #FB7185;
  font-size: 12.5px;
  margin-bottom: 18px;
  animation: shake 0.3s ease-in-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

.password-input-wrap {
  position: relative;
}

.btn-toggle-pwd {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
}

.btn-toggle-pwd:hover {
  color: var(--text-primary);
}

.btn-login {
  width: 100%;
  background: var(--accent-blue);
  color: #FFFFFF;
  border: none;
  padding: 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
  transition: background-color 0.15s ease;
  box-shadow: var(--shadow-glow-blue);
}

.btn-login:hover {
  background: var(--accent-blue-hover);
}

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

.quick-admin-chips {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--border-divider);
  text-align: center;
}

.quick-admin-chips p {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.chips-row {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-chip-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-card);
  color: var(--text-secondary);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.admin-chip-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
  .broadcast-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.mobile-open {
    transform: translateX(0);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.9);
  }

  .main-wrapper {
    margin-left: 0;
  }

  .mobile-menu-btn {
    display: block;
  }

  .topbar {
    padding: 0 16px;
  }

  .utc-clock-badge {
    display: none;
  }

  .content-body {
    padding: 20px 16px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .search-wrapper {
    min-width: 100%;
  }

  .panel-controls {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .filter-pills {
    overflow-x: auto;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
}
