/*
 * web.css — INTOPS Intelligence Operations Platform
 * Design System: Intel Dark Theme (dark-first)
 * Platform: Desktop web, multi-persona (POLA B)
 * Generated: 2026-05-31
 * Sections:
 *   1.  CSS Variables (:root light + [data-theme="dark"])
 *   2.  CSS Reset + base HTML/body
 *   3.  Layout: .app-shell, .app-sidebar, .app-main, .app-header, .app-content
 *   4.  Sidebar components
 *   5.  Topbar/Header components
 *   6.  Page layout
 *   7.  Grid system
 *   8.  Stat Card
 *   9.  Card
 *   10. Table
 *   11. Pagination
 *   12. Button
 *   13. Form
 *   14. Modal
 *   15. Badge
 *   16. Dropdown
 *   17. Toast
 *   18. Tab
 *   19. Alert inline
 *   20. INTOPS-specific components
 *   21. Utility classes
 *   22. Scrollbar
 *   23. Responsive
 *   24. Animations
 */

/* ===========================================================================
   1. CSS VARIABLES
   =========================================================================== */

:root {
  /* Brand INTOPS */
  --color-primary:        #00b4d8;
  --color-primary-dark:   #0077b6;
  --color-primary-light:  color-mix(in srgb, var(--color-primary) 15%, transparent);

  /* Semantic */
  --color-success:        #10b981;
  --color-success-light:  rgba(16, 185, 129, 0.15);
  --color-warning:        #f59e0b;
  --color-warning-light:  rgba(245, 158, 11, 0.15);
  --color-danger:         #ef4444;
  --color-danger-light:   rgba(239, 68, 68, 0.15);
  --color-info:           #2196f3;
  --color-info-light:     rgba(33, 150, 243, 0.15);

  /* INTOPS Alert Severity */
  --color-critical:       #ef4444;
  --color-high:           #f97316;
  --color-safe:           #10b981;
  --color-inactive:       #6b7280;

  /* Surface — Light mode (default :root) */
  --bg-page:              #f6f8fa;
  --bg-surface:           #ffffff;
  --bg-elevated:          #f0f2f5;
  --bg-hover:             #eaeef2;
  --bg-sidebar:           #161b22;
  --bg-overlay:           rgba(13, 17, 23, 0.85);

  /* Text — Light mode */
  --text-primary:         #0d1117;
  --text-secondary:       #57606a;
  --text-muted:           #6e7781;
  --text-link:            #0969da;
  --text-inverse:         #f0f6fc;

  /* Border — Light mode */
  --border-default:       #d0d7de;
  --border-muted:         #eaeef2;
  --border-focus:         #0969da;
  --border-strong:        #8c959f;

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

  /* Layout */
  --header-height:        56px;
  --sidebar-width:        240px;

  /* Z-index */
  --z-sidebar:            100;
  --z-dropdown:           150;
  --z-modal:              200;
  --z-modal-content:      201;
  --z-toast:              500;

  /* Border Radius */
  --radius-sm:            4px;
  --radius-md:            6px;
  --radius-lg:            8px;
  --radius-xl:            12px;
  --radius-full:          9999px;

  /* Transition */
  --transition-fast:      150ms ease;
  --transition-base:      200ms ease;
}

/* Dark mode — default INTOPS */
[data-theme="dark"] {
  --bg-page:              #0d1117;
  --bg-surface:           #161b22;
  --bg-elevated:          #21262d;    /* WAJIB SOLID — tidak boleh alpha */
  --bg-hover:             #2d333b;
  --bg-sidebar:           #0d1117;
  --bg-overlay:           rgba(13, 17, 23, 0.85);
  --text-primary:         #f0f6fc;
  --text-secondary:       #adbac7;
  --text-muted:           #768390;
  --text-link:            #58a6ff;
  --text-inverse:         #0d1117;
  --border-default:       #30363d;
  --border-muted:         #21262d;
  --border-focus:         #388bfd;
  --border-strong:        #6e7781;
  --shadow-xs:            0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-sm:            0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-md:            0 4px 6px rgba(0, 0, 0, 0.35);
  --shadow-lg:            0 10px 15px rgba(0, 0, 0, 0.5);
}

/* ===========================================================================
   2. CSS RESET + BASE
   =========================================================================== */

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

button {
  appearance: none;
  -webkit-appearance: none;
  background: none;
  border: none;
  outline: none;
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
}

ul,
ol {
  list-style: none;
}

html {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: var(--bg-page);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
}

h1 { font-size: 24px; font-weight: 700; line-height: 1.2; }
h2 { font-size: 20px; font-weight: 600; line-height: 1.3; }
h3 { font-size: 16px; font-weight: 600; line-height: 1.4; }

