/* =========================================
   AUREX PORTAL — Design System CSS
   PT. Sambas Mineral Mining — AMIOP ERP
   ========================================= */

/* CSS Variables */
:root {
  --color-primary: #1E3A5F;
  --color-primary-hover: #152B47;
  --color-primary-light: rgba(30,58,95,0.12);
  --color-accent: #F5A623;
  --color-accent-light: #FFF8E1;
  --color-success: #22C55E;
  --color-success-light: #DCFCE7;
  --color-warning: #F59E0B;
  --color-warning-light: #FEF3C7;
  --color-danger: #EF4444;
  --color-danger-light: #FEE2E2;
  --color-info: #3B82F6;
  --color-info-light: #DBEAFE;
  --bg-page: #F5F5F5;
  --bg-surface: #FFFFFF;
  --bg-elevated: #EBEBEB;
  --bg-sidebar: #1A1A1A;
  --bg-hover: #EFEFEF;
  --text-primary: #111111;
  --text-secondary: #555555;
  --text-muted: #888888;
  --border-default: #E0E0E0;
  --border-strong: #C8C8C8;
  --border-focus: #1E3A5F;
  --header-height: 60px;
  --sidebar-width: 240px;
  --z-sidebar: 100;
  --z-dropdown: 150;
  --z-modal: 200;
  --z-modal-content: 201;
  --z-toast: 500;
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-xl: 12px;
  --radius-full: 9999px;
  --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);
  --transition-fast: 150ms ease;
  --transition-base: 200ms ease;

  /* Semantic text colors — adapt per theme */
  --color-warning-text:  #92400E;
  --color-danger-text:   #991B1B;
  --color-success-text:  #14532D;
  --color-info-text:     #1E3A8A;
  --color-neutral-bg:    #F1F5F9;
  --color-neutral-text:  #64748B;

  /* Purple (missing from portal root) */
  --color-purple:        #7B1FA2;
  --color-purple-light:  #EDE9FE;

  --space-1:  4px;
  --space-2:  8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
}

[data-theme="dark"] {
  --bg-page:        #111111;
  --bg-surface:     #1C1C1C;
  --bg-elevated:    #262626;
  --bg-sidebar:     #0A0A0A;
  --bg-hover:       #2E2E2E;
  --text-primary:   #F5F5F5;
  --text-secondary: #B0B0B0;
  --text-muted:     #6B6B6B;
  --border-default: rgba(255,255,255,0.10);
  --border-strong:  rgba(255,255,255,0.22);

  /* Color overrides — dark legibility */
  --color-primary:       #60A5FA;
  --color-primary-hover: #93C5FD;
  --color-primary-light: rgba(96,165,250,0.15);
  --color-success:       #81C784;
  --color-success-light: rgba(129,199,132,0.12);
  --color-warning:       #FFB74D;
  --color-warning-light: rgba(255,183,77,0.12);
  --color-danger:        #EF9A9A;
  --color-danger-light:  rgba(239,154,154,0.12);
  --color-info:          #90CAF9;
  --color-info-light:    rgba(144,202,249,0.12);
  --color-purple:        #CE93D8;
  --color-purple-light:  rgba(206,147,216,0.12);
  --color-accent-light:  rgba(245,166,35,0.15);
  --border-focus:        #60A5FA;

  /* Semantic text colors — dark mode */
  --color-warning-text:  #FFB74D;
  --color-danger-text:   #EF9A9A;
  --color-success-text:  #81C784;
  --color-info-text:     #90CAF9;
  --color-neutral-bg:    rgba(255,255,255,0.08);
  --color-neutral-text:  #B0B0B0;
}

