/* CSS Design System - SAP Transport Portal */

:root {
  /* Colors */
  --bg-main: #070913;
  --bg-sidebar: rgba(10, 12, 26, 0.75);
  --bg-glass: rgba(20, 24, 46, 0.45);
  --bg-glass-hover: rgba(30, 36, 68, 0.6);
  --border-glass: rgba(255, 255, 255, 0.06);
  --border-glass-focus: rgba(99, 102, 241, 0.4);
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --primary: #6366f1; /* Indigo */
  --primary-glow: rgba(99, 102, 241, 0.3);
  --secondary: #a855f7; /* Violet */
  --secondary-glow: rgba(168, 85, 247, 0.3);
  --accent-pink: #ec4899; /* Pink */
  
  --success: #10b981;
  --success-glow: rgba(16, 185, 129, 0.2);
  --warning: #f59e0b;
  --danger: #ef4444;
  --danger-glow: rgba(239, 68, 68, 0.2);

  /* Fonts & Styling */
  --font-main: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-glow: 0 0 25px rgba(99, 102, 241, 0.15);
}

/* Global Reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-main);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 90% 80%, rgba(168, 85, 247, 0.05) 0%, transparent 50%);
  background-attachment: fixed;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.01);
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

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

/* Main Layout Structure */
.app-container {
  display: flex;
  min-height: 100vh;
  position: relative;
}

/* Sidebar Navigation */
.sidebar {
  width: 260px;
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-glass);
  backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
  z-index: 100;
  transition: var(--transition-smooth);
}

.sidebar-brand {
  padding: 32px 20px 24px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border-bottom: 1px solid var(--border-glass);
  text-align: center;
}

.logo-img {
  height: 32px;
  max-width: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 8px rgba(99, 102, 241, 0.2));
  margin: 0 auto;
}

.brand-text {
  font-weight: 800;
  font-size: 0.82rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  background: linear-gradient(135deg, #fff 30%, var(--text-secondary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: block;
  text-align: center;
}

.sidebar-nav {
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-grow: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  background: transparent;
  border: none;
  border-radius: 12px;
  color: var(--text-secondary);
  font-family: var(--font-main);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: var(--transition-smooth);
}

.nav-item:hover {
  background: var(--bg-glass-hover);
  color: var(--text-primary);
}

.nav-item.active {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(168, 85, 247, 0.15));
  color: var(--text-primary);
  border: 1px solid rgba(99, 102, 241, 0.2);
  box-shadow: inset 0 0 12px rgba(99, 102, 241, 0.05);
}

.nav-icon {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.sidebar-footer {
  padding: 24px;
  border-top: 1px solid var(--border-glass);
}

.status-indicator-container {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.status-dot.online {
  background-color: var(--success);
  box-shadow: 0 0 8px var(--success);
}

.status-text {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Main Content Area */
.main-content {
  margin-left: 260px;
  flex-grow: 1;
  padding: 32px 40px;
  min-height: 100vh;
}

/* Topbar Header */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
}

.topbar h1 {
  font-size: 1.75rem;
  font-weight: 800;
  background: linear-gradient(to right, #ffffff, #94a3b8);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.sync-summary-badge {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.sync-summary-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--primary);
  box-shadow: 0 0 6px var(--primary);
}

/* View panels switcher */
.view-panel {
  display: none;
  animation: fadeIn 0.4s ease-out;
}

.view-panel.active {
  display: block;
}

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

/* KPI Summary Grid */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.kpi-card {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  backdrop-filter: blur(16px);
  transition: var(--transition-smooth);
}

.kpi-card:hover {
  transform: translateY(-4px);
  border-color: rgba(99, 102, 241, 0.25);
  box-shadow: var(--shadow-glow);
}

.kpi-icon-wrapper {
  width: 54px;
  height: 54px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.kpi-icon-wrapper.purple {
  background: rgba(168, 85, 247, 0.1);
  color: var(--secondary);
  border: 1px solid rgba(168, 85, 247, 0.2);
}

.kpi-icon-wrapper.indigo {
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary);
  border: 1px solid rgba(99, 102, 241, 0.2);
}

.kpi-icon-wrapper.pink {
  background: rgba(236, 72, 153, 0.1);
  color: var(--accent-pink);
  border: 1px solid rgba(236, 72, 153, 0.2);
}

.kpi-icon-wrapper svg {
  width: 26px;
  height: 26px;
  fill: currentColor;
}

.kpi-data {
  display: flex;
  flex-direction: column;
}

.kpi-title {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 600;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.kpi-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-primary);
}

/* Dashboard Layout Grid */
.dashboard-layout-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 24px;
}

.dashboard-card {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: 20px;
  padding: 24px;
  backdrop-filter: blur(16px);
}

.card-header-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 24px;
  color: var(--text-primary);
  border-left: 3px solid var(--primary);
  padding-left: 12px;
}

