/* =============================================
   JobWork SaaS - Main Stylesheet
   Professional Service Management System
   ============================================= */

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

:root {
  --primary:        #4F46E5;
  --primary-dark:   #3730A3;
  --primary-light:  #EEF2FF;
  --secondary:      #0EA5E9;
  --success:        #10B981;
  --warning:        #F59E0B;
  --danger:         #EF4444;
  --info:           #6366F1;
  --dark:           #1E293B;
  --gray:           #64748B;
  --light:          #F8FAFC;
  --white:          #FFFFFF;
  --border:         #E2E8F0;
  --sidebar-bg:     #1E293B;
  --sidebar-active: #4F46E5;
  --font-main:      'Inter', sans-serif;
  --font-heading:   'Poppins', sans-serif;
  --shadow-sm:      0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
  --shadow:         0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -1px rgba(0,0,0,.06);
  --shadow-lg:      0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -2px rgba(0,0,0,.05);
  --radius:         0.625rem;
  --radius-lg:      1rem;
  --transition:     all .25s ease;
}

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-main);
  font-size: 14px;
  color: var(--dark);
  background: var(--light);
  line-height: 1.6;
  min-height: 100vh;
}
h1,h2,h3,h4,h5,h6 { font-family: var(--font-heading); font-weight: 600; color: var(--dark); }
a { text-decoration: none; color: var(--primary); transition: var(--transition); }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; height: auto; }

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

/* =============================================
   SIDEBAR
   ============================================= */
.sidebar {
  width: 260px;
  background: var(--sidebar-bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0; top: 0;
  z-index: 1000;
  transition: var(--transition);
  overflow-y: auto;
}
.sidebar.collapsed { width: 70px; }

.sidebar-brand {
  padding: 20px 18px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 72px;
}
.sidebar-brand img { width: 38px; height: 38px; border-radius: 8px; object-fit: cover; }
.sidebar-brand .brand-text { display: flex; flex-direction: column; }
.sidebar-brand .brand-name { font-family: var(--font-heading); font-weight: 700; font-size: 16px; color: var(--white); }
.sidebar-brand .brand-sub { font-size: 11px; color: rgba(255,255,255,.5); }
.sidebar.collapsed .brand-text { display: none; }

.sidebar-nav { flex: 1; padding: 12px 0; }
.nav-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255,255,255,.35);
  padding: 16px 20px 6px;
}
.sidebar.collapsed .nav-label { display: none; }

.nav-item { list-style: none; }
.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 20px;
  color: rgba(255,255,255,.7);
  font-size: 13.5px;
  font-weight: 500;
  border-radius: 0;
  transition: var(--transition);
  position: relative;
  white-space: nowrap;
  overflow: hidden;
}
.nav-link:hover, .nav-link.active {
  color: var(--white);
  background: rgba(255,255,255,.07);
}
.nav-link.active { background: var(--sidebar-active); color: var(--white); }
.nav-link.active::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: #818CF8;
  border-radius: 0 3px 3px 0;
}
.nav-link i { font-size: 17px; width: 22px; text-align: center; flex-shrink: 0; }
.nav-link .badge-count {
  margin-left: auto;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 99px;
  font-weight: 700;
}
.sidebar.collapsed .nav-link span { display: none; }
.sidebar.collapsed .badge-count { display: none; }

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid rgba(255,255,255,.08);
}
.sidebar-user {
  display: flex; align-items: center; gap: 10px;
  padding: 8px;
  border-radius: var(--radius);
  background: rgba(255,255,255,.06);
}
.sidebar-user img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; }
.sidebar-user .user-info { flex: 1; overflow: hidden; }
.sidebar-user .user-name { font-weight: 600; font-size: 13px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user .user-role { font-size: 11px; color: rgba(255,255,255,.45); }
.sidebar.collapsed .sidebar-user .user-info { display: none; }

/* =============================================
   MAIN CONTENT
   ============================================= */
.main-content {
  margin-left: 260px;
  flex: 1;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  min-height: 100vh;
}
.main-content.expanded { margin-left: 70px; }

/* ---- Topbar ---- */
.topbar {
  background: var(--white);
  height: 64px;
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 12px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 900;
  box-shadow: var(--shadow-sm);
}
.topbar-left { display: flex; align-items: center; gap: 14px; flex: 1; }
.toggle-sidebar {
  width: 36px; height: 36px;
  border: none;
  background: var(--light);
  border-radius: 8px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  color: var(--gray);
  transition: var(--transition);
}
.toggle-sidebar:hover { background: var(--primary-light); color: var(--primary); }

.breadcrumb-nav { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--gray); }
.breadcrumb-nav .separator { color: var(--border); }
.breadcrumb-nav .current { color: var(--dark); font-weight: 600; }

