/* =====================================================
   PHONPHAWIT STAINLESS ENGINEERING
   Repair Management System - Stylesheet
   Aesthetic: Industrial precision meets Thai warmth
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Thai:wght@300;400;500;600;700&family=IBM+Plex+Mono:wght@400;500&family=Sarabun:wght@300;400;500;600;700&display=swap');

/* ===== CSS Variables ===== */
:root {
  --navy: #0a1628;
  --navy-mid: #112240;
  --navy-light: #1e3a5f;
  --steel: #2d4a6e;
  --blue: #1e6fbb;
  --blue-bright: #2196f3;
  --blue-glow: #64b5f6;
  --gold: #d4a017;
  --gold-light: #f5c842;
  --emerald: #00897b;
  --emerald-light: #4db6ac;
  --red: #c62828;
  --red-light: #ef5350;
  --orange: #e65100;
  --orange-light: #ff7043;
  --slate-100: #f0f4f8;
  --slate-200: #d0dae8;
  --slate-300: #a8b8cc;
  --slate-400: #7890ab;
  --slate-600: #4a6080;
  --white: #ffffff;
  --text-primary: #0a1628;
  --text-secondary: #4a6080;
  --text-muted: #7890ab;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  
  --shadow-sm: 0 1px 3px rgba(10,22,40,0.12), 0 1px 2px rgba(10,22,40,0.08);
  --shadow-md: 0 4px 12px rgba(10,22,40,0.15), 0 2px 4px rgba(10,22,40,0.1);
  --shadow-lg: 0 10px 30px rgba(10,22,40,0.2), 0 4px 8px rgba(10,22,40,0.12);
  --shadow-blue: 0 4px 20px rgba(30,111,187,0.3);
  
  --sidebar-w: 260px;
  --header-h: 64px;
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Sarabun', 'IBM Plex Sans Thai', sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--slate-100);
  min-height: 100vh;
}

a { color: var(--blue); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--blue-bright); }

input, select, textarea, button {
  font-family: inherit;
  font-size: inherit;
}

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

/* ===== Sidebar ===== */
.sidebar {
  width: var(--sidebar-w);
  background: var(--navy);
  color: var(--white);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  box-shadow: 4px 0 20px rgba(0,0,0,0.3);
  overflow: hidden;
}

/* Subtle metal texture effect */
.sidebar::before {
  content: '';
  position: absolute;
  inset: 0;
  background: 
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 2px,
      rgba(255,255,255,0.01) 2px,
      rgba(255,255,255,0.01) 4px
    );
  pointer-events: none;
}

.sidebar-brand {
  padding: 24px 20px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  position: relative;
}

.brand-logo-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
}

.brand-icon {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-bright) 100%);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 700;
  font-size: 18px;
  color: white;
  flex-shrink: 0;
  box-shadow: 0 2px 10px rgba(30,111,187,0.4);
}

.brand-name {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--white);
  line-height: 1.2;
}

.brand-sub {
  font-size: 10px;
  letter-spacing: 0.15em;
  color: var(--blue-glow);
  opacity: 0.8;
  font-family: 'IBM Plex Mono', monospace;
}

.sidebar-user {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue-bright), var(--emerald));
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 16px;
  flex-shrink: 0;
}

.user-name { font-size: 13px; font-weight: 600; color: var(--white); }
.user-role { 
  font-size: 11px; 
  color: var(--slate-300); 
  background: rgba(255,255,255,0.08); 
  padding: 1px 8px; 
  border-radius: 20px; 
  display: inline-block; 
  margin-top: 2px;
  font-family: 'IBM Plex Mono', monospace;
}

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  overflow-y: auto;
}

.nav-section-label {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--slate-400);
  font-weight: 600;
  font-family: 'IBM Plex Mono', monospace;
  padding: 12px 10px 6px;
  margin-top: 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--slate-300);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  margin-bottom: 2px;
  text-decoration: none;
  border: 1px solid transparent;
}

.nav-item:hover {
  background: rgba(255,255,255,0.07);
  color: var(--white);
  border-color: rgba(255,255,255,0.06);
}

.nav-item.active {
  background: var(--blue);
  color: var(--white);
  box-shadow: var(--shadow-blue);
  border-color: rgba(100,181,246,0.2);
}

.nav-item.active-green {
  background: var(--emerald);
  color: var(--white);
  box-shadow: 0 4px 20px rgba(0,137,123,0.3);
}

