/* ==========================================================================
   Studio Printing & Album Management System - Clean White / Studio Pro Edition
   Modern Crisp White Aesthetic with Emerald Accents, Mobile Drawer & Table Cards
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
  /* Crisp White Background Palette */
  --bg-body: #f8fafc;
  --bg-sidebar: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f0fdf4;
  --bg-elevated: #f1f5f9;
  --bg-input: #ffffff;
  --border-subtle: #e2e8f0;
  --border-strong: #cbd5e1;
  --border-focus: #059669;

  /* Primary Accent: Studio Emerald Green */
  --primary: #059669;
  --primary-hover: #047857;
  --primary-light: rgba(5, 150, 105, 0.1);
  --accent-green: #10b981;
  --accent-mint: #059669;
  --accent-cyan: #0284c7;

  /* Status Colors for Clean White Theme */
  --status-pending-bg: rgba(245, 158, 11, 0.12);
  --status-pending-text: #b45309;
  --status-pending-border: rgba(245, 158, 11, 0.35);

  --status-production-bg: rgba(5, 150, 105, 0.12);
  --status-production-text: #059669;
  --status-production-border: rgba(5, 150, 105, 0.35);

  --status-ready-bg: rgba(16, 185, 129, 0.15);
  --status-ready-text: #047857;
  --status-ready-border: rgba(16, 185, 129, 0.4);

  --status-confirmed-bg: rgba(2, 132, 199, 0.12);
  --status-confirmed-text: #0284c7;
  --status-confirmed-border: rgba(2, 132, 199, 0.35);

  --status-urgent-bg: rgba(239, 68, 68, 0.12);
  --status-urgent-text: #dc2626;
  --status-urgent-border: rgba(239, 68, 68, 0.35);

  /* Typography */
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;

  --text-main: #0f172a;
  --text-muted: #334155;
  --text-dim: #64748b;

  /* Shadows & Transitions */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.07);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.12);
  --shadow-glow: 0 0 20px rgba(5, 150, 105, 0.2);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  height: 100vh;
  width: 100vw;
}

/* App Layout Grid */
.app-container {
  display: flex;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  position: relative;
}

/* ==========================================================================
   Sidebar Navigation & Drawer Mode
   ========================================================================== */
.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  z-index: 290;
  display: none;
}

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

.sidebar {
  width: 280px;
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  height: 100vh;
  flex-shrink: 0;
  z-index: 300;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.02);
}

.brand-section {
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
}

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

.brand-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: var(--shadow-glow);
}

.brand-info h1 {
  font-family: var(--font-heading);
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

.brand-info span {
  font-size: 0.72rem;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
}

.btn-close-sidebar {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 4px;
}

.sidebar-cta {
  padding: 16px 20px 10px;
}

.btn-primary-action {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 16px;
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.3);
  transition: var(--transition);
}

.btn-primary-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(5, 150, 105, 0.45);
}

.nav-menu {
  flex: 1 1 auto;
  overflow-y: auto;
  min-height: 0;
  padding: 12px 14px;
}

.nav-section-title {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  font-weight: 700;
  padding: 10px 10px 6px;
}

.nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-bottom: 14px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  transition: var(--transition);
  cursor: pointer;
  white-space: nowrap;
}

.nav-link:hover {
  background-color: var(--bg-card-hover);
  color: var(--text-main);
}

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

.nav-link svg {
  width: 18px;
  height: 18px;
  stroke-width: 2;
  flex-shrink: 0;
}

.nav-badge {
  margin-left: auto;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  background-color: var(--bg-elevated);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 22px;
  text-align: center;
  line-height: 1.4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.nav-badge.alert {
  background-color: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}

.nav-badge.actimate {
  background: rgba(5, 150, 105, 0.08);
  color: var(--primary);
  font-size: 0.65rem;
  border: 1px solid rgba(5, 150, 105, 0.2);
  white-space: nowrap;
  flex-shrink: 0;
}

.sidebar-footer {
  padding: 14px 16px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #fafafa;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.user-meta {
  flex: 1;
  line-height: 1.2;
}

.user-name {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-main);
}

.user-role {
  font-size: 0.7rem;
  color: var(--text-dim);
}

.btn-reset-demo {
  background: transparent;
  border: 1px dashed var(--border-strong);
  color: var(--text-dim);
  font-size: 0.72rem;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: var(--transition);
}

.btn-reset-demo:hover {
  border-color: var(--status-urgent-text);
  color: var(--status-urgent-text);
  background: rgba(239, 68, 68, 0.05);
}

/* ==========================================================================
   Main Content Area & Top Header (White Theme)
   ========================================================================== */