/* SVG Chart Styles */
.chart-container {
  width: 100%;
  height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* Recent Deliveries Table */
.recent-list-container {
  overflow-x: auto;
}

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

.data-table th {
  padding: 12px;
  border-bottom: 1px solid var(--border-glass);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
}

.data-table td {
  padding: 14px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.02);
  font-size: 0.9rem;
}

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

.table-loading {
  text-align: center;
  color: var(--text-muted);
  padding: 40px 0 !important;
}

.customer-link {
  color: var(--text-primary);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.customer-link:hover {
  color: var(--primary);
  text-decoration: underline;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 10px;
  font-family: var(--font-main);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

.btn-primary:hover {
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-glass);
}

.btn-outline:hover {
  background: var(--bg-glass-hover);
  border-color: var(--text-secondary);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.25);
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.2);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
  border-radius: 6px;
}

/* Customers Directory View */
.directory-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 32px;
}

.search-input-wrapper {
  position: relative;
  flex-grow: 1;
  max-width: 450px;
}

.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  fill: var(--text-muted);
}

.search-input-wrapper input {
  width: 100%;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  padding: 14px 16px 14px 48px;
  border-radius: 14px;
  color: #fff;
  font-family: var(--font-main);
  font-size: 0.95rem;
  transition: var(--transition-smooth);
}

.search-input-wrapper input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.15);
}

.styled-select {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  padding: 14px 20px;
  border-radius: 14px;
  color: #fff;
  font-family: var(--font-main);
  font-size: 0.95rem;
  outline: none;
  cursor: pointer;
  transition: var(--transition-smooth);
}

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

.styled-select option {
  background: var(--bg-main);
  color: #fff;
}

/* Customer Cards Grid */
.customer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.customer-card {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: 18px;
  padding: 24px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.customer-card:hover {
  transform: translateY(-6px);
  border-color: rgba(168, 85, 247, 0.3);
  box-shadow: 0 8px 30px rgba(168, 85, 247, 0.1);
  background: var(--bg-glass-hover);
}

.customer-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
}

.customer-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
}

.delivery-badge {
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.2);
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 8px;
}

.customer-card-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.03);
  padding-top: 14px;
}

.info-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
}

.info-label {
  color: var(--text-muted);
}

.info-val {
  color: var(--text-secondary);
  font-weight: 500;
}

.grid-loading {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--text-muted);
  padding: 100px 0;
}

/* Sync Page Styling */
.sync-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
  gap: 32px;
}

.sync-card {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: 20px;
  padding: 32px;
  display: flex;
  flex-direction: column;
}

.sync-card.full-width {
  grid-column: 1 / -1;
}

.sync-card-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.sync-card-logo {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background-size: 60%;
  background-position: center;
  background-repeat: no-repeat;
}

.sync-card-logo.dropbox {
  background-color: rgba(0, 97, 254, 0.1);
  border: 1px solid rgba(0, 97, 254, 0.2);
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%230061FE"><path d="M6 2l6 4-6 4-6-4 6-4zm12 0l6 4-6 4-6-4 6-4zM0 12l6-4 6 4-6 4-6-4zm18-4l6 4-6 4-6-4 6-4zm-6 9l6-4 6 4-12 8-12-8 6-4 6 4z"/></svg>');
}

