/* ============================================
   MAGIC MAID CLEANING — Design System v2.0
   Complete Visual Redesign
   ============================================ */

/* ---------- Google Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap');

/* ---------- CSS Variables ---------- */
:root {
  --color-primary: #042d62;
  --color-primary-light: #0a3d7a;
  --color-primary-dark: #021e42;
  --color-accent: #deb423;
  --color-accent-light: #e8c23a;
  --color-accent-dark: #c49e1a;
  --color-bg: #f0f2f5;
  --color-surface: #ffffff;
  --color-success: #22c55e;
  --color-success-bg: #dcfce7;
  --color-success-text: #16a34a;
  --color-warning: #f59e0b;
  --color-warning-bg: #fef9c3;
  --color-warning-text: #ca8a04;
  --color-danger: #ef4444;
  --color-danger-bg: #fee2e2;
  --color-danger-text: #dc2626;
  --color-info: #3b82f6;
  --color-info-bg: #dbeafe;
  --text-dark: #1a1a2e;
  --text-muted: #6b7280;
  --text-light: #9ca3af;
  --border-color: #d1d5db;
  --border-light: #f1f5f9;
  --input-bg: #f8fafc;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);
  --shadow-glow: 0 4px 20px rgba(222, 180, 35, 0.3);
  --radius: 12px;
  --radius-lg: 16px;
  --radius-pill: 9999px;
  --sidebar-w: 260px;
  --topbar-h: 64px;
  --transition: 0.2s ease;
  --font: 'Roboto', sans-serif;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--color-bg);
  color: var(--text-dark);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: inherit;
}

ul,
ol {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

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

button {
  cursor: pointer;
}

/* ---------- Utility ---------- */
.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.items-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.justify-center {
  justify-content: center;
}

.gap-sm {
  gap: 8px;
}

.gap-md {
  gap: 16px;
}

.gap-lg {
  gap: 24px;
}

.w-full {
  width: 100%;
}

.mt-1 {
  margin-top: 8px;
}

.mt-2 {
  margin-top: 16px;
}

.mt-3 {
  margin-top: 24px;
}

.mb-1 {
  margin-bottom: 8px;
}

.mb-2 {
  margin-bottom: 16px;
}

.mb-3 {
  margin-bottom: 24px;
}

/* ---------- Skeleton Loader ---------- */
.skeleton {
  background: linear-gradient(90deg, #e5e7eb 25%, #f0f2f5 50%, #e5e7eb 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius);
}

@keyframes shimmer {
  0% {
    background-position: 200% 0
  }

  100% {
    background-position: -200% 0
  }
}

.skeleton-text {
  height: 14px;
  margin-bottom: 8px;
}

.skeleton-title {
  height: 22px;
  width: 60%;
  margin-bottom: 12px;
}

.skeleton-card {
  height: 120px;
}

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

.toast {
  pointer-events: auto;
  padding: 14px 24px;
  border-radius: var(--radius);
  color: #fff;
  font-weight: 500;
  font-size: 14px;
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.3s ease, toastOut 0.3s ease 2.7s forwards;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 380px;
}

.toast.success {
  background: var(--color-success);
}

.toast.error {
  background: var(--color-danger);
}

.toast.info {
  background: var(--color-info);
}

.toast i {
  font-size: 18px;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(40px)
  }

  to {
    opacity: 1;
    transform: translateX(0)
  }
}

@keyframes toastOut {
  from {
    opacity: 1
  }

  to {
    opacity: 0;
    transform: translateY(-10px)
  }
}

/* ============================================
   LOGIN & AUTH PAGES
   ============================================ */

/* Animated particle background */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #021e42 0%, #042d62 50%, #0a3d7a 100%);
  padding: 20px;
  position: relative;
  overflow: hidden;
}

