/* ── Rika Logistics Premium Theme ─────────────────────────── */
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}

:root{
  --bg-h:221; --bg-s:47%; --bg-l:8%;
  --bg:hsl(var(--bg-h), var(--bg-s), var(--bg-l));
  --bg-card:rgba(255,255,255,0.03);
  --bg-card-hover:rgba(255,255,255,0.06);
  --bg-input:rgba(0,0,0,0.3);
  --surface:rgba(255,255,255,0.04);
  --surface-hover:rgba(255,255,255,0.1);
  --border:rgba(255,255,255,0.06);
  --border-focus:rgba(255,255,255,0.2);
  --text:hsl(210, 40%, calc(100% - var(--bg-l) * 0.5));
  --text-muted:hsl(210, 20%, calc(70% - var(--bg-l) * 0.3));
  --text-dim:#475569;
  --primary:#3b82f6;
  --primary-hover:#2563eb;
  --primary-light:rgba(59,130,246,0.15);
  --primary-glow:rgba(59,130,246,0.25);
  --danger:#ef4444;
  --danger-light:rgba(239,68,68,0.15);
  --success:#22c55e;
  --success-light:rgba(34,197,94,0.15);
  --warning:#f59e0b;
  --warning-light:rgba(245,158,11,0.15);
  --radius:10px;
  --radius-lg:16px;
  --shadow:0 1px 3px rgba(0,0,0,0.3);
  --shadow-lg:0 8px 32px rgba(0,0,0,0.4);
  --sidebar-w:240px;
  --font:'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;
}

html.light{
  --bg-h:210; --bg-s:8%; --bg-l:93%;
  --bg:hsl(var(--bg-h), var(--bg-s), var(--bg-l));
  --text:#1e293b;
  --text-muted:#64748b;
  --bg-card:rgba(255,255,255,0.5);
  --bg-card-hover:rgba(255,255,255,0.7);
  --bg-input:#f0f2f5;
  --surface:rgba(255,255,255,0.55);
  --surface-hover:rgba(255,255,255,0.75);
  --border:rgba(0,0,0,0.06);
  --border-focus:rgba(59,130,246,0.25);
  --text:#334155;
  --text-muted:#6b7280;
  --text-dim:#9ca3af;
  --shadow:0 1px 2px rgba(0,0,0,0.04);
  --shadow-lg:0 4px 16px rgba(0,0,0,0.06);
}

body{
  font-family:var(--font);
  background:var(--bg);
  color:var(--text);
  display:flex;
  min-height:100vh;
  transition:background .3s,color .3s;
  overflow-x:hidden;
}

::-webkit-scrollbar{width:6px;height:6px}
::-webkit-scrollbar-track{background:transparent}
::-webkit-scrollbar-thumb{background:var(--border);border-radius:3px}
::-webkit-scrollbar-thumb:hover{background:var(--text-dim)}

.sidebar{
  width:var(--sidebar-w);
  height:100vh;
  background:var(--surface);
  backdrop-filter:blur(20px);
  -webkit-backdrop-filter:blur(20px);
  border-right:1px solid var(--border);
  display:flex;
  flex-direction:column;
  position:fixed;
  z-index:100;
  transition:all .3s;
}
.sidebar nav{flex:1;overflow-y:auto;overflow-x:hidden}
.sidebar nav::-webkit-scrollbar{width:3px}
.sidebar nav::-webkit-scrollbar-thumb{background:var(--border);border-radius:3px}
.sidebar-footer{flex-shrink:0}

.sidebar-group{padding:6px 20px 2px;font-size:.62em;font-weight:700;color:var(--text-dim);text-transform:uppercase;letter-spacing:.6px;margin-top:4px;user-select:none}
.sidebar-group:hover{color:var(--text)}
.group-toggle{display:inline-block;width:14px;font-size:.9em;margin-right:2px}
.group-items{transition:all .15s}
.group-items.collapsed{display:none}

/* Page fade-in */
.main > .page-header{animation:fadeSlide .2s ease}
.table-wrap,.glass{animation:fadeSlide .25s ease}
@keyframes fadeSlide{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}