/* ===========================================================================
   3. LAYOUT — APP SHELL
   =========================================================================== */

.app-shell {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

.app-sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  max-width: var(--sidebar-width);
  flex-shrink: 0;
  background: #161b22; /* fixed — tidak ikut tema light/dark */
  border-right: 1px solid #2d333b; /* fixed — visible di kedua mode */
  display: flex;
  flex-direction: column;
  height: 100vh;
  transition: width var(--transition-base);
  overflow: hidden;
  z-index: var(--z-sidebar);
  /* Sidebar always dark — force text colors to dark-theme values */
  --sidebar-text-primary:   #f0f6fc;
  --sidebar-text-secondary: #adbac7;
  --sidebar-text-muted:     #768390;
}

/* Override all text inside sidebar to use fixed colors regardless of theme */
.app-sidebar .brand-name              { color: var(--sidebar-text-primary) !important; }
.app-sidebar .brand-sub               { color: var(--sidebar-text-secondary) !important; }
.app-sidebar .sidebar-platform-indicator { color: var(--sidebar-text-secondary) !important; }
.app-sidebar .nav-item                { color: var(--sidebar-text-secondary) !important; }
.app-sidebar .nav-item:hover          { color: var(--sidebar-text-primary) !important; background: rgba(255,255,255,0.06) !important; }
.app-sidebar .nav-item.active         { color: var(--color-primary) !important; }
.app-sidebar .nav-section-label       { color: var(--sidebar-text-muted) !important; }
.app-sidebar .user-name               { color: var(--sidebar-text-primary) !important; }
.app-sidebar .user-role               { color: var(--sidebar-text-secondary) !important; }
.app-sidebar .btn-logout              { color: var(--sidebar-text-secondary) !important; }
.app-sidebar .btn-logout:hover        { color: #ef4444 !important; }
.app-sidebar .sidebar-footer          { border-top-color: #2d333b !important; }

.app-sidebar.collapsed {
  width: 60px;
  min-width: 60px;
  max-width: 60px;
}

.app-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}

.app-header {
  height: var(--header-height);
  flex-shrink: 0;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-default);
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 12px;
}

.app-content {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  background: var(--bg-page);
  scrollbar-gutter: stable; /* reservasi scrollbar space — cegah layout shift */
}

.sidebar-overlay {
  position: fixed;
  inset: 0;
  z-index: 99;
  background: var(--bg-overlay);
  display: none;
}

.sidebar-overlay.open {
  display: block;
}

/* ===========================================================================
   4. SIDEBAR COMPONENTS
   =========================================================================== */

.sidebar-brand {
  height: var(--header-height);
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 12px;
  flex-shrink: 0;
  border-bottom: 1px solid var(--border-default);
}

.brand-logo {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  background: var(--color-primary);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: white;
}

.brand-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand-name {
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-primary);
}

.brand-sub {
  font-size: 11px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.nav-section-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 12px 16px 4px;
  letter-spacing: 0.5px;
}

.nav-section-divider {
  display: none;
  height: 1px;
  background: var(--border-default);
  margin: 8px 0;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  border-left: 3px solid transparent;
  font-size: 14px;
  font-weight: 400;
  white-space: nowrap;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
}

.nav-item.active {
  color: var(--color-primary);
  background: var(--color-primary-light);
  border-left: 3px solid var(--color-primary);
}

.nav-icon {
  width: 18px;
  flex-shrink: 0;
  text-align: center;
  font-size: 14px;
}

.nav-label {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-badge {
  font-size: 11px;
  background: var(--color-danger);
  color: white;
  border-radius: var(--radius-full);
  padding: 1px 6px;
  min-width: 18px;
  text-align: center;
  font-weight: 600;
  flex-shrink: 0;
}

.nav-badge.hidden {
  display: none;
}

.sidebar-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border-default);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar,
button.avatar,
.avatar {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-full);
  background: var(--color-primary);
  color: white;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
  border: 2px solid rgba(0,180,216,0.4);
  transition: border-color var(--transition-fast);
}
button.avatar:hover,
.avatar:hover {
  border-color: var(--color-primary);
}

.user-info {
  flex: 1;
  min-width: 0;
}

.user-name {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #f0f6fc;
}

.user-role {
  font-size: 11px;
  color: #8b949e;
}

/* Dropdown header name + role */
.dropdown-header strong,
#dd-user-name {
  color: #f0f6fc;
  font-size: 13px;
  font-weight: 600;
}
#dd-user-role {
  color: #8b949e;
  font-size: 12px;
}

.btn-logout {
  color: var(--text-muted);
  font-size: 16px;
  padding: 4px;
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast);
  flex-shrink: 0;
}