/* Hardcoded color fixes — dark mode */
[data-theme="dark"] .badge-warning    { background: rgba(255,183,77,0.12); color: #FFB74D; }
[data-theme="dark"] .badge-disputed   { background: rgba(255,183,77,0.12); color: #FFB74D; }
[data-theme="dark"] .badge-expiry-warn { background: rgba(255,183,77,0.12); color: #FFB74D; }
[data-theme="dark"] .alert-warning { background: rgba(255,183,77,0.08);  border-color: rgba(255,183,77,0.3);  color: #FFB74D; }
[data-theme="dark"] .alert-danger  { background: rgba(239,154,154,0.08); border-color: rgba(239,154,154,0.3); color: #EF9A9A; }
[data-theme="dark"] .alert-success { background: rgba(129,199,132,0.08); border-color: rgba(129,199,132,0.3); color: #81C784; }
[data-theme="dark"] .alert-info    { background: rgba(144,202,249,0.08); border-color: rgba(144,202,249,0.3); color: #90CAF9; }
[data-theme="dark"] .toast-warning    { background: #1C1C1C; color: #FFB74D; border-color: rgba(255,183,77,0.3); }

/* Dark mode — btn-primary uses light bg (#60A5FA), must use dark text */
[data-theme="dark"] .btn-primary               { color: #0F172A; }
[data-theme="dark"] .btn-primary:hover         { color: #0F172A; }
[data-theme="dark"] .pagination-btn.active     { color: #0F172A; }

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; }
body { font-family: 'Inter', sans-serif; background: var(--bg-page); color: var(--text-primary); line-height: 1.5; min-height: 100vh; }
a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; }
img { max-width: 100%; }
ul, ol { list-style: none; }

/* =========================================
   LAYOUT SHELL
   ========================================= */
.app-shell {
  display: flex;
  min-height: 100vh;
}

.app-sidebar {
  width: var(--sidebar-width);
  background: var(--bg-sidebar);
  color: #CBD5E1;
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  z-index: var(--z-sidebar);
  transition: transform var(--transition-base);
  overflow: hidden;
}

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

.app-sidebar.collapsed .nav-label,
.app-sidebar.collapsed .brand-info,
.app-sidebar.collapsed .user-name,
.app-sidebar.collapsed .user-role,
.app-sidebar.collapsed .btn-logout {
  display: none;
}

.app-main {
  flex: 1;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.app-header {
  height: var(--header-height);
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-default);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: var(--z-dropdown);
  gap: 16px;
}

.app-content {
  flex: 1;
  padding: 24px;
  padding-bottom: 40px;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: calc(var(--z-sidebar) - 1);
}

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

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

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

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

.breadcrumb-sep { color: var(--text-muted); }
.breadcrumb-current { color: var(--text-primary); font-weight: 500; }
.header-sync { font-size: 12px; color: var(--text-muted); display: flex; align-items: center; gap: 4px; }

/* =========================================
   BOTTOM NAV (Mobile)
   ========================================= */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 56px;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-default);
  display: none;
  z-index: var(--z-sidebar);
}

.bottom-nav.visible {
  display: flex;
}

.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 11px;
  color: var(--text-muted);
  text-decoration: none;
}

.bottom-nav-item:hover { text-decoration: none; }

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

/* =========================================
   SIDEBAR COMPONENTS
   ========================================= */
.sidebar-brand {
  height: var(--header-height);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}

.brand-logo {
  width: 36px;
  height: 36px;
  background: var(--color-accent);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 16px;
  flex-shrink: 0;
}

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

.brand-sub {
  font-size: 11px;
  color: rgba(255,255,255,0.4);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.sidebar-footer {
  padding: 12px 16px;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  min-height: 60px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  transition: var(--transition-fast);
  font-size: 14px;
  border-left: 3px solid transparent;
  position: relative;
}

.nav-item:hover {
  background: rgba(255,255,255,0.06);
  color: white;
  text-decoration: none;
}

.nav-item.active {
  color: var(--color-accent);
  background: rgba(245,166,35,0.12);
  border-left-color: var(--color-accent);
}

.nav-badge {
  font-size: 10px;
  padding: 1px 5px;
  margin-left: auto;
}

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

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

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

.user-role {
  font-size: 11px;
  color: rgba(255,255,255,0.4);
}

.btn-logout {
  background: none;
  border: none;
  color: rgba(255,255,255,0.5);
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-md);
  transition: var(--transition-fast);
  flex-shrink: 0;
  margin-left: auto;
}
.btn-logout:hover { color: white; background: rgba(255,255,255,0.08); }

.btn-logout:hover {
  color: var(--color-danger);
  background: rgba(239,68,68,0.1);
}

/* =========================================
   BADGES
   ========================================= */
.badge {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  line-height: 1.5;
}

.badge-pending { background: var(--color-neutral-bg); color: var(--color-neutral-text); }
.badge-confirmed { background: var(--color-success-light); color: var(--color-success-text); }
.badge-disputed { background: var(--color-warning-light); color: var(--color-warning-text); }
.badge-voided { background: var(--color-danger-light); color: var(--color-danger-text); }
.badge-info { background: var(--color-info-light); color: var(--color-info-text); }
.badge-gray { background: var(--bg-elevated); color: var(--text-muted); }
.badge-success { background: var(--color-success-light); color: var(--color-success-text); }
.badge-warning { background: var(--color-warning-light); color: var(--color-warning-text); }
.badge-danger { background: var(--color-danger-light); color: var(--color-danger-text); }
.badge-aport-review { background: var(--color-purple-light); color: var(--color-purple); }
.badge-aport-sent { background: var(--color-info-light); color: var(--color-info-text); }
.badge-aport-overdue { background: var(--color-danger-light); color: var(--color-danger-text); font-weight: 700; }
.badge-expiry-warn { background: var(--color-warning-light); color: var(--color-warning-text); }

/* =========================================
   CARDS
   ========================================= */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
}

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

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

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

.card-body {
  padding: 20px;
}

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

/* =========================================
   STAT CARDS
   ========================================= */
.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--shadow-xs);
}

.stat-card.stat-primary { border-top: 3px solid var(--color-primary); }
.stat-card.stat-success { border-top: 3px solid var(--color-success); }
.stat-card.stat-warning { border-top: 3px solid var(--color-warning); }
.stat-card.stat-danger { border-top: 3px solid var(--color-danger); }
.stat-card.stat-info { border-top: 3px solid var(--color-info); }

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

.stat-card.stat-primary .stat-icon { background: var(--color-primary-light); color: var(--color-primary); }
.stat-card.stat-success .stat-icon { background: var(--color-success-light); color: var(--color-success); }
.stat-card.stat-warning .stat-icon { background: var(--color-warning-light); color: var(--color-warning); }
.stat-card.stat-danger .stat-icon { background: var(--color-danger-light); color: var(--color-danger); }
.stat-card.stat-info .stat-icon { background: var(--color-info-light); color: var(--color-info); }

.stat-label {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

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

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

/* =========================================
   TABLES
   ========================================= */
.table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
}

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

thead {
  background: var(--bg-elevated);
}

tbody tr {
  border-top: 1px solid var(--border-default);
  transition: background var(--transition-fast);
}

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

th {
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: left;
  white-space: nowrap;
}

td {
  padding: 12px 14px;
  font-size: 13.5px;
  color: var(--text-primary);
  vertical-align: middle;
}

.col-no { width: 40px; text-align: center; color: var(--text-muted); }
.col-action { width: 120px; text-align: right; }

.sortable { cursor: pointer; user-select: none; }
.sortable:hover { color: var(--text-primary); }

.table-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-default);
  flex-wrap: wrap;
}

.search-box {
  position: relative;
  flex: 1;
  min-width: 200px;
}

.search-box input {
  width: 100%;
  padding: 8px 12px 8px 36px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  color: var(--text-primary);
  font-size: 13px;
  outline: none;
}

.search-box input:focus {
  border-color: var(--border-focus);
}

.search-box::before {
  content: '\f002';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 13px;
}

.filter-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-chip {
  padding: 5px 12px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  background: var(--bg-surface);
  color: var(--text-secondary);
  transition: var(--transition-fast);
}

.filter-chip:hover {
  background: var(--bg-hover);
}

.filter-chip.active {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

/* =========================================
   FORMS
   ========================================= */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.form-group:last-child {
  margin-bottom: 0;
}

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

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

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

.form-control:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--color-primary-light);
}

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

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