.sync-card-logo.zip {
  background-color: rgba(236, 72, 153, 0.1);
  border: 1px solid rgba(236, 72, 153, 0.2);
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23ec4899"><path d="M20 6h-8l-2-2H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V8c0-1.11-.89-2-2-2zm-1 12H5V8h14v10z"/></svg>');
}

.sync-card-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 24px;
}

.path-snippet {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.05);
  font-family: monospace;
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--accent-pink);
  font-size: 0.9em;
}

.sync-form-group {
  margin-bottom: 24px;
}

.sync-form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
  text-transform: uppercase;
}

.sync-form-group input {
  width: 100%;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-glass);
  padding: 12px 16px;
  border-radius: 10px;
  color: #fff;
  font-family: var(--font-main);
  outline: none;
  transition: var(--transition-smooth);
}

.sync-form-group input:focus {
  border-color: var(--primary);
}

.form-hint {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 6px;
}

.sync-actions {
  display: flex;
  gap: 16px;
  align-items: center;
}

.sync-actions.margin-top {
  margin-top: 16px;
}

.action-status-label {
  font-size: 0.9rem;
  font-weight: 600;
}

.action-status-label.success {
  color: var(--success);
}

.action-status-label.error {
  color: var(--danger);
}

/* Drag Drop Zone */
.upload-drag-zone {
  border: 2px dashed var(--border-glass);
  background: rgba(255, 255, 255, 0.01);
  padding: 40px 24px;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-align: center;
  transition: var(--transition-smooth);
  position: relative;
}

.upload-drag-zone:hover {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.02);
}

.upload-icon {
  width: 48px;
  height: 48px;
  fill: var(--text-muted);
  margin-bottom: 16px;
  transition: var(--transition-smooth);
}

.upload-drag-zone:hover .upload-icon {
  fill: var(--primary);
  transform: translateY(-4px);
}

.upload-text {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.hidden-file-input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.upload-status {
  margin-top: 16px;
  font-size: 0.9rem;
  text-align: center;
  font-weight: 500;
}

/* Drawer / Modal Details */
.drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(3, 4, 9, 0.7);
  backdrop-filter: blur(8px);
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.drawer-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.drawer {
  position: fixed;
  top: 0;
  right: -550px;
  width: 500px;
  height: 100vh;
  background-color: #0b0f1d;
  border-left: 1px solid var(--border-glass);
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.5);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.drawer.open {
  right: 0;
}

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

#drawer-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
}

.drawer-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
}

.btn-close-drawer {
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}

.btn-close-drawer:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

.btn-close-drawer svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

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

.drawer-stats-row {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
}

.drawer-stat-item {
  flex-grow: 1;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  padding: 16px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
}

.drawer-stat-item .label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
}

.drawer-stat-item .val {
  font-size: 1.2rem;
  font-weight: 800;
  color: #fff;
  margin-top: 4px;
}

/* Transports Timeline in Drawer */
.transports-list-wrapper h3 {
  font-size: 0.95rem;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 16px;
  letter-spacing: 0.5px;
}

.transports-timeline {
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: relative;
  padding-left: 20px;
}

.transports-timeline::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background-color: var(--border-glass);
}

.timeline-item {
  position: relative;
}

.timeline-dot {
  position: absolute;
  left: -20px;
  top: 6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--primary);
  border: 2px solid #0b0f1d;
  box-shadow: 0 0 6px var(--primary);
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.timeline-date {
  font-weight: 700;
  color: #fff;
  font-size: 0.95rem;
}

.timeline-code {
  font-family: monospace;
  font-size: 0.8rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.02);
  padding: 2px 6px;
  border-radius: 4px;
}

.timeline-files-box {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.file-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.02);
}