.sidebar-header{
  padding:20px 20px 16px;
  border-bottom:1px solid var(--border);
}

.sidebar-logo{
  font-size:1.3em;
  font-weight:800;
  background:linear-gradient(135deg,#3b82f6,#8b5cf6);
  -webkit-background-clip:text;
  -webkit-text-fill-color:transparent;
  letter-spacing:-.5px;
}

.sidebar-logo small{
  display:block;
  font-size:.45em;
  font-weight:400;
  -webkit-text-fill-color:var(--text-muted);
  margin-top:2px;
}

.sidebar-search{
  padding:12px 16px;
  position:relative;
}

.sidebar-search input{
  width:100%;
  padding:8px 12px 8px 32px;
  background:var(--bg-input);
  border:1px solid var(--border);
  border-radius:8px;
  color:var(--text);
  font-size:.8em;
  outline:none;
  transition:all .2s;
  font-family:inherit;
}

.sidebar-search input:focus{
  border-color:var(--primary);
  box-shadow:0 0 0 3px var(--primary-glow);
}

.sidebar-search::before{
  content:'';
  position:absolute;
  left:24px;
  top:20px;
  font-size:.75em;
  opacity:.5;
  width:14px;height:14px;
  background:var(--text-muted);
  mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E") center/contain no-repeat;
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E") center/contain no-repeat;
}

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

.nav-btn{
  display:flex;
  align-items:center;
  gap:10px;
  width:100%;
  padding:10px 20px;
  border:none;
  background:transparent;
  color:var(--text-muted);
  text-align:left;
  font-size:.82em;
  cursor:pointer;
  transition:all .15s;
  font-family:inherit;
  border-left:3px solid transparent;
}

.nav-btn:hover{
  background:var(--surface-hover);
  color:var(--text);
}

.nav-btn.active{
  background:var(--primary-light);
  color:var(--primary);
  border-left-color:var(--primary);
  font-weight:600;
}

.nav-icon{font-size:1em;width:20px;text-align:center}

.nav-badge{
  margin-left:auto;
  background:var(--danger);
  color:#fff;
  font-size:.65em;
  padding:1px 6px;
  border-radius:10px;
  font-weight:700;
}

.sidebar-footer{
  padding:16px 20px;
  border-top:1px solid var(--border);
  font-size:.75em;
}

.sidebar-footer .health-row{
  display:flex;
  align-items:center;
  gap:6px;
  color:var(--text-muted);
  margin-bottom:6px;
}

.health-dot{
  width:8px;height:8px;border-radius:50%;flex:none;
}
.health-dot.on{background:var(--success);box-shadow:0 0 6px rgba(34,197,94,.4)}
.health-dot.off{background:var(--danger);box-shadow:0 0 6px rgba(239,68,68,.4)}

.main{
  margin-left:var(--sidebar-w);
  flex:1;
  padding:24px 32px;
  min-width:0;
  max-width:1400px;
}

.page-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:24px;
  flex-wrap:wrap;
  gap:12px;
}

.page-header h1{
  font-size:1.4em;
  font-weight:700;
  letter-spacing:-.3px;
}

.page-header .subtitle{
  font-size:.85em;
  color:var(--text-muted);
  margin-top:2px;
}

.glass{
  background:var(--bg-card);
  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px);
  border:1px solid var(--border);
  border-radius:var(--radius-lg);
  padding:20px;
  transition:all .2s;
}

.glass:hover{
  background:var(--bg-card-hover);
}

.metrics{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(200px,1fr));
  gap:16px;
  margin-bottom:24px;
}

.metric-card{
  position:relative;
  overflow:hidden;
}

.metric-card .metric-icon{
  position:absolute;
  top:16px;right:16px;
  font-size:1.5em;
  opacity:.2;
}

.metric-value{
  font-size:1.8em;
  font-weight:700;
  letter-spacing:-.5px;
}

.metric-label{
  font-size:.82em;
  color:var(--text-muted);
  margin-top:4px;
}