.auth-page::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(2px 2px at 20% 30%, rgba(222, 180, 35, 0.3) 0%, transparent 100%),
    radial-gradient(2px 2px at 40% 70%, rgba(255, 255, 255, 0.15) 0%, transparent 100%),
    radial-gradient(1px 1px at 60% 20%, rgba(222, 180, 35, 0.2) 0%, transparent 100%),
    radial-gradient(2px 2px at 80% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 100%),
    radial-gradient(1px 1px at 10% 80%, rgba(222, 180, 35, 0.25) 0%, transparent 100%),
    radial-gradient(1px 1px at 70% 90%, rgba(255, 255, 255, 0.12) 0%, transparent 100%),
    radial-gradient(2px 2px at 50% 10%, rgba(222, 180, 35, 0.15) 0%, transparent 100%),
    radial-gradient(1px 1px at 90% 40%, rgba(255, 255, 255, 0.1) 0%, transparent 100%),
    radial-gradient(1px 1px at 30% 50%, rgba(222, 180, 35, 0.2) 0%, transparent 100%),
    radial-gradient(2px 2px at 85% 15%, rgba(255, 255, 255, 0.08) 0%, transparent 100%);
  animation: particleFloat 20s ease-in-out infinite alternate;
}

@keyframes particleFloat {
  0% {
    transform: translateY(0) translateX(0);
  }

  50% {
    transform: translateY(-20px) translateX(10px);
  }

  100% {
    transform: translateY(10px) translateX(-10px);
  }
}

.auth-card {
  background: rgba(30, 45, 69, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 48px 40px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4);
  animation: fadeUp 0.5s ease;
  position: relative;
  z-index: 1;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px)
  }

  to {
    opacity: 1;
    transform: translateY(0)
  }
}

.auth-card .logo {
  width: 120px;
  margin: 0 auto 24px;
}

.auth-card h1 {
  font-size: 26px;
  font-weight: 700;
  color: #ffffff;
  text-align: center;
  margin-bottom: 6px;
}

.auth-card p.subtitle {
  font-size: 12px;
  color: var(--color-accent);
  text-align: center;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 700;
}

.auth-card .separator {
  width: 60px;
  height: 2px;
  background: var(--color-accent);
  margin: 0 auto 28px;
}

.auth-card .form-group label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.auth-card .form-group input {
  width: 100%;
  padding: 13px 14px 13px 42px;
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  font-size: 14px;
  transition: var(--transition);
}

.auth-card .form-group input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.auth-card .form-group input:focus {
  border-color: var(--color-accent);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 0 3px rgba(222, 180, 35, 0.15);
}

.auth-card .form-group input.error {
  border-color: var(--color-danger);
}

.auth-card .input-icon i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.4);
  font-size: 16px;
}

.auth-card .password-toggle {
  color: rgba(255, 255, 255, 0.4);
}

.auth-card .password-toggle:hover {
  color: rgba(255, 255, 255, 0.7);
}

.auth-card .error-msg {
  color: var(--color-danger);
  font-size: 12px;
  margin-top: 4px;
}

.auth-card .btn-primary {
  background: var(--color-accent);
  color: var(--color-primary);
  font-weight: 700;
}

.auth-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.25);
}

/* ---------- Form Elements (Global) ---------- */
.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border-color);
  border-radius: 10px;
  background: var(--input-bg);
  transition: var(--transition);
  font-size: 14px;
  color: var(--text-dark);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--color-primary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(4, 45, 98, 0.15);
}

.form-group input.error {
  border-color: var(--color-danger);
}

.form-group .error-msg {
  font-size: 12px;
  color: var(--color-danger);
  margin-top: 4px;
}

.form-group .input-icon {
  position: relative;
}

.form-group .input-icon i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 16px;
}

.form-group .input-icon input {
  padding-left: 42px;
}

.password-toggle {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
}

.forgot-link {
  display: block;
  text-align: center;
  font-size: 13px;
  color: var(--color-accent);
  margin-top: 12px;
  font-weight: 500;
}

.forgot-link:hover {
  color: var(--color-accent-light);
  text-decoration: underline;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 14px;
  transition: all var(--transition);
  border: none;
}

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