.main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  background-color: var(--bg-body);
}

.top-navbar {
  height: 64px;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 10;
  flex-shrink: 0;
  gap: 12px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.nav-left-group {
  display: flex;
  align-items: center;
  gap: 14px;
}

.btn-mobile-menu {
  display: none;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.nav-page-title h2 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-main);
}

.nav-page-title span {
  font-size: 0.76rem;
  color: var(--text-dim);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.search-container {
  position: relative;
  width: 280px;
}

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

.global-search-input {
  width: 100%;
  background-color: var(--bg-input);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 8px 14px 8px 36px;
  color: var(--text-main);
  font-size: 0.85rem;
  outline: none;
  transition: var(--transition);
}

.global-search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.15);
}

.btn-quick-new-order {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--primary);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-quick-new-order:hover {
  background: var(--primary-hover);
}

/* Content Container */
.content-body {
  flex: 1;
  overflow-y: auto;
  padding: 22px 24px;
}

/* ==========================================================================
   Dashboard View
   ========================================================================== */
.view-panel {
  display: none;
  animation: fadeIn 0.25s ease-in-out;
}

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

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

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

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.stat-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--primary);
}

.stat-card.stat-pending::before { background: #f59e0b; }
.stat-card.stat-production::before { background: #059669; }
.stat-card.stat-ready::before { background: #10b981; }
.stat-card.stat-delivered::before { background: #64748b; }

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

.stat-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.stat-icon {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(5, 150, 105, 0.08);
}

.stat-value {
  font-family: var(--font-heading);
  font-size: 1.85rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1;
  margin-bottom: 4px;
}

.stat-subtext {
  font-size: 0.72rem;
  color: var(--text-dim);
}

.banner-alert {
  background: linear-gradient(90deg, #fffbeb 0%, #fef3c7 100%);
  border: 1px solid #fde68a;
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
  gap: 12px;
  box-shadow: var(--shadow-sm);
}

.banner-alert-left {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #92400e;
}

.banner-alert-left strong {
  color: #78350f;
  font-weight: 700;
}

.banner-btn-action {
  background: #f59e0b;
  color: #fff;
  border: none;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
}

/* Dashboard Charts & Visual Analytics */
.dashboard-charts-grid {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 20px;
  margin-bottom: 22px;
}

.chart-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.chart-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.chart-card-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
}

.chart-card-subtitle {
  font-size: 0.76rem;
  color: var(--text-dim);
  margin-top: 2px;
}

.chart-header-badge {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  background: rgba(5, 150, 105, 0.08);
  color: #059669;
  border: 1px solid rgba(5, 150, 105, 0.2);
  white-space: nowrap;
}

.chart-container {
  width: 100%;
  height: 220px;
  position: relative;
}

.chart-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

/* Donut Chart Layout */
.donut-chart-layout {
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 16px;
  height: 220px;
}

.donut-svg-wrap {
  width: 150px;
  height: 150px;
  position: relative;
  flex-shrink: 0;
}

.donut-center-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  pointer-events: none;
}

.donut-center-value {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1;
}

.donut-center-label {
  font-size: 0.7rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 2px;
}

.donut-legend {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.donut-legend-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.donut-legend-item:hover {
  background: var(--bg-card-hover);
}

.donut-legend-color {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  margin-right: 8px;
  flex-shrink: 0;
}

.donut-legend-left {
  display: flex;
  align-items: center;
  color: var(--text-muted);
}

.donut-legend-right {
  font-weight: 700;
  color: var(--text-main);
}

/* Production Flow & Equipment Meters Row */
.dashboard-metrics-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 22px;
}

.mini-metrics-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
}

.mini-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.mini-card-title {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
}

/* Stage Flow Bar */
.stage-flow-bar-container {
  display: flex;
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
  background: #f1f5f9;
  margin-bottom: 14px;
}

.stage-flow-segment {
  height: 100%;
  transition: width 0.4s ease;
  position: relative;
}

.stage-flow-legend {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.stage-flow-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.74rem;
  color: var(--text-muted);
}

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

/* Machine Utilization Meter List */
.machine-util-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.machine-util-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.machine-util-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
}

.machine-util-name {
  font-weight: 600;
  color: var(--text-main);
}

.machine-util-stat {
  font-size: 0.74rem;
  color: var(--text-dim);
}

.machine-progress-track {
  height: 7px;
  background: #f1f5f9;
  border-radius: 999px;
  overflow: hidden;
}

.machine-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #059669 0%, #10b981 100%);
  transition: width 0.5s ease;
}