.nav-icon { font-size: 16px; width: 20px; text-align: center; flex-shrink: 0; }

.sidebar-footer {
  padding: 12px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.sidebar-footer .nav-item {
  color: var(--slate-400);
}

.sidebar-footer .nav-item:hover {
  color: var(--red-light);
  background: rgba(198,40,40,0.1);
}

/* ===== Main Content ===== */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.main-header {
  height: var(--header-h);
  background: var(--white);
  border-bottom: 1px solid var(--slate-200);
  display: flex;
  align-items: center;
  padding: 0 32px;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow-sm);
  gap: 16px;
}

.header-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--navy);
  flex: 1;
}

.header-badge {
  background: var(--navy);
  color: var(--white);
  font-size: 11px;
  font-family: 'IBM Plex Mono', monospace;
  padding: 3px 10px;
  border-radius: 20px;
  letter-spacing: 0.05em;
}

.page-content {
  padding: 28px 32px;
  flex: 1;
}

/* ===== Cards ===== */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(208,218,232,0.6);
  overflow: hidden;
}

.card-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--slate-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--navy);
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-body { padding: 24px; }

/* ===== Dashboard Stats ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(208,218,232,0.6);
  position: relative;
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}

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

.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
}

.stat-card.blue::before { background: var(--blue); }
.stat-card.gold::before { background: var(--gold); }
.stat-card.orange::before { background: var(--orange); }
.stat-card.emerald::before { background: var(--emerald); }
.stat-card.navy::before { background: var(--navy); }
.stat-card.red::before { background: var(--red); }

.stat-icon {
  width: 44px; height: 44px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  margin-bottom: 4px;
}

.stat-card.blue .stat-icon { background: rgba(30,111,187,0.1); }
.stat-card.gold .stat-icon { background: rgba(212,160,23,0.1); }
.stat-card.orange .stat-icon { background: rgba(230,81,0,0.1); }
.stat-card.emerald .stat-icon { background: rgba(0,137,123,0.1); }
.stat-card.navy .stat-icon { background: rgba(10,22,40,0.06); }
.stat-card.red .stat-icon { background: rgba(198,40,40,0.1); }

.stat-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--navy);
  font-family: 'IBM Plex Mono', monospace;
  line-height: 1;
}

.stat-label {
  font-size: 12.5px;
  color: var(--text-secondary);
  font-weight: 500;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  white-space: nowrap;
  text-decoration: none;
}

.btn-primary {
  background: var(--blue);
  color: white;
  box-shadow: 0 2px 8px rgba(30,111,187,0.3);
}
.btn-primary:hover { background: var(--blue-bright); box-shadow: var(--shadow-blue); color: white; transform: translateY(-1px); }

.btn-emerald {
  background: var(--emerald);
  color: white;
  box-shadow: 0 2px 8px rgba(0,137,123,0.3);
}
.btn-emerald:hover { background: var(--emerald-light); color: white; transform: translateY(-1px); }

.btn-gold {
  background: var(--gold);
  color: white;
  box-shadow: 0 2px 8px rgba(212,160,23,0.3);
}
.btn-gold:hover { background: var(--gold-light); color: var(--navy); transform: translateY(-1px); }

.btn-danger {
  background: var(--red);
  color: white;
  box-shadow: 0 2px 8px rgba(198,40,40,0.3);
}
.btn-danger:hover { background: var(--red-light); color: white; transform: translateY(-1px); }

.btn-outline {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--slate-200);
}
.btn-outline:hover { background: var(--slate-100); color: var(--navy); }

.btn-sm { padding: 6px 12px; font-size: 12.5px; }
.btn-lg { padding: 12px 24px; font-size: 15px; }
.btn-icon { padding: 8px; width: 34px; height: 34px; justify-content: center; }

.btn-group { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ===== Forms ===== */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

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

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

.form-group.full { grid-column: 1 / -1; }

.form-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}

.form-label .required { color: var(--red); margin-left: 3px; }

.form-control {
  width: 100%;
  padding: 10px 14px;
  background: var(--slate-100);
  border: 1.5px solid var(--slate-200);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 14px;
  transition: all var(--transition);
  outline: none;
}

.form-control:focus {
  border-color: var(--blue);
  background: white;
  box-shadow: 0 0 0 3px rgba(30,111,187,0.12);
}

