/* ============================================================
   LAUNDRY MANAGEMENT SYSTEM - MAIN STYLESHEET
   Modern SaaS Admin Dashboard - Teal & Orange Theme
   ============================================================ */

/* ----- DESIGN TOKENS ----- */
:root {
  /* Primary - Teal */
  --primary: #0F766E;
  --primary-dark: #115E59;
  --primary-light: #CCFBF1;
  --primary-lighter: #F0FDFA;
  --primary-50: #F0FDFA;
  --primary-100: #CCFBF1;
  --primary-200: #99F6E4;
  --primary-500: #0F766E;
  --primary-600: #0D9488;
  --primary-700: #115E59;

  /* Accent - Orange */
  --accent: #F97316;
  --accent-dark: #EA580C;
  --accent-light: #FFEDD5;
  --accent-lighter: #FFF7ED;

  /* Neutrals */
  --bg: #F8FAFC;
  --bg-alt: #F1F5F9;
  --white: #FFFFFF;
  --text: #1E293B;
  --text-muted: #64748B;
  --text-light: #94A3B8;
  --border: #E2E8F0;
  --border-light: #F1F5F9;

  /* Status Colors */
  --status-waiting: #94A3B8;
  --status-processing: #3B82F6;
  --status-washing: #06B6D4;
  --status-drying: #8B5CF6;
  --status-ironing: #F59E0B;
  --status-ready: #10B981;
  --status-done: #22C55E;
  --status-picked: #6366F1;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04), 0 1px 3px rgba(0,0,0,0.06);
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 4px 12px rgba(0,0,0,0.05);
  --shadow-lg: 0 4px 6px rgba(0,0,0,0.05), 0 10px 30px rgba(0,0,0,0.08);
  --shadow-xl: 0 20px 50px rgba(0,0,0,0.12);

  /* Radius */
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;

  /* Sidebar */
  --sidebar-width: 260px;
  --sidebar-collapsed: 72px;

  /* Transitions */
  --transition: all 0.2s ease;
  --transition-slow: all 0.3s ease;
}

/* ----- RESET & BASE ----- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}
a:hover {
  color: var(--primary-dark);
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

/* ----- SCROLLBAR ----- */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94A3B8;
}

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

/* ----- SIDEBAR ----- */
.sidebar {
  width: var(--sidebar-width);
  background: var(--white);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 1040;
  transition: var(--transition-slow);
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar-brand {
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.sidebar-brand .brand-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(15, 118, 110, 0.3);
}
.sidebar-brand .brand-text {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}
.sidebar-brand .brand-text small {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  margin-top: 2px;
}

.sidebar-nav {
  padding: 16px 12px;
  flex: 1;
}
.sidebar-nav .nav-section-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-light);
  padding: 12px 12px 8px;
}
.sidebar-nav .nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius);
  color: var(--text-muted);
  font-weight: 500;
  font-size: 14px;
  margin-bottom: 2px;
  transition: var(--transition);
  cursor: pointer;
  white-space: nowrap;
}
.sidebar-nav .nav-item i {
  font-size: 18px;
  flex-shrink: 0;
  width: 20px;
  text-align: center;
}
.sidebar-nav .nav-item:hover {
  background: var(--primary-lighter);
  color: var(--primary);
}
.sidebar-nav .nav-item.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  box-shadow: 0 4px 12px rgba(15, 118, 110, 0.25);
}
.sidebar-nav .nav-item.active i {
  color: white;
}
.sidebar-nav .nav-badge {
  margin-left: auto;
  background: var(--accent);
  color: white;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
}
.sidebar-nav .nav-item.active .nav-badge {
  background: rgba(255,255,255,0.25);
}

.sidebar-footer {
  padding: 16px 12px;
  border-top: 1px solid var(--border);
}
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
}
.sidebar-user:hover {
  background: var(--bg-alt);
}
.sidebar-user .user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 14px;
  flex-shrink: 0;
}
.sidebar-user .user-info {
  flex: 1;
  min-width: 0;
}
.sidebar-user .user-info .user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-user .user-info .user-role {
  font-size: 11px;
  color: var(--text-muted);
}

/* ----- MAIN CONTENT ----- */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: var(--transition-slow);
}