.topbar-right { display: flex; align-items: center; gap: 8px; }
.topbar-btn {
  width: 36px; height: 36px;
  border: none;
  background: var(--light);
  border-radius: 8px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  color: var(--gray);
  transition: var(--transition);
  position: relative;
}
.topbar-btn:hover { background: var(--primary-light); color: var(--primary); }
.topbar-btn .dot {
  position: absolute;
  top: 6px; right: 7px;
  width: 8px; height: 8px;
  background: var(--danger);
  border-radius: 50%;
  border: 2px solid var(--white);
}

.topbar-user {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 10px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  background: transparent;
  border: none;
}
.topbar-user:hover { background: var(--light); }
.topbar-user img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.topbar-user .user-name { font-weight: 600; font-size: 13px; }
.topbar-user .user-role { font-size: 11px; color: var(--gray); }

/* ---- Page Content ---- */
.page-content { padding: 24px; flex: 1; }

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}
.page-title { font-size: 22px; font-weight: 700; margin-bottom: 4px; }
.page-subtitle { font-size: 13px; color: var(--gray); }

/* =============================================
   STAT CARDS
   ============================================= */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 20px;
  border: 1px solid var(--border);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
}
.stat-card.indigo::before { background: var(--primary); }
.stat-card.blue::before   { background: var(--secondary); }
.stat-card.green::before  { background: var(--success); }
.stat-card.amber::before  { background: var(--warning); }
.stat-card.red::before    { background: var(--danger); }

.stat-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.stat-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  margin-bottom: 14px;
}
.stat-icon.indigo { background: var(--primary-light); color: var(--primary); }
.stat-icon.blue   { background: #E0F2FE; color: var(--secondary); }
.stat-icon.green  { background: #D1FAE5; color: var(--success); }
.stat-icon.amber  { background: #FEF3C7; color: var(--warning); }
.stat-icon.red    { background: #FEE2E2; color: var(--danger); }

.stat-value { font-size: 26px; font-weight: 700; font-family: var(--font-heading); line-height: 1; margin-bottom: 4px; }
.stat-label { font-size: 12px; color: var(--gray); font-weight: 500; }
.stat-change { font-size: 11px; margin-top: 6px; font-weight: 600; }
.stat-change.up   { color: var(--success); }
.stat-change.down { color: var(--danger); }

/* =============================================
   CARDS
   ============================================= */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.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-title { font-size: 15px; font-weight: 600; margin: 0; }
.card-body { padding: 20px; }
.card-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  background: var(--light);
}

/* =============================================
   BUTTONS
   ============================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 18px;
  font-size: 13.5px;
  font-weight: 600;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  font-family: var(--font-main);
  text-decoration: none;
}
.btn i { font-size: 15px; }
.btn-sm { padding: 5px 12px; font-size: 12px; }
.btn-lg { padding: 11px 24px; font-size: 15px; }
.btn-icon { padding: 8px; width: 36px; height: 36px; justify-content: center; }
.btn-icon.btn-sm { padding: 5px; width: 30px; height: 30px; }

.btn-primary   { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-secondary { background: var(--secondary); color: #fff; }
.btn-secondary:hover { background: #0284c7; color: #fff; }
.btn-success   { background: var(--success); color: #fff; }
.btn-success:hover { background: #059669; color: #fff; }
.btn-warning   { background: var(--warning); color: #fff; }
.btn-warning:hover { background: #d97706; color: #fff; }
.btn-danger    { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #dc2626; color: #fff; }
.btn-light     { background: var(--light); color: var(--dark); border: 1px solid var(--border); }
.btn-light:hover { background: var(--border); }
.btn-outline-primary { background: transparent; color: var(--primary); border: 1.5px solid var(--primary); }
.btn-outline-primary:hover { background: var(--primary); color: #fff; }
.btn-outline-danger { background: transparent; color: var(--danger); border: 1.5px solid var(--danger); }
.btn-outline-danger:hover { background: var(--danger); color: #fff; }

/* =============================================
   FORMS
   ============================================= */
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: 13px; font-weight: 600; color: var(--dark); margin-bottom: 6px; }
.form-label .required { color: var(--danger); margin-left: 3px; }
.form-control, .form-select {
  width: 100%;
  padding: 9px 14px;
  font-size: 13.5px;
  font-family: var(--font-main);
  color: var(--dark);
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  transition: var(--transition);
  outline: none;
  appearance: none;
}
.form-control:focus, .form-select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79,70,229,.12); }
.form-control::placeholder { color: #A0AEC0; }
.form-control-sm { padding: 6px 11px; font-size: 12.5px; }
.form-text { font-size: 11.5px; color: var(--gray); margin-top: 4px; }
.invalid-feedback { font-size: 11.5px; color: var(--danger); margin-top: 4px; display: none; }
.is-invalid .form-control, .form-control.is-invalid { border-color: var(--danger); }
.is-invalid .invalid-feedback { display: block; }

.input-group { position: relative; }
.input-group .form-control { padding-left: 40px; }
.input-group .input-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray);
  font-size: 15px;
}