.form-control:hover:not(:focus) {
  border-color: var(--slate-300);
}

textarea.form-control { resize: vertical; min-height: 80px; }

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237890ab' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

/* ===== Tables ===== */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-md);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.data-table thead th {
  background: var(--navy);
  color: rgba(255,255,255,0.85);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 12px 16px;
  text-align: left;
  white-space: nowrap;
  font-family: 'IBM Plex Mono', monospace;
}

.data-table thead th:first-child { border-radius: var(--radius-sm) 0 0 0; }
.data-table thead th:last-child { border-radius: 0 var(--radius-sm) 0 0; }

.data-table tbody tr {
  border-bottom: 1px solid var(--slate-200);
  transition: background var(--transition);
}

.data-table tbody tr:last-child { border-bottom: none; }

.data-table tbody tr:hover { background: rgba(30,111,187,0.03); }

.data-table tbody td {
  padding: 12px 16px;
  color: var(--text-primary);
  vertical-align: middle;
}

.data-table tbody tr:nth-child(even) td { background: rgba(240,244,248,0.5); }
.data-table tbody tr:nth-child(even):hover td { background: rgba(30,111,187,0.04); }

.table-empty {
  text-align: center;
  padding: 48px;
  color: var(--text-muted);
  font-size: 15px;
}

/* ===== Status Badges ===== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.badge-waiting {
  background: rgba(212,160,23,0.12);
  color: #a87800;
  border: 1px solid rgba(212,160,23,0.25);
}

.badge-doing {
  background: rgba(30,111,187,0.12);
  color: var(--blue);
  border: 1px solid rgba(30,111,187,0.25);
}

.badge-done {
  background: rgba(0,137,123,0.12);
  color: var(--emerald);
  border: 1px solid rgba(0,137,123,0.25);
}

.badge-delivered {
  background: rgba(10,22,40,0.08);
  color: var(--navy);
  border: 1px solid rgba(10,22,40,0.15);
}

.badge-cancelled {
  background: rgba(198,40,40,0.1);
  color: var(--red);
  border: 1px solid rgba(198,40,40,0.2);
}

/* ===== Search & Filters ===== */
.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.search-wrap {
  position: relative;
  flex: 1;
  min-width: 200px;
}

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

.search-input {
  width: 100%;
  padding: 10px 14px 10px 38px;
  background: var(--white);
  border: 1.5px solid var(--slate-200);
  border-radius: var(--radius-sm);
  font-size: 14px;
  transition: all var(--transition);
  outline: none;
}

.search-input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(30,111,187,0.1);
}

.filter-select {
  padding: 9px 36px 9px 14px;
  background: white;
  border: 1.5px solid var(--slate-200);
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
  outline: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237890ab' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  transition: border-color var(--transition);
}

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

/* ===== Repair Item Row ===== */
.item-row-header {
  display: grid;
  grid-template-columns: 2fr 1.5fr 1fr 60px 2fr 110px 36px;
  gap: 8px;
  padding: 8px 12px;
  background: var(--navy);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
  font-family: 'IBM Plex Mono', monospace;
}

.item-row {
  display: grid;
  grid-template-columns: 2fr 1.5fr 1fr 60px 2fr 110px 36px;
  gap: 8px;
  padding: 8px 12px;
  background: var(--slate-100);
  border: 1px solid var(--slate-200);
  border-top: none;
  align-items: center;
  transition: background var(--transition);
}

.item-row:hover { background: white; }

.item-row:last-child { border-radius: 0 0 var(--radius-sm) var(--radius-sm); }

/* ===== Toast Notification ===== */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  color: white;
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  animation: slideInToast 0.35s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  pointer-events: auto;
  max-width: 360px;
}

.toast.success { background: var(--emerald); }
.toast.error { background: var(--red); }
.toast.info { background: var(--blue); }