/* ----- TOP NAVBAR ----- */
.topbar {
  height: 64px;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 1030;
}
.topbar .sidebar-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 22px;
  color: var(--text);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.topbar .sidebar-toggle:hover {
  background: var(--bg-alt);
}
.topbar-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}
.topbar-breadcrumb .breadcrumb-item {
  color: var(--text-muted);
}
.topbar-breadcrumb .breadcrumb-item.active {
  color: var(--text);
  font-weight: 600;
}
.topbar-breadcrumb .breadcrumb-separator {
  color: var(--text-light);
  font-size: 12px;
}
.topbar-spacer {
  flex: 1;
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.topbar-icon-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  border: none;
  background: var(--bg-alt);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  font-size: 18px;
}
.topbar-icon-btn:hover {
  background: var(--primary-lighter);
  color: var(--primary);
}
.topbar-icon-btn .notification-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  border: 2px solid var(--white);
}
.topbar-search {
  position: relative;
}
.topbar-search input {
  width: 280px;
  padding: 8px 12px 8px 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
  background: var(--bg);
  color: var(--text);
  transition: var(--transition);
  outline: none;
}
.topbar-search input:focus {
  border-color: var(--primary);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.1);
}
.topbar-search i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  font-size: 16px;
}

/* ----- PAGE CONTENT ----- */
.page-content {
  padding: 24px;
  flex: 1;
}
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}
.page-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}
.page-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ============================================================
   COMPONENTS
   ============================================================ */

/* ----- CARDS ----- */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.card:hover {
  box-shadow: var(--shadow);
}
.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.card-header h5, .card-header h6 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}
.card-body {
  padding: 20px;
}
.card-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
}

/* ----- STAT CARDS ----- */
.stat-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 20px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.stat-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.stat-card .stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.stat-card .stat-icon.teal {
  background: var(--primary-light);
  color: var(--primary);
}
.stat-card .stat-icon.orange {
  background: var(--accent-light);
  color: var(--accent);
}
.stat-card .stat-icon.blue {
  background: #DBEAFE;
  color: #2563EB;
}
.stat-card .stat-icon.green {
  background: #D1FAE5;
  color: #059669;
}
.stat-card .stat-info {
  flex: 1;
}
.stat-card .stat-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.stat-card .stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  margin-top: 4px;
  line-height: 1.1;
}
.stat-card .stat-trend {
  font-size: 12px;
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.stat-card .stat-trend.up {
  color: #059669;
}
.stat-card .stat-trend.down {
  color: #DC2626;
}
.stat-card .stat-decoration {
  position: absolute;
  bottom: -20px;
  right: -20px;
  font-size: 80px;
  opacity: 0.05;
  transform: rotate(-15deg);
}

/* ----- BUTTONS ----- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
  line-height: 1.4;
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.btn-primary {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}
.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  color: white;
  box-shadow: 0 4px 12px rgba(15, 118, 110, 0.3);
}
.btn-accent {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}
.btn-accent:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  color: white;
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}
.btn-outline {
  background: var(--white);
  color: var(--text);
  border-color: var(--border);
}
.btn-outline:hover {
  background: var(--bg-alt);
  border-color: #CBD5E1;
  color: var(--text);
}
.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: transparent;
}
.btn-ghost:hover {
  background: var(--bg-alt);
  color: var(--text);
}
.btn-danger {
  background: #FEF2F2;
  color: #DC2626;
  border-color: #FECACA;
}
.btn-danger:hover {
  background: #DC2626;
  color: white;
  border-color: #DC2626;
}
.btn-success {
  background: #ECFDF5;
  color: #059669;
  border-color: #A7F3D0;
}
.btn-success:hover {
  background: #059669;
  color: white;
  border-color: #059669;
}
.btn-sm {
  padding: 6px 12px;
  font-size: 13px;
}
.btn-lg {
  padding: 12px 24px;
  font-size: 15px;
}
.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: var(--radius);
}
.btn-block {
  width: 100%;
}

/* ----- BADGES ----- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.badge-waiting {
  background: #F1F5F9;
  color: #64748B;
}
.badge-processing {
  background: #DBEAFE;
  color: #2563EB;
}
.badge-washing {
  background: #CFFAFE;
  color: #0891B2;
}
.badge-drying {
  background: #EDE9FE;
  color: #7C3AED;
}
.badge-ironing {
  background: #FEF3C7;
  color: #D97706;
}
.badge-ready {
  background: #D1FAE5;
  color: #059669;
}
.badge-done {
  background: #DCFCE7;
  color: #16A34A;
}
.badge-picked {
  background: #E0E7FF;
  color: #4F46E5;
}
.badge-paid {
  background: #D1FAE5;
  color: #059669;
}
.badge-unpaid {
  background: #FEE2E2;
  color: #DC2626;
}
.badge-accent {
  background: var(--accent-light);
  color: var(--accent-dark);
}

/* ----- ALERTS ----- */
.alert {
  padding: 14px 16px;
  border-radius: var(--radius);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14px;
  border: 1px solid transparent;
}
.alert i {
  font-size: 20px;
  flex-shrink: 0;
  margin-top: 1px;
}
.alert-info {
  background: var(--primary-lighter);
  color: var(--primary-dark);
  border-color: var(--primary-light);
}
.alert-warning {
  background: var(--accent-lighter);
  color: var(--accent-dark);
  border-color: var(--accent-light);
}
.alert-success {
  background: #ECFDF5;
  color: #047857;
  border-color: #A7F3D0;
}
.alert-danger {
  background: #FEF2F2;
  color: #B91C1C;
  border-color: #FECACA;
}

/* ----- TABLES ----- */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  -webkit-overflow-scrolling: touch;
}
table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
table.data-table thead th {
  background: var(--bg-alt);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  padding: 12px 16px;
  text-align: left;
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
}
table.data-table tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text);
  vertical-align: middle;
}
table.data-table tbody tr:last-child td {
  border-bottom: none;
}
table.data-table tbody tr {
  transition: var(--transition);
}
table.data-table tbody tr:hover {
  background: var(--primary-lighter);
}
table.data-table .td-code {
  font-weight: 600;
  color: var(--primary);
  font-size: 13px;
  white-space: nowrap;
}
table.data-table .td-actions {
  display: flex;
  gap: 4px;
  align-items: center;
}
table.data-table .td-actions .btn-icon {
  width: 32px;
  height: 32px;
  font-size: 15px;
}
table.data-table .td-actions .btn-icon.btn-ghost {
  color: var(--text-muted);
}
table.data-table .td-actions .btn-icon.btn-ghost:hover {
  color: var(--primary);
  background: var(--primary-lighter);
}
table.data-table .td-actions .btn-icon.btn-danger {
  background: transparent;
  border-color: transparent;
  color: #DC2626;
}
table.data-table .td-actions .btn-icon.btn-danger:hover {
  background: #FEE2E2;
}