/* Tooltip for SVG Chart */
.chart-tooltip-box {
  position: absolute;
  padding: 6px 10px;
  background: rgba(15, 23, 42, 0.92);
  color: #ffffff;
  border-radius: 6px;
  font-size: 0.74rem;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transform: translate(-50%, -120%);
  white-space: nowrap;
  z-index: 10;
  display: none;
  line-height: 1.35;
}

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

.section-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.section-box-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
  gap: 10px;
}

.section-box-header h3 {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
}

/* ==========================================================================
   Modern Tables & Responsive Table-To-Card System (White Theme)
   ========================================================================== */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.modern-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.85rem;
}

.modern-table th {
  padding: 12px 14px;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  background: #f8fafc;
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
}

.modern-table td {
  padding: 14px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-muted);
  vertical-align: middle;
}

.modern-table tr:hover td {
  background-color: var(--bg-card-hover);
  color: var(--text-main);
}

/* Table elements */
.table-id-badge {
  font-family: monospace;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  background: rgba(5, 150, 105, 0.08);
  color: var(--primary);
  border: 1px solid rgba(5, 150, 105, 0.25);
  display: inline-block;
  white-space: nowrap;
}

.table-job-badge {
  font-family: monospace;
  font-size: 0.76rem;
  color: var(--text-dim);
  margin-top: 2px;
  white-space: nowrap;
}

.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  white-space: nowrap;
}

.badge-priority {
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.priority-urgent {
  background: var(--status-urgent-bg);
  color: var(--status-urgent-text);
  border: 1px solid var(--status-urgent-border);
}

.priority-high {
  background: rgba(245, 158, 11, 0.12);
  color: #b45309;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.priority-normal {
  background: #f1f5f9;
  color: #475569;
}

.btn-icon-action {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

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

/* ==========================================================================
   Mobile Responsive Table-as-Cards Transformation (Max-width: 768px)
   ========================================================================== */
@media (max-width: 768px) {
  .modern-table {
    display: block;
    width: 100%;
  }

  .modern-table thead {
    display: none;
  }

  .modern-table tbody {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 100%;
  }

  .modern-table tbody tr {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    padding: 14px 16px;
    gap: 8px;
    box-shadow: var(--shadow-sm);
  }

  .modern-table tbody tr:hover td {
    background-color: transparent;
  }

  .modern-table td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid var(--border-subtle);
    font-size: 0.84rem;
  }

  .modern-table td::before {
    content: attr(data-label);
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    flex-shrink: 0;
    margin-right: 12px;
  }

  .modern-table td:last-child {
    border-bottom: none;
    padding-top: 10px;
    margin-top: 4px;
    justify-content: flex-end;
  }

  .modern-table td:last-child::before {
    display: none;
  }
}

/* ==========================================================================
   Kanban Board View (White Theme)
   ========================================================================== */
.kanban-view-container {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 120px);
}

.kanban-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-shrink: 0;
  gap: 16px;
  flex-wrap: wrap;
}

.kanban-filters {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.select-filter {
  background-color: var(--bg-card);
  border: 1px solid var(--border-strong);
  color: var(--text-muted);
  padding: 7px 12px;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  outline: none;
  cursor: pointer;
}

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

.kanban-board {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  flex: 1;
  padding-bottom: 14px;
  scroll-snap-type: x mandatory;
}

.kanban-column {
  width: 280px;
  min-width: 260px;
  background: #f1f5f9;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  max-height: 100%;
  scroll-snap-align: start;
}

.kanban-column-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8fafc;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.kanban-col-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.kanban-col-title {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-main);
}

.kanban-col-count {
  font-size: 0.74rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: #ffffff;
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
}

.kanban-cards-wrapper {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Kanban Cards (White Theme) */
.kanban-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  box-shadow: var(--shadow-sm);
}

.kanban-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.kanban-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.kanban-job-num {
  font-family: monospace;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--primary);
}

.kanban-customer-name {
  font-family: var(--font-heading);
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}

.kanban-product-type {
  display: inline-block;
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.kanban-warning-chip {
  background: #fef3c7;
  border: 1px solid #fde68a;
  color: #b45309;
  padding: 5px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}

.kanban-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-subtle);
  padding-top: 10px;
  font-size: 0.74rem;
  color: var(--text-dim);
}

.kanban-due-date {
  display: flex;
  align-items: center;
  gap: 5px;
}

.kanban-due-date.urgent {
  color: #dc2626;
  font-weight: 700;
}

.kanban-assignee {
  display: flex;
  align-items: center;
  gap: 6px;
}

.kanban-assignee-avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--bg-elevated);
  font-size: 0.65rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
}

/* Quick Advance Action */
.kanban-quick-advance {
  display: none;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--border-subtle);
  align-items: center;
  justify-content: space-between;
}