.btn-primary:hover {
  filter: brightness(1.1);
  box-shadow: var(--shadow-glow);
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  color: var(--color-primary);
  border: 1.5px solid var(--color-primary);
}

.btn-secondary:hover {
  background: rgba(4, 45, 98, 0.05);
}

.btn-danger {
  background: var(--color-danger);
  color: #fff;
}

.btn-danger:hover {
  background: #dc2626;
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
}

.btn-ghost:hover {
  color: var(--text-dark);
  background: var(--color-bg);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
}

.btn-lg {
  padding: 14px 32px;
  font-size: 16px;
}

.btn-block {
  width: 100%;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

.btn .spinner {
  width: 18px;
  height: 18px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

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

/* ---------- Sidebar ---------- */
.sidebar {
  width: var(--sidebar-w);
  background: var(--color-primary);
  color: #fff;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  transition: transform 0.3s ease;
}

.sidebar-header {
  padding: 28px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-header img {
  height: 42px;
}

.sidebar-header span {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

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

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.65);
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition);
  margin-bottom: 4px;
  border-left: 3px solid transparent;
}

.sidebar-nav a:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.sidebar-nav a.active {
  background: var(--color-primary-light);
  color: var(--color-accent);
  font-weight: 700;
  border-left-color: var(--color-accent);
}

.sidebar-nav a i {
  font-size: 18px;
  width: 22px;
  text-align: center;
}

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

.sidebar-footer .avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--color-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: var(--color-primary);
}

.sidebar-footer .user-info {
  flex: 1;
}

.sidebar-footer .user-info .name {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}

.sidebar-footer .user-info .role {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.45);
}

.sidebar-footer .logout-btn {
  background: none;
  color: rgba(255, 255, 255, 0.4);
  font-size: 18px;
  transition: var(--transition);
}

.sidebar-footer .logout-btn:hover {
  color: var(--color-danger);
}

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

/* ---------- Topbar ---------- */
.topbar {
  height: var(--topbar-h);
  background: var(--color-surface);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar .breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar .breadcrumb span {
  font-size: 14px;
  color: var(--text-muted);
}

.topbar .breadcrumb span.current {
  color: var(--text-dark);
  font-weight: 600;
}

.topbar .breadcrumb i {
  font-size: 12px;
  color: var(--text-light);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.topbar .search-box {
  position: relative;
  width: 240px;
}

.topbar .search-box input {
  width: 100%;
  padding: 9px 14px 9px 38px;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-pill);
  background: var(--color-bg);
  font-size: 13px;
  transition: var(--transition);
}

.topbar .search-box input:focus {
  border-color: var(--color-primary);
  background: #fff;
}

.topbar .search-box i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 14px;
}

.topbar .icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--color-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 18px;
  transition: var(--transition);
  position: relative;
}

.topbar .icon-btn:hover {
  background: #e5e7eb;
  color: var(--text-dark);
}

.topbar .icon-btn .badge {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 8px;
  height: 8px;
  background: var(--color-danger);
  border-radius: 50%;
  border: 2px solid var(--color-surface);
}

.topbar .avatar-sm {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  color: var(--color-primary);
  cursor: pointer;
}

/* ---------- Page Content ---------- */
.page-content {
  padding: 28px;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}

.page-header h1 {
  font-size: 24px;
  font-weight: 700;
  color: var(--color-primary);
}

.page-header p {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ---------- Stats / KPI Cards ---------- */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--color-surface);
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

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

.stat-card .stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 14px;
  background: #fef3c7;
}

.stat-card .stat-icon.blue {
  background: var(--color-info-bg);
  color: var(--color-info);
}

.stat-card .stat-icon.gold {
  background: #fef3c7;
  color: var(--color-accent);
}

.stat-card .stat-icon.green {
  background: var(--color-success-bg);
  color: var(--color-success);
}

.stat-card .stat-icon.navy {
  background: #e0e7ff;
  color: var(--color-primary);
}

.stat-card .stat-label {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 8px;
}

.stat-card .stat-value {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1.1;
}