.file-item:last-child {
  border-bottom: none;
}

.file-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-grow: 1;
}

.file-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.file-icon.pdf { fill: #f87171; }
.file-icon.docx { fill: #60a5fa; }
.file-icon.zip { fill: #fbbf24; }
.file-icon.folder { fill: var(--text-secondary); }

.file-name-wrapper {
  display: flex;
  flex-direction: column;
}

.file-name {
  font-size: 0.85rem;
  color: var(--text-primary);
  font-weight: 500;
  word-break: break-all;
}

.file-size {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.btn-download-file {
  background: transparent;
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  border-radius: 6px;
  padding: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}

.btn-download-file:hover {
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary);
  border-color: var(--primary);
}

.btn-download-file svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

/* Helpers */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

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

@media (max-width: 768px) {
  .sidebar {
    width: 60px;
  }
  .sidebar-brand .brand-text, 
  .sidebar-nav span,
  .status-text {
    display: none;
  }
  .sidebar-brand {
    padding: 14px;
  }
  .logo-icon {
    width: 30px;
    height: 30px;
  }
  .nav-item {
    justify-content: center;
    padding: 12px;
  }
  .main-content {
    margin-left: 60px;
    padding: 24px;
  }
  .directory-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .search-input-wrapper {
    max-width: 100%;
  }
  .sync-grid {
    grid-template-columns: 1fr;
  }
  .drawer {
    width: 100%;
    right: -100%;
  }
}

/* Dashboard dual chart row */
.dashboard-charts-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 32px;
}
.dashboard-table-row {
  margin-bottom: 32px;
}

@media (max-width: 1200px) {
  .dashboard-charts-row {
    grid-template-columns: 1fr;
  }
}

/* Modal styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(3, 4, 9, 0.75);
  backdrop-filter: blur(10px);
  z-index: 1001;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}
.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  width: 90%;
  max-width: 650px;
  max-height: 85vh;
  background-color: #0b0f1d;
  border: 1px solid var(--border-glass);
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  z-index: 1002;
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.modal.open {
  opacity: 1;
  pointer-events: all;
  transform: translate(-50%, -50%) scale(1);
}
.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-glass);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.btn-close-modal {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 28px;
  cursor: pointer;
  line-height: 1;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: var(--transition-smooth);
}
.btn-close-modal:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}
.modal-body {
  padding: 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.modal-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
}
.modal-search-wrapper {
  margin-bottom: 4px;
}
.modal-search-wrapper input {
  width: 100%;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  padding: 14px 16px;
  color: #fff;
  font-size: 0.95rem;
  outline: none;
  font-family: var(--font-main);
  transition: var(--transition-smooth);
}
.modal-search-wrapper input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.15);
}
.modal-results-container {
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  max-height: 400px;
}
.modal-results-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-glass);
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
}
.modal-results-list {
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.results-placeholder {
  padding: 40px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}
/* Search Result Items */
.search-result-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition-smooth);
  border: 1px solid transparent;
}
.search-result-item:hover {
  background: var(--bg-glass-hover);
  border-color: rgba(99, 102, 241, 0.15);
}
.search-result-main {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-grow: 1;
}
.search-result-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: #fff;
}
.search-result-subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}
.btn-dl-result {
  background: transparent;
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  border-radius: 6px;
  padding: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}
.btn-dl-result:hover {
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary);
  border-color: var(--primary);
}
.btn-dl-result svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

