/* /echo/assets/css/app.css */
/* -----------------------------------------------------------------------------
   Echo Orders Dashboard - Light, broker-style theme (single sheet; no dark mode)
   Contains: layout, forms, tables, modals, dropzone, quick notes, and utilities
   ----------------------------------------------------------------------------- */

:root{
  --bg:#f6f8fb; 
  --panel:#fff; 
  --fg:#1d2a3a; 
  --muted:#66768a; 
  --border:#dde4ed;
  --accent:#e21d2a; 
  --primary:#195fcb; 
  --primary-hover:#1654b5;
}

/* ========================= Base Styles ========================= */
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  color:var(--fg);
  font:14px/1.45 "Segoe UI",Roboto,Arial,sans-serif
}
a{color:var(--primary);text-decoration:none}
a:hover{text-decoration:underline}

/* ========================= Layout ========================= */
.container{max-width:1300px;margin:0 auto;padding:16px}
main.container{position:relative} /* For loading overlay positioning */

/* ========================= Header & Topbar ========================= */
.logo{height:40px;vertical-align:middle}
.topbar{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin:8px 0 16px
}
.topbar .left{display:flex;align-items:center;gap:12px}
.topbar .right{display:flex;align-items:center;gap:10px}
.topbar h1{
  margin:0;
  font-size:20px;
  font-weight:600;
  color:var(--fg);
  letter-spacing:-0.01em
}

/* Dashboard-style page header (white container with shadow) */
.dashboard-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px;
  margin-bottom:20px;
  background:#fff;
  padding:20px;
  border-radius:8px;
  box-shadow:0 1px 3px rgba(0,0,0,0.1)
}
.dashboard-header .logo-container{
  flex-shrink:0
}
.dashboard-header h1{
  font-size:24px;
  font-weight:600;
  margin:0 0 6px 0;
  color:#1f2937;
  text-align:center
}
.dashboard-header p{
  color:#6b7280;
  margin:0;
  font-size:14px;
  text-align:center
}

.badge{
  background:#eef3f9;
  color:#3a506b;
  padding:4px 8px;
  border-radius:999px;
  font-size:12px;
  border:1px solid var(--border)
}
.version-badge {
  background-color: #e5e7eb;
  color: #4b5563;
  font-family: ui-monospace, Consolas, Menlo, monospace;
}

/* ========================= Forms & Inputs ========================= */
.input,#q{
  padding:8px 10px;
  border:1px solid var(--border);
  background:#fff;
  color:var(--fg);
  border-radius:8px;
  width:280px;
  outline:none
}
.input:focus,#q:focus{
  border-color:#c9d4e3;
  box-shadow:0 0 0 3px rgba(25,95,203,.08)
}