.metric-card.blue .metric-value{color:#3b82f6}
.metric-card.green .metric-value{color:#22c55e}
.metric-card.amber .metric-value{color:#f59e0b}
.metric-card.red .metric-value{color:#ef4444}
.metric-card.purple .metric-value{color:#8b5cf6}

.btn{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:8px 16px;
  border:1px solid var(--border);
  border-radius:var(--radius);
  background:var(--surface);
  color:var(--text);
  font-size:.82em;
  cursor:pointer;
  transition:all .15s;
  text-decoration:none;
  white-space:nowrap;
  font-family:inherit;
}
.btn:hover{background:var(--surface-hover)}
.btn-primary{background:linear-gradient(135deg,#3b82f6,#2563eb);color:#fff;border-color:transparent}
.btn-primary:hover{box-shadow:0 4px 12px var(--primary-glow);transform:translateY(-1px)}
.btn-success{background:linear-gradient(135deg,#22c55e,#16a34a);color:#fff;border-color:transparent}
.btn-success:hover{box-shadow:0 4px 12px rgba(34,197,94,.3);transform:translateY(-1px)}
.btn-danger{background:linear-gradient(135deg,#ef4444,#dc2626);color:#fff;border-color:transparent}
.btn-warning{background:linear-gradient(135deg,#f59e0b,#d97706);color:#fff;border-color:transparent}
.btn-sm{padding:5px 10px;font-size:.78em}
.btn-xs{padding:3px 8px;font-size:.72em}
.btn:disabled{opacity:.4;cursor:not-allowed;transform:none!important}
.btn-row{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0}

.input{
  padding:9px 12px;
  background:var(--bg-input);
  border:1px solid var(--border);
  border-radius:var(--radius);
  color:var(--text);
  font-size:.85em;
  outline:none;
  transition:all .15s;
  width:100%;
  font-family:inherit;
  min-height:44px;
}

.input:focus{
  border-color:var(--primary);
  box-shadow:0 0 0 3px var(--primary-glow);
}

select.input{cursor:pointer}
textarea.input{resize:vertical;min-height:80px}

.form-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
}

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

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

.form-group label{
  font-size:.78em;
  font-weight:600;
  color:var(--text-muted);
}

.form-section{
  background:var(--bg-card);
  border:1px solid var(--border);
  border-radius:var(--radius-lg);
  padding:20px;
  margin-bottom:16px;
}

.form-section h3{
  font-size:.95em;
  margin-bottom:16px;
  color:var(--text);
}

.filter-row{
  display:flex;
  gap:8px;
  margin-bottom:16px;
  flex-wrap:wrap;
  align-items:center;
}

.filter-row .input{min-width:140px}

.table-wrap{
  background:var(--bg-card);
  border:1px solid var(--border);
  border-radius:var(--radius-lg);
  overflow:hidden;
}

table{width:100%;border-collapse:collapse}
th,td{
  padding:10px 12px;
  text-align:left;
  font-size:.82em;
  border-bottom:1px solid var(--border);
}

th{
  background:rgba(0,0,0,.15);
  font-weight:600;
  color:var(--text-muted);
  font-size:.75em;
  text-transform:uppercase;
  letter-spacing:.4px;
  position:sticky;
  top:0;
  z-index:2;
  user-select:none;
}
th:hover{background:rgba(0,0,0,.25)}
.row-bulk{background:rgba(59,130,246,0.04)}
.row-bulk:hover{background:rgba(59,130,246,0.08)}

tr:hover td{background:var(--surface-hover)}
td{white-space:nowrap}

.badge{
  display:inline-block;
  padding:3px 10px;
  border-radius:999px;
  font-size:.72em;
  font-weight:600;
  color:#fff;
  white-space:nowrap;
}

.pagination{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:16px 0;
}

.page-info{font-size:.85em;color:var(--text-muted)}

.modal-overlay{
  position:fixed;inset:0;
  background:rgba(0,0,0,0.6);
  backdrop-filter:blur(4px);
  display:flex;
  align-items:center;
  justify-content:center;
  z-index:1000;
  animation:fadeIn .15s ease;
}

.modal{
  background:var(--bg);
  border:1px solid var(--border);
  border-radius:var(--radius-lg);
  padding:28px;
  max-width:640px;
  width:95%;
  max-height:90vh;
  overflow-y:auto;
  box-shadow:var(--shadow-lg);
  animation:slideUp .2s ease;
}

.modal-lg{max-width:900px}
.modal h3{font-size:1.1em;margin-bottom:16px;font-weight:700}
.modal-actions{
  display:flex;
  gap:8px;
  justify-content:flex-end;
  margin-top:20px;
  padding-top:16px;
  border-top:1px solid var(--border);
}

#toast-container{
  position:fixed;
  top:16px;
  right:16px;
  z-index:2000;
  display:flex;
  flex-direction:column;
  gap:8px;
}

.toast{
  padding:12px 20px;
  border-radius:var(--radius);
  color:#fff;
  font-size:.85em;
  box-shadow:var(--shadow-lg);
  animation:slideIn .3s ease;
  display:flex;
  align-items:center;
  gap:8px;
  backdrop-filter:blur(12px);
  border:1px solid rgba(255,255,255,0.1);
}

.toast-success{background:rgba(34,197,94,0.9)}
.toast-error{background:rgba(239,68,68,0.9)}
.toast-info{background:rgba(59,130,246,0.9)}
.toast-warning{background:rgba(245,158,11,0.9)}

.loading{
  display:flex;
  justify-content:center;
  padding:60px;
}

.spinner{
  width:32px;
  height:32px;
  border:3px solid var(--border);
  border-top-color:var(--primary);
  border-radius:50%;
  animation:spin .6s linear infinite;
}

.ac-wrap{position:relative}
.filter-row .ac-dropdown{position:absolute;top:100%;left:0;right:auto;width:auto;min-width:200px;z-index:50}
.ac-dropdown{
  display:none;
  position:absolute;
  top:100%;left:0;right:0;
  background:var(--bg);
  border:1px solid var(--border);
  border-radius:0 0 8px 8px;
  max-height:220px;
  overflow-y:auto;
  z-index:500;
  box-shadow:var(--shadow-lg);
}
.ac-dropdown.open{display:block}
.ac-item{
  padding:8px 12px;
  font-size:.82em;
  cursor:pointer;
  border-bottom:1px solid var(--border);
}
.ac-item:last-child{border-bottom:none}
.ac-item:hover{background:var(--primary-light);color:var(--primary)}

.status-tabs{
  display:flex;
  gap:4px;
  margin-bottom:16px;
  flex-wrap:wrap;
}

.tab-btn{
  padding:7px 16px;
  border:1px solid var(--border);
  border-radius:999px;
  background:transparent;
  cursor:pointer;
  font-size:.82em;
  color:var(--text-muted);
  transition:all .15s;
  font-family:inherit;
  display:flex;
  align-items:center;
  gap:6px;
}

.tab-btn:hover{background:var(--surface-hover);color:var(--text)}
.tab-btn.active{background:var(--primary-light);color:var(--primary);border-color:var(--primary)}
.tab-count{
  background:rgba(0,0,0,.15);
  border-radius:999px;
  padding:1px 7px;
  font-size:.78em;
}
.tab-btn.active .tab-count{background:var(--primary-glow)}

.row-status{border-left:4px solid transparent}
.row-status{border-left:4px solid transparent;transition:background .15s}
.row-status{transition:all .15s}
.row-status[data-status="Draft"]{border-left:5px solid #9ca3af;background:linear-gradient(90deg,rgba(156,163,175,0.15) 0%,rgba(156,163,175,0.03) 100%)}
.row-status[data-status="New"]{border-left:5px solid #3b82f6;background:linear-gradient(90deg,rgba(59,130,246,0.15) 0%,rgba(59,130,246,0.03) 100%)}
.row-status[data-status="Booked"]{border-left:5px solid #8b5cf6;background:linear-gradient(90deg,rgba(139,92,246,0.15) 0%,rgba(139,92,246,0.03) 100%)}
.row-status[data-status="Collected"]{border-left:5px solid #14b8a6;background:linear-gradient(90deg,rgba(20,184,166,0.15) 0%,rgba(20,184,166,0.03) 100%)}
.row-status[data-status="Arrived Collection"]{border-left:5px solid #f59e0b;background:linear-gradient(90deg,rgba(245,158,11,0.15) 0%,rgba(245,158,11,0.03) 100%)}
.row-status[data-status="In Transit"]{border-left:5px solid #f97316;background:linear-gradient(90deg,rgba(249,115,22,0.15) 0%,rgba(249,115,22,0.03) 100%)}
.row-status[data-status="Arrived Delivery"]{border-left:5px solid #10b981;background:linear-gradient(90deg,rgba(16,185,129,0.15) 0%,rgba(16,185,129,0.03) 100%)}
.row-status[data-status="Delivered"]{border-left:5px solid #22c55e;background:linear-gradient(90deg,rgba(34,197,94,0.15) 0%,rgba(34,197,94,0.03) 100%)}
.row-status[data-status="Invoiced"]{border-left:5px solid #6366f1;background:linear-gradient(90deg,rgba(99,102,241,0.15) 0%,rgba(99,102,241,0.03) 100%)}
.row-status[data-status="Completed"]{border-left:5px solid #16a34a;background:linear-gradient(90deg,rgba(22,163,74,0.15) 0%,rgba(22,163,74,0.03) 100%)}
.row-status[data-status="Waiting Charges"]{border-left:5px solid #d97706;background:linear-gradient(90deg,rgba(217,119,6,0.15) 0%,rgba(217,119,6,0.03) 100%)}
.row-status[data-status="Problem Collection"]{border-left:5px solid #ef4444;background:linear-gradient(90deg,rgba(239,68,68,0.15) 0%,rgba(239,68,68,0.03) 100%)}
.row-status[data-status="Problem Delivery"]{border-left:5px solid #dc2626;background:linear-gradient(90deg,rgba(220,38,38,0.15) 0%,rgba(220,38,38,0.03) 100%)}
.row-status[data-status="Arrived Customs"]{border-left:5px solid #a855f7;background:linear-gradient(90deg,rgba(168,85,247,0.15) 0%,rgba(168,85,247,0.03) 100%)}
.row-status[data-status="Crossing"]{border-left:5px solid #06b6d4;background:linear-gradient(90deg,rgba(6,182,212,0.15) 0%,rgba(6,182,212,0.03) 100%)}
.row-status[data-status="Reference Needed"]{border-left:5px solid #6b7280;background:linear-gradient(90deg,rgba(107,114,128,0.15) 0%,rgba(107,114,128,0.03) 100%)}
.row-status[data-status="Documents Needed"]{border-left:5px solid #6b7280;background:linear-gradient(90deg,rgba(107,114,128,0.15) 0%,rgba(107,114,128,0.03) 100%)}
.row-status[data-status="On Hold"]{border-left:5px solid #eab308;background:linear-gradient(90deg,rgba(234,179,8,0.15) 0%,rgba(234,179,8,0.03) 100%)}
.row-status[data-status="Cancelled"]{border-left:5px solid #4b5563;background:linear-gradient(90deg,rgba(75,85,99,0.15) 0%,rgba(75,85,99,0.03) 100%)}

/* Health dot on job rows */
.health-dot-cell{width:12px;padding-right:0!important}
.health-dot{display:inline-block;width:10px;height:10px;border-radius:50%;flex:none}
.health-dot-red{background:#ef4444;box-shadow:0 0 6px rgba(239,68,68,0.5)}
.health-dot-yellow{background:#f59e0b;box-shadow:0 0 6px rgba(245,158,11,0.5)}
.health-dot-green{background:#22c55e;box-shadow:0 0 6px rgba(34,197,94,0.3)}
.health-dot-gray{background:#9ca3af}

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

.detail-section{
  background:var(--bg-card);
  border:1px solid var(--border);
  border-radius:var(--radius-lg);
  padding:20px;
  margin-bottom:12px;
}

.detail-section h3{
  font-size:.9em;
  margin-bottom:12px;
  color:var(--text-muted);
  font-weight:600;
}

.detail-row{
  display:flex;
  justify-content:space-between;
  padding:6px 0;
  border-bottom:1px solid var(--border);
  font-size:.85em;
}

.detail-row:last-child{border-bottom:none}
.detail-label{color:var(--text-muted)}

.pricing-grid{
  display:grid;
  grid-template-columns:1fr 1fr 1fr;
  gap:12px;
}

.price-box{
  padding:16px;
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--radius);
  text-align:center;
}

.price-box .amount{
  font-size:1.4em;
  font-weight:700;
}

.price-box .label{font-size:.78em;color:var(--text-muted);margin-top:4px}

.price-box.green{border-color:rgba(34,197,94,.3)}
.price-box.green .amount{color:#22c55e}
.price-box.amber{border-color:rgba(245,158,11,.3)}
.price-box.amber .amount{color:#f59e0b}
.price-box.blue{border-color:rgba(59,130,246,.3)}
.price-box.blue .amount{color:#3b82f6}

.dropzone{
  border:2px dashed var(--border);
  border-radius:var(--radius);
  padding:24px;
  text-align:center;
  color:var(--text-muted);
  transition:all .15s;
  cursor:pointer;
}

.dropzone:hover,.dropzone.dragover{
  border-color:var(--primary);
  background:var(--primary-light);
  color:var(--primary);
}

.chart-container{
  position:relative;
  height:250px;
}

.empty-state{
  text-align:center;
  padding:60px 20px;
  color:var(--text-muted);
}
.empty-state .icon{font-size:3em;margin-bottom:12px;opacity:.3}
.empty-state .btn{margin-top:12px}

/* Skeleton loading */
.skeleton{padding:20px}
.skeleton-row{height:32px;background:var(--border);border-radius:6px;margin-bottom:10px;animation:skeletonPulse 1.5s ease-in-out infinite}
.skeleton-row:first-child{width:40%}.skeleton-row:nth-child(2){width:70%}.skeleton-row:nth-child(3){width:55%}.skeleton-row:nth-child(4){width:85%}.skeleton-row:nth-child(5){width:30%}
@keyframes skeletonPulse{0%,100%{opacity:.3}50%{opacity:.6}}

/* Back to top */
#back-to-top{position:fixed;bottom:24px;right:24px;width:44px;height:44px;border-radius:50%;background:var(--primary);color:#fff;border:none;font-size:1.2em;cursor:pointer;box-shadow:0 4px 12px rgba(0,0,0,.3);z-index:999;display:none;transition:all .2s}
#back-to-top:hover{transform:translateY(-2px);box-shadow:0 6px 16px rgba(0,0,0,.4)}

/* Session warning banner */
#session-warning{position:fixed;bottom:0;left:0;right:0;background:#f59e0b;color:#1e293b;text-align:center;padding:8px 16px;font-size:.85em;z-index:9999;display:none;font-weight:600}

.share-card{
  background:var(--bg-card);
  border:1px solid var(--border);
  border-radius:var(--radius-lg);
  padding:16px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:8px;
}

.timeline-item{display:flex;gap:10px;padding:6px 0;border-left:2px solid var(--border);padding-left:16px;margin-left:4px;position:relative}
.timeline-item:last-child{border-left-color:transparent}
.timeline-dot{position:absolute;left:-7px;top:10px;width:12px;height:12px;border-radius:50%;border:2px solid var(--bg);flex:none}
.timeline-content{flex:1}
.timeline-status{font-size:.82em;font-weight:500}
.timeline-meta{font-size:.72em;color:var(--text-muted)}

.share-url{
  font-size:.82em;
  color:var(--primary);
  word-break:break-all;
}

@keyframes spin{to{transform:rotate(360deg)}}
@keyframes slideIn{from{transform:translateX(100%);opacity:0}to{transform:translateX(0);opacity:1}}
@keyframes fadeIn{from{opacity:0}to{opacity:1}}
@keyframes slideUp{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}
@keyframes pulse{0%,100%{opacity:1}50%{opacity:.5}}
@keyframes ambientFloat{0%,100%{transform:translate(0,0) scale(1)}33%{transform:translate(30px,-30px) scale(1.05)}66%{transform:translate(-20px,20px) scale(.95)}}

.glass-card{
  background:var(--bg-card);
  backdrop-filter:blur(16px);
  -webkit-backdrop-filter:blur(16px);
  border:1px solid var(--border);
  border-radius:var(--radius-lg);
  transition:all .3s ease;
}
.glass-card:hover{
  background:var(--bg-card-hover);
  transform:translateY(-1px);
  box-shadow:0 8px 32px rgba(0,0,0,0.3);
}

#ambient-blob{
  position:fixed;
  top:-30%;left:-20%;
  width:70vw;height:70vw;
  background:radial-gradient(circle,rgba(59,130,246,0.12) 0%,transparent 70%);
  border-radius:50%;
  pointer-events:none;
  z-index:0;
  animation:ambientFloat 20s ease-in-out infinite;
  filter:blur(80px);
}
#ambient-blob2{
  position:fixed;
  bottom:-30%;right:-20%;
  width:60vw;height:60vw;
  background:radial-gradient(circle,rgba(139,92,246,0.08) 0%,transparent 70%);
  border-radius:50%;
  pointer-events:none;
  z-index:0;
  animation:ambientFloat 25s ease-in-out infinite reverse;
  filter:blur(80px);
}

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

.text-muted{color:var(--text-muted)}
.text-success{color:var(--success)}
.text-danger{color:var(--danger)}
.text-warning{color:var(--warning)}
.text-primary{color:var(--primary)}
.text-center{text-align:center}
.text-sm{font-size:.82em}
.text-xs{font-size:.72em}
.mt-1{margin-top:8px}
.mt-2{margin-top:16px}
.mb-1{margin-bottom:8px}
.mb-2{margin-bottom:16px}
.flex{display:flex}
.flex-col{flex-direction:column}
.items-center{align-items:center}
.justify-between{justify-content:space-between}
.gap-1{gap:8px}
.gap-2{gap:16px}
.flex-1{flex:1}
.hidden{display:none!important}
.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.w-full{width:100%}

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

@media(max-width:900px){
  .dashboard-grid{grid-template-columns:1fr}
}

.live-indicator{
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-size:.75em;
  color:var(--text-muted);
}

.live-dot{
  width:6px;height:6px;border-radius:50%;
  background:var(--success);
  animation:pulse 2s ease-in-out infinite;
}

@media(max-width:768px){
  .sidebar{width:60px;overflow:hidden}
  .sidebar-header{padding:12px 8px;text-align:center}
  .sidebar-logo{font-size:0}
  .sidebar-logo::after{content:'RL';font-size:1.2em;-webkit-text-fill-color:var(--primary)}
  .sidebar-logo small{display:none}
  .sidebar-search{display:none}
  .nav-btn{padding:12px;justify-content:center;border-left:none;font-size:0;gap:0}
  .nav-icon{font-size:1.3em;width:auto}
  .nav-btn.active{border-left:none;border-top:2px solid var(--primary)}
  .sidebar-footer{font-size:0}
  .main{margin-left:60px;padding:16px}
  .form-grid,.form-grid-3,.detail-grid,.pricing-grid{grid-template-columns:1fr}
  .metrics{grid-template-columns:repeat(2,1fr)}
  .page-header{flex-direction:column;align-items:stretch}
}

@media(max-width:480px){
  .metrics{grid-template-columns:1fr}
  .main{padding:12px}
}

/* Visibility badges */
.vis-badge {
  font-size: .6em; padding: 1px 6px; border-radius: 999px;
  font-weight: 600; text-transform: uppercase; letter-spacing: .3px;
}
.vis-internal { background: rgba(107,114,128,.2); color: #9ca3af; }
.vis-customer { background: rgba(34,197,94,.2); color: #22c55e; }
.vis-haulier { background: rgba(245,158,11,.2); color: #f59e0b; }


.nav-btn.drag-over { border-top: 2px solid var(--primary) !important; }