.kanban-card:hover .kanban-quick-advance {
  display: flex;
}

.btn-advance-stage {
  background: var(--primary-light);
  border: 1px solid rgba(5, 150, 105, 0.3);
  color: var(--primary);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.btn-advance-stage:hover {
  background: var(--primary);
  color: #fff;
}

/* ==========================================================================
   Settings Module (Master Data Lists)
   ========================================================================== */
.settings-container {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.settings-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 12px;
  overflow-x: auto;
}

.settings-tab-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  color: var(--text-muted);
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.settings-tab-btn:hover {
  background: var(--bg-elevated);
  color: var(--text-main);
}

.settings-tab-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(5, 150, 105, 0.25);
}

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

.settings-tab-content.active {
  display: block;
}

.settings-list-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.settings-list-header {
  padding: 16px 20px;
  background: #f8fafc;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.settings-list-header h4 {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
}

.settings-list-header p {
  font-size: 0.78rem;
  color: var(--text-dim);
}

/* ==========================================================================
   Modals & Drawers (White Theme)
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  z-index: 500;
  display: none;
  align-items: center;
  justify-content: center;
}

.modal-overlay.active {
  display: flex;
  animation: fadeIn 0.2s ease-out;
}

.modal-dialog {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  width: 92%;
  max-width: 640px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  position: relative;
}

.modal-dialog form {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  height: 100%;
}

.modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: #ffffff;
  flex-shrink: 0;
}

.modal-header h3 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-main);
}

.btn-close-modal {
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.btn-close-modal:hover {
  color: var(--text-main);
  background: var(--bg-elevated);
}

.modal-body {
  padding: 20px 24px 28px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: #ffffff;
  flex: 1 1 auto;
  min-height: 0;
}

.modal-footer {
  padding: 14px 24px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  background: #f8fafc;
  flex-shrink: 0;
}

.modal-tip-box {
  background: #f0fdf4;
  border: 1px dashed #059669;
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font-size: 0.8rem;
  color: #166534;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.5;
  margin-top: 4px;
}

.modal-tip-box svg {
  flex-shrink: 0;
  margin-top: 2px;
  color: #059669;
}

.modal-tip-box strong {
  color: #14532d;
}

/* Master Settings CRUD Action Buttons & Form Controls */
.btn-action-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-table-edit {
  background: #ffffff;
  border: 1px solid var(--border-strong);
  color: var(--text-main);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-table-edit:hover {
  background: var(--bg-card-hover);
  border-color: var(--primary);
  color: var(--primary);
}

.btn-table-delete {
  background: #ffffff;
  border: 1px solid #fecaca;
  color: #dc2626;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-table-delete:hover {
  background: #fef2f2;
  border-color: #ef4444;
}

.input-with-addon {
  display: flex;
  align-items: center;
  width: 100%;
}

.input-addon {
  padding: 8px 12px;
  background: #f1f5f9;
  border: 1px solid var(--border-strong);
  border-right: none;
  border-radius: var(--radius-md) 0 0 var(--radius-md);
  color: var(--text-dim);
  font-size: 0.85rem;
  font-weight: 600;
  flex-shrink: 0;
}

.input-with-addon input {
  border-top-left-radius: 0 !important;
  border-bottom-left-radius: 0 !important;
  flex: 1;
}

/* Delete Modal Styling */
.delete-icon-wrap {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: #fee2e2;
  border: 4px solid #fef2f2;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2px;
}

.btn-danger {
  background: #dc2626;
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-danger:hover {
  background: #b91c1c;
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.35);
}

/* Slide-out Drawer (White Theme) */
.drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
  z-index: 510;
  display: none;
}

.drawer-overlay.active {
  display: block;
}

.slide-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 820px;
  max-width: 95vw;
  height: 100vh;
  background: #ffffff;
  border-left: 1px solid var(--border-subtle);
  z-index: 520;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.15);
}

.slide-drawer.open {
  transform: translateX(0);
}

.drawer-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-subtle);
  background: #f8fafc;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
}

.drawer-title-group h2 {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 12px;
}

.drawer-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  background: #f8fafc;
}

.drawer-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-subtle);
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
}

/* Form Styles */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.form-control {
  width: 100%;
  background-color: #ffffff;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  color: var(--text-main);
  font-size: 0.88rem;
  outline: none;
  transition: var(--transition);
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.15);
}

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

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

/* Progressive Specs Section in Job Card */
.specs-card-box {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
}

.specs-card-box-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 10px;
}

.specs-card-box-header h4 {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
}