/* ----- FORM CONTROLS ----- */
.form-group {
  margin-bottom: 18px;
}
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}
.form-label .required {
  color: #DC2626;
}
.form-control, .form-select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--text);
  background: var(--white);
  transition: var(--transition);
  outline: none;
  font-family: inherit;
}
.form-control:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.1);
}
.form-control::placeholder {
  color: var(--text-light);
}
.form-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}
.form-error {
  font-size: 12px;
  color: #DC2626;
  margin-top: 4px;
}
.input-group {
  position: relative;
  display: flex;
  align-items: center;
}
.input-group .input-group-text {
  padding: 10px 12px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-right: none;
  border-radius: var(--radius) 0 0 var(--radius);
  color: var(--text-muted);
  font-size: 14px;
  display: flex;
  align-items: center;
}
.input-group .form-control {
  border-radius: 0 var(--radius) var(--radius) 0;
}
.input-group.input-group-start .input-group-text {
  border-right: none;
  border-left: 1px solid var(--border);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.input-group.input-group-start .form-control {
  border-radius: var(--radius) 0 0 var(--radius);
}

/* ----- MODAL ----- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(2px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeIn 0.2s ease;
}
.modal-overlay.show {
  display: flex;
}
.modal {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideUp 0.25s ease;
}
.modal.modal-lg {
  max-width: 720px;
}
.modal.modal-sm {
  max-width: 400px;
}
.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-header h5 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
}
.modal-body {
  padding: 20px;
}
.modal-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.modal-close {
  background: none;
  border: none;
  font-size: 22px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  line-height: 1;
}
.modal-close:hover {
  background: var(--bg-alt);
  color: var(--text);
}

/* ----- TOAST ----- */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toast {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 14px 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 320px;
  max-width: 400px;
  border-left: 4px solid var(--primary);
  animation: slideInRight 0.3s ease;
}
.toast.toast-success {
  border-left-color: #059669;
}
.toast.toast-warning {
  border-left-color: var(--accent);
}
.toast.toast-error {
  border-left-color: #DC2626;
}
.toast .toast-icon {
  font-size: 20px;
  flex-shrink: 0;
}
.toast.toast-success .toast-icon {
  color: #059669;
}
.toast.toast-info .toast-icon {
  color: var(--primary);
}
.toast.toast-warning .toast-icon {
  color: var(--accent);
}
.toast.toast-error .toast-icon {
  color: #DC2626;
}
.toast .toast-content {
  flex: 1;
}
.toast .toast-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.toast .toast-message {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}
.toast .toast-close {
  background: none;
  border: none;
  font-size: 18px;
  color: var(--text-light);
  cursor: pointer;
  padding: 0;
  line-height: 1;
}
.toast.toast-out {
  animation: slideOutRight 0.3s ease forwards;
}

/* ----- PAGINATION ----- */
.pagination {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  padding: 0;
  justify-content: center;
}
.pagination .page-item .page-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}
.pagination .page-item:hover .page-link {
  border-color: var(--primary);
  color: var(--primary);
}
.pagination .page-item.active .page-link {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}
.pagination .page-item.disabled .page-link {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

/* ----- EMPTY STATE ----- */
.empty-state {
  text-align: center;
  padding: 48px 24px;
}
.empty-state .empty-icon {
  font-size: 56px;
  color: var(--text-light);
  margin-bottom: 16px;
  opacity: 0.6;
}
.empty-state .empty-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}
.empty-state .empty-text {
  font-size: 14px;
  color: var(--text-muted);
}