.stat-card .stat-trend {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  margin-top: 8px;
}

.stat-card .stat-trend.up {
  background: var(--color-success-bg);
  color: var(--color-success-text);
}

.stat-card .stat-trend.down {
  background: var(--color-danger-bg);
  color: var(--color-danger-text);
}

/* ---------- Cards ---------- */
.card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-light);
}

.card-header h2 {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-primary);
}

/* ---------- Tables ---------- */
.table-container {
  overflow-x: auto;
  border-radius: var(--radius-lg);
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead th {
  padding: 12px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: var(--input-bg);
  border-bottom: 1px solid var(--border-light);
}

tbody td {
  padding: 14px 16px;
  font-size: 14px;
  border-bottom: 1px solid var(--border-light);
}

tbody tr {
  transition: var(--transition);
}

tbody tr:hover {
  background: #f0f4ff;
}

tbody tr:last-child td {
  border-bottom: none;
}

.code-badge {
  display: inline-block;
  padding: 3px 10px;
  background: #e0e7ff;
  color: var(--color-primary);
  font-family: 'Roboto Mono', monospace;
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
}

/* ---------- Status Badges ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
}

.badge-success {
  background: var(--color-success-bg);
  color: var(--color-success-text);
}

.badge-info {
  background: var(--color-info-bg);
  color: var(--color-info);
}

.badge-warning {
  background: var(--color-warning-bg);
  color: var(--color-warning-text);
}

.badge-danger {
  background: var(--color-danger-bg);
  color: var(--color-danger-text);
}

.badge-muted {
  background: #f3f4f6;
  color: var(--text-muted);
}

.badge-primary {
  background: var(--color-primary);
  color: #fff;
}

.badge-accent {
  background: #fef3c7;
  color: var(--color-accent-dark);
}

.badge-completed {
  background: var(--color-success-bg);
  color: var(--color-success-text);
}

.badge-pending {
  background: var(--color-warning-bg);
  color: var(--color-warning-text);
}

.badge-overdue {
  background: var(--color-danger-bg);
  color: var(--color-danger-text);
}

.badge i {
  font-size: 8px;
}

/* ---------- Tabs ---------- */
.tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border-light);
  margin-bottom: 24px;
  background: none;
  padding: 0;
}

.tabs .tab {
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  transition: var(--transition);
  background: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 0;
}

.tabs .tab:hover {
  color: var(--color-primary);
}

.tabs .tab.active {
  color: var(--color-primary);
  font-weight: 700;
  border-bottom-color: var(--color-primary);
}

/* ---------- Modals ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}

.modal-overlay.closing {
  animation: fadeOut 0.2s ease forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0
  }

  to {
    opacity: 1
  }
}

@keyframes fadeOut {
  from {
    opacity: 1
  }

  to {
    opacity: 0
  }
}

.modal {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: scaleIn 0.2s ease;
}

.modal-overlay.closing .modal {
  animation: scaleOut 0.2s ease forwards;
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95)
  }

  to {
    opacity: 1;
    transform: scale(1)
  }
}

@keyframes scaleOut {
  from {
    opacity: 1;
    transform: scale(1)
  }

  to {
    opacity: 0;
    transform: scale(0.95)
  }
}

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

.modal-header h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-primary);
}

.modal-header .close-btn {
  background: none;
  font-size: 22px;
  color: var(--text-muted);
}

.modal-header .close-btn:hover {
  color: var(--text-dark);
}

.modal-body {
  padding: 24px;
}

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

/* ---------- Accordion ---------- */
.accordion-item {
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  margin-bottom: 8px;
  overflow: hidden;
}

.accordion-header {
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  background: var(--color-surface);
  font-weight: 700;
  font-size: 14px;
  transition: var(--transition);
}

.accordion-header:hover {
  background: var(--color-bg);
}

.accordion-header i {
  transition: transform 0.2s;
}

.accordion-item.open .accordion-header i {
  transform: rotate(180deg);
}