.btn-logout:hover {
  color: var(--color-danger);
}

/* INTOPS-specific sidebar elements */
.sidebar-platform-indicator {
  font-size: 10px;
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 4px 16px 8px;
}

/* Collapsed sidebar state */
.app-sidebar.collapsed .brand-info,
.app-sidebar.collapsed .nav-label,
.app-sidebar.collapsed .nav-badge,
.app-sidebar.collapsed .nav-section-label,
.app-sidebar.collapsed .sidebar-platform-indicator,
.app-sidebar.collapsed .user-info,
.app-sidebar.collapsed .btn-logout {
  display: none;
}

.app-sidebar.collapsed .nav-section-divider {
  display: block;
}

.app-sidebar.collapsed .nav-item {
  justify-content: center;
  padding: 10px 0;
  border-left: 3px solid transparent;
}

.app-sidebar.collapsed .nav-item.active {
  border-left: 3px solid var(--color-primary);
}

.app-sidebar.collapsed .sidebar-nav {
  overflow-x: hidden;
}

.app-sidebar.collapsed .sidebar-footer {
  justify-content: center;
  padding: 12px 0;
  gap: 0;
}


.app-sidebar.collapsed .sidebar-brand {
  padding: 0;
  justify-content: center;
}

/* ===========================================================================
   5. TOPBAR / HEADER COMPONENTS
   =========================================================================== */

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.header-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
  overflow: hidden;
  white-space: nowrap;
}

.breadcrumb-sep {
  color: var(--text-muted);
  flex-shrink: 0;
}

.breadcrumb-current {
  color: var(--text-primary);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-sync {
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
}

.bell-wrapper {
  position: relative;
  display: inline-flex;
}

.bell-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 16px;
  height: 16px;
  background: var(--color-danger);
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: 700;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  line-height: 1;
}

.bell-badge.hidden {
  display: none;
}

/* INTOPS-specific header elements */
.platform-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: var(--color-primary-light);
  color: var(--color-primary);
  white-space: nowrap;
}

.tenant-label {
  font-size: 12px;
  color: var(--text-primary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 2px 8px;
  white-space: nowrap;
}

.sidebar-toggle {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  flex-shrink: 0;
  transition: background var(--transition-fast);
}

.sidebar-toggle:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.theme-toggle {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.theme-toggle:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

/* ===========================================================================
   6. PAGE LAYOUT
   =========================================================================== */

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 24px;
}

.page-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.page-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
}

.page-sub {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.page-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-back {
  width: 32px;
  height: 32px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.btn-back:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

/* ===========================================================================
   7. GRID SYSTEM
   =========================================================================== */

.grid {
  display: grid;
  gap: 20px;
}

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

.col-span-2 { grid-column: span 2; }
.col-span-3 { grid-column: span 3; }

/* INTOPS Intelligence Dashboard Grids */
.grid-intel-3col {
  display: grid;
  grid-template-columns: 25% 50% 25%;
  gap: 16px;
}

.grid-intel-map {
  display: grid;
  grid-template-columns: 20% 55% 25%;
  gap: 16px;
}

/* ===========================================================================
   8. STAT CARD
   =========================================================================== */

.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 16px;
  height: 96px;
  display: flex;
  align-items: center;
  gap: 16px;
  border-left: 3px solid transparent;
  transition: box-shadow var(--transition-fast);
}

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

/* Stat card variants */
.stat-card.stat-primary   { border-left-color: var(--color-primary); }
.stat-card.stat-success   { border-left-color: var(--color-success); }
.stat-card.stat-warning   { border-left-color: var(--color-warning); }
.stat-card.stat-danger    { border-left-color: var(--color-danger); }
.stat-card.stat-info      { border-left-color: var(--color-info); }
.stat-card.stat-critical  { border-left-color: var(--color-critical); }   /* [INTOPS] */
.stat-card.stat-safe      { border-left-color: var(--color-safe); }       /* [INTOPS] */

.stat-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

/* Stat icon variants */
.icon-primary  { background: var(--color-primary-light);   color: var(--color-primary); }
.icon-success  { background: var(--color-success-light);   color: var(--color-success); }
.icon-warning  { background: var(--color-warning-light);   color: var(--color-warning); }
.icon-danger   { background: var(--color-danger-light);    color: var(--color-danger); }
.icon-info     { background: var(--color-info-light);      color: var(--color-info); }
.icon-critical { background: rgba(239, 68, 68, 0.15);      color: var(--color-critical); }  /* [INTOPS] */
.icon-safe     { background: rgba(16, 185, 129, 0.15);     color: var(--color-safe); }      /* [INTOPS] */
.icon-high     { background: rgba(249, 115, 22, 0.15);     color: var(--color-high); }      /* [INTOPS] */

.stat-body {
  flex: 1;
  min-width: 0;
}

.stat-label {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stat-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.stat-delta {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.stat-trend {
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.trend-up   { color: var(--color-success); }
.trend-down { color: var(--color-danger); }
.trend-flat { color: var(--text-muted); }

/* ===========================================================================
   9. CARD
   =========================================================================== */

.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

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

.card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.card-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-body {
  padding: 0;
}

.card-body.p-4 { padding: 16px; }
.card-body.p-5 { padding: 20px; }

.card-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--border-default);
  background: var(--bg-surface);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* ===========================================================================
   10. TABLE
   =========================================================================== */

.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

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

thead th {
  padding: 10px 16px;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-default);
  white-space: nowrap;
  background: var(--bg-surface);
}

tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-muted);
  color: var(--text-primary);
  font-size: 14px;
}

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

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