/* Sheet Table inside Job Card */
.sheet-config-table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0 16px;
  font-size: 0.84rem;
}

.sheet-config-table th {
  background: #f8fafc;
  color: var(--text-dim);
  padding: 8px 12px;
  text-align: left;
  font-size: 0.72rem;
  font-weight: 700;
  border-bottom: 1px solid var(--border-subtle);
}

.sheet-config-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
}

.btn-add-sheet {
  background: rgba(5, 150, 105, 0.08);
  border: 1px dashed var(--primary);
  color: var(--primary);
  padding: 7px 14px;
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}

.btn-add-sheet:hover {
  background: var(--primary);
  color: #fff;
}

/* Financials Box */
.financials-summary-box {
  background: #f8fafc;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.85rem;
}

.fin-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-muted);
}

.fin-row.total {
  border-top: 1px solid var(--border-subtle);
  padding-top: 10px;
  margin-top: 4px;
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
}

.fin-row.total .amount {
  color: var(--primary);
}

/* Timeline in Job Card */
.timeline-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  padding-left: 20px;
}

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

.timeline-item {
  position: relative;
}

.timeline-dot {
  position: absolute;
  left: -20px;
  top: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--primary);
  border: 3px solid #ffffff;
  box-shadow: 0 0 0 1px var(--border-subtle);
}

.timeline-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.timeline-event-title {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text-main);
}

.timeline-meta {
  font-size: 0.72rem;
  color: var(--text-dim);
}

.timeline-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 3px;
}

/* Buttons */
.btn-secondary {
  background: #ffffff;
  border: 1px solid var(--border-strong);
  color: var(--text-muted);
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.84rem;
  cursor: pointer;
  transition: var(--transition);
}

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

.btn-primary {
  background: var(--primary);
  border: none;
  color: #fff;
  padding: 8px 18px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.84rem;
  cursor: pointer;
  transition: var(--transition);
}

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

.btn-success {
  background: #059669;
  border: none;
  color: #fff;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.84rem;
  cursor: pointer;
  transition: var(--transition);
}

.btn-success:hover {
  background: #047857;
}

/* Actimate Connected Banner View */
.actimate-module-view {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 36px 32px;
  text-align: center;
  max-width: 680px;
  margin: 40px auto;
  box-shadow: var(--shadow-sm);
}

.actimate-badge-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(5, 150, 105, 0.08);
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 16px;
  border: 1px solid rgba(5, 150, 105, 0.25);
}

.actimate-module-view h3 {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  color: var(--text-main);
  margin-bottom: 10px;
}

.actimate-module-view p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 24px;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  background: #ffffff;
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-lg);
  color: var(--text-main);
  padding: 12px 18px;
  border-radius: var(--radius-md);
  font-size: 0.86rem;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideInUp 0.25s ease-out;
  pointer-events: auto;
}

.toast.success { border-color: #059669; }
.toast.warning { border-color: #f59e0b; }

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

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* ==========================================================================
   Dashboard Visual Charts & Analytics (SVG & CSS)
   ========================================================================== */
.dashboard-charts-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 18px;
  margin-bottom: 20px;
}

.chart-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.chart-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 14px;
  gap: 12px;
}

.chart-card-title {
  font-family: var(--font-heading);
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.3;
}

.chart-card-subtitle {
  font-size: 0.77rem;
  color: var(--text-dim);
  margin-top: 2px;
}

.chart-header-badge {
  background: rgba(5, 150, 105, 0.09);
  color: var(--primary);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  border: 1px solid rgba(5, 150, 105, 0.2);
  white-space: nowrap;
}

.chart-container {
  position: relative;
  width: 100%;
  height: 210px;
}

.chart-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.chart-grid-line {
  stroke: #f1f5f9;
  stroke-width: 1;
  stroke-dasharray: 4 4;
}

.chart-axis-text {
  fill: #94a3b8;
  font-size: 11px;
  font-weight: 500;
  font-family: var(--font-sans);
}

.chart-area-path {
  fill: url(#weeklyAreaGradient);
  opacity: 0.85;
}

.chart-line-path {
  fill: none;
  stroke: var(--primary);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chart-dot {
  fill: #ffffff;
  stroke: var(--primary);
  stroke-width: 2.5;
  cursor: pointer;
  transition: all 0.2s ease;
}

.chart-dot:hover {
  r: 7;
  fill: var(--primary);
  stroke: #ffffff;
  stroke-width: 3;
}

.chart-tooltip-box {
  position: absolute;
  pointer-events: none;
  background: #0f172a;
  color: #ffffff;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 500;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
  transform: translate(-50%, -125%);
  display: none;
  white-space: nowrap;
  z-index: 50;
  line-height: 1.4;
}

.chart-tooltip-box::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: #0f172a transparent transparent transparent;
}

/* Donut Chart Layout */
.donut-chart-layout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  height: 210px;
}