.accordion-body {
  padding: 0 18px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.accordion-item.open .accordion-body {
  max-height: 600px;
  padding: 14px 18px;
}

/* ---------- Calendar ---------- */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: var(--border-light);
  border-radius: var(--radius);
  overflow: hidden;
}

.calendar-header-cell {
  padding: 10px;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--input-bg);
  text-transform: uppercase;
}

.calendar-cell {
  min-height: 90px;
  padding: 8px;
  background: var(--color-surface);
  position: relative;
  cursor: pointer;
  transition: var(--transition);
}

.calendar-cell:hover {
  background: #f0f4ff;
}

.calendar-cell .day-num {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-dark);
}

.calendar-cell.today .day-num {
  background: var(--color-accent);
  color: var(--color-primary);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-weight: 700;
}

.calendar-cell.other-month .day-num {
  color: var(--text-light);
}

.calendar-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
  margin: 1px;
}

.calendar-dot.pending {
  background: var(--text-light);
}

.calendar-dot.in-progress {
  background: var(--color-info);
}

.calendar-dot.completed {
  background: var(--color-success);
}

/* ---------- Charts ---------- */
.chart-container {
  position: relative;
  width: 100%;
  height: 300px;
}

.chart-container canvas {
  width: 100% !important;
  height: 100% !important;
}

/* ---------- Search & Filters ---------- */
.filters-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

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

.search-input input {
  width: 100%;
  padding: 10px 14px 10px 40px;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  font-size: 14px;
  transition: var(--transition);
}

.search-input input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(4, 45, 98, 0.15);
}

.search-input i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.view-toggle {
  display: flex;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
}

.view-toggle button {
  padding: 8px 14px;
  background: var(--color-surface);
  color: var(--text-muted);
  font-size: 16px;
  transition: var(--transition);
  border-right: 1px solid var(--border-color);
}

.view-toggle button:last-child {
  border-right: none;
}

.view-toggle button.active {
  background: var(--color-primary);
  color: #fff;
}

/* ---------- Filter Pills ---------- */
.filter-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.filter-pill {
  padding: 7px 16px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 500;
  background: var(--color-bg);
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
  border: 1.5px solid transparent;
}

.filter-pill:hover {
  color: var(--text-dark);
}

.filter-pill.active {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

/* ---------- Empty States ---------- */
.empty-state {
  text-align: center;
  padding: 60px 20px;
}

.empty-state i {
  font-size: 48px;
  color: var(--text-light);
  margin-bottom: 16px;
}

.empty-state h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.empty-state p {
  font-size: 14px;
  color: var(--text-muted);
  max-width: 360px;
  margin: 0 auto 20px;
}

/* ============================================
   EMPLOYEE LAYOUT
   ============================================ */
.emp-layout {
  min-height: 100vh;
  background: var(--color-bg);
}

.emp-header {
  background: var(--color-surface);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid var(--color-accent);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.emp-header .logo {
  height: 36px;
}

.emp-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lang-toggle {
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--border-color);
  background: var(--color-surface);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-dark);
  cursor: pointer;
  transition: var(--transition);
}

.lang-toggle:hover {
  border-color: var(--color-accent);
}

.emp-content {
  padding: 20px;
  max-width: 600px;
  margin: 0 auto;
}

.emp-greeting {
  margin-bottom: 24px;
}

.emp-greeting h1 {
  font-size: 24px;
  font-weight: 700;
  color: var(--color-primary);
}

.emp-greeting p {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 4px;
}

.emp-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.emp-section-title h2 {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-primary);
}

.count-badge {
  background: var(--color-accent);
  color: var(--color-primary);
  font-size: 12px;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: var(--radius-pill);
}

/* ---------- Assignment Cards (Employee) ---------- */
.assignment-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 14px;
  border-left: 4px solid var(--border-color);
  transition: var(--transition);
}

.assignment-card:hover {
  box-shadow: var(--shadow);
}

.assignment-card.status-pending {
  border-left-color: var(--text-light);
}

.assignment-card.status-in-progress {
  border-left-color: var(--color-info);
}