.col-no {
  width: 50px;
  text-align: center;
}

.col-action {
  width: 80px;
  text-align: right;
}

.text-right  { text-align: right; }
.text-center { text-align: center; }
.text-left   { text-align: left; }

.sortable {
  cursor: pointer;
  user-select: none;
}

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

.sort-icon {
  font-size: 11px;
  color: var(--text-muted);
  margin-left: 4px;
}

/* Table toolbar (search + filters area above table) */
.table-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border-default);
}

/* Toolbar children — selects selalu auto width, tidak stretch */
.table-toolbar .form-select,
.table-toolbar select {
  width: auto;
  min-width: 120px;
  max-width: 180px;
  flex-shrink: 0;
}

/* Search box di toolbar — flex grow tapi dibatasi */
.table-toolbar .search-box {
  flex: 1;
  min-width: 140px;
  max-width: 280px;
}

/* Tombol aksi selalu di ujung kanan */
.toolbar-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Empty state */
.table-empty {
  text-align: center;
  padding: 48px 24px;
}

.table-empty-icon {
  font-size: 40px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.table-empty-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-secondary);
}

.table-empty-sub {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 4px;
}

.empty-row td {
  border: none;
}

/* Skeleton loading */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--bg-elevated) 25%,
    var(--bg-hover) 50%,
    var(--bg-elevated) 75%
  );
  background-size: 400px 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

.skeleton-line    { height: 14px; border-radius: var(--radius-sm); }
.skeleton-line-sm { width: 60px; }
.skeleton-line-md { width: 120px; }
.skeleton-line-lg { width: 180px; }

/* INTOPS data column — mono font */
.col-data {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 13px;
}

/* ===========================================================================
   11. PAGINATION
   =========================================================================== */

.pagination {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* CANONICAL — DILARANG mengganti dengan .page-btn */
.pagination-btn {
  width: 32px;
  height: 32px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  font-size: 13px;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  background: transparent;
}

.pagination-btn.active {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

.pagination-btn:hover:not(.active):not(:disabled) {
  background: var(--bg-hover);
  color: var(--text-primary);
}

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

.pagination-ellipsis {
  padding: 0 8px;
  color: var(--text-muted);
  font-size: 13px;
}

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

/* ===========================================================================
   12. BUTTON
   =========================================================================== */

.btn {
  height: 36px;
  padding: 0 16px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
  border: 1px solid transparent;
  font-family: inherit;
  line-height: 1;
}

/* Button sizes — explicit height, DILARANG hanya padding */
.btn-xs { height: 24px; padding: 0 8px;  font-size: 11px; }
.btn-sm { height: 30px; padding: 0 12px; font-size: 12px; }
.btn-lg { height: 44px; padding: 0 20px; font-size: 14px; font-weight: 600; }

/* Button variants */
.btn-primary {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}
.btn-primary:hover {
  background: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
}

.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border-color: var(--border-default);
}
.btn-secondary:hover {
  background: var(--bg-hover);
}

.btn-danger {
  background: var(--color-danger);
  color: white;
  border-color: var(--color-danger);
}
.btn-danger:hover {
  background: #dc2626;
  border-color: #dc2626;
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: transparent;
}
.btn-ghost:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

/* Icon-only button */
.btn-icon {
  width: 36px;
  padding: 0;
  justify-content: center;
}
.btn-icon.btn-sm { width: 30px; }
.btn-icon.btn-xs { width: 24px; }

/* Button states */
.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.btn.loading {
  color: transparent;
  position: relative;
  pointer-events: none;
}

.btn.loading::after {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* ===========================================================================
   13. FORM
   =========================================================================== */

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}

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

.form-control {
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  color: var(--text-primary);
  font-size: 14px;
  width: 100%;
  transition: border-color var(--transition-fast), outline-color var(--transition-fast);
}

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

.form-control:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 1px;
  border-color: var(--border-focus);
}