.donut-svg-wrap {
  position: relative;
  width: 140px;
  height: 140px;
  flex-shrink: 0;
}

.donut-center-text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.donut-center-value,
.donut-center-num {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-main);
  font-family: var(--font-heading);
  line-height: 1;
}

.donut-center-label,
.donut-center-lbl {
  font-size: 0.68rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 3px;
  font-weight: 600;
}

.donut-legend {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.donut-legend-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.79rem;
  gap: 8px;
}

.donut-legend-left,
.legend-label-wrap {
  display: flex;
  align-items: center;
  color: var(--text-main);
  font-weight: 500;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.donut-legend-color,
.legend-dot {
  width: 9px;
  height: 9px;
  border-radius: 2px;
  flex-shrink: 0;
  margin-right: 8px;
}

.donut-legend-right,
.legend-val {
  font-weight: 700;
  color: var(--text-muted);
  font-size: 0.76rem;
  white-space: nowrap;
}

/* Metrics Row: Pipeline Stage Flow & Machine Capacity */
.dashboard-metrics-row {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 18px;
  margin-bottom: 22px;
}

.mini-metrics-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.mini-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.mini-card-title {
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
}

.stage-flow-bar-container,
.stage-flow-stacked-bar {
  display: flex;
  height: 18px;
  border-radius: 6px;
  overflow: hidden;
  background: #f1f5f9;
  margin-bottom: 12px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

.stage-flow-segment {
  height: 100%;
  transition: width 0.3s ease;
  cursor: pointer;
  position: relative;
}

.stage-flow-segment:hover {
  filter: brightness(1.1);
}

.stage-flow-legend {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px 10px;
}

.stage-flow-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.stage-flow-dot,
.stage-color-pill {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.machine-util-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.machine-util-row,
.machine-util-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.machine-util-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.77rem;
  flex-wrap: wrap;
  gap: 4px;
}

.machine-util-name,
.machine-name-text {
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
}

.machine-util-stat,
.machine-load-text {
  font-weight: 600;
  color: var(--primary);
  font-size: 0.74rem;
}

.machine-progress-track,
.machine-progress-bg {
  height: 7px;
  border-radius: 4px;
  background: #e2e8f0;
  overflow: hidden;
}

.machine-progress-fill {
  height: 100%;
  border-radius: 4px;
  background: var(--primary);
  transition: width 0.4s ease;
}

/* Job Card Drawer Quick Action Toolbar */
.jc-quick-toolbar {
  display: flex;
  gap: 8px;
  padding: 10px 24px;
  background: #f8fafc;
  border-bottom: 1px solid var(--border-subtle);
  flex-wrap: wrap;
  align-items: center;
}

.btn-jc-action {
  background: #ffffff;
  border: 1px solid var(--border-strong);
  color: var(--text-main);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.77rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: var(--transition);
}

.btn-jc-action:hover {
  background: var(--bg-elevated);
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
}

/* Reports & Analytics View Styling */
.reports-header-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 18px 22px;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  box-shadow: var(--shadow-sm);
}

.reports-filter-bar {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  flex-wrap: wrap;
}

/* QC Checklist Styling */
.qc-checklist-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 14px;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  transition: var(--transition);
}

.qc-checklist-item:hover {
  background: #f8fafc;
  border-color: var(--border-strong);
}

.qc-checklist-item input[type="checkbox"] {
  margin-top: 3px;
  accent-color: var(--primary);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.qc-checklist-item label {
  display: flex;
  flex-direction: column;
  gap: 2px;
  cursor: pointer;
}

.qc-checklist-item label strong {
  font-size: 0.82rem;
  color: var(--text-main);
}

.qc-checklist-item label span {
  font-size: 0.74rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Printable A4 Physical Job Card Mockup */
.printable-sheet-paper {
  background: #ffffff;
  padding: 32px 36px;
  border-radius: 4px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  color: #0f172a;
  font-family: var(--font-sans);
  margin: 0 auto;
  max-width: 740px;
  line-height: 1.4;
}

.print-letterhead {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 2px solid #0f172a;
  padding-bottom: 14px;
  margin-bottom: 16px;
}

.print-logo-box h2 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin: 0;
  color: #059669;
}

.print-logo-sub {
  font-size: 0.72rem;
  color: #64748b;
  margin-top: 2px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.print-hotline-box {
  text-align: right;
  font-size: 0.74rem;
  color: #475569;
}

.print-doc-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e2e8f0;
}

.print-doc-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.print-barcode-block {
  text-align: right;
  font-family: 'Courier New', Courier, monospace;
}

.print-barcode-bars {
  font-size: 1.4rem;
  letter-spacing: -1px;
  line-height: 0.8;
  color: #0f172a;
}

.print-barcode-number {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: #64748b;
}

.print-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 18px;
}