.assignment-card.status-completed {
  border-left-color: var(--color-success);
}

.assignment-card .card-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.assignment-card .status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.status-dot.pending {
  background: var(--text-light);
}

.status-dot.in-progress {
  background: var(--color-info);
}

.status-dot.completed {
  background: var(--color-success);
}

.assignment-card .client-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-primary);
}

.assignment-card .address {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.assignment-card .meta {
  display: flex;
  gap: 12px;
  margin-bottom: 14px;
}

.assignment-card .meta .tag {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--color-bg);
  color: var(--text-muted);
  font-weight: 500;
}

.assignment-card .action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px;
  border-radius: var(--radius-pill);
  background: var(--color-accent);
  color: var(--color-primary);
  font-weight: 700;
  font-size: 14px;
  transition: all var(--transition);
}

.assignment-card .action-btn:hover {
  filter: brightness(1.1);
  box-shadow: var(--shadow-glow);
}

.assignment-card .action-btn.completed-btn {
  background: var(--color-success-bg);
  color: var(--color-success-text);
}

/* ---------- Checklist (Employee) ---------- */
.checklist-progress {
  margin-bottom: 24px;
}

.checklist-progress .progress-text {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.checklist-progress .progress-text strong {
  color: var(--color-primary);
}

.progress-bar {
  height: 6px;
  background: #e5e7eb;
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.progress-bar .fill {
  height: 100%;
  background: var(--color-primary);
  border-radius: var(--radius-pill);
  transition: width 0.4s ease;
}

.checklist-section {
  margin-bottom: 24px;
}

.checklist-section h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.checklist-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  margin-bottom: 6px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  background: var(--color-surface);
  border: 1.5px solid var(--border-color);
}

.checklist-item:hover {
  border-color: var(--color-accent);
}

.checklist-item.checked {
  background: #f0fdf4;
  border-color: var(--color-success);
}

.checklist-item .checkbox {
  width: 40px;
  height: 40px;
  border: 2px solid var(--border-color);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: var(--transition);
  font-size: 18px;
  font-weight: 700;
  color: transparent;
}

.checklist-item.checked .checkbox {
  background: var(--color-success);
  border-color: var(--color-success);
  color: #fff;
}

.checklist-item .task-name {
  font-size: 15px;
  font-weight: 500;
  flex: 1;
}

.checklist-item.checked .task-name {
  text-decoration: line-through;
  color: var(--text-muted);
}

/* N/A Toggle Switch */
.checklist-item .na-label {
  display: none;
}

.checklist-item .na-checkbox {
  position: relative;
  width: 44px;
  height: 24px;
  background: #e5e7eb;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
  font-size: 0;
  color: transparent;
}

.checklist-item .na-checkbox::before {
  content: 'N/A';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 8px;
  font-weight: 700;
  color: var(--text-light);
  letter-spacing: 0.3px;
}

.checklist-item .na-checkbox::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.checklist-item .na-checkbox.active {
  background: var(--text-muted);
}

.checklist-item .na-checkbox.active::before {
  color: rgba(255, 255, 255, 0.7);
}

.checklist-item .na-checkbox.active::after {
  transform: translateX(20px);
}

.checklist-item.na-checked {
  background: #f9fafb;
}

.checklist-item.na-checked .task-name {
  text-decoration: line-through;
  color: var(--text-light);
}

.notes-box {
  background: #fef9e7;
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 24px;
  display: flex;
  gap: 10px;
  font-size: 14px;
  color: var(--color-accent-dark);
  border: 1px solid #f0e5b0;
}

.notes-box i {
  font-size: 18px;
  margin-top: 2px;
}

.complete-job-btn {
  width: 100%;
  padding: 16px;
  border-radius: var(--radius-pill);
  background: var(--color-success);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  transition: all var(--transition);
  margin-top: 20px;
}

.complete-job-btn:hover {
  background: #16a34a;
  box-shadow: 0 4px 20px rgba(34, 197, 94, 0.3);
}

.save-checklist-btn {
  width: 100%;
  padding: 14px;
  border-radius: var(--radius-pill);
  background: var(--color-accent);
  color: var(--color-primary);
  font-size: 15px;
  font-weight: 700;
  text-align: center;
  transition: all var(--transition);
  margin-top: 20px;
}

.save-checklist-btn:hover {
  filter: brightness(1.1);
  box-shadow: var(--shadow-glow);
}

.checklist-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: var(--text-muted);
  text-align: center;
}