/* Donut Chart styles */
.donut-chart-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-around;
  width: 100%;
  height: 100%;
  padding: 10px 20px;
  gap: 24px;
}
.donut-svg-container {
  width: 160px;
  height: 160px;
  position: relative;
  flex-shrink: 0;
}
.donut-svg-container svg {
  width: 100%;
  height: 100%;
}
.donut-center-text {
  text-anchor: middle;
  font-family: var(--font-main);
  pointer-events: none;
}
.donut-center-val {
  font-size: 14px;
  font-weight: 800;
  fill: var(--text-primary);
}
.donut-center-lbl {
  font-size: 7px;
  font-weight: 700;
  fill: var(--text-secondary);
  letter-spacing: 1px;
}
.donut-legend {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex-grow: 1;
  max-width: 220px;
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  transition: var(--transition-smooth);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
}
.legend-item:hover {
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-primary);
}
.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
  box-shadow: 0 0 6px currentColor;
}
.legend-label {
  flex-grow: 1;
  text-transform: uppercase;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.5px;
}
.legend-value {
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
}
.donut-slice {
  fill: none;
  stroke-width: 18;
  transition: stroke-width 0.3s ease, filter 0.3s ease;
  cursor: pointer;
}
.donut-slice:hover {
  stroke-width: 24;
}

/* Timeline highlight animation */
@keyframes pulse-highlight {
  0% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.5); border-color: var(--primary); }
  50% { box-shadow: 0 0 0 12px rgba(99, 102, 241, 0); border-color: var(--primary); }
  100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0); }
}
.timeline-files-box.highlighted {
  animation: pulse-highlight 2s ease-out 3;
  border-color: var(--primary) !important;
  background: rgba(99, 102, 241, 0.06) !important;
}

/* Registry modal item formatting */
.registry-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-radius: 10px;
  cursor: pointer;
  transition: var(--transition-smooth);
  border: 1px solid transparent;
}
.registry-item:hover {
  background: var(--bg-glass-hover);
  border-color: rgba(99, 102, 241, 0.15);
}
.registry-main {
  display: flex;
  align-items: center;
  gap: 12px;
}
.registry-info {
  display: flex;
  flex-direction: column;
}
.registry-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
}
.registry-subtitle {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 2px;
}
.registry-badge {
  background: rgba(168, 85, 247, 0.1);
  border: 1px solid rgba(168, 85, 247, 0.2);
  color: var(--secondary);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
}

/* Advanced Charts Layout */
.dashboard-charts-row-full {
  margin-bottom: 24px;
  width: 100%;
}
.chart-card-full {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: 20px;
  padding: 24px;
  backdrop-filter: blur(16px);
}

/* Spline Area Line Chart Tracker & Tooltips */
.chart-tracker-line {
  stroke: rgba(99, 102, 241, 0.25);
  stroke-width: 1.5;
  stroke-dasharray: 4 4;
  pointer-events: none;
}
.chart-tracker-dot {
  fill: var(--primary);
  stroke: #fff;
  stroke-width: 2.5;
  filter: drop-shadow(0 0 6px var(--primary));
  pointer-events: none;
}
.chart-tooltip-group {
  pointer-events: none;
}
.chart-tooltip-bg {
  fill: rgba(7, 9, 19, 0.95);
  stroke: var(--border-glass-focus);
  stroke-width: 1.5;
  rx: 8;
  ry: 8;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.6));
}
.chart-tooltip-title {
  font-family: var(--font-main);
  font-size: 11px;
  font-weight: 700;
  fill: #fff;
}
.chart-tooltip-val {
  font-family: var(--font-main);
  font-size: 13px;
  font-weight: 800;
  fill: var(--secondary);
}

/* Radar (Spider) Chart Elements */
.radar-grid {
  fill: none;
  stroke: rgba(255, 255, 255, 0.05);
  stroke-width: 1;
}
.radar-grid-line {
  stroke: rgba(255, 255, 255, 0.06);
  stroke-width: 1;
  stroke-dasharray: 2 2;
}
.radar-axis-label {
  font-family: var(--font-main);
  font-size: 10px;
  font-weight: 700;
  fill: var(--text-secondary);
  letter-spacing: 0.5px;
}
.radar-polygon {
  stroke-width: 2;
  fill-opacity: 0.15;
  transition: fill-opacity 0.3s ease, stroke-width 0.3s ease, filter 0.3s ease;
  cursor: pointer;
}
.radar-polygon:hover {
  fill-opacity: 0.35;
  stroke-width: 3;
  filter: drop-shadow(0 0 8px currentColor);
}
.radar-point {
  transition: r 0.2s ease, filter 0.2s ease;
  cursor: pointer;
}
.radar-point:hover {
  r: 6;
  filter: drop-shadow(0 0 5px currentColor);
}
.radar-legend {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.radar-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--text-secondary);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
  padding: 4px 8px;
  border-radius: 6px;
}
.radar-legend-item:hover {
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-primary);
}
.radar-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  box-shadow: 0 0 6px currentColor;
}