.form-control.error {
  border-color: var(--color-danger);
}

.form-control:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

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

.form-select {
  height: 36px;
  padding: 0 32px 0 12px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  color: var(--text-primary);
  font-size: 14px;
  width: 100%;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238b949e' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  transition: border-color var(--transition-fast);
}

.form-select:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 1px;
  border-color: var(--border-focus);
}

.form-select-sm {
  height: 30px;
  font-size: 12px;
  padding: 0 28px 0 8px;
}

.form-error {
  font-size: 12px;
  color: var(--color-danger);
}

.form-hint {
  font-size: 12px;
  color: var(--text-muted);
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
}

/* Search box */
.search-box {
  position: relative;
  flex: 1;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 13px;
  pointer-events: none;
}

.search-box .form-control {
  padding-left: 36px;
}

/* Toggle switch */
.toggle-switch {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  gap: 8px;
}

.toggle-switch input[type="checkbox"] {
  display: none;
}

.toggle-slider {
  width: 40px;
  height: 22px;
  background: var(--border-default);
  border-radius: 11px;
  transition: background var(--transition-base);
  position: relative;
  flex-shrink: 0;
}

.toggle-slider::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  background: white;
  border-radius: 50%;
  top: 3px;
  left: 3px;
  transition: transform var(--transition-base);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.toggle-switch input:checked + .toggle-slider {
  background: var(--color-primary);
}

.toggle-switch input:checked + .toggle-slider::after {
  transform: translateX(18px);
}

/* ===========================================================================
   14. MODAL
   =========================================================================== */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-overlay);
  z-index: var(--z-modal);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-overlay.open {
  display: flex;
}

.modal {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  max-width: 560px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  z-index: var(--z-modal-content);
  box-shadow: var(--shadow-lg);
}

.modal-sm { max-width: 400px; }
.modal-lg { max-width: 800px; }
.modal-xl { max-width: 1100px; }

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

.modal-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

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

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-default);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-shrink: 0;
}

/* ===========================================================================
   15. BADGE
   =========================================================================== */

.badge {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  white-space: nowrap;
  line-height: 1.4;
}

/* Semantic badge variants */
.badge-success  { background: rgba(16, 185, 129, 0.15);  color: var(--color-success); }
.badge-warning  { background: rgba(245, 158, 11, 0.15);  color: var(--color-warning); }
.badge-danger   { background: rgba(239, 68, 68, 0.15);   color: var(--color-danger); }
.badge-info     { background: rgba(33, 150, 243, 0.15);  color: var(--color-info); }
.badge-gray     { background: rgba(107, 114, 128, 0.15); color: var(--color-inactive); }