.checklist-empty i {
  font-size: 48px;
  margin-bottom: 16px;
}

.checklist-empty h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
}

.checklist-empty p {
  font-size: 14px;
}

/* ---------- Employee Grid Cards (Admin) ---------- */
.employee-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.employee-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  text-align: center;
  transition: var(--transition);
}

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

.employee-card .emp-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #e0e7ff;
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
  margin: 0 auto 14px;
}

.employee-card .emp-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-primary);
}

.employee-card .emp-email {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.employee-card .emp-stats {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 14px;
}

.employee-card .emp-stat-val {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-primary);
}

.employee-card .emp-stat-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
}

.employee-card .emp-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
}

/* ---------- Count Badge ---------- */
.count-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  background: var(--color-accent);
  color: var(--color-primary);
}

/* ---------- Activity Feed ---------- */
.activity-feed {
  padding: 0;
}

.activity-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
}

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

.activity-item .activity-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.activity-item .activity-text {
  font-size: 13px;
  color: var(--text-dark);
}

.activity-item .activity-time {
  font-size: 11px;
  color: var(--text-light);
  margin-top: 2px;
}

/* ---------- Confirm Dialog ---------- */
.confirm-dialog {
  text-align: center;
}

.confirm-dialog i {
  font-size: 48px;
  color: var(--color-danger);
  margin-bottom: 16px;
}

.confirm-dialog h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

.confirm-dialog p {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

/* ---------- Client Detail ---------- */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.detail-item label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.detail-item p {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-dark);
  margin-top: 4px;
}

.property-card {
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 16px;
  transition: var(--transition);
}

.property-card:hover {
  border-color: var(--color-accent);
}

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

.property-card .prop-address {
  font-size: 15px;
  font-weight: 700;
  color: var(--color-primary);
}

.property-card .prop-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

/* ---------- Employee Two-Column Layout ---------- */
.emp-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  padding: 20px;
  max-width: 1400px;
  margin: 0 auto;
}

.emp-services-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: calc(100vh - 180px);
  overflow-y: auto;
}

.emp-checklist-panel {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  max-height: calc(100vh - 180px);
  overflow-y: auto;
}

.emp-stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.emp-stat-mini {
  background: var(--color-surface);
  border-radius: var(--radius);
  padding: 12px 14px;
  box-shadow: var(--shadow-sm);
  text-align: center;
}

.emp-stat-mini .stat-num {
  font-size: 22px;
  font-weight: 700;
  color: var(--color-primary);
}

.emp-stat-mini .stat-lbl {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.3px;
}

.emp-stat-mini.overdue .stat-num {
  color: var(--color-danger);
}

.emp-stat-mini.pending .stat-num {
  color: var(--color-warning);
}

.emp-stat-mini.completed .stat-num {
  color: var(--color-success);
}

/* Service Card (Employee) */
.service-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--border-color);
  cursor: pointer;
  transition: var(--transition);
}

.service-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.service-card.active {
  border-color: var(--color-accent);
  box-shadow: var(--shadow);
}

.service-card.status-completed {
  border-left-color: var(--color-success);
}

.service-card.status-pending {
  border-left-color: var(--color-warning);
}

.service-card.status-overdue {
  border-left-color: var(--color-danger);
}

.service-card .svc-client {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 4px;
}