.print-info-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  padding: 10px 14px;
  font-size: 0.78rem;
}

.print-info-row {
  display: flex;
  justify-content: space-between;
  padding: 3px 0;
  border-bottom: 1px dashed #edf2f7;
}

.print-info-row:last-child {
  border-bottom: none;
}

.print-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
  margin-bottom: 16px;
}

.print-table th {
  background: #0f172a;
  color: #ffffff;
  padding: 6px 10px;
  text-align: left;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.print-table td {
  padding: 6px 10px;
  border-bottom: 1px solid #e2e8f0;
}

.print-table tr:nth-child(even) {
  background: #f8fafc;
}

.print-totals-wrapper {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 24px;
}

.print-totals-card {
  width: 280px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 10px 14px;
  font-size: 0.78rem;
}

.print-total-row {
  display: flex;
  justify-content: space-between;
  padding: 3px 0;
}

.print-total-row.grand-total {
  font-size: 0.92rem;
  font-weight: 800;
  border-top: 2px solid #0f172a;
  padding-top: 6px;
  margin-top: 4px;
  color: #059669;
}

.print-signatures-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-top: 28px;
  padding-top: 14px;
  border-top: 1px solid #cbd5e1;
}

.print-sign-box {
  text-align: center;
}

.print-sign-line {
  border-bottom: 1px solid #0f172a;
  height: 36px;
  margin-bottom: 6px;
}

.print-sign-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #475569;
}

/* Print Media Query */
@media print {
  body * {
    visibility: hidden;
  }
  #modalPrintJobCard,
  #modalPrintJobCard * {
    visibility: visible;
  }
  #modalPrintJobCard {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: auto;
    background: #ffffff !important;
    display: block !important;
  }
  .modal-dialog {
    max-width: 100% !important;
    width: 100% !important;
    box-shadow: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  .modal-header,
  .btn-close-modal,
  .btn-primary,
  .top-navbar,
  .sidebar,
  .drawer-footer {
    display: none !important;
  }
  .modal-body {
    padding: 0 !important;
    background: #ffffff !important;
  }
  .printable-sheet-paper {
    box-shadow: none !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }
}

/* ==========================================================================
   Responsive Breakpoints & Drawer Behavior (Tablet & Mobile)
   ========================================================================== */
@media (max-width: 1024px) {
  .dashboard-split-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 280px;
    transform: translateX(-100%);
    box-shadow: 10px 0 40px rgba(0, 0, 0, 0.15);
  }

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

  .btn-close-sidebar {
    display: flex;
  }

  .btn-mobile-menu {
    display: flex;
  }

  .slide-drawer {
    width: 100vw;
    max-width: 100vw;
  }

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

  .dashboard-charts-grid,
  .dashboard-metrics-row {
    grid-template-columns: 1fr;
  }

  .donut-chart-layout {
    flex-direction: column;
    height: auto;
  }

  .stage-flow-legend {
    grid-template-columns: repeat(2, 1fr);
  }

  .top-navbar {
    padding: 0 16px;
  }

  .search-container {
    width: 180px;
  }
}

@media (max-width: 640px) {
  .top-navbar {
    height: auto;
    padding: 10px 14px;
    flex-wrap: wrap;
  }

  .nav-actions {
    width: 100%;
    justify-content: space-between;
    margin-top: 8px;
  }

  .search-container {
    flex: 1;
    width: auto;
  }

  .content-body {
    padding: 14px;
  }

  .kanban-view-container {
    height: auto;
  }

  .kanban-board {
    min-height: 480px;
  }

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

  .modal-dialog {
    width: 96%;
    max-height: 95vh;
  }

  .modal-body {
    padding: 16px;
  }
}

/* ==========================================================================
   PHOTOGRAPHY STUDIO SPECIALIZED MODULE STYLES
   ========================================================================== */

/* Proofing Progress Bar */
.proofing-progress-bar-wrap {
  width: 100%;
  height: 8px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}

.proofing-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #059669);
  border-radius: 999px;
  transition: width 0.4s ease;
}

/* 3-Level Storage Backup Checks */
.storage-backup-checks {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #f8fafc;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.storage-check-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-main);
  cursor: pointer;
}

.storage-check-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
  cursor: pointer;
}