/* ----- LOADING ----- */
.spinner {
  width: 20px;
  height: 20px;
  border: 2.5px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
.spinner-lg {
  width: 40px;
  height: 40px;
  border-width: 3.5px;
}
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(2px);
  z-index: 4000;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
}
.loading-overlay.show {
  display: flex;
}
.loading-overlay .loading-text {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 500;
}

/* ----- DROPDOWN ----- */
.dropdown {
  position: relative;
  display: inline-block;
}
.dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  min-width: 200px;
  padding: 6px;
  z-index: 1050;
  display: none;
  animation: fadeIn 0.15s ease;
}
.dropdown-menu.show {
  display: block;
}
.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}
.dropdown-item:hover {
  background: var(--bg-alt);
  color: var(--text);
}
.dropdown-item i {
  font-size: 16px;
  color: var(--text-muted);
  width: 18px;
}
.dropdown-item.danger {
  color: #DC2626;
}
.dropdown-item.danger:hover {
  background: #FEF2F2;
}
.dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}

/* ----- FILTER BAR ----- */
.filter-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 20px;
}
.filter-bar .filter-search {
  flex: 1;
  min-width: 200px;
  position: relative;
}
.filter-bar .filter-search input {
  width: 100%;
  padding: 9px 12px 9px 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
  background: var(--white);
  outline: none;
  transition: var(--transition);
}
.filter-bar .filter-search input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.1);
}
.filter-bar .filter-search i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  font-size: 16px;
}
.filter-bar select, .filter-bar input[type="date"] {
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
  background: var(--white);
  color: var(--text);
  outline: none;
  cursor: pointer;
  transition: var(--transition);
}
.filter-bar select:focus, .filter-bar input[type="date"]:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.1);
}