.service-card .svc-date {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.service-card .svc-address {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.service-card .svc-id {
  font-size: 12px;
  color: var(--text-light);
  font-family: 'Roboto Mono', monospace;
  margin-bottom: 6px;
  background: #e0e7ff;
  color: var(--color-primary);
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
}

.service-card .svc-special {
  font-size: 12px;
  color: var(--color-accent-dark);
  background: #fef9e7;
  padding: 6px 10px;
  border-radius: var(--radius);
  margin-top: 6px;
}

/* ---------- Admin Two-Panel Layout ---------- */
.admin-two-panel {
  display: grid;
  grid-template-columns: 400px 1fr;
  gap: 24px;
}

/* Worker Link Row */
.worker-link-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid var(--border-light);
}

.worker-link-row:last-child {
  border-bottom: none;
}

.worker-link-row .worker-name {
  font-weight: 700;
  color: var(--color-primary);
}

.worker-link-row .worker-code {
  font-size: 12px;
  color: var(--text-muted);
  font-family: monospace;
}

.worker-link-row .worker-link {
  font-size: 11px;
  color: var(--text-light);
  word-break: break-all;
  flex: 1;
}

.worker-link-row .copy-btn {
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: var(--color-accent);
  color: var(--color-primary);
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
  transition: var(--transition);
}

.worker-link-row .copy-btn:hover {
  filter: brightness(1.1);
}

/* Cleaning Card Print */
.cleaning-card-print {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 32px;
  border: 2px solid var(--color-primary);
}

.cleaning-card-print h2 {
  color: var(--color-primary);
  font-size: 20px;
  margin-bottom: 16px;
}

.cleaning-card-print .info-row {
  display: flex;
  gap: 24px;
  margin-bottom: 8px;
  font-size: 14px;
}

.cleaning-card-print .info-row strong {
  color: var(--color-primary);
  min-width: 100px;
}

/* Service Cards (Admin) */
.service-list-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 14px;
  border-left: 4px solid var(--border-color);
  transition: var(--transition);
}

.service-list-card:hover {
  box-shadow: var(--shadow);
}

.service-list-card.status-completed {
  border-left-color: var(--color-success);
}

.service-list-card.status-pending {
  border-left-color: var(--color-warning);
}

.service-list-card.status-overdue {
  border-left-color: var(--color-danger);
}

/* ---------- Mobile Sidebar Toggle ---------- */
.sidebar-toggle {
  display: none;
  background: none;
  font-size: 22px;
  color: var(--text-dark);
}

/* ---------- KPI Counter Animation ---------- */
@keyframes countUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.stat-value.animated {
  animation: countUp 0.5s ease forwards;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .sidebar {
    transform: translateX(-100%);
  }

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

  .main-content {
    margin-left: 0;
  }

  .sidebar-toggle {
    display: block;
  }

  .page-content {
    padding: 20px;
  }

  .stats-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }

  .emp-two-col {
    grid-template-columns: 1fr;
  }

  .admin-two-panel {
    grid-template-columns: 1fr;
  }

  .emp-stats-bar {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .stats-row {
    grid-template-columns: 1fr;
  }

  .filters-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .topbar .search-box {
    width: 160px;
  }

  .employee-grid {
    grid-template-columns: 1fr;
  }

  .modal {
    max-width: 100%;
    margin: 10px;
  }
}

@media (max-width: 480px) {
  .auth-card {
    padding: 32px 24px;
  }

  .topbar {
    padding: 0 16px;
  }

  .topbar .search-box {
    display: none;
  }

  .page-content {
    padding: 16px;
  }

  .tabs {
    flex-wrap: wrap;
  }

  .emp-content {
    padding: 16px;
  }

  .emp-stats-bar {
    grid-template-columns: 1fr 1fr;
  }
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}

::selection {
  background: rgba(222, 180, 35, 0.2);
}

/* ---------- Print ---------- */
@media print {

  .sidebar,
  .topbar,
  .emp-header,
  .btn,
  .modal-overlay {
    display: none !important;
  }

  .main-content {
    margin-left: 0 !important;
  }

  .page-content {
    padding: 0 !important;
  }

  .cleaning-card-print {
    border: 1px solid #000;
  }
}