/* Global Search & Topbar Actions styling */
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.global-search-wrapper {
  position: relative;
  width: 300px;
  transition: var(--transition-smooth);
}

.global-search-wrapper:focus-within {
  width: 420px;
}

.global-search-wrapper input {
  width: 100%;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  padding: 10px 14px 10px 42px;
  border-radius: 12px;
  color: #fff;
  font-family: var(--font-main);
  font-size: 0.9rem;
  transition: var(--transition-smooth);
}

.global-search-wrapper input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.15);
}

.global-search-wrapper .search-icon {
  left: 14px;
  width: 16px;
  height: 16px;
}

.global-search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 100%;
  max-height: 400px;
  overflow-y: auto;
  background: rgba(10, 12, 26, 0.98);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(99, 102, 241, 0.1);
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-10px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 8px;
}

.global-search-dropdown.open {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}

.search-dropdown-section {
  margin-bottom: 12px;
}

.search-dropdown-section:last-child {
  margin-bottom: 0;
}

.search-dropdown-section-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 6px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  margin-bottom: 4px;
}

.search-dropdown-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition-smooth);
  border: 1px solid transparent;
}

.search-dropdown-item:hover {
  background: var(--bg-glass-hover);
  border-color: rgba(99, 102, 241, 0.15);
}

.search-dropdown-item-main {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-grow: 1;
  min-width: 0;
}

.search-dropdown-item-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.search-dropdown-item-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-dropdown-item-subtitle {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-dropdown-item-meta {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 500;
  flex-shrink: 0;
}

.search-dropdown-download-btn {
  background: transparent;
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  border-radius: 6px;
  padding: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
  flex-shrink: 0;
  margin-left: 8px;
}

.search-dropdown-download-btn:hover {
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary);
  border-color: var(--primary);
}

.search-dropdown-download-btn svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.search-dropdown-empty {
  padding: 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* View Toggle Styles */
.filter-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.view-toggle-group {
  display: inline-flex;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  padding: 4px;
  gap: 4px;
}

.btn-view-toggle {
  background: transparent;
  border: none;
  color: var(--text-muted);
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-view-toggle:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.03);
}

.btn-view-toggle.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 0 10px var(--primary-glow);
}

.btn-view-toggle svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* List View layout changes for Customer directory grid */
.customer-grid.list-view {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.customer-grid.list-view .customer-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 24px;
  border-radius: 14px;
}

.customer-grid.list-view .customer-card:hover {
  transform: translateY(-2px);
}

.customer-grid.list-view .customer-card-header {
  margin-bottom: 0;
  display: flex;
  align-items: center;
  gap: 16px;
}

.customer-grid.list-view .customer-card-title {
  font-size: 1.05rem;
  margin-bottom: 0;
}

.customer-grid.list-view .customer-card-info {
  border-top: none;
  padding-top: 0;
  flex-direction: row;
  align-items: center;
  gap: 24px;
}

.customer-grid.list-view .info-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.customer-grid.list-view .info-label {
  display: none;
}

.customer-grid.list-view .info-val {
  font-size: 0.9rem;
}

/* Timeline Header Row & Excel Export Button */
.timeline-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.timeline-header-row h3 {
  margin-bottom: 0 !important;
}

#btn-export-excel {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.2);
  cursor: pointer;
  transition: var(--transition-smooth);
}

#btn-export-excel:hover {
  background: rgba(16, 185, 129, 0.25);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}