.form-select {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 32px;
}

.form-select:focus {
  border-color: var(--border-focus);
}

.input-group {
  display: flex;
  align-items: stretch;
}

.input-prefix,
.input-suffix {
  padding: 9px 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  color: var(--text-secondary);
  font-size: 13px;
  white-space: nowrap;
  display: flex;
  align-items: center;
}

.input-prefix {
  border-right: none;
  border-radius: var(--radius-md) 0 0 var(--radius-md);
}

.input-suffix {
  border-left: none;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  cursor: pointer;
}

.input-group .form-control {
  border-radius: 0;
}

/* =========================================
   BUTTONS
   ========================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition-fast);
  white-space: nowrap;
  text-decoration: none;
  line-height: 1.4;
  font-family: inherit;
}

.btn:hover { text-decoration: none; }

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

.btn-primary:hover {
  background: var(--color-primary-hover);
  border-color: var(--color-primary-hover);
}

.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;
}

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

.btn-outline:hover {
  background: var(--color-primary-light);
}

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

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

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

.btn-xs {
  padding: 4px 8px;
  font-size: 11px;
}

.btn-icon {
  padding: 7px;
  min-width: 32px;
  min-height: 32px;
}

.btn-back {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  color: var(--text-secondary);
  cursor: pointer;
  transition: background var(--transition-fast);
  flex-shrink: 0;
}
.btn-back:hover { background: var(--bg-hover); }

/* =========================================
   AVATAR
   ========================================= */
.avatar    { width: 36px; height: 36px; border-radius: 50%; background: #0284C7; color: white; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; flex-shrink: 0; }
.avatar-sm { width: 28px; height: 28px; font-size: 11px; }

/* =========================================
   BELL NOTIFICATION
   ========================================= */
.bell-wrapper { position: relative; }
.bell-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-danger);
  color: white;
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: 700;
}

/* =========================================
   DROPDOWN
   ========================================= */
.dropdown { position: relative; display: inline-block; }
.dropdown-menu {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: var(--z-dropdown);
  min-width: 200px;
  overflow: hidden;
}
.dropdown-menu.open { display: block; }
.dropdown-menu-right { right: 0; left: auto; }
.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  font-size: 14px;
  color: var(--text-primary);
  cursor: pointer;
  transition: background var(--transition-fast);
  text-decoration: none;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
}
.dropdown-item:hover  { background: var(--bg-hover); }
.dropdown-item.danger { color: var(--color-danger); }
.dropdown-header  { padding: 10px 16px 8px; border-bottom: 1px solid var(--border-default); }
.dropdown-divider { height: 1px; background: var(--border-default); }

/* =========================================
   ALERTS
   ========================================= */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-lg);
  font-size: 13.5px;
  line-height: 1.5;
}

.alert-warning {
  background: var(--color-warning-light);
  color: var(--color-warning-text);
  border: 1px solid var(--color-warning);
}

.alert-danger {
  background: var(--color-danger-light);
  color: var(--color-danger-text);
  border: 1px solid var(--color-danger);
}

.alert-success {
  background: var(--color-success-light);
  color: var(--color-success-text);
  border: 1px solid var(--color-success);
}

.alert-info {
  background: var(--color-info-light);
  color: var(--color-info-text);
  border: 1px solid var(--color-primary);
}

/* =========================================
   MODALS
   ========================================= */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: var(--z-modal);
  align-items: center;
  justify-content: center;
  padding: 16px;
}

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

.modal {
  background: var(--bg-surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  z-index: var(--z-modal-content);
  animation: modal-in 200ms ease;
}

.modal-sm { max-width: 420px; }
.modal-md { max-width: 560px; }
.modal-lg { max-width: 720px; }

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

.modal-title {
  font-size: 15px;
  font-weight: 600;
}

.modal-body {
  padding: 20px;
}

.modal-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border-default);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  background: var(--bg-elevated);
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}

/* =========================================
   TOASTS
   ========================================= */