.btn{
  appearance:none;
  background:#fff;
  border:1px solid var(--border);
  color:var(--fg);
  border-radius:8px;
  padding:8px 12px;
  cursor:pointer;
  line-height:1.2
}
.btn:hover{border-color:#c9d4e3}
.btn.primary{
  background:var(--primary);
  border-color:var(--primary);
  color:#fff
}
.btn.primary:hover{
  background:var(--primary-hover);
  border-color:var(--primary-hover)
}

/* ========================= Tabs & Controls ========================= */
.controls-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.tabs{display:flex;gap:6px}
.tab{
  background:#fff;
  border:1px solid var(--border);
  border-radius:10px;
  padding:8px 12px;
  cursor:pointer
}
.tab:hover{border-color:#c9d4e3}
.tab.active{
  border-color:var(--accent);
  box-shadow:0 0 0 2px rgba(226,29,42,.15)
}

.record-count {
  font-weight: 600;
  color: var(--muted);
  font-size: 14px;
  padding: 8px 12px;
  background: #f0f4f8;
  border-radius: 8px;
  border: 1px solid var(--border);
  cursor: help;
  user-select: none;
}
.record-count #record-count-number {
  color: var(--primary);
  font-size: 16px;
  font-weight: 700;
  font-family: ui-monospace, Consolas, Menlo, monospace;
}

.date-filters {
  display: flex;
  align-items: center;
  gap: 8px;
}
.filter-sep {
  display: inline-block;
  width: 1px;
  background: var(--border);
  height: 24px;
  margin: 0 8px;
}

/* ========================= Views & Tables ========================= */
.view{
  display:none;
}
.view.active{
  display:block;
  max-height:calc(100vh - 220px);
  overflow-y:auto;
}

.grid{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  background:var(--panel);
  border:1px solid var(--border);
  border-radius:10px;
  overflow:visible;
}
.grid th,.grid td{
  padding:10px;
  border-bottom:1px solid var(--border);
  vertical-align:top
}
.grid th{
  background:#f3f6fb;
  color:#37506b;
  cursor:pointer;
  position:sticky;
  top:0;
  z-index:10;
  white-space:nowrap;
  user-select:none;
  box-shadow:0 2px 4px rgba(0,0,0,0.08);
}
.grid th:hover{
  background:#e9eef5;
}
.grid tbody tr:hover{background:#fafcff}
.grid .nowrap{white-space:nowrap}

/* Table row highlighting */
tr[data-pro]{cursor:pointer}
tr.late{background:#ffe5e5 !important}
tr.today{background:#fff7cc !important}
tr.tomorrow{background:#e7f6e7 !important}
tr.early{background:#f0e5ff !important}
tr.voided{background:#f3f4f6 !important; opacity:0.6; text-decoration:line-through}

/* Enhanced hover effect for colored rows - uses box-shadow overlay */
tr.late:hover,
tr.today:hover,
tr.tomorrow:hover,
tr.early:hover,
tr.voided:hover {
  box-shadow: inset 0 0 0 2000px rgba(0, 0, 0, 0.08);
  position: relative;
}

/* Status chips */
.chip{
  display:inline-block;
  padding:2px 6px;
  border-radius:10px;
  font-size:11px;
  line-height:16px;
  margin-left:6px;
  border:1px solid #d8dce2;
  background:#fff;
  color:#444
}
.chip.pick{border-color:#9cc4ff}
.chip.tran{border-color:#f7c66a}
.chip.delv{border-color:#8fd3a0}

/* ========================= Context Menu ========================= */
.context-menu {
  position: fixed;
  background: #fff;
  border: 1px solid #dde4ed;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  padding: 6px;
  min-width: 240px;
  z-index: 10000;
  animation: contextMenuAppear 0.15s ease-out;
}

.context-menu[hidden] {
  display: none;
}

.context-item[hidden] {
  display: none;
}

@keyframes contextMenuAppear {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(-4px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.context-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  border: none;
  background: transparent;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  color: var(--fg);
  text-align: left;
  transition: all 0.15s;
}

.context-item:hover {
  background: #f3f6fb;
}

.context-item:active {
  background: #e9eef5;
}

.context-icon {
  font-size: 16px;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.context-label {
  flex: 1;
  white-space: nowrap;
}

.context-highlight {
  background: #fff3cd;
  border: 1px solid #ffc107;
}

.context-highlight:hover {
  background: #ffe69c;
}

.context-divider {
  height: 1px;
  background: #e9eef5;
  margin: 6px 0;
}

.context-danger {
  color: #dc3545;
}

.context-danger:hover {
  background: #fee;
}

.context-success {
  color: #28a745;
}

.context-success:hover {
  background: #efe;
}

/* Highlight right-clicked row */
tr.context-target {
  background: #fff3cd !important;
  border-left: 3px solid #ffc107;
}

/* ========================= Selection Mode ========================= */
.selection-action-bar {
  background: linear-gradient(135deg, #195fcb 0%, #1654b5 100%);
  color: #fff;
  padding: 12px 16px;
  border-radius: 10px;
  margin-bottom: 16px;
  box-shadow: 0 4px 12px rgba(25, 95, 203, 0.2);
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 20px;
  align-items: center;
  animation: slideDown 0.3s ease-out;
}

.selection-action-bar[hidden] {
  display: none;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.selection-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-icon-action {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
  display: flex;
  align-items: center;
}

.btn-icon-action:hover {
  background: rgba(255, 255, 255, 0.3);
}

.selection-count {
  font-size: 16px;
  font-weight: 600;
}

.selection-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.btn-action {
  background: #fff;
  border: 1px solid #dde4ed;
  color: #1d2a3a;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-action:hover:not(:disabled) {
  background: #f3f6fb;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn-action:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.action-badge {
  background: #195fcb;
  color: #fff;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  min-width: 24px;
  text-align: center;
}

.selection-helpers {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-helper {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s;
}

.btn-helper:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Checkbox column in selection mode */
.select-col {
  width: 40px;
  text-align: center;
  padding: 8px !important;
}

.select-col input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

/* Selected row highlighting */
tr.selected {
  background: #e3f2fd !important;
  border-left: 3px solid #195fcb;
}

tr.selected:hover {
  background: #d1e7fd !important;
}

/* Selection mode: hide action column */
.selection-mode-active .actions-col {
  display: none;
}

/* Bulk quick note buttons */
.bulk-quick-note {
  font-size: 13px;
  padding: 6px 12px;
}

/* Column-specific styles */
td.actions{white-space:nowrap}
td.rad, td.reqship{white-space:nowrap}

/* Last Update column styling */
td.lastup { 
  line-height: 1.15; 
  vertical-align: middle; 
  white-space: nowrap;
  min-width: 140px;
}
td.lastup .lu-top { 
  font-weight: 600; 
  color: var(--fg);
}
td.lastup .lu-note { 
  font-size: 12px; 
  opacity: .70; 
  font-style: italic;
  color: var(--muted);
}

/* Make Last Update header sortable */
th.last-update-col {
  cursor: pointer;
  user-select: none;
}
th.last-update-col:hover {
  background: #e9eef5;
}

/* ========================= Action Buttons ========================= */
.iconlink{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:28px;
  height:28px;
  border-radius:6px;
  border:1px solid #d8dce2;
  background:#fff;
  cursor:pointer;
  font-size:16px
}
.iconlink:hover{background:#f1f3f6}
.iconlink + .iconlink{margin-left:6px}

.iconbtn{
  border:1px solid var(--border);
  background:#fff;
  color:var(--fg);
  border-radius:8px;
  padding:6px 10px;
  cursor:pointer
}
.iconbtn:hover{border-color:#c9d4e3}

.actions .btn,.actions .iconbtn{margin-right:6px}

/* ========================= Quick Notes Dropdown ========================= */
.quick-note-wrapper{
  position:relative;
  display:inline-block
}
.quick-note-menu{
  position:absolute;
  top:100%;
  left:0;
  margin-top:4px;
  background:#fff;
  border:1px solid var(--border);
  border-radius:8px;
  box-shadow:0 4px 12px rgba(0,0,0,.12);
  z-index:100;
  min-width:200px;
  padding:4px
}
.quick-note-menu[hidden]{display:none}
.quick-note-menu button{
  display:block;
  width:100%;
  text-align:left;
  padding:8px 12px;
  border:0;
  background:transparent;
  cursor:pointer;
  border-radius:6px;
  font-size:13px;
  color:var(--fg);
  white-space:nowrap
}
.quick-note-menu button:hover{background:#f3f6fb}

/* ========================= Modals ========================= */
.modal[hidden]{display:none}
.modal .modal-backdrop{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.35)
}
.modal .modal-body{
  position:fixed;
  left:50%;
  top:50%;
  transform:translate(-50%,-50%);
  background:#fff;
  border:1px solid var(--border);
  border-radius:12px;
  min-width:400px;
  max-height:85vh;
  overflow:hidden;
  display:flex;
  flex-direction:column;
  box-shadow:0 20px 60px rgba(0,0,0,0.15)
}
.modal .modal-body.wide{min-width:900px}
.modal .modal-close{
  position:absolute;
  right:10px;
  top:6px;
  background:transparent;
  color:#99a;
  border:0;
  font-size:24px;
  cursor:pointer
}

/* Modal Header */
.modal-header{
  padding:20px 24px;
  border-bottom:1px solid var(--border);
  background:#fafbfc;
  display:flex;
  align-items:center;
  justify-content:space-between
}
.modal-header h3{
  margin:0;
  font-size:18px;
  font-weight:600;
  color:var(--fg)
}

/* Modal Content */
.modal-content{
  padding:24px;
  overflow-y:auto;
  flex:1
}

/* Modal Footer */
.modal-footer{
  padding:16px 24px;
  border-top:1px solid var(--border);
  background:#fafbfc;
  display:flex;
  justify-content:flex-end;
  gap:10px
}

/* Form Groups */
.form-group{
  margin-bottom:20px
}
.form-group:last-child{
  margin-bottom:0
}
.form-group label{
  display:block;
  margin-bottom:6px;
  font-weight:500;
  color:var(--fg)
}

.grid2{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.grid3{display:grid;grid-template-columns:1fr 1fr 1fr;gap:12px}
.pairs div{margin:6px 0}

.activity{
  background:#fbfdff;
  border:1px solid var(--border);
  border-radius:8px;
  padding:8px;
  min-height:160px;
  max-height:320px;
  overflow:auto
}
.activity .item{
  margin:6px 0;
  padding:6px;
  border-bottom:1px dashed #dfe7f1
}
.add-note{display:flex;gap:6px;margin-top:8px}

#reviewModal .modal-close {
  border: 0;
  background: none;
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
}

/* ========================= Drag & Drop Zone ========================= */
.dropzone{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  width:220px;
  height:84px;
  background:#fff;
  color:var(--fg);
  border:2px dashed var(--border);
  border-radius:12px;
  cursor:pointer;
  user-select:none
}
.dropzone input{display:none}
.dropzone .dz-icon{font-size:22px;line-height:1;margin-bottom:4px}
.dropzone .dz-title{font-weight:600}
.dropzone .dz-sub{font-size:12px;color:var(--muted)}
.dropzone.dragover{
  border-color:var(--primary);
  box-shadow:0 0 0 3px rgba(25,95,203,.08)
}
.dropzone.error{
  border-color:#d33;
  box-shadow:0 0 0 3px rgba(211,51,51,.08)
}

/* ========================= Loading Overlay ========================= */
.loading-overlay {
  position: absolute;
  top: 145px; /* Below control bar */
  left: 16px;
  right: 16px;
  bottom: 0;
  background: rgba(246, 248, 251, 0.85);
  backdrop-filter: blur(1px);
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
}
.loading-overlay[hidden] {display: none}

.spinner {
  width: 48px;
  height: 48px;
  border: 5px solid #e9eef3;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ========================= Toast Notifications ========================= */
.toast{
  position:fixed;
  left:50%;
  transform:translateX(-50%);
  bottom:24px;
  background:#fff;
  border:1px solid var(--border);
  padding:10px 14px;
  border-radius:10px;
  box-shadow:0 6px 20px rgba(0,0,0,.08);
  z-index:1000
}
.toast[hidden]{display:none}

/* ========================= Cards & Misc ========================= */
.card{
  background:#fff;
  border:1px solid var(--border);
  border-radius:10px;
  padding:14px;
  margin-bottom:14px
}

.summary{margin:8px 0 12px;color:#2c3f57}

.mono{font-family:ui-monospace,Consolas,Menlo,monospace}
.small{font-size:12px;color:var(--muted)}

/* ========================= Login Page ========================= */
.login-page {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 16px;
}
.login-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 400px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px;
  box-shadow: 0 8px 24px rgba(0,0,0,.05);
  text-align: center;
}
.login-card .logo {
  height: 32px;
  margin-bottom: 12px;
}
.login-card h2 {
  margin-top: 0;
  margin-bottom: 24px;
  color: var(--fg);
}
.login-card .form-row {
  display: flex;
  flex-direction: column;
  text-align: left;
  margin-bottom: 16px;
}
.login-card .form-row label {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
}
.login-card .input {
  width: 100%;
}
.login-card .btn {
  width: 100%;
  margin-top: 10px;
  padding: 10px;
  font-weight: 600;
}
/* ========================= Z-Index Fix: Modal Above Sticky Headers ========================= */
.modal {
  z-index: 10000 !important;
}

.modal .modal-backdrop {
  z-index: 9999 !important;
}

.modal .modal-body {
  z-index: 10001 !important;
}

table.grid thead th {
  z-index: 10 !important;
}

/* Manual upload logo (owner only) */
#logoUpload {
  transition: opacity 0.2s ease, transform 0.2s ease;
}

#logoUpload:hover {
  opacity: 0.7;
  transform: scale(1.05);
}

#logoUpload:active {
  transform: scale(0.95);
}

/* ========================= Logo Container & Version Badge ========================= */
.logo-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.logo-container .version-badge {
  font-size: 10px;
  padding: 2px 6px;
  margin: 0;
}

/* ========================= User Avatar Dropdown ========================= */
.user-dropdown {
  position: relative;
}

.user-avatar {
  appearance: none;
  background: linear-gradient(135deg, var(--primary) 0%, #1976d2 100%);
  border: 2px solid #fff;
  box-shadow: 0 2px 8px rgba(25, 95, 203, 0.25);
  color: #fff;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.5px;
  transition: all 0.2s ease;
  padding: 0;
  position: relative;
}

.user-avatar:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(25, 95, 203, 0.35);
}

.avatar-initials {
  display: flex;
  align-items: center;
  justify-content: center;
}

.avatar-chevron {
  position: absolute;
  bottom: -2px;
  right: -2px;
  background: #fff;
  border-radius: 50%;
  padding: 2px;
  opacity: 0.9;
}

.user-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  min-width: 240px;
  padding: 0;
  z-index: 1000;
  animation: slideDown 0.2s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.user-menu[hidden] {
  display: none;
}

.user-menu-header {
  padding: 16px;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-radius: 12px 12px 0 0;
}

.user-menu-name {
  font-weight: 600;
  font-size: 15px;
  color: var(--fg);
  margin-bottom: 4px;
}

.user-menu-email {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}

.user-menu-role {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--primary);
  background: rgba(25, 95, 203, 0.1);
  padding: 4px 8px;
  border-radius: 4px;
}

.user-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: var(--fg);
  text-decoration: none;
  cursor: pointer;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  font-size: 14px;
  transition: background 0.15s ease;
}

.user-menu-item:hover {
  background: #f8fafc;
  text-decoration: none;
}

.user-menu-item svg {
  color: var(--muted);
  flex-shrink: 0;
}

.user-menu-item:hover svg {
  color: var(--primary);
}

.user-menu-divider {
  height: 1px;
  background: var(--border);
  margin: 8px 0;
}

/* ========================= Toggle Switch ========================= */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #cbd5e1;
  transition: 0.3s;
  border-radius: 34px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-switch input:checked + .toggle-slider {
  background-color: var(--primary);
}

.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(22px);
}

.toggle-switch input:disabled + .toggle-slider {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ========================= User Assignment List ========================= */
.user-assign-list {
  max-height: 400px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.user-assign-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s ease;
}

.user-assign-item:last-child {
  border-bottom: none;
}

.user-assign-item:hover {
  background: #f8fafc;
}

.user-assign-info {
  flex: 1;
}

.user-assign-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--fg);
  margin-bottom: 2px;
}

.user-assign-email {
  font-size: 13px;
  color: var(--muted);
}

.user-assign-role {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
  background: #f1f5f9;
  padding: 3px 8px;
  border-radius: 4px;
  margin-left: 8px;
}

/* ========================= Icon Buttons ========================= */
.btn-icon {
  appearance: none;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 6px;
  padding: 6px 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  margin-left: 4px;
}

.btn-icon:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: #f8fafc;
}

.btn-icon svg {
  display: block;
}

/* ========================= Accounts Grid ========================= */
.accounts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
  margin-top: 20px;
}

.account-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  transition: all 0.2s ease;
  position: relative;
}

.account-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  border-color: #c9d4e3;
  transform: translateY(-1px);
}

.account-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid #f1f5f9;
}

.account-card-title {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.account-card-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--fg);
  display: flex;
  align-items: center;
}

.account-card-code {
  font-family: 'Courier New', monospace;
  font-size: 13px;
  font-weight: 600;
  color: #000;
}

.account-card-status {
  flex-shrink: 0;
}

.account-card-body {
  margin-bottom: 10px;
}

.account-card-info {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  font-size: 13px;
}

.account-card-info svg {
  color: var(--muted);
  flex-shrink: 0;
}

.account-card-info-content {
  flex: 1;
}

.account-card-info-label {
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 2px;
}

.account-card-info-value {
  color: var(--fg);
  font-weight: 600;
}

.account-card-actions {
  display: flex;
  gap: 6px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.account-card-actions .btn {
  flex: 1;
  justify-content: center;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  padding: 7px 10px;
  font-weight: 500;
}

.account-card-actions .btn svg {
  width: 14px;
  height: 14px;
}

.account-card-actions .btn-danger {
  background: transparent;
  color: #dc3545;
  border-color: #dc3545;
}

.account-card-actions .btn-danger:hover {
  background: #dc3545;
  color: #fff;
}

/* ========================= Transit Columns (SMC) ========================= */
.grid td.term-col,
.grid th.term-col {
  text-align: center !important;
  font-weight: 600;
  white-space: nowrap;
  width: 60px;
}

.grid td.days-col,
.grid th.days-col {
  text-align: center !important;
  font-weight: 600;
  color: var(--primary) !important;
  white-space: nowrap;
  width: 50px;
}

.grid td.norm-date-col,
.grid th.norm-date-col {
  text-align: center !important;
  white-space: nowrap;
  width: 90px;
}

.grid td.on-time-col,
.grid th.on-time-col {
  text-align: center !important;
  white-space: nowrap;
  width: 100px;
}

.status-ontime {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  background: #e7f6e7;
  color: #2e7d32;
  border: 1px solid #a5d6a7;
}

.status-late {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  background: #ffe5e5;
  color: #c62828;
  border: 1px solid #ef9a9a;
}