@keyframes slideInToast {
  from { opacity: 0; transform: translateX(60px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ===== Modal ===== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10,22,40,0.65);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}

.modal {
  background: white;
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 480px;
  box-shadow: var(--shadow-lg);
  animation: scaleIn 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

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

.modal-title { font-size: 17px; font-weight: 700; color: var(--navy); }

.modal-body { padding: 24px; }

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--slate-200);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.modal-close {
  background: none;
  border: none;
  font-size: 20px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  transition: all var(--transition);
}
.modal-close:hover { background: var(--slate-100); color: var(--navy); }

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

/* ===== Login Page ===== */
.login-page {
  min-height: 100vh;
  background: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
  overflow: hidden;
}

.login-page::before {
  content: '';
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(ellipse at 20% 50%, rgba(30,111,187,0.2) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(0,137,123,0.15) 0%, transparent 50%),
    repeating-linear-gradient(
      45deg,
      transparent,
      transparent 40px,
      rgba(255,255,255,0.015) 40px,
      rgba(255,255,255,0.015) 80px
    );
}

.login-card {
  background: white;
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 420px;
  overflow: hidden;
  box-shadow: 0 25px 80px rgba(0,0,0,0.4);
  position: relative;
}

.login-header {
  background: var(--navy-mid);
  padding: 36px 32px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.login-header::after {
  content: '';
  position: absolute;
  bottom: -20px; left: -10%; right: -10%;
  height: 40px;
  background: white;
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}

.login-brand-icon {
  width: 68px; height: 68px;
  background: linear-gradient(135deg, var(--blue), var(--blue-bright));
  border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
  box-shadow: 0 8px 30px rgba(30,111,187,0.5);
}

.login-brand-icon span {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 24px;
  font-weight: 800;
  color: white;
}

.login-title {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 22px;
  font-weight: 800;
  color: white;
  letter-spacing: 0.1em;
}

.login-subtitle {
  font-size: 12px;
  color: var(--blue-glow);
  letter-spacing: 0.2em;
  margin-top: 4px;
  font-family: 'IBM Plex Mono', monospace;
}

.login-body { padding: 32px; }

.login-sys-name {
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 28px;
}

.demo-hint {
  background: var(--slate-100);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 12px;
  color: var(--text-secondary);
  text-align: center;
  margin-top: 16px;
  border: 1px dashed var(--slate-200);
  font-family: 'IBM Plex Mono', monospace;
}

/* ===== Print Styles ===== */
.print-doc {
  background: white;
  max-width: 210mm;
  margin: 0 auto;
  padding: 12mm 15mm;
  font-size: 13px;
}

.print-doc table {
  width: 100%;
  border-collapse: collapse;
}

.print-doc table th, .print-doc table td {
  border: 1px solid #333;
  padding: 5px 8px;
}

.no-print { display: block; }

@media print {
  .no-print { display: none !important; }
  body { background: white !important; }
  .app-wrapper, .main-content { display: block !important; margin: 0 !important; }
  .sidebar, .main-header { display: none !important; }
  .page-content { padding: 0 !important; }
  .print-page { 
    page-break-after: always; 
    box-shadow: none !important;
  }
  .print-page:last-child { page-break-after: auto; }
}

/* ===== Misc Utilities ===== */
.text-mono { font-family: 'IBM Plex Mono', monospace; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 12.5px; }
.text-bold { font-weight: 700; }
.text-navy { color: var(--navy); }
.text-blue { color: var(--blue); }
.text-emerald { color: var(--emerald); }
.text-red { color: var(--red); }
.text-gold { color: var(--gold); }

.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }

.mb-1 { margin-bottom: 6px; }
.mb-2 { margin-bottom: 12px; }
.mb-3 { margin-bottom: 18px; }
.mb-4 { margin-bottom: 24px; }
.mb-5 { margin-bottom: 32px; }

.mt-2 { margin-top: 12px; }
.mt-3 { margin-top: 18px; }
.mt-4 { margin-top: 24px; }

.divider {
  border: none;
  border-top: 1px solid var(--slate-200);
  margin: 20px 0;
}

.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.alert-info {
  background: rgba(30,111,187,0.08);
  border: 1px solid rgba(30,111,187,0.2);
  color: var(--blue);
}

.alert-warning {
  background: rgba(212,160,23,0.08);
  border: 1px solid rgba(212,160,23,0.2);
  color: #7a5c00;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.checkbox-row input[type=checkbox] {
  width: 18px; height: 18px;
  accent-color: var(--blue);
  cursor: pointer;
}

.repair-code {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
  background: var(--slate-100);
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid var(--slate-200);
}

/* Animate page load */
.fade-in { animation: fadeInUp 0.4s ease forwards; }
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--slate-100); }
::-webkit-scrollbar-thumb { background: var(--slate-300); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--slate-400); }