.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: var(--z-toast);
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius-lg);
  font-size: 13.5px;
  font-weight: 500;
  min-width: 260px;
  max-width: 360px;
  box-shadow: var(--shadow-lg);
  animation: toast-in 300ms ease;
}

.toast-success { background: var(--color-success-light); color: var(--color-success-text); border: 1px solid var(--color-success); }
.toast-error   { background: var(--color-danger-light); color: var(--color-danger-text); border: 1px solid var(--color-danger); }
.toast-warning { background: var(--color-warning-light); color: var(--color-warning-text); border: 1px solid var(--color-warning); }
.toast-info    { background: var(--color-info-light); color: var(--color-info-text); border: 1px solid var(--color-primary); }

/* =========================================
   UPLOAD ZONE
   ========================================= */
.upload-zone {
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 32px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition-base);
}

.upload-zone:hover {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
}

.upload-zone.drag-over {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
}

/* =========================================
   APORT-SPECIFIC COMPONENTS
   ========================================= */
.summary-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-top: 3px solid;
  padding: 16px 20px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
}

.summary-card.total-ton { border-top-color: var(--color-primary); }
.summary-card.total-invoice { border-top-color: var(--color-success); }
.summary-card.open-dispute { border-top-color: var(--color-warning); }
.summary-card.pending-pay { border-top-color: var(--color-info); }

.contract-expiry-banner {
  border-left: 4px solid var(--color-warning);
}

.dispute-file-preview {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.dispute-file-item {
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 8px;
  display: flex;
  gap: 8px;
  font-size: 12px;
  align-items: center;
  background: var(--bg-elevated);
}

.ticket-detail-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.wb-photo-frame {
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: zoom-in;
  background: var(--bg-elevated);
}

.char-counter {
  font-size: 12px;
  color: var(--text-muted);
  text-align: right;
  margin-top: 4px;
}

.char-counter.warn { color: var(--color-warning); }
.char-counter.ok   { color: var(--color-success); }

/* =========================================
   TIMELINE (DISPUTE)
   ========================================= */
.timeline {
  position: relative;
  padding-left: 24px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 4px;
  bottom: 0;
  width: 2px;
  background: var(--border-default);
}

.timeline-item {
  position: relative;
  padding-bottom: 20px;
}

.timeline-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  position: absolute;
  left: -32px;
  top: 2px;
  flex-shrink: 0;
}

.timeline-dot.submitted { background: var(--color-info); }
.timeline-dot.review    { background: var(--color-warning); }
.timeline-dot.approved  { background: var(--color-success); }
.timeline-dot.rejected  { background: var(--color-danger); }

.timeline-content {
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  background: var(--bg-surface);
}

.timeline-title {
  font-weight: 600;
  font-size: 14px;
}

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

.timeline-by {
  font-size: 13px;
  color: var(--text-secondary);
}
.timeline-note {
  margin-top: 8px;
  font-size: 13px;
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  color: var(--text-secondary);
}

/* =========================================
   LOGIN PAGE
   ========================================= */
.login-page {
  min-height: 100vh;
  background: linear-gradient(135deg, #1A1A1A 0%, #0A0A0A 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.login-card {
  background: var(--bg-surface);
  border-radius: var(--radius-xl);
  padding: 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-lg);
}

.login-logo {
  width: 56px;
  height: 56px;
  background: var(--color-accent);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 24px;
  margin: 0 auto 16px;
}

.login-title {
  font-size: 22px;
  font-weight: 700;
  text-align: center;
  color: var(--text-primary);
}

.login-sub {
  font-size: 13px;
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 28px;
}

.demo-info-box {
  background: var(--color-primary-light);
  border: 1px solid rgba(30,58,95,0.2);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-top: 20px;
}

.demo-credential {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--color-primary);
}

/* =========================================
   PAGE HEADER
   ========================================= */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
  flex-wrap: wrap;
}

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

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

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

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

/* =========================================
   PAGINATION
   ========================================= */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 16px;
}

.pagination-btn {
  min-width: 32px;
  height: 32px;
  padding: 4px 8px;
  border: 1px solid var(--border-default);
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  font-size: 13px;
  cursor: pointer;
  color: var(--text-secondary);
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
}

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

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

/* =========================================
   EMPTY STATE
   ========================================= */
.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
}

.empty-icon {
  font-size: 40px;
  margin-bottom: 16px;
  opacity: 0.4;
}

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

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

/* =========================================
   UTILITIES
   ========================================= */
.flex       { display: flex; }
.flex-col   { flex-direction: column; }
.flex-1     { flex: 1; }
.flex-wrap  { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start  { align-items: flex-start; }
.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; }
.gap-6 { gap: 24px; }