/* Toggle Switch */
.toggle-switch { display: flex; align-items: center; gap: 10px; }
.toggle-input { display: none; }
.toggle-slider {
  width: 44px; height: 24px;
  background: var(--border);
  border-radius: 99px;
  position: relative;
  cursor: pointer;
  transition: var(--transition);
}
.toggle-slider::after {
  content: '';
  position: absolute;
  width: 18px; height: 18px;
  background: #fff;
  border-radius: 50%;
  top: 3px; left: 3px;
  transition: var(--transition);
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.toggle-input:checked + .toggle-slider { background: var(--primary); }
.toggle-input:checked + .toggle-slider::after { transform: translateX(20px); }
.toggle-label { font-size: 13px; font-weight: 500; color: var(--dark); cursor: pointer; }

/* =============================================
   TABLES
   ============================================= */
.table-responsive { overflow-x: auto; border-radius: var(--radius-lg); }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table thead tr { background: var(--light); }
.table th {
  padding: 12px 16px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--gray);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.table td { padding: 13px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr:hover { background: rgba(79,70,229,.03); }
.table tbody tr:last-child td { border-bottom: 0; }

/* =============================================
   BADGES / STATUS
   ============================================= */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  font-size: 11.5px;
  font-weight: 600;
  border-radius: 99px;
}
.badge-primary { background: var(--primary-light); color: var(--primary); }
.badge-success { background: #D1FAE5; color: #065F46; }
.badge-warning { background: #FEF3C7; color: #92400E; }
.badge-danger  { background: #FEE2E2; color: #991B1B; }
.badge-info    { background: #E0F2FE; color: #075985; }
.badge-gray    { background: #F1F5F9; color: var(--gray); }

/* Job Status Specific */
.status-received         { background: #EEF2FF; color: #3730A3; }
.status-diagnosis        { background: #FEF3C7; color: #92400E; }
.status-waiting-parts    { background: #FEE2E2; color: #991B1B; }
.status-repair-progress  { background: #DBEAFE; color: #1E40AF; }
.status-ready-delivery   { background: #D1FAE5; color: #065F46; }
.status-delivered        { background: #F0FDF4; color: #14532D; }
.status-cancelled        { background: #F1F5F9; color: #475569; }

/* =============================================
   AUTH PAGES
   ============================================= */
.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 20px;
}
.auth-card {
  background: var(--white);
  border-radius: 20px;
  padding: 40px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 25px 50px rgba(0,0,0,.2);
}
.auth-logo {
  text-align: center;
  margin-bottom: 28px;
}
.auth-logo img { width: 60px; height: 60px; border-radius: 14px; }
.auth-logo h1 { font-size: 24px; font-weight: 800; color: var(--dark); margin-top: 12px; }
.auth-logo p { font-size: 13px; color: var(--gray); margin-top: 4px; }
.auth-title { font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.auth-subtitle { font-size: 13px; color: var(--gray); margin-bottom: 24px; }
.auth-footer { text-align: center; font-size: 12.5px; color: var(--gray); margin-top: 20px; }

/* =============================================
   PRICING PLANS (SuperAdmin)
   ============================================= */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}
.pricing-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 2px solid var(--border);
  padding: 28px;
  transition: var(--transition);
  position: relative;
}
.pricing-card.popular { border-color: var(--primary); }
.pricing-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.pricing-card .popular-badge {
  position: absolute;
  top: -12px; left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 14px;
  border-radius: 99px;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.pricing-name { font-size: 17px; font-weight: 700; margin-bottom: 4px; }
.pricing-desc { font-size: 12.5px; color: var(--gray); margin-bottom: 16px; }
.pricing-price { display: flex; align-items: baseline; gap: 4px; margin-bottom: 4px; }
.pricing-amount { font-size: 36px; font-weight: 800; font-family: var(--font-heading); color: var(--primary); }
.pricing-period { font-size: 13px; color: var(--gray); }
.pricing-billing { font-size: 11.5px; color: var(--gray); margin-bottom: 20px; }
.pricing-features { list-style: none; margin-bottom: 24px; }
.pricing-features li { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 5px 0; }
.pricing-features li i { color: var(--success); font-size: 15px; }
.pricing-features li.disabled { color: var(--gray); }
.pricing-features li.disabled i { color: var(--border); }

/* =============================================
   NOTIFICATIONS DROPDOWN
   ============================================= */
.dropdown-menu {
  position: absolute;
  right: 0; top: calc(100% + 8px);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  min-width: 320px;
  z-index: 9999;
  display: none;
  overflow: hidden;
}
.dropdown-menu.show { display: block; }
.dropdown-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.dropdown-header h6 { font-weight: 700; font-size: 14px; margin: 0; }
.notif-item { display: flex; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); transition: var(--transition); cursor: pointer; }
.notif-item:hover { background: var(--light); }
.notif-item.unread { background: rgba(79,70,229,.04); }
.notif-icon { width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; }
.notif-text .title { font-size: 13px; font-weight: 600; margin-bottom: 2px; }
.notif-text .desc  { font-size: 12px; color: var(--gray); }
.notif-text .time  { font-size: 11px; color: var(--gray); margin-top: 3px; }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1024px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.mobile-open { transform: translateX(0); }
  .main-content { margin-left: 0 !important; }
  .sidebar-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,.4);
    z-index: 999;
  }
  .sidebar-overlay.show { display: block; }
}
@media (max-width: 768px) {
  .page-content { padding: 16px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .topbar { padding: 0 16px; }
  .page-header { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .auth-card { padding: 28px 20px; }
  .pricing-grid { grid-template-columns: 1fr; }
}

/* =============================================
   MISC UTILITIES
   ============================================= */
.text-primary { color: var(--primary) !important; }
.text-success { color: var(--success) !important; }
.text-warning { color: var(--warning) !important; }
.text-danger  { color: var(--danger) !important; }
.text-gray    { color: var(--gray) !important; }
.text-muted   { color: #9CA3AF !important; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.fs-12  { font-size: 12px; }
.fs-13  { font-size: 13px; }
.gap-8  { gap: 8px; }

.avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--primary-light);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px; color: var(--primary);
  flex-shrink: 0;
}
.avatar-sm { width: 28px; height: 28px; font-size: 11px; }
.avatar-lg { width: 48px; height: 48px; font-size: 18px; }

.empty-state {
  text-align: center;
  padding: 48px 24px;
}
.empty-state i { font-size: 48px; color: var(--border); margin-bottom: 12px; }
.empty-state h5 { font-size: 16px; color: var(--dark); margin-bottom: 6px; }
.empty-state p  { font-size: 13px; color: var(--gray); }

.spinner {
  width: 20px; height: 20px;
  border: 2.5px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Progress bar */
.progress { height: 6px; background: var(--border); border-radius: 99px; overflow: hidden; }
.progress-bar { height: 100%; border-radius: 99px; transition: width .5s ease; }
.progress-bar.primary { background: var(--primary); }
.progress-bar.success { background: var(--success); }
.progress-bar.warning { background: var(--warning); }

/* Alert */
.alert {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius);
  font-size: 13.5px;
  margin-bottom: 16px;
}
.alert-success { background: #D1FAE5; color: #065F46; border: 1px solid #6EE7B7; }
.alert-danger  { background: #FEE2E2; color: #991B1B; border: 1px solid #FCA5A5; }
.alert-warning { background: #FEF3C7; color: #92400E; border: 1px solid #FCD34D; }
.alert-info    { background: #E0F2FE; color: #075985; border: 1px solid #7DD3FC; }

/* Modal */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 9998;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.modal-box {
  background: var(--white);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 60px rgba(0,0,0,.25);
  animation: modalIn .25s ease;
}
.modal-box-lg { max-width: 780px; }
@keyframes modalIn {
  from { opacity: 0; transform: scale(.96) translateY(8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-header {
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
}
.modal-title { font-size: 16px; font-weight: 700; }
.modal-close { background: none; border: none; font-size: 20px; color: var(--gray); cursor: pointer; padding: 2px 6px; border-radius: 4px; }
.modal-close:hover { background: var(--light); color: var(--danger); }
.modal-body   { padding: 20px; }
.modal-footer { padding: 14px 20px; border-top: 1px solid var(--border); display: flex; gap: 8px; justify-content: flex-end; }

/* Tabs */
.tab-nav { display: flex; gap: 2px; border-bottom: 2px solid var(--border); margin-bottom: 20px; }
.tab-btn {
  padding: 9px 18px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--gray);
  background: none;
  border: none;
  cursor: pointer;
  position: relative;
  transition: var(--transition);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
}
.tab-btn:hover { color: var(--primary); }
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* Timeline */
.timeline { position: relative; padding-left: 24px; }
.timeline::before { content: ''; position: absolute; left: 7px; top: 0; bottom: 0; width: 2px; background: var(--border); }
.timeline-item { position: relative; padding-bottom: 20px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot {
  position: absolute;
  left: -21px;
  top: 4px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--white);
  border: 2px solid var(--primary);
}
.timeline-dot.success { border-color: var(--success); }
.timeline-dot.warning { border-color: var(--warning); }
.timeline-dot.danger  { border-color: var(--danger); }
.timeline-content .title { font-size: 13px; font-weight: 600; }
.timeline-content .time  { font-size: 11.5px; color: var(--gray); margin-bottom: 4px; }
.timeline-content .desc  { font-size: 12.5px; color: var(--gray); }

/* Pagination */
.pagination { display: flex; gap: 4px; align-items: center; }
.page-btn {
  min-width: 34px; height: 34px;
  border: 1.5px solid var(--border);
  background: var(--white);
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
  padding: 0 8px;
}
.page-btn:hover { border-color: var(--primary); color: var(--primary); }
.page-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.page-btn:disabled { opacity: .4; cursor: not-allowed; }

/* Search bar */
.search-bar { display: flex; align-items: center; gap: 10px; }
.search-input {
  position: relative;
  flex: 1;
}
.search-input input { padding-left: 38px; }
.search-input .search-icon {
  position: absolute;
  left: 12px; top: 50%;
  transform: translateY(-50%);
  color: var(--gray);
  font-size: 15px;
  pointer-events: none;
}

/* QR / Barcode area */
.qr-box {
  width: 100px; height: 100px;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 36px;
  color: var(--border);
}

/* Theme color swatches */
.color-swatch {
  width: 32px; height: 32px;
  border-radius: 50%;
  cursor: pointer;
  border: 3px solid transparent;
  transition: var(--transition);
}
.color-swatch.selected { border-color: var(--dark); transform: scale(1.15); }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #CBD5E1; border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--gray); }