/* ----- SECTION HEADER (FORM) ----- */
.form-section {
  margin-bottom: 28px;
}
.form-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--primary-light);
}
.form-section-title .section-number {
  width: 28px;
  height: 28px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

/* ----- CLOTHING ITEM ROW ----- */
.clothing-item {
  display: grid;
  grid-template-columns: 2fr 1.5fr 1fr 2fr auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
  padding: 12px;
  background: var(--bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.clothing-item .form-control, .clothing-item .form-select {
  padding: 8px 10px;
  font-size: 13px;
}
.clothing-item .btn-remove-item {
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  border: 1px solid #FECACA;
  background: #FEF2F2;
  color: #DC2626;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: var(--transition);
  flex-shrink: 0;
}
.clothing-item .btn-remove-item:hover {
  background: #DC2626;
  color: white;
}

/* ----- SUMMARY BOX ----- */
.summary-box {
  background: var(--primary-lighter);
  border: 1px solid var(--primary-light);
  border-radius: var(--radius-lg);
  padding: 20px;
}
.summary-box .summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  font-size: 14px;
}
.summary-box .summary-row.total {
  border-top: 2px solid var(--primary-light);
  margin-top: 8px;
  padding-top: 14px;
  font-size: 18px;
  font-weight: 700;
}
.summary-box .summary-row.total .summary-value {
  color: var(--primary);
}
.summary-box .summary-label {
  color: var(--text-muted);
  font-weight: 500;
}
.summary-box .summary-value {
  font-weight: 600;
  color: var(--text);
}

/* ----- QR & BARCODE CARDS ----- */
.qr-card {
  text-align: center;
  padding: 24px;
}
.qr-card .qr-image {
  display: inline-block;
  padding: 16px;
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 16px;
}
.qr-card .qr-code-text {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 1px;
  margin-bottom: 4px;
}
.qr-card .qr-code-subtext {
  font-size: 13px;
  color: var(--text-muted);
}

/* ----- LOGIN PAGE ----- */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  position: relative;
  overflow: hidden;
  padding: 20px;
}
.login-page::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(249, 115, 22, 0.15) 0%, transparent 70%);
  border-radius: 50%;
}
.login-page::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(15, 118, 110, 0.2) 0%, transparent 70%);
  border-radius: 50%;
}
.login-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 420px;
  padding: 40px;
  position: relative;
  z-index: 1;
  animation: slideUp 0.4s ease;
}
.login-logo {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 30px;
  margin: 0 auto 20px;
  box-shadow: 0 8px 24px rgba(15, 118, 110, 0.3);
}
.login-title {
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.login-subtitle {
  text-align: center;
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 28px;
}
.login-form .form-control {
  padding: 12px 14px;
  font-size: 14px;
}
.login-form .input-group {
  margin-bottom: 16px;
}
.login-form .input-group .input-group-text {
  padding: 12px 14px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-right: none;
  border-radius: var(--radius) 0 0 var(--radius);
  color: var(--text-muted);
  font-size: 18px;
  display: flex;
  align-items: center;
}
.login-form .input-group .form-control {
  border-radius: 0 var(--radius) var(--radius) 0;
}
.login-form .input-group .btn-toggle-pw {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-left: none;
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 12px 14px;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 16px;
}
.login-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  font-size: 13px;
}
.login-options .form-check {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.login-options .form-check input {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
  cursor: pointer;
}
.login-options a {
  color: var(--primary);
  font-weight: 500;
}
.login-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 13px;
  color: var(--text-muted);
}
.login-footer a {
  color: var(--primary);
  font-weight: 600;
}

/* ----- CHART CONTAINER ----- */
.chart-container {
  position: relative;
  width: 100%;
  height: 280px;
}
.chart-bars {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  height: 240px;
  padding-top: 20px;
}
.chart-bar-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.chart-bar {
  width: 100%;
  max-width: 40px;
  background: linear-gradient(180deg, var(--primary-200), var(--primary));
  border-radius: 6px 6px 0 0;
  transition: var(--transition);
  position: relative;
  cursor: pointer;
  min-height: 4px;
}
.chart-bar:hover {
  background: linear-gradient(180deg, var(--accent-light), var(--accent));
}
.chart-bar .chart-tooltip {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--text);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
  margin-bottom: 4px;
}
.chart-bar:hover .chart-tooltip {
  opacity: 1;
}
.chart-bar-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

/* ----- DUAL CHART ----- */
.chart-bars.dual .chart-bar-group {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  gap: 3px;
}
.chart-bars.dual .chart-bar {
  max-width: 16px;
}
.chart-bars.dual .chart-bar.bar-secondary {
  background: linear-gradient(180deg, var(--accent-light), var(--accent));
}

/* ----- PROGRESS ----- */
.progress {
  height: 8px;
  background: var(--bg-alt);
  border-radius: 4px;
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--primary-dark));
  border-radius: 4px;
  transition: width 0.5s ease;
}

/* ----- INFO LIST ----- */
.info-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}
.info-item .info-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  font-weight: 500;
  margin-bottom: 4px;
}
.info-item .info-value {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

/* ----- STATUS TIMELINE ----- */
.status-timeline {
  display: flex;
  align-items: center;
  gap: 0;
  margin: 20px 0;
  flex-wrap: wrap;
}
.status-timeline .timeline-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  position: relative;
  flex: 1;
  min-width: 80px;
}
.status-timeline .timeline-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-alt);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--text-light);
  z-index: 1;
  transition: var(--transition);
}
.status-timeline .timeline-step.completed .timeline-dot {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}
.status-timeline .timeline-step.current .timeline-dot {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
  box-shadow: 0 0 0 4px var(--accent-light);
}
.status-timeline .timeline-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
  text-align: center;
}
.status-timeline .timeline-step.completed .timeline-label {
  color: var(--primary);
}
.status-timeline .timeline-step.current .timeline-label {
  color: var(--accent-dark);
  font-weight: 600;
}
.status-timeline .timeline-connector {
  height: 2px;
  background: var(--border);
  flex: 1;
  margin: 0 -4px;
  position: absolute;
  top: 15px;
  z-index: 0;
}
.status-timeline .timeline-connector.completed {
  background: var(--primary);
}