/* INTOPS severity badge variants */
.badge-critical { background: rgba(239, 68, 68, 0.15);   color: #ef4444; }   /* [INTOPS] */
.badge-high     { background: rgba(249, 115, 22, 0.15);  color: #f97316; }   /* [INTOPS] */
.badge-safe     { background: rgba(16, 185, 129, 0.15);  color: #10b981; }   /* [INTOPS] */

/* INTOPS role badge variants */
.badge-role-super-admin  { background: rgba(0, 180, 216, 0.2);   color: #00b4d8; }   /* [INTOPS] */
.badge-role-admin        { background: rgba(139, 92, 246, 0.15); color: #8b5cf6; }
.badge-role-supervisor   { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }   /* [INTOPS] */
.badge-role-analyst      { background: rgba(33, 150, 243, 0.15); color: #2196f3; }   /* [INTOPS] */
.badge-role-operator     { background: rgba(16, 185, 129, 0.15); color: #10b981; }   /* [INTOPS] */
.badge-role-user         { background: rgba(107, 114, 128, 0.15); color: #6b7280; }
.badge-role-manager      { background: rgba(245, 158, 11, 0.15); color: var(--color-warning); }

/* ===========================================================================
   16. DROPDOWN
   =========================================================================== */

.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-menu {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  min-width: 180px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  z-index: var(--z-dropdown);
  overflow: hidden;
}

.dropdown-menu.open {
  display: block;
  animation: fadeIn 120ms ease-out;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  font-size: 14px;
  color: var(--text-primary);
  cursor: pointer;
  width: 100%;
  transition: background var(--transition-fast);
  border: none;
  background: none;
  text-align: left;
  font-family: inherit;
}

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

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

.dropdown-divider {
  height: 1px;
  background: var(--border-default);
  margin: 4px 0;
}

.dropdown-header {
  padding: 12px 16px 8px;
  border-bottom: 1px solid var(--border-default);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

/* ===========================================================================
   17. TOAST
   =========================================================================== */

.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: var(--z-toast);
  pointer-events: none;
}

.toast {
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 280px;
  max-width: 400px;
  box-shadow: var(--shadow-lg);
  pointer-events: all;
  animation: fadeIn 200ms ease-out;
  border-left: 4px solid var(--border-default);
}

.toast.toast-success { border-left-color: var(--color-success); }
.toast.toast-error   { border-left-color: var(--color-danger); }
.toast.toast-warning { border-left-color: var(--color-warning); }
.toast.toast-info    { border-left-color: var(--color-info); }

.toast-icon {
  font-size: 16px;
  flex-shrink: 0;
  margin-top: 1px;
}

.toast.toast-success .toast-icon { color: var(--color-success); }
.toast.toast-error   .toast-icon { color: var(--color-danger); }
.toast.toast-warning .toast-icon { color: var(--color-warning); }
.toast.toast-info    .toast-icon { color: var(--color-info); }

.toast-body {
  flex: 1;
  min-width: 0;
}

.toast-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.toast-msg {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.toast-close {
  color: var(--text-muted);
  font-size: 14px;
  flex-shrink: 0;
  transition: color var(--transition-fast);
}

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

/* ===========================================================================
   18. TAB
   =========================================================================== */

.tabs {
  display: flex;
  border-bottom: 2px solid var(--border-default);
  gap: 0;
}

.tab-item {
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.tab-item.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

.tab-item:hover:not(.active) {
  color: var(--text-primary);
}

.tab-content {
  padding-top: 20px;
}

.tab-content.hidden {
  display: none;
}

/* ===========================================================================
   19. ALERT INLINE
   =========================================================================== */

.alert {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
}

.alert-success { background: var(--color-success-light); color: var(--color-success); }
.alert-warning { background: var(--color-warning-light); color: var(--color-warning); }
.alert-danger  { background: var(--color-danger-light);  color: var(--color-danger); }
.alert-info    { background: var(--color-info-light);    color: var(--color-info); }

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

.alert-body {
  flex: 1;
  min-width: 0;
}

/* ===========================================================================
   20. INTOPS-SPECIFIC COMPONENTS [INTOPS]
   =========================================================================== */

/* Alert Stream — real-time WebSocket feed */
.alert-stream {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 400px;
  overflow-y: auto;
}

.alert-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 16px;
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-default);
  border-left: 3px solid transparent;
  transition: background var(--transition-fast);
}

.alert-item:hover {
  background: var(--bg-hover);
}

/* Alert severity variants */
.alert-item.severity-critical { border-left-color: var(--color-critical); }
.alert-item.severity-high     { border-left-color: var(--color-high); }
.alert-item.severity-warning  { border-left-color: var(--color-warning); }
.alert-item.severity-info     { border-left-color: var(--color-info); }
.alert-item.severity-safe     { border-left-color: var(--color-safe); }

.alert-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.alert-type {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.alert-desc {
  font-size: 13px;
  color: var(--text-primary);
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.alert-time {
  font-size: 12px;
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-muted);
}

/* Severity bar (left accent strip) */
.alert-severity-bar {
  width: 3px;
  border-radius: 2px;
  flex-shrink: 0;
  align-self: stretch;
  background: var(--border-default);
}

.severity-bar { width: 3px; border-radius: 2px; flex-shrink: 0; align-self: stretch; }

/* Network graph container */
.network-graph-container {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.graph-controls {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 10;
}

/* Geo map container */
.geo-map-container {
  position: relative;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.map-controls {
  padding: 10px 16px;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-default);
}

.map-legend {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--text-secondary);
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dot-active { background: var(--color-primary); }
.dot-track  { background: var(--color-danger); }
.dot-safe   { background: var(--color-safe); }
.dot-warn   { background: var(--color-warning); }

/* ===========================================================================
   21. UTILITY CLASSES
   =========================================================================== */

.hidden          { display: none !important; }
.flex            { display: flex; }
.flex-col        { flex-direction: column; }
.items-center    { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-end     { justify-content: flex-end; }
.justify-center  { justify-content: center; }
.gap-1           { gap: 4px; }
.gap-2           { gap: 8px; }
.gap-3           { gap: 12px; }
.gap-4           { gap: 16px; }
.gap-5           { gap: 20px; }
.ml-auto         { margin-left: auto; }
.mr-auto         { margin-right: auto; }
.flex-1          { flex: 1; }
.flex-shrink-0   { flex-shrink: 0; }
.w-full          { width: 100%; }
.h-full          { height: 100%; }
.min-w-0         { min-width: 0; }

/* Typography utilities */
.text-sm         { font-size: 13px; }
.text-xs         { font-size: 12px; }
.text-lg         { font-size: 16px; }
.text-xl         { font-size: 20px; }
.text-muted      { color: var(--text-muted); }
.text-secondary  { color: var(--text-secondary); }
.text-primary    { color: var(--text-primary); }
.text-danger     { color: var(--color-danger); }
.text-success    { color: var(--color-success); }
.text-warning    { color: var(--color-warning); }
.text-info       { color: var(--color-info); }
.text-link       { color: var(--text-link); }
.font-mono       { font-family: 'JetBrains Mono', 'Courier New', monospace; }
.font-medium     { font-weight: 500; }
.font-semibold   { font-weight: 600; }
.font-bold       { font-weight: 700; }
.truncate        { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Spacing utilities */
.p-4             { padding: 16px; }
.p-5             { padding: 20px; }
.px-4            { padding-left: 16px; padding-right: 16px; }
.py-4            { padding-top: 16px; padding-bottom: 16px; }
.mt-1            { margin-top: 4px; }
.mt-2            { margin-top: 8px; }
.mt-4            { margin-top: 16px; }
.mb-0            { margin-bottom: 0; }
.mb-2            { margin-bottom: 8px; }
.mb-4            { margin-bottom: 16px; }

/* Display utilities */
.block           { display: block; }
.inline-flex     { display: inline-flex; }
.relative        { position: relative; }
.absolute        { position: absolute; }

/* Opacity utilities */
.opacity-50      { opacity: 0.5; }
.opacity-75      { opacity: 0.75; }

/* Cursor utilities */
.cursor-pointer  { cursor: pointer; }
.cursor-default  { cursor: default; }

/* Spacing additions */
.mb-1  { margin-bottom: 4px; }
.mb-3  { margin-bottom: 12px; }
.mb-5  { margin-bottom: 20px; }
.mb-6  { margin-bottom: 24px; }
.mt-3  { margin-top: 12px; }
.mt-5  { margin-top: 20px; }
.mt-6  { margin-top: 24px; }
.mr-1  { margin-right: 4px; }
.mr-2  { margin-right: 8px; }
.mr-3  { margin-right: 12px; }
.my-1  { margin-top: 4px;  margin-bottom: 4px; }
.my-2  { margin-top: 8px;  margin-bottom: 8px; }
.my-3  { margin-top: 12px; margin-bottom: 12px; }
.my-4  { margin-top: 16px; margin-bottom: 16px; }
.p-3   { padding: 12px; }
.px-3  { padding-left: 12px; padding-right: 12px; }

/* Typography additions */
.text-2xs  { font-size: 11px; }
.text-3xs  { font-size: 10px; }
.text-md   { font-size: 14px; }
.fw-400    { font-weight: 400; }
.fw-500    { font-weight: 500; }
.fw-600    { font-weight: 600; }
.fw-700    { font-weight: 700; }

/* Icon color helpers — for use on <i> elements */
.c-primary { color: var(--color-primary); }
.c-info    { color: var(--color-info); }
.c-warning { color: var(--color-warning); }
.c-danger  { color: var(--color-danger); }
.c-success { color: var(--color-safe); }
.c-muted   { color: var(--text-muted); }

/* Layout helpers */
.flex-min      { flex: 1; min-width: 0; }
.flex-col-4    { display: flex; flex-direction: column; gap: 16px; }
.flex-col-3    { display: flex; flex-direction: column; gap: 12px; }
.flex-col-2    { display: flex; flex-direction: column; gap: 8px; }
.flex-row-2    { display: flex; align-items: center; gap: 8px; }
.flex-row-3    { display: flex; align-items: center; gap: 12px; }
.align-start   { align-items: flex-start; }
.align-end     { align-items: flex-end; }
.wrap          { flex-wrap: wrap; }

/* Section separator */
.section-sep   { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border-default); }

/* Section sub-label */
.section-label { font-size: 12px; font-weight: 600; color: var(--text-muted); margin-bottom: 8px; }

/* Checkbox / radio row */
.check-row     { display: flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; }
.check-row-sm  { display: flex; align-items: center; gap: 6px; font-size: 12px; cursor: pointer; }

/* ===========================================================================
   22. SCROLLBAR
   =========================================================================== */

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border-default);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

* {
  scrollbar-width: thin;
  scrollbar-color: var(--border-default) transparent;
}

/* ===========================================================================
   23. RESPONSIVE
   =========================================================================== */

@media (max-width: 1024px) {
  .app-sidebar {
    position: fixed;
    left: -240px;
    z-index: var(--z-sidebar);
    transition: left var(--transition-base);
    height: 100vh;
  }

  .app-sidebar.open {
    left: 0;
  }

  .app-sidebar.collapsed {
    left: -60px;
  }

  .sidebar-overlay.open {
    display: block;
  }

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

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

  .grid-intel-3col {
    grid-template-columns: 1fr;
  }

  .grid-intel-map {
    grid-template-columns: 1fr;
  }

  .col-span-2,
  .col-span-3 {
    grid-column: span 1;
  }
}

@media (max-width: 640px) {
  .app-content {
    padding: 16px;
  }

  .grid-cols-2,
  .grid-cols-3,
  .grid-cols-4 {
    grid-template-columns: 1fr;
  }

  .form-row-2,
  .form-row-3 {
    grid-template-columns: 1fr;
  }

  .modal {
    margin: 0;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    align-self: flex-end;
    max-height: 95vh;
  }

  .page-header {
    flex-direction: column;
    gap: 12px;
  }

  .page-header-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .table-toolbar {
    flex-wrap: wrap;
    gap: 8px;
  }

  .header-breadcrumb {
    display: none;
  }

  .tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .pagination {
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* ===========================================================================
   24. ANIMATIONS
   =========================================================================== */

@keyframes shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position: calc(400px + 100%) 0; }
}

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

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

/* ===========================================================================
   25. AUTH PAGES (login.html, logout.html)
   Standalone pages — no app-shell, no sidebar
   =========================================================================== */

/* Full-viewport centering wrapper */
.auth-page {
  min-height: 100vh;
  background: var(--bg-page);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

/* Auth card */
.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: fadeIn 200ms ease-out;
}

/* Logout card smaller */
.auth-card.auth-card-sm {
  max-width: 360px;
}

/* Card header — logo area */
.auth-card-header {
  padding: 32px 32px 0;
}

/* Card body */
.auth-card-body {
  padding: 24px 32px 28px;
}

/* Card footer */
.auth-card-footer {
  padding: 12px 32px;
  border-top: 1px solid var(--border-default);
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
}

.auth-sep {
  color: var(--border-default);
}

.auth-tenant {
  font-weight: 600;
  color: var(--text-secondary);
}

.auth-version {
  font-family: 'JetBrains Mono', monospace;
}

/* Logo block */
.auth-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
}

.auth-logo-mark {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-lg);
  background: var(--color-primary);
  color: #0d1117;
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  letter-spacing: 0.5px;
}

.auth-logo-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.auth-logo-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}

.auth-logo-tagline {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.2px;
}

/* Title & instruction */
.auth-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
  margin-top: 20px;
}

.auth-instruction {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 24px;
}

/* Card reader icon */
.auth-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.auth-card-icon i {
  font-size: 64px;
  color: var(--color-primary);
  opacity: 0.9;
}

/* Status: loading */
.auth-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 16px;
  font-size: 13px;
  color: var(--text-secondary);
}

.auth-spinner {
  display: flex;
  align-items: center;
  gap: 10px;
}

.auth-spinner i {
  color: var(--color-primary);
  font-size: 16px;
}

/* Status: error */
.auth-error {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 16px;
  padding: 12px 14px;
  background: var(--color-danger-light);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius-md);
  font-size: 13px;
  color: var(--color-danger);
  line-height: 1.5;
}

.auth-error i {
  flex-shrink: 0;
  margin-top: 2px;
}

/* Divider */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0 16px;
  font-size: 12px;
  color: var(--text-muted);
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-default);
}

/* Help link */
.auth-help {
  text-align: center;
}

.auth-help-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-link);
  text-decoration: none;
  transition: opacity var(--transition-fast);
}