/* Gear Kit Pill */
.gear-pill {
  display: inline-block;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #334155;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  font-family: var(--font-mono, monospace);
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Shoot Status Badges */
.shoot-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
}

.shoot-status-upcoming {
  background: rgba(99, 102, 241, 0.12);
  color: #6366f1;
}

.shoot-status-today {
  background: rgba(245, 158, 11, 0.15);
  color: #d97706;
}

.shoot-status-completed {
  background: rgba(16, 185, 129, 0.15);
  color: #059669;
}

/* ==========================================================================
   ALBUM SPREAD PROOFING & LAYFLAT VIEWER MODAL
   ========================================================================== */

.modal-spread-dialog {
  max-width: 1060px;
  width: 95%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.6);
}

.spread-top-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #1e293b;
  margin-bottom: 14px;
}

.spread-info-block {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.spread-index-tag {
  background: #334155;
  color: #f1f5f9;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.04em;
}

.spread-title-text {
  font-size: 0.88rem;
  font-weight: 600;
  color: #f8fafc;
}

/* Layflat Album Viewport */
.album-spread-viewport {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 18px 8px;
  background: #020617;
  border-radius: var(--radius-md);
  border: 1px solid #1e293b;
  perspective: 1200px;
}

.album-spread-canvas {
  position: relative;
  display: flex;
  width: 100%;
  max-width: 900px;
  aspect-ratio: 2 / 1;
  background: #ffffff;
  border-radius: 4px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.album-page {
  flex: 1;
  height: 100%;
  position: relative;
  padding: 16px;
  background: #ffffff;
  display: flex;
  flex-direction: column;
}

.album-page-left {
  border-right: 1px solid rgba(0, 0, 0, 0.05);
}

.album-page-right {
  border-left: 1px solid rgba(0, 0, 0, 0.05);
}

/* Layflat Spine Crease */
.album-spine-crease {
  width: 14px;
  height: 100%;
  position: relative;
  background: linear-gradient(90deg, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.02) 50%, rgba(0,0,0,0.15) 100%);
  flex-shrink: 0;
  z-index: 10;
  box-shadow: inset 1px 0 3px rgba(0,0,0,0.2), inset -1px 0 3px rgba(0,0,0,0.2);
}

.spread-photo-block {
  border-radius: 3px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 12px;
}

.spread-photo-block.photo-main {
  width: 100%;
  height: 100%;
}

.spread-right-grid {
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: 12px;
  width: 100%;
  height: 100%;
}

.spread-photo-block.photo-sub {
  width: 100%;
  height: 100%;
}

.photo-overlay-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(4px);
  color: #f8fafc;
  font-size: 0.68rem;
  font-weight: 600;
  font-family: monospace;
  padding: 3px 7px;
  border-radius: 3px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.photo-artistic-frame {
  margin: auto;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 16px 24px;
  border-radius: 2px;
}

.photo-initials-crest {
  font-family: var(--font-heading, Georgia, serif);
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: #f1f5f9;
}

.photo-caption-mockup {
  font-size: 0.72rem;
  color: #cbd5e1;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: 4px;
}

.page-corner-number {
  position: absolute;
  bottom: 6px;
  font-size: 0.65rem;
  color: #64748b;
  font-weight: 600;
}

.album-page-left .page-corner-number {
  left: 12px;
}

.album-page-right .page-corner-number {
  right: 12px;
}

/* Rubber Stamp Client Approval Badge */
.spread-approval-stamp {
  position: absolute;
  bottom: 24px;
  right: 28px;
  background: rgba(16, 185, 129, 0.9);
  color: #ffffff;
  padding: 6px 14px;
  border-radius: 4px;
  border: 2px dashed #a7f3d0;
  transform: rotate(-5deg);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
  z-index: 20;
}

.spread-notes-bar {
  margin-top: 12px;
  background: #1e293b;
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  border-left: 3px solid var(--primary);
}

/* Filmstrip Spread Thumbnails */
.spread-thumbnails-strip {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  overflow-x: auto;
  padding: 6px 2px;
}

.spread-thumb-item {
  flex-shrink: 0;
  width: 96px;
  height: 52px;
  background: #1e293b;
  border: 2px solid #334155;
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.spread-thumb-item:hover {
  border-color: #64748b;
  transform: translateY(-2px);
}

.spread-thumb-item.active {
  border-color: var(--primary);
  background: #0f2e22;
  box-shadow: 0 0 0 2px rgba(5, 150, 105, 0.4);
}

.spread-thumb-title {
  font-size: 0.68rem;
  font-weight: 700;
  color: #f1f5f9;
}

.spread-thumb-status {
  font-size: 0.6rem;
  color: #34d399;
}