/* ----- SCAN PAGE ----- */
.scan-area {
  background: var(--text);
  border-radius: var(--radius-lg);
  aspect-ratio: 1;
  max-width: 400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 16px;
  color: white;
  position: relative;
  overflow: hidden;
}
.scan-area .scan-frame {
  width: 70%;
  height: 70%;
  border: 3px solid var(--accent);
  border-radius: var(--radius);
  position: relative;
}
.scan-area .scan-frame::before,
.scan-area .scan-frame::after {
  content: '';
  position: absolute;
  width: 30px;
  height: 30px;
  border: 4px solid var(--accent);
}
.scan-area .scan-frame::before {
  top: -4px;
  left: -4px;
  border-right: none;
  border-bottom: none;
  border-radius: 8px 0 0 0;
}
.scan-area .scan-frame::after {
  bottom: -4px;
  right: -4px;
  border-left: none;
  border-top: none;
  border-radius: 0 0 8px 0;
}
.scan-area .scan-line {
  position: absolute;
  left: 15%;
  right: 15%;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  animation: scanLine 2s ease-in-out infinite;
}
.scan-area .scan-placeholder {
  text-align: center;
  color: rgba(255,255,255,0.6);
}
.scan-area .scan-placeholder i {
  font-size: 48px;
  margin-bottom: 8px;
  display: block;
}
.scan-area.scanning .scan-placeholder {
  display: none;
}

/* ----- LAUNDRY LABEL (PRINTABLE) ----- */
.laundry-label {
  width: 350px;
  background: var(--white);
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 16px;
  font-family: 'Inter', sans-serif;
  margin: 0 auto;
}
.laundry-label .label-header {
  text-align: center;
  border-bottom: 2px solid var(--text);
  padding-bottom: 8px;
  margin-bottom: 10px;
}
.laundry-label .label-shop-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.laundry-label .label-trx-code {
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
  margin: 8px 0;
  letter-spacing: 1px;
}
.laundry-label .label-qr {
  text-align: center;
  margin: 8px 0;
}
.laundry-label .label-qr img,
.laundry-label .label-qr canvas {
  display: inline-block;
}
.laundry-label .label-customer {
  text-align: center;
  margin: 8px 0;
}
.laundry-label .label-customer .label-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.laundry-label .label-customer .label-phone {
  font-size: 12px;
  color: var(--text-muted);
}
.laundry-label .label-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 12px;
  margin: 8px 0;
  font-size: 12px;
}
.laundry-label .label-info-grid .label-info-label {
  color: var(--text-muted);
}
.laundry-label .label-info-grid .label-info-value {
  font-weight: 600;
  color: var(--text);
  text-align: right;
}
.laundry-label .label-service {
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin: 6px 0;
  padding: 4px;
  background: var(--bg-alt);
  border-radius: 4px;
}
.laundry-label .label-dates {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  margin: 8px 0;
}
.laundry-label .label-dates .label-date-group .label-date-label {
  color: var(--text-muted);
  font-size: 10px;
}
.laundry-label .label-dates .label-date-group .label-date-value {
  font-weight: 600;
  color: var(--text);
}
.laundry-label .label-status {
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  border-top: 2px solid var(--text);
  border-bottom: 2px solid var(--text);
  padding: 6px;
  margin-top: 8px;
  letter-spacing: 1px;
}

/* ----- MISC ----- */
.text-primary { color: var(--primary) !important; }
.text-accent { color: var(--accent) !important; }
.text-muted { color: var(--text-muted) !important; }
.text-success { color: #059669 !important; }
.text-danger { color: #DC2626 !important; }
.fw-bold { font-weight: 700 !important; }
.fw-semibold { font-weight: 600 !important; }

.d-flex { display: flex; }
.align-items-center { align-items: center; }
.justify-content-between { justify-content: space-between; }
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.flex-wrap { flex-wrap: wrap; }
.flex-grow-1 { flex: 1; }
.text-center { text-align: center; }
.text-end { text-align: right; }
.w-100 { width: 100%; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mb-0 { margin-bottom: 0 !important; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.p-0 { padding: 0; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }

/* ----- ANIMATIONS ----- */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes slideOutRight {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(40px); }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes scanLine {
  0%, 100% { top: 15%; }
  50% { top: 80%; }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.animate-fade-in {
  animation: fadeIn 0.3s ease;
}
.animate-slide-up {
  animation: slideUp 0.3s ease;
}