.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mt-5 { margin-top: 20px; }
.mt-6 { margin-top: 24px; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mb-5 { margin-bottom: 20px; }
.mb-6 { margin-bottom: 24px; }

.ml-auto { margin-left: auto; }
.mr-auto { margin-right: auto; }

.p-2 { padding: 8px; }
.p-3 { padding: 12px; }
.p-4 { padding: 16px; }
.p-5 { padding: 20px; }
.p-6 { padding: 24px; }

.w-full  { width: 100%; }
.hidden  { display: none; }
.block   { display: block; }

.truncate {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.text-xs   { font-size: 11px; }
.text-sm   { font-size: 12px; }
.text-base { font-size: 14px; }
.text-lg   { font-size: 16px; }
.text-xl   { font-size: 20px; }
.text-2xl  { font-size: 24px; }

.font-mono    { font-family: 'JetBrains Mono', monospace; }
.font-medium  { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold    { font-weight: 700; }

.text-muted     { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-primary-c { color: var(--color-primary); }
.text-success   { color: var(--color-success); }
.text-warning   { color: var(--color-warning); }
.text-danger    { color: var(--color-danger); }
.text-info      { color: var(--color-info); }

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

.link {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 500;
}

.link:hover { text-decoration: underline; }

.grid         { display: grid; }
.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); }

.min-w-0 { min-width: 0; }

/* =========================================
   ANIMATIONS
   ========================================= */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes modal-in {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}

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

@keyframes shimmer {
  from { background-position: -200% 0; }
  to   { background-position: 200% 0; }
}

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 768px) {
  .app-sidebar {
    transform: translateX(-100%);
    position: fixed;
  }

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

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

  .app-content {
    padding: 16px;
    padding-bottom: 72px;
  }

  .bottom-nav.visible {
    display: flex;
  }

  .ticket-detail-panel {
    grid-template-columns: 1fr;
  }

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

  .page-header {
    flex-direction: column;
  }

  .table-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 480px) {
  .login-card {
    padding: 28px 20px;
  }
}

/* ===== Extended Utilities ===== */
.text-10  { font-size: 10px; }
.text-13  { font-size: 13px; }
.text-primary { color: var(--color-primary); }

.m-0  { margin: 0; }
.p-0  { padding: 0; }
.ml-1 { margin-left: 4px; }
.ml-2 { margin-left: 8px; }
.ml-3 { margin-left: 12px; }
.mr-1 { margin-right: 4px; }
.mr-2 { margin-right: 8px; }
.mr-3 { margin-right: 12px; }
.mb-auto { margin-bottom: auto; }
.mt-auto { margin-top: auto; }
.pt-2 { padding-top: 8px; }
.pt-3 { padding-top: 12px; }
.pt-4 { padding-top: 16px; }
.pb-2 { padding-bottom: 8px; }
.pb-4 { padding-bottom: 16px; }
.pl-2 { padding-left: 8px; }
.pl-4 { padding-left: 16px; }
.px-2 { padding-left: 8px;  padding-right: 8px; }
.px-3 { padding-left: 12px; padding-right: 12px; }
.py-1 { padding-top: 4px;   padding-bottom: 4px; }
.py-3 { padding-top: 12px;  padding-bottom: 12px; }

.flex-between   { display: flex; align-items: center; justify-content: space-between; }
.flex-center    { display: flex; align-items: center; justify-content: center; }
.flex-col-gap-2 { display: flex; flex-direction: column; gap: 8px; }
.flex-col-gap-3 { display: flex; flex-direction: column; gap: 12px; }
.inline-flex    { display: inline-flex; }

.relative        { position: relative; }
.absolute        { position: absolute; }
.overflow-auto   { overflow: auto; }
.overflow-y-auto { overflow-y: auto; }
.overflow-x-auto { overflow-x: auto; }

.line-1  { line-height: 1; }
.nowrap  { white-space: nowrap; }
.w-auto  { width: auto; }
.border-none { border: none; }
.radius-0    { border-radius: 0; }

.border-l-primary { border-left: 4px solid var(--color-primary); }
.border-l-success { border-left: 4px solid var(--color-success); }
.border-l-warning { border-left: 4px solid var(--color-warning); }
.border-l-danger  { border-left: 4px solid var(--color-danger); }
.border-l-info    { border-left: 4px solid var(--color-info); }

.w-160 { width: 160px; }
.w-200 { width: 200px; }

.text-11 { font-size: 11px; }
.text-14 { font-size: 14px; }
.text-8 { font-size: 8px; }
.text-2xl { font-size: 2rem; }
.text-white { color: white; }
.text-upper { text-transform: uppercase; }
.tracking-1 { letter-spacing: 0.5px; }
.font-normal { font-weight: 400; }
.mt-10 { margin-top: 10px; }
.mb-10 { margin-bottom: 10px; }
.p-8 { padding: 32px; }
.p-10 { padding: 10px; }
.pl-36 { padding-left: 36px; }
.w-150 { width: 150px; }
.flex-baseline-gap-1 { display: flex; align-items: baseline; gap: 4px; }
.flex-shrink-0 { flex-shrink: 0; }
.flex-1 { flex: 1; }
.flex-gap-sm { display: flex; gap: 8px; }
.flex-gap-sm-10 { display: flex; align-items: center; gap: 10px; }
.grid-2-col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.w-40 { width: 40px; }
.accent-primary { accent-color: var(--color-primary); }
.bg-elevated-radius { background: var(--bg-elevated); border-radius: var(--radius-md); padding: 14px; }
.px-8 { padding-left: 32px; padding-right: 32px; }
.px-4-py-3 { padding: 12px 16px; }
.color-danger-text { color: var(--color-danger); }
.text-success-green { color: #22C55E; }
.border-bottom-default { border-bottom: 1px solid var(--border-default); }
.border-default { border: 1px solid var(--border-default); }
.bg-elevated-rounded { background: var(--bg-elevated); border-radius: 8px; }
.grid-span-2 { grid-column: span 2; }
.label-upper-1 { font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 8px; }
.label-upper-12 { font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 12px; }
.label-11-mb8 { font-size: 11px; color: var(--text-muted); text-transform: uppercase; margin-bottom: 8px; }
.label-11-mb4-600 { font-size: 11px; color: var(--text-muted); text-transform: uppercase; font-weight: 600; margin-bottom: 4px; }
.text-muted-no-link { font-size: 12px; color: var(--text-muted); text-decoration: none; }
.text-base-muted { font-size: 13px; font-weight: 400; color: var(--text-secondary); }
.text-18-bold { font-size: 18px; font-weight: 700; color: var(--text-primary); }
.text-20-400-muted { font-size: 20px; font-weight: 400; color: var(--text-muted); }
.text-16-mt1 { font-size: 16px; margin-top: 4px; }
.text-16     { font-size: 16px; }
.text-15     { font-size: 15px; }
.text-28-mono-bold { font-size: 28px; font-weight: 700; font-family: monospace; }
.grid-1fr-320   { display: grid; grid-template-columns: 1fr 320px; }
.label-upper-10 { font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 10px; }
.label-upper-6  { font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: #555555; margin-bottom: 6px; }
.label-upper-55 { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.12em; color: #555555; }
.tv-mono-accent  { font-size: 13px; font-family: 'JetBrains Mono', monospace; color: #F5A623; font-weight: 700; }
.kpi-value-sm   { font-size: 13px; padding: 6px 14px; }
.opacity-80     { opacity: 0.8; }
.text-11-grey   { font-size: 11px; color: #6B6B6B; }
.p-6-14         { padding: 6px 14px; }
.text-primary-color { color: var(--text-primary); }
.text-info-color { color: var(--color-info); }
.text-success-lh1 { color: var(--color-success); line-height: 1; }
.tv-grid-1fr-320 { flex: 1; display: grid; grid-template-columns: 1fr 320px; overflow: hidden; }
.tv-grid-1fr-300 { flex: 1; display: grid; grid-template-columns: 1fr 300px; gap: 0; overflow: hidden; }
.grid-4-col-16  { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; flex-shrink: 0; }
.flex-between-pad { display: flex; justify-content: space-between; padding: 8px 12px; background: var(--bg-elevated); border-radius: 6px; }
.flex-gap-sp2   { display: flex; gap: var(--space-2); }
.flex-wrap-gap-10 { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.flex-between-mb4 { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-4); }
.flex-gap6-pointer { display: flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; }
.flex-baseline-gap-6 { display: flex; align-items: baseline; gap: 6px; }
.danger-mr6     { color: var(--color-danger); margin-right: 6px; }
.text-accent     { color: var(--color-accent); }
.text-accent-lh1 { color: var(--color-accent); line-height: 1; }
.text-danger-bold { color: #dc3545; font-weight: 700; }
.tv-text-grey-13 { color: #B0B0B0; font-size: 13px; }
.tv-link-grey   { color: #6B6B6B; font-size: 12px; text-decoration: none; display: flex; align-items: center; gap: 6px; }
.btn-clear-grey  { color: #6B6B6B; background: none; border: none; cursor: pointer; font-size: 14px; }
.text-55-mx2    { color: #555555; margin: 0 8px; }
.border-top-auto { border-top: 1px solid var(--border-default); padding-top: 20px; margin-top: auto; }
.tv-border-top-auto { border-top: 1px solid rgba(255,255,255,0.10); padding-top: 16px; margin-top: auto; }
.tv-border-top-mt8  { border-top: 1px solid rgba(255,255,255,0.10); padding-top: 16px; margin-top: 8px; }
.card-xxl       { border-radius: 16px; padding: 28px; }
.card-lg-p6     { border-radius: 12px; padding: 24px; }
.border-left-purple { border-left: 4px solid #8b5cf6; }
.input-elevated-bold { border: 1px solid var(--border-default); padding: 6px; background: var(--bg-elevated); font-weight: 600; }
.cell-warning   { border: 1px solid var(--border-default); padding: 6px; background: #fef3c7; color: #92400e; }
.cell-success   { border: 1px solid var(--border-default); padding: 6px; background: #d1fae5; color: #065f46; }
.td-elevated-left { border: 1px solid var(--border-default); padding: 10px; text-align: left; }
.bg-muted-rounded  { background: var(--bg-muted); border-radius: 8px; }
.tv-header-dark { background: rgba(26,26,26,0.98); border-bottom: 1px solid rgba(255,255,255,0.12); padding: 0 32px; height: 56px; display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; }
.badge-purple   { background: #f3e8ff; color: #8b5cf6; }
.bg-success-btn  { background: #28a745; }
.tv-panel-right  { background: #111111; border-left: 1px solid rgba(255,255,255,0.10); padding: 24px; display: flex; flex-direction: column; gap: 16px; overflow-y: auto; }
.divider-v       { width: 1px; height: 40px; background: var(--border-default); }
.w-36            { width: 36px; }
.w-180           { width: 180px; }
.w-160-right     { width: 160px; text-align: right; }
.w-14            { width: 14px; }
.w-140           { width: 140px; }
.legend-dot-warn { width: 12px; height: 12px; background: #fff5f5; border: 1px solid #ffcccc; border-radius: 2px; }
.table-collapse  { width: 100%; border-collapse: collapse; }
.pb4-border-bb   { padding-bottom: 16px; border-bottom: 1px solid var(--border-default); }
.py-2-bold       { padding: 8px 0; font-weight: 600; }
.w-80-h8         { width: 80px; height: 8px; }

.overflow-x-auto { overflow-x: auto; }
.overflow-y-auto { overflow-y: auto; }
.text-green-500  { color: #22c55e; }
.grid-gap-14    { display: grid; gap: 14px; }
.text-20-bold   { font-size: 20px; font-weight: 700; margin: 0; }
.text-13-muted-mt2 { font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.text-8-success { font-size: 8px; color: var(--color-success); }
.max-w-480      { max-width: 480px; }
.max-w-560      { max-width: 560px; }
.min-w-200      { min-width: 200px; }
.text-15-bold   { font-size: 15px; font-weight: 700; }
.text-16-bold   { font-size: 16px; font-weight: 700; }
.font-08-rem    { font-size: 0.5rem; }
.border-left-primary { border-left: 4px solid var(--color-primary); }
.gap-1rem       { gap: 1rem; }
.p-0-16         { padding: 0 16px; }
.text-warning   { color: var(--color-warning); }
.text-danger-color { color: var(--color-danger); }
.bg-muted       { background: var(--bg-muted); }
.bg-elevated-muted { background: var(--bg-elevated); color: var(--text-muted); }
.cell-error     { border: 1px solid var(--border-default); padding: 6px; background: #fee2e2; color: #991b1b; }
.grid-2-sp4     { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); margin-bottom: var(--space-4); }
.indicator-dot-warn { position: absolute; left: 0; width: 14px; height: 14px; border-radius: 50%; background: var(--color-warning); border: 2px solid white; box-shadow: 0 0 0 2px var(--color-warning); }
.h-200           { height: 200px; }
.p-rem-2-1       { padding: 2rem 1rem; }
.hero-number     { font-size: 3rem; margin-bottom: 0.5rem; }
.btn-sm-rem      { font-size: 0.85rem; padding: 0.4rem 0.8rem; }
.btn-md-rem      { font-size: 0.9rem; padding: 0.4rem 1rem; }
.grid-1fr-360    { display: grid; grid-template-columns: 1fr 360px; }
.gap-5           { gap: 20px; }
.bg-success-alpha { background: rgba(34,197,94,0.12); }
.text-13-muted-mt10 { font-size: 13px; color: var(--text-muted); margin-top: 10px; }
.text-13-muted-mt8  { font-size: 13px; color: var(--text-muted); margin-top: 8px; }
.text-13-success-mt8 { font-size: 13px; color: var(--color-success); margin-top: 8px; }
.text-sm-muted-mt6  { font-size: 12px; color: var(--text-muted); margin-top: 6px; }
.text-sm-muted-mt2  { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.text-sm-grey-mt1   { font-size: 12px; color: #6B6B6B; margin-top: 4px; }
.border-top-pt5  { border-top: 1px solid var(--border-default); padding-top: 20px; }
.canvas-panel-right { background: var(--bg-elevated); border-left: 1px solid var(--border-default); padding: 24px; display: flex; flex-direction: column; gap: 16px; overflow-y: auto; }
.tv-card-main    { flex: 1; background: #1C1C1C; border: 1px solid rgba(255,255,255,0.10); border-radius: 16px; padding: 24px; overflow: hidden; min-height: 0; }
.label-55-mt12   { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: #555555; margin-bottom: 12px; }
.label-muted-12  { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-muted); margin-bottom: 12px; }
.label-subtle-1  { font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); margin-bottom: 8px; }
.label-subtle-2  { font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); margin-bottom: 4px; }
.danger-ef-mr6   { color: #ef4444; margin-right: 6px; }
.warning-mr6     { margin-right: 6px; color: #F57C00; }
.mt6-muted       { margin-top: 6px; color: var(--text-muted); }

/* Pass 19 */
.my-16              { margin-top: 16px; margin-bottom: 16px; }
.mb-rem-5           { margin-bottom: 0.5rem; }
.h-10               { height: 10px; }
.flex-baseline-gap4-mt4 { display: flex; align-items: baseline; gap: 4px; margin-top: 4px; }
.text-sm-mt2        { font-size: 12px; margin-top: 2px; }
.text-white-lh1     { color: white; line-height: 1; }
.text-amber-lh1     { color: #f59e0b; line-height: 1; }
.danger-dc-mr6      { margin-right: 6px; color: #dc2626; }
.bg-dark-red        { background: #1c0a0a; }
.tv-mono-grey       { font-family: 'JetBrains Mono', monospace; font-weight: 700; color: #B0B0B0; }
.tv-mono-amber      { font-family: 'JetBrains Mono', monospace; font-weight: 700; color: #f59e0b; }
.tv-big-stat        { font-size: 40px; font-weight: 800; font-family: 'JetBrains Mono', monospace; color: var(--border-strong); }
.text-sm-grey-mt6   { font-size: 12px; color: #6B6B6B; margin-top: 6px; }
.text-18-mt4        { font-size: 18px; margin-top: 4px; }
.grid-2-gap16-mb20  { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 20px; }

.flex-gap-1  { display: flex; align-items: center; gap: 4px; }
.flex-gap-2  { display: flex; align-items: center; gap: 8px; }
.flex-gap-3  { display: flex; align-items: center; gap: 12px; }
.flex-gap-4  { display: flex; align-items: center; gap: 16px; }
.flex-gap-6  { display: flex; align-items: center; gap: 24px; }
.flex-col-gap-4 { display: flex; flex-direction: column; gap: 16px; }
.flex-between-wrap { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }

.label-sm  { font-size: 12px; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 4px; }
.label-11  { font-size: 11px; color: var(--text-muted); font-weight: 600; text-transform: uppercase; margin-bottom: 4px; }
.label-11-2 { font-size: 11px; color: var(--text-muted); font-weight: 600; text-transform: uppercase; margin-bottom: 2px; }
.upper-muted-sm { color: var(--text-muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.text-sm-muted  { font-size: 12px; color: var(--text-muted); }
.text-13-muted  { font-size: 13px; color: var(--text-muted); }
.d-none          { display: none; }
.p-6px           { padding: 6px; }
.p-12            { padding: 12px; }
.p-14            { padding: 14px; }
.mt-6px          { margin-top: 6px; }
.h-220           { height: 220px; }
.min-w-160       { min-width: 160px; }
.max-w-600       { max-width: 600px; }
.no-events       { pointer-events: none; }
.btn-clear       { color: var(--text-muted); background: none; border: none; cursor: pointer; font-size: 14px; }
.input-group-left  { border-radius: var(--radius-md) 0 0 var(--radius-md); }
.input-group-right { cursor: pointer; border-radius: 0 var(--radius-md) var(--radius-md) 0; }
.text-excel      { color: #217346; }
.card-xl         { border-radius: 16px; padding: 24px; }
.card-lg         { border-radius: 12px; padding: 20px; }
.input-bg-elevated { border: 1px solid var(--border-default); padding: 6px; background: var(--bg-elevated); }
.bg-elevated-card  { background: var(--bg-elevated); border-radius: 8px; padding: 12px; }
.icon-amber      { width: 32px; height: 32px; background: #F5A623; border-radius: 8px; display: flex; align-items: center; justify-content: center; }
.avatar-primary  { width: 24px; height: 24px; background: var(--color-primary-light); border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 12px; font-weight: 700; color: var(--color-primary); }
.search-icon-abs { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 13px; }
.cell-center-bg  { text-align: center; padding: var(--space-3) var(--space-4); background: var(--bg-elevated); border-radius: var(--radius-md); }
.grid-2fr-1fr   { display: grid; grid-template-columns: 2fr 1fr; }
.td-mono-danger  { padding: 6px; text-align: right; font-family: monospace; color: var(--color-danger); }
.td-danger       { padding: 6px; color: var(--color-danger); }
.td-success-pl   { padding: 6px; color: var(--color-success); padding-left: 16px; }
.mt-6px-right   { margin-top: 6px; text-align: right; }

/* ── Portal inline-style fixes ── */
.vendor-avatar         { width:64px;height:64px;background:var(--color-primary);border-radius:var(--radius-lg);display:flex;align-items:center;justify-content:center;color:white;font-size:24px;font-weight:700;flex-shrink:0; }
.section-divider-top   { border-top:1px solid var(--border-default);padding-top:12px; }
.form-centered         { max-width:480px;margin:0 auto; }
.info-block            { background:var(--bg-elevated);border-radius:var(--radius-md);padding:14px 16px;margin-bottom:4px; }
.reason-box            { background:var(--bg-elevated);border-radius:var(--radius-md);padding:14px 16px;font-size:13.5px;line-height:1.7; }
.notice-block          { background:var(--bg-elevated);border-radius:var(--radius-md);padding:12px 16px;margin-bottom:16px; }
.dispute-item          { border:1px solid var(--border-default);border-radius:var(--radius-md);padding:12px;margin-bottom:10px; }
.mw-300                { max-width:300px; }
.mw-280                { max-width:280px; }
.cell-truncate         { display:block;max-width:280px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis; }
.card-body-h260        { height:260px; }
.card-body-h280        { height:280px; }
.tfoot-divider         { border-top:2px solid var(--border-strong); }
.tr-primary-total      { background:var(--color-primary);color:white; }
.icon-upload           { font-size:24px;color:var(--text-muted);display:block;margin-bottom:8px; }
.icon-upload-lg        { font-size:28px;color:var(--text-muted);display:block;margin-bottom:8px; }
.grid-1fr-300          { display:grid;grid-template-columns:1fr 300px;gap:16px; }
.card-header-divider   { border-top:1px solid var(--border-default);border-bottom:none;margin-top:0; }
.weight-grid           { display:grid;grid-template-columns:repeat(3,1fr);gap:16px; }
.info-grid             { display:grid;grid-template-columns:1fr 1fr;gap:16px; }
.stat-block-center     { background:var(--bg-elevated);padding:16px;border-radius:var(--radius-md);text-align:center; }
.photo-placeholder-inner { height:200px;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:8px;color:var(--text-muted); }
.icon-xl-muted         { font-size:32px;opacity:0.4; }
.btn-warning-outline   { color:var(--color-warning);border-color:var(--color-warning); }
.btn-remove            { color:var(--color-danger);padding:2px 4px; }
.doc-bg-warn           { border:none;padding:0;background:var(--color-warning-light); }
.doc-bg-ok             { border:none;padding:0;background:var(--color-success-light); }
.progress-mini-track   { height:4px;background:var(--bg-elevated);border-radius:99px;margin-top:6px; }
.progress-mini-fill    { height:4px;background:var(--color-primary);border-radius:99px; }