.auth-help-link:hover {
  opacity: 0.8;
  text-decoration: underline;
}

/* Logout page center icon */
.auth-icon-large {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--color-warning-light);
  margin: 0 auto 20px;
}

.auth-icon-large i {
  font-size: 32px;
  color: var(--color-warning);
}

.auth-logout-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  text-align: center;
  margin-bottom: 8px;
}

.auth-logout-sub {
  font-size: 13px;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 28px;
  line-height: 1.6;
}

/* Theme toggle button — fixed top-right on auth pages */
.auth-theme-toggle {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: var(--z-dropdown);
}

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

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

/* Animation application */
.modal-overlay.open .modal {
  animation: fadeIn 150ms ease-out;
}

.toast-container .toast {
  animation: slideInRight 200ms ease-out;
}

.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid var(--border-default);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.spinner-sm {
  width: 12px;
  height: 12px;
  border-width: 2px;
}

.pulse {
  animation: pulse 2s ease-in-out infinite;
}

/* Live indicator dot */
.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-success);
  display: inline-block;
  animation: pulse 1.5s ease-in-out infinite;
}

/* ===========================================================================
   END OF web.css — INTOPS Intelligence Operations Platform
   Total sections: 24 | Dark-first | Multi-persona (POLA B)
   =========================================================================== */
