/* ═══════════════════════════════════════════════════════════
   BiznesERP — Dizayn Sistemi
   ═══════════════════════════════════════════════════════════ */

/* ── Google Font ────────────────────────────────────────── */

/* ── CSS Dəyişənlər (Dark Mode standart) ───────────────── */
:root {
  /* Əsas Rənglər */
  --accent-1: #6C63FF;
  --accent-2: #3ECFCF;
  --accent-grad: linear-gradient(135deg, #6C63FF 0%, #3ECFCF 100%);
  --accent-grad-soft: linear-gradient(135deg, rgba(108,99,255,0.15) 0%, rgba(62,207,207,0.15) 100%);

  /* Arxa plan */
  --bg-base:      #0D0F1A;
  --bg-surface:   #141624;
  --bg-elevated:  #1C1F35;
  --bg-hover:     #232640;
  --bg-card:      rgba(28,31,53,0.85);

  /* Mətn */
  --text-primary:   #F0F2FF;
  --text-secondary: #8B90B8;
  --text-muted:     #555A80;
  --text-inverse:   #0D0F1A;

  /* Haşiyə */
  --border:       rgba(108,99,255,0.15);
  --border-light: rgba(255,255,255,0.06);

  /* Durum rəngləri */
  --success:      #22D3A0;
  --success-bg:   rgba(34,211,160,0.12);
  --warning:      #FFB830;
  --warning-bg:   rgba(255,184,48,0.12);
  --danger:       #FF5B7A;
  --danger-bg:    rgba(255,91,122,0.12);
  --info:         #38BFFF;
  --info-bg:      rgba(56,191,255,0.12);

  /* Sidebar */
  --sidebar-w:    260px;
  --sidebar-collapsed-w: 70px;
  --sidebar-bg:   #10122A;
  --sidebar-border: rgba(108,99,255,0.12);

  /* Topbar */
  --topbar-h:     64px;

  /* Kölgə */
  --shadow-sm:  0 2px 8px rgba(0,0,0,0.3);
  --shadow-md:  0 4px 20px rgba(0,0,0,0.4);
  --shadow-lg:  0 8px 40px rgba(0,0,0,0.5);
  --shadow-glow: 0 0 30px rgba(108,99,255,0.2);

  /* Şüşə effekti */
  --glass-bg:     rgba(20,22,36,0.75);
  --glass-border: rgba(255,255,255,0.08);
  --glass-blur:   blur(20px);

  /* Radius */
  --radius-sm:  8px;
  --radius-md:  12px;
  --radius-lg:  18px;
  --radius-xl:  24px;
  --radius-full: 9999px;

  /* Keçid */
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);

  /* Font */
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Light Mode */
[data-theme="light"] {
  --bg-base:      #F0F2FF;
  --bg-surface:   #FFFFFF;
  --bg-elevated:  #F5F7FF;
  --bg-hover:     #EEF0FF;
  --bg-card:      rgba(255,255,255,0.9);
  --text-primary:   #1A1B2E;
  --text-secondary: #5A6080;
  --text-muted:     #9DA5C8;
  --border:       rgba(108,99,255,0.12);
  --border-light: rgba(0,0,0,0.06);
  --sidebar-bg:   #FFFFFF;
  --sidebar-border: rgba(108,99,255,0.1);
  --glass-bg:     rgba(255,255,255,0.8);
  --glass-border: rgba(108,99,255,0.1);
  --shadow-sm:  0 2px 8px rgba(108,99,255,0.08);
  --shadow-md:  0 4px 20px rgba(108,99,255,0.12);
}

/* ── Reset ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; scroll-behavior: smooth; }
body {
  font-family: 'Segoe UI', Arial, sans-serif;
  font-family: var(--font);
  background: #f5f6f7;
  background: var(--bg-base);
  color: #252a31;
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font-family: 'Segoe UI', Arial, sans-serif; font-family: var(--font); }
input, select, textarea { font-family: 'Segoe UI', Arial, sans-serif; font-family: var(--font); }
ul, ol { list-style: none; }
img { max-width: 100%; }

/* ── Yardımçı Siniflər ──────────────────────────────────── */
.hidden { display: none !important; }
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }
.w-full { width: 100%; }
.text-sm { font-size: 0.857rem; }
.text-xs { font-size: 0.75rem; }
.text-lg { font-size: 1.143rem; }
.text-xl { font-size: 1.286rem; }
.text-2xl { font-size: 1.571rem; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.text-muted { color: #6b7480; color: var(--text-muted); }
.text-secondary { color: #525c67; color: var(--text-secondary); }
.text-success { color: #387052; color: var(--success); }
.text-danger { color: #a64e48; color: var(--danger); }
.text-warning { color: #936222; color: var(--warning); }
.text-accent { color: #315d7b; color: var(--accent-1); }
.glass {
  background: #ffffff;
  background: var(--glass-bg);
  backdrop-filter: none;
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: none;
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid #d3d8de;
  border: 1px solid var(--glass-border);
}

/* ══════════════════ LOGIN SCREEN ══════════════════════════ */
.login-screen {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: #f5f6f7;
  background: var(--bg-base);
  z-index: 1000;
  overflow: hidden;
}

/* Arxa plan dairələri */
.login-bg-orbs { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.orb {
  position: absolute;
  border-radius: 50%;
  -webkit-filter: blur(80px);
          filter: blur(80px);
  opacity: 0.18;
  animation: orbFloat 8s ease-in-out infinite;
}
.orb-1 { width: 500px; height: 500px; background: #6C63FF; top: -150px; left: -100px; animation-delay: 0s; }
.orb-2 { width: 400px; height: 400px; background: #3ECFCF; bottom: -100px; right: -80px; animation-delay: 3s; }
.orb-3 { width: 300px; height: 300px; background: #FF5B7A; top: 50%; left: 50%; transform: translate(-50%,-50%); animation-delay: 1.5s; }

@keyframes orbFloat {
  0%, 100% { transform: scale(1) translateY(0); }
  50% { transform: scale(1.1) translateY(-20px); }
}

.login-card {
  position: relative; z-index: 1;
  width: 100%; max-width: 420px;
  padding: 44px 40px;
  border-radius: 16px;
  border-radius: var(--radius-xl);
  box-shadow: 0 8px 30px rgba(25,35,45,0.12), none;
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  animation: slideUp 0.5s cubic-bezier(0.4,0,0.2,1);
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

.login-logo {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 36px;
}
.logo-icon { width: 48px; height: 48px; flex-shrink: 0; }
.logo-icon.small { width: 36px; height: 36px; }
.login-brand h1 { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.5px; background: #315d7b; background: var(--accent-grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.login-brand p { font-size: 0.8rem; color: #6b7480; color: var(--text-muted); margin-top: 1px; }

.login-form { display: flex; flex-direction: column; gap: 20px; }
.form-group { display: flex; flex-direction: column; gap: 7px; }
.form-group label { font-size: 0.8rem; font-weight: 600; color: #525c67; color: var(--text-secondary); letter-spacing: 0.3px; }

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  background: #f4f5f6;
  background: var(--bg-elevated);
  border: 1px solid #d3d8de;
  border: 1px solid var(--border);
  border-radius: 8px;
  border-radius: var(--radius-md);
  color: #252a31;
  color: var(--text-primary);
  font-size: 0.93rem;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
  transition: var(--transition);
  outline: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: #315d7b;
  border-color: var(--accent-1);
  box-shadow: 0 0 0 3px rgba(108,99,255,0.15);
  background: #eceff1;
  background: var(--bg-hover);
}
.form-group input::-webkit-input-placeholder { color: #6b7480; color: var(--text-muted); }
.form-group input:-ms-input-placeholder { color: #6b7480; color: var(--text-muted); }
.form-group input::-ms-input-placeholder { color: #6b7480; color: var(--text-muted); }
.form-group input::placeholder { color: #6b7480; color: var(--text-muted); }

.password-wrap { position: relative; }
.password-wrap input { padding-right: 48px; }
.eye-btn {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  font-size: 1rem; color: #6b7480; color: var(--text-muted);
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
  transition: var(--transition);
  padding: 4px;
}
.eye-btn:hover { color: #252a31; color: var(--text-primary); }

.login-error {
  background: #fbefed;
  background: var(--danger-bg);
  border: 1px solid rgba(255,91,122,0.3);
  color: #a64e48;
  color: var(--danger);
  padding: 10px 14px;
  border-radius: 6px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  text-align: center;
}

.login-hint {
  text-align: center;
  margin-top: 20px;
  font-size: 0.8rem;
  color: #6b7480;
  color: var(--text-muted);
}
.login-hint b { color: #525c67; color: var(--text-secondary); }

/* ══════════════════ APP LAYOUT ════════════════════════════ */
.app {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ── Sidebar ──────────────────────────────────────────────── */
.sidebar {
  width: 228px;
  width: var(--sidebar-w);
  background: #fafbfc;
  background: var(--sidebar-bg);
  border-right: 1px solid #e0e4e8;
  border-right: 1px solid var(--sidebar-border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transition: width 0.3s cubic-bezier(0.4,0,0.2,1);
  overflow: hidden;
  z-index: 100;
}
.sidebar.collapsed { width: 64px; width: var(--sidebar-collapsed-w); }
.sidebar.collapsed .nav-label,
.sidebar.collapsed .nav-section-label,
.sidebar.collapsed .sidebar-brand,
.sidebar.collapsed .user-details { display: none; }
.sidebar.collapsed .sidebar-header { justify-content: center; padding: 0 12px; }
.sidebar.collapsed .sidebar-toggle { transform: rotate(180deg); }
.sidebar.collapsed .nav-item { justify-content: center; padding: 12px; }
.sidebar.collapsed .nav-icon { font-size: 1.3rem; }
.sidebar.collapsed .user-info { justify-content: center; }

.sidebar-header {
  display: flex; align-items: center; gap: 10px;
  padding: 0 16px 0 20px;
  height: 60px;
  height: var(--topbar-h);
  border-bottom: 1px solid #e0e4e8;
  border-bottom: 1px solid var(--sidebar-border);
  flex-shrink: 0;
}
.sidebar-brand { font-size: 1.1rem; font-weight: 800; background: #315d7b; background: var(--accent-grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent; flex: 1; white-space: nowrap; }
.sidebar-toggle {
  width: 28px; height: 28px;
  border-radius: 6px;
  border-radius: var(--radius-sm);
  background: #f4f5f6;
  background: var(--bg-elevated);
  color: #6b7480;
  color: var(--text-muted);
  font-size: 1.1rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
  transition: var(--transition);
  flex-shrink: 0;
}
.sidebar-toggle:hover { background: #eceff1; background: var(--bg-hover); color: #252a31; color: var(--text-primary); }

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 12px 10px;
  scrollbar-width: thin;
  scrollbar-color: #d3d8de transparent;
  scrollbar-color: var(--border) transparent;
}
.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-track { background: transparent; }
.sidebar-nav::-webkit-scrollbar-thumb { background: #d3d8de; background: var(--border); border-radius: 4px; }

.nav-section-label {
  font-size: 0.68rem; font-weight: 700; letter-spacing: 1px;
  text-transform: uppercase;
  color: #6b7480;
  color: var(--text-muted);
  padding: 16px 10px 6px;
  white-space: nowrap;
}

.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  border-radius: var(--radius-md);
  color: #525c67;
  color: var(--text-secondary);
  font-size: 0.875rem; font-weight: 500;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
  transition: var(--transition);
  white-space: nowrap;
  cursor: pointer;
  margin-bottom: 2px;
}
.nav-item:hover { background: #eceff1; background: var(--bg-hover); color: #252a31; color: var(--text-primary); }
.nav-item.active {
  background: #edf2f6;
  background: var(--accent-grad-soft);
  color: #315d7b;
  color: var(--accent-1);
  font-weight: 600;
  border: 1px solid rgba(108,99,255,0.2);
}
.nav-icon { font-size: 1.1rem; flex-shrink: 0; }

.sidebar-footer {
  padding: 14px 12px;
  border-top: 1px solid #e0e4e8;
  border-top: 1px solid var(--sidebar-border);
  display: flex; align-items: center; gap: 10px;
  flex-shrink: 0;
}
.user-info { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.user-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: #315d7b;
  background: var(--accent-grad);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.9rem; color: #fff;
  flex-shrink: 0;
}
.user-details { min-width: 0; }
.user-name { display: block; font-size: 0.85rem; font-weight: 600; color: #252a31; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { display: block; font-size: 0.73rem; color: #6b7480; color: var(--text-muted); }
.logout-btn {
  width: 32px; height: 32px;
  border-radius: 6px;
  border-radius: var(--radius-sm);
  background: #fbefed;
  background: var(--danger-bg);
  color: #a64e48;
  color: var(--danger);
  font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
  transition: var(--transition);
  flex-shrink: 0;
}
.logout-btn:hover { background: #a64e48; background: var(--danger); color: #fff; }

/* ── Main Content ─────────────────────────────────────────── */
.main-content {
  flex: 1;
  display: flex; flex-direction: column;
  overflow: hidden;
  background: #f5f6f7;
  background: var(--bg-base);
}

/* ── Topbar ───────────────────────────────────────────────── */
.topbar {
  height: 60px;
  height: var(--topbar-h);
  background: #ffffff;
  background: var(--bg-surface);
  border-bottom: 1px solid #e3e6e9;
  border-bottom: 1px solid var(--border-light);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px;
  flex-shrink: 0;
}
.topbar-left { display: flex; align-items: center; gap: 16px; }
.mobile-menu-btn {
  display: none;
  width: 36px; height: 36px;
  border-radius: 6px;
  border-radius: var(--radius-sm);
  background: #f4f5f6;
  background: var(--bg-elevated);
  color: #525c67;
  color: var(--text-secondary);
  font-size: 1.2rem;
  align-items: center; justify-content: center;
}
.page-title { font-size: 1.2rem; font-weight: 700; color: #252a31; color: var(--text-primary); }
.topbar-right { display: flex; align-items: center; gap: 16px; }
.topbar-date { font-size: 0.8rem; color: #6b7480; color: var(--text-muted); }
.notification-bell {
  position: relative;
  width: 36px; height: 36px;
  border-radius: 6px;
  border-radius: var(--radius-sm);
  background: #f4f5f6;
  background: var(--bg-elevated);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
  transition: var(--transition);
}
.notification-bell:hover { background: #eceff1; background: var(--bg-hover); }
.notif-badge {
  position: absolute; top: 4px; right: 4px;
  background: #a64e48;
  background: var(--danger); color: #fff;
  font-size: 0.6rem; font-weight: 700;
  width: 16px; height: 16px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid #ffffff;
  border: 2px solid var(--bg-surface);
}

/* ── Content Area ─────────────────────────────────────────── */
.content-area {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  scrollbar-width: thin;
  scrollbar-color: #d3d8de transparent;
  scrollbar-color: var(--border) transparent;
}
.content-area::-webkit-scrollbar { width: 6px; }
.content-area::-webkit-scrollbar-track { background: transparent; }
.content-area::-webkit-scrollbar-thumb { background: #d3d8de; background: var(--border); border-radius: 4px; }

/* ── Notification Panel ───────────────────────────────────── */
.notif-panel {
  position: fixed; top: 60px; top: var(--topbar-h); right: 16px;
  width: 340px; max-height: 480px;
  border-radius: 12px;
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 30px rgba(25,35,45,0.12);
  box-shadow: var(--shadow-lg);
  z-index: 500;
  display: flex; flex-direction: column;
  animation: slideDown 0.2s ease;
}
@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
.notif-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #e3e6e9;
  border-bottom: 1px solid var(--border-light);
  font-weight: 600;
}
.notif-header button { color: #6b7480; color: var(--text-muted); transition: background-color 0.15s, border-color 0.15s, color 0.15s; transition: var(--transition); }
.notif-header button:hover { color: #252a31; color: var(--text-primary); }
.notif-list { overflow-y: auto; padding: 8px; }
.notif-item {
  padding: 12px 14px;
  border-radius: 6px;
  border-radius: var(--radius-sm);
  margin-bottom: 6px;
  font-size: 0.83rem;
  display: flex; gap: 10px; align-items: flex-start;
}
.notif-item.warning { background: #faf3e7; background: var(--warning-bg); border-left: 3px solid #936222; border-left: 3px solid var(--warning); }
.notif-item.danger  { background: #fbefed; background: var(--danger-bg);  border-left: 3px solid #a64e48;  border-left: 3px solid var(--danger); }
.notif-item.info    { background: #edf2f6; background: var(--info-bg);    border-left: 3px solid #315d7b;    border-left: 3px solid var(--info); }
.notif-item.success { background: #edf5ef; background: var(--success-bg); border-left: 3px solid #387052; border-left: 3px solid var(--success); }

/* ══════════════════ MODAL ══════════════════════════════════ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  -webkit-backdrop-filter: blur(4px);
          backdrop-filter: blur(4px);
  z-index: 900;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  width: 100%; max-width: 560px;
  border-radius: 16px;
  border-radius: var(--radius-xl);
  box-shadow: 0 8px 30px rgba(25,35,45,0.12);
  box-shadow: var(--shadow-lg);
  max-height: 90vh;
  display: flex; flex-direction: column;
  animation: modalSlide 0.3s cubic-bezier(0.4,0,0.2,1);
}
.modal.modal-lg { max-width: 800px; }
.modal.modal-xl { max-width: 1000px; }
@keyframes modalSlide { from { opacity: 0; transform: scale(0.95) translateY(20px); } to { opacity: 1; transform: scale(1) translateY(0); } }
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid #e3e6e9;
  border-bottom: 1px solid var(--border-light);
}
.modal-header h3 { font-size: 1.05rem; font-weight: 700; }
.modal-close {
  width: 30px; height: 30px; border-radius: 6px; border-radius: var(--radius-sm);
  background: #f4f5f6;
  background: var(--bg-elevated); color: #6b7480; color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
  transition: var(--transition); font-size: 0.9rem;
}
.modal-close:hover { background: #fbefed; background: var(--danger-bg); color: #a64e48; color: var(--danger); }
.modal-body {
  padding: 20px 24px;
  overflow-y: auto;
  flex: 1;
}
.modal-footer {
  padding: 16px 24px 20px;
  border-top: 1px solid #e3e6e9;
  border-top: 1px solid var(--border-light);
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end;
}

/* ══════════════════ TOAST ══════════════════════════════════ */
.toast-container {
  position: fixed; bottom: 24px; right: 24px;
  z-index: 9999;
  display: flex; flex-direction: column; gap: 10px;
  pointer-events: none;
}
.toast {
  min-width: 280px; max-width: 380px;
  padding: 14px 18px;
  border-radius: 8px;
  border-radius: var(--radius-md);
  font-size: 0.87rem; font-weight: 500;
  display: flex; align-items: center; gap: 10px;
  box-shadow: 0 2px 8px rgba(25,35,45,0.06);
  box-shadow: var(--shadow-md);
  pointer-events: all;
  animation: toastIn 0.3s cubic-bezier(0.4,0,0.2,1);
  border-left: 4px solid transparent;
}
@keyframes toastIn { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: translateX(0); } }
@keyframes toastOut { from { opacity: 1; transform: translateX(0); } to { opacity: 0; transform: translateX(40px); } }
.toast.success { background: #f4f5f6; background: var(--bg-elevated); border-color: #387052; border-color: var(--success); color: #387052; color: var(--success); }
.toast.error   { background: #f4f5f6; background: var(--bg-elevated); border-color: #a64e48; border-color: var(--danger);  color: #a64e48;  color: var(--danger); }
.toast.warning { background: #f4f5f6; background: var(--bg-elevated); border-color: #936222; border-color: var(--warning); color: #936222; color: var(--warning); }
.toast.info    { background: #f4f5f6; background: var(--bg-elevated); border-color: #315d7b; border-color: var(--info);    color: #315d7b;    color: var(--info); }
.toast-icon { font-size: 1.1rem; }
.toast-msg { color: #252a31; color: var(--text-primary); flex: 1; }

/* ══════════════════ RESPONSIVE ════════════════════════════ */
@media (max-width: 768px) {
  :root { --sidebar-w: 280px; }
  .sidebar {
    position: fixed; left: -280px; top: 0; bottom: 0;
    transition: left 0.3s ease;
    z-index: 999;
  }
  .sidebar.mobile-open { left: 0; }
  .mobile-menu-btn { display: flex; }
  .content-area { padding: 16px; }
  .topbar { padding: 0 16px; }
}

/* ═══════════════════════════════════════════════════════════
   BiznesERP — Komponentlər
   ═══════════════════════════════════════════════════════════ */

/* ══════════════════ DÜYMƏLƏR ═══════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 7px;
  padding: 10px 18px;
  border-radius: 8px;
  border-radius: var(--radius-md);
  font-size: 0.875rem; font-weight: 600;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
  transition: var(--transition);
  white-space: nowrap;
  cursor: pointer;
  border: 1px solid transparent;
  line-height: 1;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-sm { padding: 7px 13px; font-size: 0.8rem; }
.btn-lg { padding: 13px 24px; font-size: 0.95rem; }
.btn-full { width: 100%; }

.btn-primary {
  background: #315d7b;
  background: var(--accent-grad);
  color: #fff;
  box-shadow: 0 4px 15px rgba(108,99,255,0.35);
}
.btn-primary:hover:not(:disabled) {
  box-shadow: 0 6px 25px rgba(108,99,255,0.5);
  transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  background: #f4f5f6;
  background: var(--bg-elevated);
  color: #252a31;
  color: var(--text-primary);
  border-color: #d3d8de;
  border-color: var(--border);
}
.btn-secondary:hover:not(:disabled) { background: #eceff1; background: var(--bg-hover); }

.btn-ghost {
  background: transparent;
  color: #525c67;
  color: var(--text-secondary);
  border-color: #d3d8de;
  border-color: var(--border);
}
.btn-ghost:hover:not(:disabled) { background: #f4f5f6; background: var(--bg-elevated); color: #252a31; color: var(--text-primary); }

.btn-danger { background: #fbefed; background: var(--danger-bg); color: #a64e48; color: var(--danger); border-color: rgba(255,91,122,0.2); }
.btn-danger:hover:not(:disabled) { background: #a64e48; background: var(--danger); color: #fff; }

.btn-success { background: #edf5ef; background: var(--success-bg); color: #387052; color: var(--success); border-color: rgba(34,211,160,0.2); }
.btn-success:hover:not(:disabled) { background: #387052; background: var(--success); color: #fff; }

.btn-warning { background: #faf3e7; background: var(--warning-bg); color: #936222; color: var(--warning); border-color: rgba(255,184,48,0.2); }
.btn-warning:hover:not(:disabled) { background: #936222; background: var(--warning); color: #fff; }

.btn-icon {
  width: 36px; height: 36px;
  padding: 0; border-radius: 6px; border-radius: var(--radius-sm);
  background: #f4f5f6;
  background: var(--bg-elevated);
  color: #6b7480;
  color: var(--text-muted);
}
.btn-icon:hover { background: #eceff1; background: var(--bg-hover); color: #252a31; color: var(--text-primary); }
.btn-icon.sm { width: 28px; height: 28px; font-size: 0.8rem; }

/* ══════════════════ KARTLAR ════════════════════════════════ */
.card {
  background: #ffffff;
  background: var(--bg-card);
  border: 1px solid #e3e6e9;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
  transition: var(--transition);
}
.card:hover { border-color: #d3d8de; border-color: var(--border); }
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.card-title { font-size: 0.95rem; font-weight: 700; }
.card-body { }

/* KPI Kartı */
.kpi-card {
  background: #ffffff;
  background: var(--bg-card);
  border: 1px solid #e3e6e9;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  position: relative;
  overflow: hidden;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
  transition: var(--transition);
  cursor: default;
}
.kpi-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 2px;
  background: #315d7b;
  background: var(--accent-grad);
  opacity: 0;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
  transition: var(--transition);
}
.kpi-card:hover { transform: translateY(-2px); box-shadow: 0 2px 8px rgba(25,35,45,0.06); box-shadow: var(--shadow-md); border-color: #d3d8de; border-color: var(--border); }
.kpi-card:hover::before { opacity: 1; }
.kpi-card.success::before { background: linear-gradient(90deg, #387052, #0EA37A); background: linear-gradient(90deg, var(--success), #0EA37A); opacity: 1; }
.kpi-card.danger::before  { background: linear-gradient(90deg, #a64e48, #C0003B); background: linear-gradient(90deg, var(--danger), #C0003B); opacity: 1; }
.kpi-card.warning::before { background: linear-gradient(90deg, #936222, #C87A00); background: linear-gradient(90deg, var(--warning), #C87A00); opacity: 1; }
.kpi-card.info::before    { background: linear-gradient(90deg, #315d7b, #0080C0); background: linear-gradient(90deg, var(--info), #0080C0); opacity: 1; }
.kpi-card.accent::before  { opacity: 1; }

.kpi-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 14px; }
.kpi-icon {
  width: 44px; height: 44px;
  border-radius: 8px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
}
.kpi-icon.success { background: #edf5ef; background: var(--success-bg); }
.kpi-icon.danger  { background: #fbefed; background: var(--danger-bg); }
.kpi-icon.warning { background: #faf3e7; background: var(--warning-bg); }
.kpi-icon.info    { background: #edf2f6; background: var(--info-bg); }
.kpi-icon.accent  { background: #edf2f6; background: var(--accent-grad-soft); }

.kpi-badge {
  font-size: 0.72rem; font-weight: 600;
  padding: 3px 8px;
  border-radius: 9999px;
  border-radius: var(--radius-full);
}
.kpi-badge.up { background: #edf5ef; background: var(--success-bg); color: #387052; color: var(--success); }
.kpi-badge.down { background: #fbefed; background: var(--danger-bg); color: #a64e48; color: var(--danger); }

.kpi-value { font-size: 1.8rem; font-weight: 800; letter-spacing: -0.5px; line-height: 1; margin-bottom: 6px; }
.kpi-label { font-size: 0.8rem; color: #525c67; color: var(--text-secondary); font-weight: 500; }

/* ══════════════════ CƏDVƏLLƏr ════════════════════════════= */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  border-radius: 12px;
  border-radius: var(--radius-lg);
  border: 1px solid #e3e6e9;
  border: 1px solid var(--border-light);
}
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.87rem;
}
.table thead tr {
  background: #f4f5f6;
  background: var(--bg-elevated);
  border-bottom: 1px solid #e3e6e9;
  border-bottom: 1px solid var(--border-light);
}
.table thead th {
  padding: 12px 16px;
  text-align: left;
  font-size: 0.75rem; font-weight: 700;
  color: #6b7480;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}
.table thead th.sortable { cursor: pointer; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; }
.table thead th.sortable:hover { color: #252a31; color: var(--text-primary); }
.table tbody tr {
  border-bottom: 1px solid #e3e6e9;
  border-bottom: 1px solid var(--border-light);
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
  transition: var(--transition);
}
.table tbody tr:last-child { border-bottom: none; }
.table tbody tr:hover { background: #f4f5f6; background: var(--bg-elevated); }
.table td {
  padding: 13px 16px;
  vertical-align: middle;
  white-space: nowrap;
}
.table td.wrap { white-space: normal; }
.table-actions { display: flex; gap: 6px; }
.empty-state {
  padding: 60px 20px;
  text-align: center;
  color: #6b7480;
  color: var(--text-muted);
}
.empty-state .empty-icon { font-size: 3rem; margin-bottom: 12px; opacity: 0.5; }
.empty-state p { font-size: 0.9rem; }

/* ══════════════════ BADGE / STATUS ════════════════════════ */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px;
  border-radius: 9999px;
  border-radius: var(--radius-full);
  font-size: 0.73rem; font-weight: 600;
  white-space: nowrap;
}
.badge-success  { background: #edf5ef; background: var(--success-bg); color: #387052; color: var(--success); }
.badge-danger   { background: #fbefed; background: var(--danger-bg);  color: #a64e48;  color: var(--danger); }
.badge-warning  { background: #faf3e7; background: var(--warning-bg); color: #936222; color: var(--warning); }
.badge-info     { background: #edf2f6; background: var(--info-bg);    color: #315d7b;    color: var(--info); }
.badge-muted    { background: #f4f5f6; background: var(--bg-elevated); color: #6b7480; color: var(--text-muted); }
.badge-accent   { background: #edf2f6; background: var(--accent-grad-soft); color: #315d7b; color: var(--accent-1); }

/* ══════════════════ FORM ELEMENTLƏRİ ═════════════════════ */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.form-row.cols-4 { grid-template-columns: repeat(4, 1fr); }

select option { background: #f4f5f6; background: var(--bg-elevated); color: #252a31; color: var(--text-primary); }

.input-group { position: relative; }
.input-group .input-prefix,
.input-group .input-suffix {
  position: absolute; top: 50%; transform: translateY(-50%);
  color: #6b7480;
  color: var(--text-muted); font-size: 0.875rem; pointer-events: none;
}
.input-group .input-prefix { left: 14px; }
.input-group .input-suffix { right: 14px; }
.input-group input { padding-left: 36px; }
.input-group.has-suffix input { padding-right: 40px; }

.checkbox-group {
  display: flex; align-items: center; gap: 10px;
  cursor: pointer;
}
.checkbox-group input[type="checkbox"] {
  width: 16px; height: 16px;
  accent-color: #315d7b;
  accent-color: var(--accent-1);
  cursor: pointer;
}

/* ══════════════════ AXTARIŞ ════════════════════════════════ */
.search-bar {
  position: relative;
  flex: 1; max-width: 320px;
}
.search-bar input {
  width: 100%;
  padding: 9px 16px 9px 38px;
  background: #f4f5f6;
  background: var(--bg-elevated);
  border: 1px solid #d3d8de;
  border: 1px solid var(--border);
  border-radius: 8px;
  border-radius: var(--radius-md);
  color: #252a31;
  color: var(--text-primary);
  font-size: 0.875rem;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
  transition: var(--transition);
  outline: none;
}
.search-bar input:focus { border-color: #315d7b; border-color: var(--accent-1); box-shadow: 0 0 0 3px rgba(108,99,255,0.12); }
.search-bar input::-webkit-input-placeholder { color: #6b7480; color: var(--text-muted); }
.search-bar input:-ms-input-placeholder { color: #6b7480; color: var(--text-muted); }
.search-bar input::-ms-input-placeholder { color: #6b7480; color: var(--text-muted); }
.search-bar input::placeholder { color: #6b7480; color: var(--text-muted); }
.search-bar .search-icon {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: #6b7480;
  color: var(--text-muted); font-size: 0.9rem; pointer-events: none;
}

/* ══════════════════ MODUL BAŞLIĞI ══════════════════════════ */
.module-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px; flex-wrap: wrap; gap: 12px;
}
.module-title { font-size: 1.3rem; font-weight: 800; }
.module-title span { color: #6b7480; color: var(--text-muted); font-weight: 400; font-size: 1rem; }
.module-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ══════════════════ KANBAN BOARD ═══════════════════════════ */
.kanban-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  align-items: start;
}
.kanban-col {
  background: #ffffff;
  background: var(--bg-surface);
  border: 1px solid #e3e6e9;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  border-radius: var(--radius-lg);
  padding: 14px;
}
.kanban-col-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.kanban-col-title {
  font-size: 0.8rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.5px;
  color: #525c67;
  color: var(--text-secondary);
}
.kanban-col-count {
  min-width: 22px; height: 22px;
  background: #f4f5f6;
  background: var(--bg-elevated);
  border-radius: 9999px;
  border-radius: var(--radius-full);
  font-size: 0.73rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  color: #6b7480;
  color: var(--text-muted);
}
.kanban-card {
  background: #ffffff;
  background: var(--bg-card);
  border: 1px solid #e3e6e9;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
  transition: var(--transition);
}
.kanban-card:hover { border-color: #315d7b; border-color: var(--accent-1); box-shadow: none; box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.kanban-card-title { font-size: 0.875rem; font-weight: 600; margin-bottom: 8px; }
.kanban-card-meta { display: flex; align-items: center; justify-content: space-between; }
.kanban-card-date { font-size: 0.73rem; color: #6b7480; color: var(--text-muted); }

/* ══════════════════ QRAFİKLƏR ═════════════════════════════ */
.chart-container {
  background: #ffffff;
  background: var(--bg-card);
  border: 1px solid #e3e6e9;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  border-radius: var(--radius-lg);
  padding: 20px 22px;
}
.chart-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.chart-title { font-size: 0.95rem; font-weight: 700; }
.chart-legend { display: flex; gap: 16px; }
.legend-item { display: flex; align-items: center; gap: 6px; font-size: 0.78rem; color: #525c67; color: var(--text-secondary); }
.legend-dot { width: 8px; height: 8px; border-radius: 50%; }

/* ══════════════════ TABS ════════════════════════════════════ */
.tabs { display: flex; gap: 4px; background: #f4f5f6; background: var(--bg-elevated); padding: 4px; border-radius: 8px; border-radius: var(--radius-md); width: -webkit-fit-content; width: -moz-fit-content; width: fit-content; margin-bottom: 20px; }
.tab-btn {
  padding: 7px 16px; border-radius: 6px; border-radius: var(--radius-sm);
  font-size: 0.83rem; font-weight: 600;
  color: #6b7480;
  color: var(--text-muted); transition: background-color 0.15s, border-color 0.15s, color 0.15s; transition: var(--transition);
}
.tab-btn:hover { color: #252a31; color: var(--text-primary); }
.tab-btn.active { background: #ffffff; background: var(--bg-surface); color: #252a31; color: var(--text-primary); box-shadow: none; box-shadow: var(--shadow-sm); }

/* ══════════════════ PROGRESS ════════════════════════════════ */
.progress-bar {
  height: 6px; background: #f4f5f6; background: var(--bg-elevated);
  border-radius: 9999px;
  border-radius: var(--radius-full); overflow: hidden;
}
.progress-fill {
  height: 100%; border-radius: 9999px; border-radius: var(--radius-full);
  background: #315d7b;
  background: var(--accent-grad);
  transition: width 0.6s cubic-bezier(0.4,0,0.2,1);
}
.progress-fill.success { background: #387052; background: var(--success); }
.progress-fill.warning { background: #936222; background: var(--warning); }
.progress-fill.danger  { background: #a64e48; background: var(--danger); }

/* ══════════════════ DIVIDER ════════════════════════════════ */
.divider { height: 1px; background: #e3e6e9; background: var(--border-light); margin: 16px 0; }

/* ══════════════════ SWITCH ═════════════════════════════════ */
.switch { position: relative; display: inline-block; width: 44px; height: 24px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch-slider {
  position: absolute; cursor: pointer; inset: 0;
  background: #f4f5f6;
  background: var(--bg-elevated); border-radius: 24px;
  transition: 0.3s;
}
.switch-slider::before {
  content: '';
  position: absolute; height: 18px; width: 18px;
  left: 3px; bottom: 3px;
  background: #6b7480;
  background: var(--text-muted);
  border-radius: 50%; transition: 0.3s;
}
.switch input:checked + .switch-slider { background: #315d7b; background: var(--accent-grad); }
.switch input:checked + .switch-slider::before { transform: translateX(20px); background: #fff; }

/* ══════════════════ SKELETON ════════════════════════════════ */
.skeleton {
  background: linear-gradient(90deg, #f4f5f6 25%, #eceff1 50%, #f4f5f6 75%);
  background: linear-gradient(90deg, var(--bg-elevated) 25%, var(--bg-hover) 50%, var(--bg-elevated) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 6px;
  border-radius: var(--radius-sm);
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ══════════════════ STAT MINI KART ═════════════════════════ */
.stat-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid #e3e6e9;
  border-bottom: 1px solid var(--border-light);
}
.stat-row:last-child { border-bottom: none; }
.stat-label { font-size: 0.83rem; color: #525c67; color: var(--text-secondary); }
.stat-value { font-size: 0.9rem; font-weight: 700; }

/* ══════════════════ PRINT ══════════════════════════════════ */
@media print {
  .sidebar, .topbar, .modal-overlay, .toast-container,
  .btn-print-hide, .module-actions { display: none !important; }
  .main-content { overflow: visible; }
  .content-area { overflow: visible; padding: 0; }
  body { background: #fff; color: #000; }
  .card, .table-wrap { border-color: #ccc; }
}

/* ═══════════════════════════════════════════════════════════
   BiznesERP — Modul Stilləri
   ═══════════════════════════════════════════════════════════ */

/* ── Dashboard Grid ──────────────────────────────────────── */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(220px,1fr)); gap: 16px; margin-bottom: 24px; }
.dashboard-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; margin-bottom: 24px; }
.dashboard-grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; margin-bottom: 24px; }
@media(max-width:1100px){ .dashboard-grid{ grid-template-columns:1fr; } .dashboard-grid-3{ grid-template-columns:1fr 1fr; } }
@media(max-width:700px){ .kpi-grid{ grid-template-columns:1fr 1fr; } .dashboard-grid-3{ grid-template-columns:1fr; } }

/* ── Finance ─────────────────────────────────────────────── */
.finance-summary { display:grid; grid-template-columns:repeat(3,1fr); gap:16px; margin-bottom:24px; }
.finance-summary .kpi-card { text-align:center; }
.txn-type-income { color:#387052; color:var(--success); font-weight:700; }
.txn-type-expense { color:#a64e48; color:var(--danger); font-weight:700; }

/* ── Invoice ─────────────────────────────────────────────── */
.invoice-preview {
  background:#fff; color:#111;
  padding:40px; border-radius:12px; border-radius:var(--radius-lg);
  box-shadow:0 2px 8px rgba(25,35,45,0.06);
  box-shadow:var(--shadow-md); max-width:700px; margin:0 auto;
  font-size:13px; line-height:1.6;
}
.invoice-preview h1 { font-size:2rem; color:#6C63FF; margin-bottom:4px; }
.invoice-grid { display:grid; grid-template-columns:1fr 1fr; gap:20px; margin:20px 0; }
.invoice-table { width:100%; border-collapse:collapse; margin:16px 0; }
.invoice-table th { background:#f5f5f5; padding:10px 14px; text-align:left; font-size:0.8rem; }
.invoice-table td { padding:10px 14px; border-bottom:1px solid #eee; }
.invoice-total { text-align:right; font-size:1rem; margin-top:12px; }
.invoice-total .big { font-size:1.4rem; font-weight:800; color:#6C63FF; }
.invoice-qr { text-align:center; margin-top:20px; }

/* ── Laundry module ──────────────────────────────────────── */
.laundry-pipeline { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:12px; margin-bottom:24px; }
@media(max-width:1200px){ .laundry-pipeline{ grid-template-columns:repeat(3,1fr); } }
@media(max-width:700px){ .laundry-pipeline{ grid-template-columns:1fr 1fr; } }
.laundry-job-card {
  background:#ffffff;
  background:var(--bg-card); border:1px solid #e3e6e9; border:1px solid var(--border-light);
  border-radius:8px;
  border-radius:var(--radius-md); padding:14px; margin-bottom:10px;
  transition:background-color 0.15s, border-color 0.15s, color 0.15s;
  transition:var(--transition); cursor:pointer;
}
.laundry-job-card:hover { border-color:#315d7b; border-color:var(--accent-1); box-shadow:none; box-shadow:var(--shadow-sm); }
.laundry-job-title { font-size:0.875rem; font-weight:600; margin-bottom:6px; }
.laundry-job-meta { font-size:0.75rem; color:#6b7480; color:var(--text-muted); }
.laundry-step { display:flex; align-items:center; gap:8px; padding:8px 0; border-bottom:1px solid #e3e6e9; border-bottom:1px solid var(--border-light); }
.laundry-step:last-child { border-bottom:none; }
.laundry-step-icon { font-size:1.2rem; width:32px; text-align:center; }
.laundry-step-info { flex:1; }
.laundry-step-name { font-size:0.83rem; font-weight:600; }
.laundry-step-time { font-size:0.75rem; color:#6b7480; color:var(--text-muted); }
.norm-table .norm-input {
  width:80px; padding:6px 8px;
  background:#f4f5f6;
  background:var(--bg-elevated); border:1px solid #d3d8de; border:1px solid var(--border);
  border-radius:6px;
  border-radius:var(--radius-sm); color:#252a31; color:var(--text-primary);
  font-size:0.83rem; text-align:center;
}

/* ── Orders ──────────────────────────────────────────────── */
.order-items-list { display:flex; flex-direction:column; gap:10px; }
.order-item-row {
  display:grid; grid-template-columns:2fr 1fr 1fr 1fr auto;
  gap:10px; align-items:center;
  padding:12px 14px;
  background:#f4f5f6;
  background:var(--bg-elevated); border-radius:6px; border-radius:var(--radius-sm);
}
@media(max-width:700px){ .order-item-row{ grid-template-columns:1fr; } }

/* ── Cash ────────────────────────────────────────────────── */
.cash-session-card {
  background:#ffffff;
  background:var(--bg-card); border:1px solid #e3e6e9; border:1px solid var(--border-light);
  border-radius:12px;
  border-radius:var(--radius-lg); padding:24px;
}
.cash-session-header { display:flex; justify-content:space-between; align-items:flex-start; margin-bottom:20px; }
.cash-total-box {
  background:#edf2f6;
  background:var(--accent-grad-soft); border:1px solid rgba(108,99,255,0.2);
  border-radius:8px;
  border-radius:var(--radius-md); padding:16px 20px; text-align:center;
}
.cash-total-box .amount { font-size:2rem; font-weight:800; background:#315d7b; background:var(--accent-grad); -webkit-background-clip:text; -webkit-text-fill-color:transparent; }

/* ── Debt aging ──────────────────────────────────────────── */
.debt-aging-bar { display:flex; gap:12px; margin-bottom:24px; }
.debt-aging-item { flex:1; padding:16px; border-radius:8px; border-radius:var(--radius-md); text-align:center; }
.debt-aging-item .aging-label { font-size:0.75rem; font-weight:700; text-transform:uppercase; letter-spacing:0.5px; margin-bottom:8px; }
.debt-aging-item .aging-amount { font-size:1.3rem; font-weight:800; }
.aging-current { background:#edf5ef; background:var(--success-bg); color:#387052; color:var(--success); }
.aging-30 { background:#faf3e7; background:var(--warning-bg); color:#936222; color:var(--warning); }
.aging-60 { background:#fbefed; background:var(--danger-bg); color:#a64e48; color:var(--danger); }
.aging-over { background:rgba(255,91,122,0.25); color:#ff3355; }

/* ── Reports ─────────────────────────────────────────────── */
.report-grid { display:grid; grid-template-columns:1fr 1fr; gap:20px; }
@media(max-width:800px){ .report-grid{ grid-template-columns:1fr; } }
.report-card {
  background:#ffffff;
  background:var(--bg-card); border:1px solid #e3e6e9; border:1px solid var(--border-light);
  border-radius:12px;
  border-radius:var(--radius-lg); padding:20px 22px;
}
.report-card canvas { width:100%!important; }

/* ── Settings ────────────────────────────────────────────── */
.settings-grid { display:grid; grid-template-columns:200px 1fr; gap:24px; }
.settings-nav { display:flex; flex-direction:column; gap:4px; }
.settings-nav-item {
  padding:10px 14px; border-radius:8px; border-radius:var(--radius-md);
  font-size:0.875rem; color:#525c67; color:var(--text-secondary); cursor:pointer;
  transition:background-color 0.15s, border-color 0.15s, color 0.15s;
  transition:var(--transition); display:flex; align-items:center; gap:8px;
}
.settings-nav-item:hover { background:#eceff1; background:var(--bg-hover); color:#252a31; color:var(--text-primary); }
.settings-nav-item.active { background:#edf2f6; background:var(--accent-grad-soft); color:#315d7b; color:var(--accent-1); font-weight:600; }
.settings-section { display:flex; flex-direction:column; gap:20px; }
.settings-panel { background:#ffffff; background:var(--bg-card); border:1px solid #e3e6e9; border:1px solid var(--border-light); border-radius:12px; border-radius:var(--radius-lg); padding:24px; }
.settings-panel h3 { font-size:1rem; font-weight:700; margin-bottom:20px; padding-bottom:14px; border-bottom:1px solid #e3e6e9; border-bottom:1px solid var(--border-light); }

/* ── User roles badges ───────────────────────────────────── */
.role-admin    { background:#edf2f6; background:var(--accent-grad-soft); color:#315d7b; color:var(--accent-1); }
.role-muhsib   { background:#edf5ef; background:var(--success-bg); color:#387052; color:var(--success); }
.role-anbardar { background:#edf2f6; background:var(--info-bg); color:#315d7b; color:var(--info); }
.role-kassir   { background:#faf3e7; background:var(--warning-bg); color:#936222; color:var(--warning); }
.role-ishci    { background:#f4f5f6; background:var(--bg-elevated); color:#525c67; color:var(--text-secondary); }

/* ── Stock warning ───────────────────────────────────────── */
.stock-critical { color:#a64e48; color:var(--danger); font-weight:700; }
.stock-low      { color:#936222; color:var(--warning); font-weight:600; }
.stock-ok       { color:#387052; color:var(--success); }

/* ── Customer portal ─────────────────────────────────────── */
.portal-hero {
  min-height:100vh; background:#f5f6f7; background:var(--bg-base);
  display:flex; align-items:center; justify-content:center;
  padding:24px;
}
.portal-card {
  background:#ffffff;
  background:var(--bg-card); border:1px solid #e3e6e9; border:1px solid var(--border-light);
  border-radius:16px;
  border-radius:var(--radius-xl); padding:36px;
  width:100%; max-width:600px;
  box-shadow:0 8px 30px rgba(25,35,45,0.12);
  box-shadow:var(--shadow-lg);
}
.portal-logo { text-align:center; margin-bottom:28px; }
.portal-logo h1 { font-size:1.6rem; font-weight:800; background:#315d7b; background:var(--accent-grad); -webkit-background-clip:text; -webkit-text-fill-color:transparent; }

/* ── Pagination ──────────────────────────────────────────── */
.pagination { display:flex; align-items:center; gap:6px; justify-content:center; margin-top:20px; }
.page-btn {
  width:34px; height:34px; border-radius:6px; border-radius:var(--radius-sm);
  background:#f4f5f6;
  background:var(--bg-elevated); color:#525c67; color:var(--text-secondary);
  font-size:0.83rem; display:flex; align-items:center; justify-content:center;
  transition:background-color 0.15s, border-color 0.15s, color 0.15s;
  transition:var(--transition);
}
.page-btn:hover { background:#eceff1; background:var(--bg-hover); color:#252a31; color:var(--text-primary); }
.page-btn.active { background:#315d7b; background:var(--accent-grad); color:#fff; }

/* ── Tooltip ─────────────────────────────────────────────── */
[data-tip] { position:relative; }
[data-tip]::after {
  content: attr(data-tip);
  position:absolute; bottom:calc(100% + 8px); left:50%; transform:translateX(-50%);
  background:#f4f5f6;
  background:var(--bg-elevated); color:#252a31; color:var(--text-primary);
  font-size:0.73rem; padding:6px 10px; border-radius:6px; border-radius:var(--radius-sm);
  white-space:nowrap; pointer-events:none; opacity:0;
  transition:opacity 0.2s; border:1px solid #d3d8de; border:1px solid var(--border);
  box-shadow:none;
  box-shadow:var(--shadow-sm);
}
[data-tip]:hover::after { opacity:1; }

/* Yığcam iş paneli. Hər iki tema eyni quruluşdan istifadə edir. */
:root, [data-theme="light"] {
  color-scheme: light;
  --accent-1: #315d7b;
  --accent-2: #315d7b;
  --accent-grad: var(--accent-1);
  --accent-grad-soft: #edf2f6;
  --bg-base: #f5f6f7;
  --bg-surface: #ffffff;
  --bg-elevated: #f4f5f6;
  --bg-hover: #eceff1;
  --bg-card: #ffffff;
  --text-primary: #252a31;
  --text-secondary: #525c67;
  --text-muted: #6b7480;
  --text-inverse: #ffffff;
  --border: #d3d8de;
  --border-light: #e3e6e9;
  --success: #387052;
  --success-bg: #edf5ef;
  --warning: #936222;
  --warning-bg: #faf3e7;
  --danger: #a64e48;
  --danger-bg: #fbefed;
  --info: #315d7b;
  --info-bg: #edf2f6;
  --sidebar-w: 228px;
  --sidebar-collapsed-w: 64px;
  --sidebar-bg: #fafbfc;
  --sidebar-border: #e0e4e8;
  --topbar-h: 60px;
  --shadow-sm: none;
  --shadow-md: 0 2px 8px rgba(25,35,45,0.06);
  --shadow-lg: 0 8px 30px rgba(25,35,45,0.12);
  --shadow-glow: none;
  --glass-bg: var(--bg-surface);
  --glass-border: var(--border);
  --glass-blur: none;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --transition: background-color 0.15s, border-color 0.15s, color 0.15s;
  --transition-slow: var(--transition);
  --font: 'Segoe UI', Arial, sans-serif;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg-base: #202326;
  --bg-surface: #282c30;
  --bg-card: #282c30;
  --bg-elevated: #30353a;
  --bg-hover: #373d43;
  --text-primary: #ebedf0;
  --text-secondary: #bcc4cc;
  --text-muted: #a1abb5;
  --border: #48515a;
  --border-light: #3b4249;
  --sidebar-bg: #24282c;
  --sidebar-border: #3b4249;
  --accent-grad-soft: #32414c;
  --success: #9ac5aa;
  --success-bg: #293e31;
  --warning: #dbbc86;
  --warning-bg: #40372a;
  --danger: #dfa8a2;
  --danger-bg: #422f2d;
  --info: #adc2d2;
  --info-bg: #2e3b46;
}
[data-theme="dark"] .nav-item.active, [data-theme="dark"] .text-accent,
[data-theme="dark"] .settings-nav-item.active { color: #315d7b; color: var(--info); }

html { scroll-behavior: auto; }
:focus-visible { outline: 2px solid #315d7b; outline: 2px solid var(--accent-1); outline-offset: 3px; }
.login-bg-orbs, .orb, .kpi-icon, .empty-icon { display: none; }
.glass, .modal-overlay { backdrop-filter: none; -webkit-backdrop-filter: none; }
.login-card, .portal-card { padding: 32px; box-shadow: none; animation: none; }
.login-screen { padding: 24px 16px; }
.login-screen .login-card {
  width: 100%; max-width: 420px; margin: auto; padding: 36px;
  border: 1px solid #e3e6e9;
  border: 1px solid var(--border-light); border-radius: 18px;
  box-shadow: 0 12px 40px rgba(25,35,45,0.06), 0 2px 6px rgba(25,35,45,0.03);
}
.login-screen .login-logo {
  margin-bottom: 28px; padding-bottom: 28px; gap: 14px;
  border-bottom: 1px solid #e3e6e9;
  border-bottom: 1px solid var(--border-light);
}
.login-screen .brand-mark {
  width: 48px; height: 48px; flex-shrink: 0; border-radius: 12px;
  font-size: 24px; font-weight: 600;
}
.login-screen .login-brand h1 { font-size: 26px; line-height: 1.2; letter-spacing: -0.6px; }
.login-screen .login-brand p { margin-top: 6px; font-size: 13px; color: #525c67; color: var(--text-secondary); }
.login-screen .login-form { gap: 22px; }
.login-screen .form-group { gap: 9px; }
.login-screen .form-group label { font-size: 13px; font-weight: 600; }
.login-screen .form-group input {
  min-height: 48px; padding: 12px 14px; font-size: 16px;
  border-radius: 9px; line-height: 1.4;
}
.login-screen .password-wrap input { padding-right: 52px; }
.login-screen .form-group input:focus { outline: none; box-shadow: 0 0 0 3px #edf2f6; box-shadow: 0 0 0 3px var(--accent-grad-soft); }
.login-screen .eye-btn {
  width: 40px; height: 40px; right: 4px; padding: 0; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
}
.login-screen .eye-btn:hover { background: #f4f5f6; background: var(--bg-elevated); }
.login-screen #login-btn {
  min-height: 48px; padding: 13px 18px; gap: 10px;
  border-radius: 9px; font-size: 15px; font-weight: 600;
}
.login-screen .login-error {
  padding: 12px 14px; font-size: 13px; line-height: 1.5;
  border: 1px solid #a64e48;
  border: 1px solid var(--danger); border-radius: 9px;
}
.login-screen .login-hint {
  margin-top: 24px; padding: 12px; border-radius: 8px;
  background: #f4f5f6;
  background: var(--bg-elevated); font-size: 12px; line-height: 1.5;
}
.login-screen .login-hint b { color: #252a31; color: var(--text-primary); font-weight: 600; }
@media (max-width:480px) {
  .login-screen .login-card { padding: 28px 24px; border-radius: 16px; }
  .login-screen .login-logo { padding-bottom: 24px; margin-bottom: 24px; }
}
.logo-icon { width: 40px; height: 40px; }
.logo-icon.small { width: 28px; height: 28px; }
.brand-mark {
  display: flex; align-items: center; justify-content: center;
  background: #315d7b;
  background: var(--accent-1); color: #fff; border-radius: 4px;
  font-size: 19px; font-weight: 600;
}
.brand-mark.small { font-size: 15px; }
.login-brand h1, .sidebar-brand, .portal-logo h1, .cash-total-box .amount {
  background: none; color: #252a31; color: var(--text-primary); -webkit-text-fill-color: currentColor;
  font-weight: 600; letter-spacing: -0.2px;
}
.sidebar-brand { font-size: 1.05rem; }
.sidebar-header { padding: 0 14px; gap: 10px; }
.sidebar-nav { padding: 10px 8px; }
.nav-section-label { font-size: 0.76rem; font-weight: 600; letter-spacing: 0; text-transform: none; padding: 14px 12px 5px; }
.nav-item { padding: 8px 12px; border: 0; }
.nav-item.active { border: 0; box-shadow: inset 2px 0 #315d7b; box-shadow: inset 2px 0 var(--accent-1); }
.nav-icon { display: flex; align-items: center; justify-content: center; width: 18px; }
.ui-icon { display: block; width: 18px; height: 18px; flex-shrink: 0; }
.sidebar.collapsed .sidebar-header { justify-content: center; padding: 0 8px; }
.sidebar.collapsed .logo-icon { display: none; }
.sidebar.collapsed .sidebar-footer { flex-direction: column; padding: 10px 4px; }
.user-avatar { background: #eceff1; background: var(--bg-hover); color: #525c67; color: var(--text-secondary); font-weight: 600; }
.logout-btn { color: #525c67; color: var(--text-secondary); background: transparent; }
.logout-btn:hover { background: #eceff1; background: var(--bg-hover); color: #252a31; color: var(--text-primary); }
.sidebar-toggle, .notification-bell, .mobile-menu-btn { background: transparent; }
.page-title { font-size: 1.05rem; font-weight: 600; }
.main-content, .topbar-left { min-width: 0; }
.topbar-date { color: #6b7480; color: var(--text-muted); font-size: 0.8rem; white-space: nowrap; }
.content-area { padding: 28px; }
.module-title { font-size: 1.3rem; font-weight: 600; letter-spacing: -0.3px; }
.module-header { margin-bottom: 20px; }
.overview-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.overview-header h1 { font-size: 1.3rem; font-weight: 600; }
.overview-header p { color: #6b7480; color: var(--text-muted); font-size: 0.86rem; margin-top: 4px; }
.btn { min-height: 36px; font-weight: 500; padding: 9px 14px; line-height: 1.2; }
.btn-sm { min-height: 30px; padding: 6px 10px; }
.btn-primary { background: #315d7b; background: var(--accent-1); box-shadow: none; }
.btn-primary:hover:not(:disabled) { background: #315d7b; background: var(--accent-1); -webkit-filter: brightness(0.9); filter: brightness(0.9); box-shadow: none; transform: none; }
.btn-icon.sm { width: auto; height: auto; min-height: 28px; padding: 4px 8px; }
.btn-icon { background: transparent; border: 1px solid #e3e6e9; border: 1px solid var(--border-light); color: #525c67; color: var(--text-secondary); }
.card, .kpi-card, .chart-container, .report-card { padding: 20px; }
.card-title, .chart-title { font-weight: 600; }
.card:hover { border-color: #e3e6e9; border-color: var(--border-light); }
.kpi-card::before { display: none; }
.kpi-card:hover, .kanban-card:hover, .laundry-job-card:hover { transform: none; box-shadow: none; }
.kpi-grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 0; border: 1px solid #e3e6e9; border: 1px solid var(--border-light); border-radius: 12px; border-radius: var(--radius-lg); overflow: hidden; background: #ffffff; background: var(--bg-surface); }
.kpi-grid .kpi-card { border: 0; border-radius: 0; border-right: 1px solid #e3e6e9; border-right: 1px solid var(--border-light); border-bottom: 1px solid #e3e6e9; border-bottom: 1px solid var(--border-light); padding: 20px 22px; }
.kpi-grid .kpi-card:nth-child(3n) { border-right: 0; }
.kpi-grid .kpi-card:nth-last-child(-n+3) { border-bottom: 0; }
.kpi-header { margin: 0; position: absolute; right: 16px; top: 16px; }
.kpi-value { font-size: 1.65rem; font-weight: 600; letter-spacing: -0.4px; line-height: 1.25; font-variant-numeric: tabular-nums; }
.kpi-label { font-size: 0.85rem; }
.kpi-badge { font-size: 0.73rem; font-weight: 500; border-radius: 3px; }
.table-wrap { background: #ffffff; background: var(--bg-surface); }
.table thead th { color: #525c67; color: var(--text-secondary); font-weight: 600; font-size: 0.8rem; text-transform: none; letter-spacing: 0; padding: 11px 14px; }
.table td { padding: 11px 14px; }
.table td b { font-weight: 600; }
.badge { font-weight: 500; border-radius: 3px; padding: 3px 7px; }
.badge-accent, .role-admin { color: #525c67; color: var(--text-secondary); background: #f4f5f6; background: var(--bg-elevated); }
.table-actions { gap: 5px; }
.form-group input, .form-group select, .form-group textarea { padding: 10px 12px; background: #ffffff; background: var(--bg-surface); }
.form-group label { font-weight: 500; letter-spacing: 0; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus, .search-bar input:focus { background: #ffffff; background: var(--bg-surface); box-shadow: 0 0 0 2px #edf2f6; box-shadow: 0 0 0 2px var(--accent-grad-soft); }
.search-bar input { background: #ffffff; background: var(--bg-surface); }
.search-icon { display: flex; align-items: center; }
.tabs { padding: 0; gap: 0; background: transparent; border: 1px solid #d3d8de; border: 1px solid var(--border); overflow: hidden; }
.tab-btn { padding: 8px 14px; border-radius: 0; font-weight: 500; color: #525c67; color: var(--text-secondary); }
.tab-btn + .tab-btn { border-left: 1px solid #d3d8de; border-left: 1px solid var(--border); }
.tab-btn.active { background: #f4f5f6; background: var(--bg-elevated); box-shadow: none; color: #252a31; color: var(--text-primary); }
.kanban-col { padding: 12px; background: #f4f5f6; background: var(--bg-elevated); }
.kanban-col-title { text-transform: none; letter-spacing: 0; font-weight: 600; }
.kanban-col-count { background: none; font-weight: 500; }
.kanban-col-header .badge { padding: 0; background: none; }
.laundry-job-card { padding: 12px; }
.laundry-job-card .stat-row { flex-wrap: wrap; gap: 4px 8px; }
.laundry-job-card .stat-row b { white-space: nowrap; }
.laundry-job-card .badge { background: none; color: #525c67; color: var(--text-secondary); padding: 0; }
.modal { animation: none; }
.modal-overlay { background: rgba(25,30,35,0.3); animation: none; }
.modal-header h3 { font-weight: 600; }
.toast { animation: none; min-width: 240px; }
.notif-panel { box-shadow: 0 2px 8px rgba(25,35,45,0.06); box-shadow: var(--shadow-md); }
.portal-hero { align-items: flex-start; padding: 40px 20px; }
.portal-card { max-width: 640px; }
.portal-logo { text-align: left; padding-bottom: 20px; border-bottom: 1px solid #e3e6e9; border-bottom: 1px solid var(--border-light); }
.portal-logo h1 { font-size: 1.35rem; }
.cash-total-box { background: #f4f5f6; background: var(--bg-elevated); border-color: #e3e6e9; border-color: var(--border-light); }
.cash-total-box .amount { font-size: 1.7rem; }
.debt-aging-item .aging-label { text-transform: none; letter-spacing: 0; }
.dashboard-grid-3 > .card { min-width: 0; }
.chart-container canvas { max-height: 240px; max-width: 100%; }
.settings-panel h3 { font-weight: 600; }
.service-item-row { display: grid; grid-template-columns: minmax(170px,2.4fr) repeat(5,minmax(70px,1fr)) minmax(90px,1fr); gap: 10px; align-items: end; padding: 14px 0; border-bottom: 1px solid #e3e6e9; border-bottom: 1px solid var(--border-light); }
.service-item-row .form-group { min-width: 0; }
.service-item-row select, .service-item-row input { min-width: 0; padding: 9px 8px; }
.service-line-sum { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding-bottom: 4px; font-weight: 600; }
.order-board { grid-template-columns: repeat(6,minmax(180px,1fr)); overflow-x: auto; }
.service-select label { white-space: nowrap; }
.skeleton { background: #f4f5f6; background: var(--bg-elevated); animation: none; }

@media (max-width:1100px) {
  .service-item-row { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .service-select { grid-column: span 2; }
  .dashboard-grid-3 { grid-template-columns: 1fr; }
  .dashboard-grid-3 > .card { grid-column: auto !important; }
}
@media (max-width:768px) {
  :root { --sidebar-w: 228px; }
  .sidebar { left: -228px; }
  .content-area { padding: 20px 16px; }
  .topbar { padding: 0 12px; }
  .topbar-left { gap: 8px; }
  .topbar-right { gap: 4px; }
  .topbar-date { display: none; }
  .page-title { font-size: 1rem; }
  .module-actions { gap: 8px; }
  .settings-grid { grid-template-columns: 1fr; }
  .settings-nav { flex-direction: row; flex-wrap: wrap; }
  .form-row.cols-3, .form-row.cols-4 { grid-template-columns: 1fr 1fr; }
  .finance-summary, .debt-aging-bar { gap: 10px; }
  .chart-header { flex-wrap: wrap; gap: 10px; }
}
@media (max-width:600px) {
  .service-item-row { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .service-select { grid-column: 1 / -1; }
  .order-board { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .kpi-grid .kpi-card { padding: 16px; border-right: 1px solid #e3e6e9; border-right: 1px solid var(--border-light); border-bottom: 1px solid #e3e6e9; border-bottom: 1px solid var(--border-light); }
  .kpi-grid .kpi-card:nth-child(3n) { border-right: 1px solid #e3e6e9; border-right: 1px solid var(--border-light); }
  .kpi-grid .kpi-card:nth-child(2n) { border-right: 0; }
  .kpi-grid .kpi-card:nth-last-child(-n+3) { border-bottom: 1px solid #e3e6e9; border-bottom: 1px solid var(--border-light); }
  .kpi-grid .kpi-card:nth-last-child(-n+2) { border-bottom: 0; }
  .kpi-grid .kpi-header { position: static; margin-bottom: 4px; }
  .kpi-value { font-size: 1.4rem; }
  .finance-summary { grid-template-columns: 1fr; }
  .debt-aging-bar { flex-wrap: wrap; }
  .debt-aging-item { flex-basis: 40%; }
  .portal-hero { padding: 16px 12px; }
  .portal-card { padding: 20px 16px; }
  .portal-card .card { padding: 16px; }
  .form-row { grid-template-columns: 1fr; }
  .login-card { margin: 16px; padding: 28px; }
}

@media print {
  .kpi-card { -webkit-column-break-inside: avoid; break-inside: avoid; }
  .content-area { padding: 0; }
}

/* Hesabat və bildirişlər: sabit ölçü, aydın rəqəmlər, rahat idarəetmə. */
.storage-recovery { display: flex; flex-direction: column; gap: 14px; font-size: 0.9rem; line-height: 1.6; color: #252a31; color: var(--text-primary); }
.setup-intro { color: #525c67; color: var(--text-secondary); font-size: 0.85rem; line-height: 1.65; margin-bottom: 14px; }
.setup-divider { display: flex; align-items: center; gap: 10px; color: #6b7480; color: var(--text-muted); font-size: 0.8rem; margin: 20px 0 12px; }
.setup-divider::before,.setup-divider::after { content: ''; flex: 1; height: 1px; background: #e3e6e9; background: var(--border-light); }
#setup-previous { margin-top: 10px; }
#setup-preview { background: #f4f5f6; background: var(--bg-elevated); border-radius: 8px; border-radius: var(--radius-md); padding: 14px; margin: 12px 0; font-size: 0.84rem; line-height: 1.7; }
#setup-preview .btn { margin-top: 10px; }
.login-screen { overflow-y: auto; }
.login-card { margin: auto; }
.card,.chart-container,.settings-panel,.cash-session-card { box-shadow: 0 2px 8px rgba(25,35,45,0.025); }
.getting-started { margin-bottom: 20px; }
.getting-started p { color: #525c67; color: var(--text-secondary); font-size: 0.85rem; line-height: 1.6; margin: 8px 0 16px; }
.storage-recovery input { width: 100%; min-width: 0; padding: 10px; border: 1px solid #d3d8de; border: 1px solid var(--border); border-radius: 6px; border-radius: var(--radius-sm); color: #252a31; color: var(--text-primary); background: #ffffff; background: var(--bg-surface); }
#portal-content.storage-recovery { padding: 24px; border: 1px solid #d3d8de; border: 1px solid var(--border); border-radius: 12px; border-radius: var(--radius-lg); background: #ffffff; background: var(--bg-surface); }
.reports-header { align-items: flex-start; flex-wrap: wrap; gap: 14px; }
.reports-header .module-actions { min-width: 0; max-width: 100%; }
.reports-header .tabs { max-width: 100%; overflow-x: auto; }
.reports-header .tab-btn { white-space: nowrap; flex-shrink: 0; }
.reports-content { min-width: 0; }
.reports-content .report-card { min-width: 0; box-shadow: 0 2px 8px rgba(25,35,45,0.025); }
.report-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; margin-bottom: 14px; }
.report-period-title { display: flex; flex-direction: column; gap: 5px; margin-right: auto; font-size: 0.9rem; }
.report-period-title span { color: #6b7480; color: var(--text-muted); font-size: 0.8rem; }
.report-period-inputs { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.report-period-inputs .form-group { margin: 0; }
.report-period-inputs label { font-size: 0.78rem; }
.report-period-inputs input { min-width: 145px; }
.report-presets { display: flex; flex-wrap: wrap; gap: 4px; }
.report-explanation { color: #6b7480; color: var(--text-muted); font-size: 0.84rem; line-height: 1.6; margin: 0 0 18px; }
.report-kpis.kpi-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
.report-kpis.kpi-grid .kpi-card { border-bottom: 0; border-right: 1px solid #e3e6e9; border-right: 1px solid var(--border-light); }
.report-kpis.kpi-grid .kpi-card:last-child { border-right: 0; }
.report-kpis .kpi-label { margin-top: 8px; }
.report-chart { position: relative; height: 280px; min-width: 0; }
.report-chart canvas { width: 100% !important; height: 100% !important; }
.report-empty { display: flex; justify-content: center; align-items: center; color: #6b7480; color: var(--text-muted); font-size: 0.85rem; text-align: center; }
.reports-content .stat-row { gap: 12px; font-size: 0.84rem; }
.reports-content .stat-row > span { min-width: 0; overflow-wrap: anywhere; }
.reports-content .stat-row > div { flex-shrink: 0; }
.notif-panel { width: min(430px,calc(100vw - 24px)); max-height: calc(100dvh - 60px - 24px); max-height: calc(100dvh - var(--topbar-h) - 24px); right: 12px; background: #ffffff; background: var(--bg-surface); box-shadow: 0 8px 30px rgba(25,35,45,0.12); box-shadow: var(--shadow-lg); animation: none; }
.notif-header { flex-shrink: 0; padding: 16px; }
.notif-list { min-height: 0; padding: 12px; }
.notif-tools { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 10px; }
[data-notice-search] { display: flex; gap: 6px; margin-bottom: 12px; }
[data-notice-search] input { min-width: 0; width: 100%; padding: 9px 10px; border: 1px solid #d3d8de; border: 1px solid var(--border); border-radius: 6px; border-radius: var(--radius-sm); color: #252a31; color: var(--text-primary); background: #ffffff; background: var(--bg-surface); }
.notif-results .notif-item { padding: 12px; border: 1px solid #e3e6e9; border: 1px solid var(--border-light); border-left-width: 3px; margin-bottom: 8px; }
.notif-item > div { min-width: 0; width: 100%; overflow-wrap: anywhere; }
.notif-item p { color: #6b7480; color: var(--text-muted); font-size: 0.76rem; margin-top: 6px; }
.notif-item.is-read { background: #f4f5f6; background: var(--bg-elevated); }
.notif-row-actions { display: flex; align-items: center; gap: 7px; margin-top: 9px; }
.notif-row-actions span { font-size: 0.76rem; color: #6b7480; color: var(--text-muted); }
.notif-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; border-top: 1px solid #e3e6e9; border-top: 1px solid var(--border-light); padding-top: 10px; margin-top: 10px; font-size: 0.76rem; color: #6b7480; color: var(--text-muted); }
.notif-empty { text-align: center; padding: 28px 12px; color: #6b7480; color: var(--text-muted); font-size: 0.85rem; }
@media (max-width:900px) { .report-kpis.kpi-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } .report-kpis.kpi-grid .kpi-card { border-bottom: 1px solid #e3e6e9; border-bottom: 1px solid var(--border-light); } .report-kpis.kpi-grid .kpi-card:nth-child(2n) { border-right: 0; } .report-kpis.kpi-grid .kpi-card:nth-last-child(-n+2) { border-bottom: 0; } }
@media (max-width:600px) { .report-period-inputs { width: 100%; } .report-period-inputs .form-group { flex: 1; min-width: 0; } .report-period-inputs input { width: 100%; min-width: 0; } .report-period-inputs > button { width: 100%; } .report-chart { height: 240px; } .report-kpis .kpi-value { font-size: 1.2rem; } .reports-content .report-card { padding: 16px; } }
@media print { .report-filters { display: none; } .report-grid { grid-template-columns: 1fr 1fr; } .report-chart { height: 220px; } }

/* One application: touch layout up to 768px, desktop layout above it. */
.mobile-field-label { display: none; }
.mobile-scroll { min-width: 0; max-width: 100%; overflow-x: auto; }
.sidebar-backdrop { display: none; }
@media screen and (max-width: 768px), screen and (max-width: 1024px) and (max-height: 500px) and (pointer: coarse) {
  :root { --topbar-h: 108px; }
  .app { height: 100dvh; }
  .main-content, .content-area, .card, .dashboard-grid > *, .report-grid > * { min-width: 0; }
  .content-area { padding: 20px max(12px,env(safe-area-inset-right)) max(24px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left)); }
  .topbar { display: grid; grid-template-columns: 44px minmax(0,1fr) 72px; grid-template-rows: 44px 44px; gap: 4px 8px; height: auto; padding: max(8px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) 8px max(12px,env(safe-area-inset-left)); }
  .topbar-left, .topbar-right { display: contents; }
  #mobile-menu-btn { grid-column: 1; grid-row: 1; }
  #page-title { grid-column: 2; grid-row: 1; overflow-wrap: anywhere; font-size: 1rem; }
  #notification-bell { grid-column: 3; grid-row: 1; justify-self: end; }
  #nav-back { grid-column: 1; grid-row: 2; }
  #nav-forward { grid-column: 2; grid-row: 2; justify-self: start; }
  #language-select { grid-column: 3; grid-row: 2; width: 72px; }
  .topbar-date { display: none; }
  button, .btn, .btn-sm, .btn-icon, .btn-icon.sm, .mobile-menu-btn, .notification-bell, .sidebar-toggle, .logout-btn, .modal-close, .nav-item, .tabs button, .pagination button { min-width: 44px; min-height: 44px; touch-action: manipulation; }
  .btn { white-space: normal; line-height: 1.35; }
  .btn-icon, .btn-icon.sm { width: auto; height: auto; }
  .btn-sm { padding: 10px 12px; }
  input:not([type=checkbox]):not([type=radio]), select, textarea { min-width: 0; max-width: 100%; min-height: 44px; font-size: 16px; }
  input[type=checkbox], input[type=radio] { width: 20px; height: 20px; }
  label:has(input[type=checkbox]), label:has(input[type=radio]) { min-height: 44px; }
  .search-box { min-width: 0; }
  .search-box input { width: 100%; }
  .module-header, .module-actions, .card-header, .chart-header, .chart-legend, .service-row-actions, .order-summary, .table-actions { flex-wrap: wrap; gap: 8px; }
  .module-header > *, .module-actions > *, .card-header > * { min-width: 0; max-width: 100%; }
  .module-actions { width: 100%; }
  .module-actions .search-box { flex: 1 1 160px; }
  .module-actions > select { flex: 1 1 120px; }
  .card { padding: 16px; }
  .kpi-grid, .report-kpis.kpi-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .kpi-value, .cash-total-box .amount { overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
  .kpi-label { overflow-wrap: anywhere; }
  .chart-container, .report-card { min-width: 0; }
  .chart-container canvas { max-width: 100%; }
  .chart-legend { font-size: 0.8rem; }
  .laundry-pipeline { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .kanban-card, .laundry-job-card, .order-col { min-width: 0; overflow-wrap: anywhere; }
  .sidebar, .sidebar.collapsed { width: min(300px,calc(100vw - 44px)); left: -320px; height: 100dvh; padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom); }
  .sidebar.mobile-open { left: 0; }
  .sidebar.collapsed .nav-label, .sidebar.collapsed .sidebar-brand, .sidebar.collapsed .user-details { display: block; }
  .sidebar.collapsed .nav-section-label:not(.hidden) { display: block; }
  .sidebar.collapsed .nav-item { justify-content: flex-start; padding: 8px 12px; }
  .sidebar.collapsed .sidebar-header { justify-content: initial; padding: 0 14px; }
  .sidebar.collapsed .logo-icon { display: flex; }
  .sidebar.collapsed .sidebar-footer { flex-direction: row; padding: 16px; }
  .sidebar-backdrop.is-open { display: block; position: fixed; inset: 0; background: rgba(25,30,35,.35); z-index: 998; }
  .modal-overlay { top: 0px; top: var(--visual-top,0px); bottom: auto; height: 100dvh; height: var(--visual-height,100dvh); padding: max(8px,env(safe-area-inset-top)) max(8px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left)); z-index: 1100; }
  .modal, .modal.modal-lg, .modal.modal-xl { max-height: 100%; border-radius: 12px; }
  .modal-header { padding: 12px 16px; gap: 10px; flex-shrink: 0; }
  .modal-header h3 { min-width: 0; overflow-wrap: anywhere; }
  .modal-close { flex-shrink: 0; }
  .modal-body { min-height: 0; padding: 16px; -ms-scroll-chaining: none; overscroll-behavior: contain; scroll-padding-bottom: 24px; }
  .modal-footer { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); padding: 12px 16px max(12px,env(safe-area-inset-bottom)); flex-shrink: 0; max-height: min(35dvh,calc(100dvh / 3)); max-height: min(35dvh,calc(var(--visual-height,100dvh) / 3)); overflow-y: auto; }
  .modal-footer > :only-child { grid-column: 1 / -1; }
  .form-row, .form-row.cols-3, .form-row.cols-4 { grid-template-columns: minmax(0,1fr); }
  .form-group { min-width: 0; }
  .service-item-row { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .service-select { grid-column: 1 / -1; }
  .table-wrap { max-width: 100%; min-width: 0; overscroll-behavior-x: contain; }
  /* List rows become labelled cards; comparison tables keep horizontal scrolling. */
  .mobile-records { position: relative; border: 0; background: transparent; }
  .mobile-records > table, .mobile-records tbody { display: block; width: 100%; }
  .mobile-records thead { position: absolute; top: 0; left: 0; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; -webkit-clip-path: inset(50%); clip-path: inset(50%); }
  .mobile-records tbody > tr { display: block; padding: 12px; margin-bottom: 12px; border: 1px solid #e3e6e9; border: 1px solid var(--border-light); border-radius: 12px; background: #ffffff; background: var(--bg-surface); }
  .mobile-records td { display: grid; grid-template-columns: minmax(0,100px) minmax(0,1fr); gap: 8px; white-space: normal; padding: 8px 0; overflow-wrap: anywhere; }
  .mobile-records .mobile-field-label { display: block; color: #6b7480; color: var(--text-muted); font-size: 0.8rem; font-weight: 500; }
  .mobile-field-value { min-width: 0; }
  .mobile-records td.mobile-wide { display: block; }
  .mobile-records td.mobile-wide .mobile-field-label { margin-bottom: 8px; }
  .mobile-records .table-actions { display: flex; flex-wrap: wrap; }
  .mobile-records td[colspan] { display: block; text-align: center; }
  .mobile-records tbody > tr:last-child { border-bottom: 1px solid #e3e6e9; border-bottom: 1px solid var(--border-light); }
  .notif-panel { top: calc(60px + env(safe-area-inset-top)); top: calc(var(--topbar-h) + env(safe-area-inset-top)); max-height: calc(100dvh - 60px - env(safe-area-inset-top) - 16px); max-height: calc(100dvh - var(--topbar-h) - env(safe-area-inset-top) - 16px); }
  .notif-header button, .notif-tools button, .notif-row-actions button { min-height: 44px; min-width: 44px; }
  .toast-container { right: 12px; bottom: max(12px,env(safe-area-inset-bottom)); max-width: calc(100vw - 24px); }
  .portal-hero { min-height: 100dvh; padding: max(16px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) max(16px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left)); }
  .portal-card { padding: 20px 16px; }
  .portal-card .card { padding: 16px; }
}
@media screen and (max-width: 360px) {
  .laundry-pipeline, .service-item-row { grid-template-columns: minmax(0,1fr); }
  .service-select { grid-column: auto; }
  .card-header { align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  .sidebar, .btn, .card { transition: none; }
  .modal, .modal-overlay, .toast { animation: none; }
}

/* Customer journey uses the application's typography, colors and focus styles. */
.portal-hero { background:#f5f6f7; background:var(--bg-base); padding:32px 20px; }
#portal-content { width:100%; max-width:800px; }
#portal-content [hidden], #modal [hidden] { display:none!important; }
#portal-content { color:#252a31; color:var(--text-primary); line-height:1.6; }
#portal-content h1 { font-size:clamp(1.75rem,5vw,2.65rem); line-height:1.2; letter-spacing:-.035em; margin:12px 0 18px; }
#portal-content h2 { font-size:1.3rem; margin:0; }
#portal-content h3 { font-size:1.08rem; margin:0; }
#portal-content p { margin:10px 0; }
#portal-content .portal-card { width:100%; max-width:none; margin:20px 0; padding:28px; border:1px solid #d3d8de; border:1px solid var(--border); border-radius:20px; background:#ffffff; background:var(--bg-surface); }
.portal-brand { display:flex; align-items:center; gap:12px; padding:4px 2px 22px; }
.portal-brand small,.portal-price-line small { display:block; color:#6b7480; color:var(--text-muted); }
.portal-brand-mark { width:42px; height:42px; display:grid; place-items:center; border-radius:13px; background:#315d7b; background:var(--accent-1); color:white; font-size:25px; }
.portal-private { margin-left:auto; font-size:.76rem; color:#6b7480; color:var(--text-muted); white-space:nowrap; }
.portal-intro { padding:24px 28px; border-radius:20px; background:#ffffff; background:var(--bg-surface); border:1px solid #d3d8de; border:1px solid var(--border); }
.portal-eyebrow { color:#315d7b; color:var(--accent-1); font-weight:600; font-size:.84rem; }
.portal-intro>p { max-width:600px; color:#525c67; color:var(--text-secondary); }
.portal-assurances { display:flex; flex-wrap:wrap; gap:8px 18px; font-size:.82rem; }
.portal-tabs { display:flex; gap:8px; padding:16px 0 0; }
.portal-tabs a { flex:1; text-align:center; display:flex; align-items:center; justify-content:center; padding:10px 5px; min-height:44px; border-radius:12px; border:1px solid #d3d8de; border:1px solid var(--border); color:#252a31; color:var(--text-primary); background:#ffffff; background:var(--bg-surface); font-weight:600; font-size:.85rem; text-decoration:none; }
.portal-section-title { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:12px; }
.portal-steps { display:flex; list-style:none; padding:0; margin:18px 0 24px; gap:6px; counter-reset:step; }
.portal-steps li { flex:1; border-bottom:3px solid #d3d8de; border-bottom:3px solid var(--border); padding:8px 0; font-size:.8rem; color:#6b7480; color:var(--text-muted); }
.portal-steps li:before { counter-increment:step; content:counter(step) '. '; }
.portal-steps li.active { color:#315d7b; color:var(--accent-1); border-color:#315d7b; border-color:var(--accent-1); font-weight:700; }
.portal-product,.pq-row { min-width:0; padding:18px; margin:0 0 16px; border:1px solid #d3d8de; border:1px solid var(--border); border-radius:14px; }
.portal-product legend,.pq-row legend { padding:0 8px; font-size:.86rem; font-weight:600; }
#portal-content .form-group,.pq-row .form-group { margin-bottom:16px; min-width:0; }
#portal-content input:not([type=checkbox]), #portal-content select,#portal-content textarea { width:100%; min-height:48px; font-size:16px; border-radius:10px; }
#portal-content input:focus-visible,#portal-content select:focus-visible,#portal-content textarea:focus-visible,#portal-content button:focus-visible,#portal-content a:focus-visible,#portal-content summary:focus-visible { outline:3px solid #315d7b; outline:3px solid var(--accent-1); outline-offset:3px; }
#portal-content .btn { min-height:46px; white-space:normal; line-height:1.4; }
.portal-hint,.portal-admin-note { padding:16px; margin:16px 0; border:1px solid #d3d8de; border:1px solid var(--border); border-left:3px solid #315d7b; border-left:3px solid var(--accent-1); border-radius:10px; font-size:.88rem; }
.portal-actions { display:flex; flex-wrap:wrap; gap:10px; margin:16px 0; }
.portal-actions .btn { flex:1; min-width:130px; }
.portal-order { padding:22px 0; border-top:1px solid #d3d8de; border-top:1px solid var(--border); }
.portal-order-state { font-size:.78rem; text-align:right; color:#315d7b; color:var(--accent-1); font-weight:600; }
.portal-quote { border:1px solid #d3d8de; border:1px solid var(--border); padding:20px; border-radius:14px; margin:18px 0 0; }
.portal-price-line { display:flex; align-items:flex-start; justify-content:space-between; gap:14px; padding:12px 0; border-bottom:1px solid #d3d8de; border-bottom:1px solid var(--border); font-size:.88rem; }
.portal-price-line>div { min-width:0; overflow-wrap:anywhere; }
.portal-price-line>b { white-space:nowrap; }
.portal-total { display:flex; justify-content:space-between; align-items:center; gap:12px; margin:16px 0; font-weight:700; }
.portal-total strong { font-size:1.7rem; color:#315d7b; color:var(--accent-1); white-space:nowrap; }
.portal-consent { display:flex!important; align-items:flex-start; gap:12px; padding:14px 0; font-size:.9rem; cursor:pointer; }
.portal-consent input { flex:0 0 22px; width:22px; height:22px; margin-top:3px; accent-color:#315d7b; accent-color:var(--accent-1); }
.portal-confirmed { font-weight:600; color:#252a31; color:var(--text-primary); }
.portal-preline { white-space:pre-wrap; overflow-wrap:anywhere; }
#portal-content summary { min-height:44px; display:list-item; padding:10px 0; cursor:pointer; font-size:.88rem; font-weight:600; }
.portal-empty { padding:20px 0; color:#6b7480; color:var(--text-muted); font-size:.9rem; }
.portal-message { display:flex; gap:14px; padding:18px 0; border-bottom:1px solid #d3d8de; border-bottom:1px solid var(--border); }
.portal-message-dot { flex:0 0 8px; width:8px; height:8px; border-radius:50%; background:#315d7b; background:var(--accent-1); margin-top:8px; }
.portal-message p { font-size:.9rem; }
.portal-message small,.portal-footer { color:#6b7480; color:var(--text-muted); font-size:.8rem; }
.portal-footer { text-align:center; padding:10px 16px 24px; }
.portal-footer a { display:inline-block; padding:12px; }
#portal-request-panel { margin-top:24px; }
.portal-request-entry { display:flex; width:100%; justify-content:space-between; align-items:center; gap:16px; border:0; border-bottom:1px solid #d3d8de; border-bottom:1px solid var(--border); background:transparent; color:#252a31; color:var(--text-primary); text-align:left; padding:16px 0; cursor:pointer; }
.portal-request-entry span { min-width:0; overflow-wrap:anywhere; }
.portal-request-entry span:last-child { font-size:.82rem; text-align:right; }
.portal-request-entry small { display:block; color:#6b7480; color:var(--text-muted); }
@media(max-width:600px) {
 .portal-hero { padding:max(16px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) max(20px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left)); }
 #portal-content .portal-card { padding:20px 16px; border-radius:16px; }
 .portal-intro { padding:24px 20px; }
 .portal-product,.pq-row { padding:14px 12px; }
 .portal-quote { padding:16px 12px; }
 .portal-brand b { font-size:.88rem; }
 .portal-brand small { font-size:.73rem; }
 .portal-private { font-size:.68rem; }
 .portal-steps li { font-size:.72rem; }
 #portal-content .form-row { grid-template-columns:1fr; }
 .portal-actions { flex-direction:column; }
 .portal-actions .btn { width:100%; }
 .portal-order>.portal-section-title { align-items:flex-start; }
 .portal-order-state { max-width:52%; }
 .portal-price-line { font-size:.8rem; gap:8px; }
 .portal-total strong { font-size:1.4rem; }
}
@media(prefers-reduced-motion:reduce) { #portal-content * { scroll-behavior:auto; animation:none; transition:none; } }

.pwa-launcher { margin-top: 16px; text-align: center; }
.pwa-launcher button { min-height: 44px; width: 100%; padding: 10px 14px; font: inherit; font-size: 14px; color: #252a31; color: var(--text-primary); background: #ffffff; background: var(--bg-surface); border: 1px solid #d3d8de; border: 1px solid var(--border); border-radius: 8px; cursor: pointer; }
/* Keep the launcher off application forms, tables and the phone keyboard. */
body:has(#app:not(.hidden)) .pwa-launcher, body:has(.modal-overlay:not(.hidden)) .pwa-launcher { display: none; }
.pwa-help[hidden], .pwa-launcher [hidden], .pwa-help [hidden] { display: none !important; }
.pwa-help { position: fixed; inset: 0; z-index: 5000; display: grid; place-items: center; padding: max(12px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left)); background: rgba(0,0,0,.45); }
.pwa-help-card { width: min(100%,440px); max-height: calc(100dvh - 24px); max-height: calc(var(--visual-height,100dvh) - 24px); overflow: auto; border-radius: 12px; padding: 20px; color: #252a31; color: var(--text-primary); background: #ffffff; background: var(--bg-surface); box-shadow: 0 10px 40px rgba(0,0,0,.2); }
.pwa-help-card h2 { font-size: 20px; margin-bottom: 12px; }
.pwa-help-card p { line-height: 1.6; margin-bottom: 16px; overflow-wrap: anywhere; }
.pwa-help-card button { min-height: 44px; }
.pwa-help-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* Feature fallbacks belong to the same application, not a separate old mode. */
.erp-old-focus a:focus, .erp-old-focus button:focus, .erp-old-focus input:focus, .erp-old-focus select:focus, .erp-old-focus textarea:focus, .erp-old-focus summary:focus { outline:2px solid #315d7b; outline-offset:2px; }
.erp-old-layout .sidebar { height:100vh; }
.erp-old-layout .app { height:100vh; }
.erp-old-layout .notif-panel { width:400px; max-width:calc(100vw - 24px); max-height:calc(100vh - 90px); }
.erp-old-layout #portal-content h1 { font-size:2rem; }
.erp-old-layout .portal-hero { min-height:100vh; }
.erp-old-layout .pwa-help { top:0; right:0; bottom:0; left:0; padding:12px; }
.erp-no-grid .pwa-help { display:flex; align-items:center; justify-content:center; }
.erp-old-layout .modal-overlay { top:0; right:0; bottom:0; left:0; height:100vh; padding:12px; }
.erp-no-grid .kpi-grid, .erp-no-grid .dashboard-grid, .erp-no-grid .dashboard-grid-3, .erp-no-grid .report-grid, .erp-no-grid .laundry-pipeline, .erp-no-grid .form-row, .erp-no-grid .service-item-row { display:flex; flex-wrap:wrap; }
.erp-no-grid .dashboard-grid-3 > * { flex:1 1 220px; min-width:0; margin-bottom:16px; }
.erp-no-grid .kpi-grid > *, .erp-no-grid .dashboard-grid > *, .erp-no-grid .report-grid > *, .erp-no-grid .laundry-pipeline > * { flex:1 1 220px; min-width:0; margin-bottom:16px; }
.erp-no-grid .form-row > * { flex:1 1 180px; min-width:0; padding-right:12px; }
.erp-no-grid .service-item-row > * { flex:1 1 120px; min-width:0; margin:4px; }
.erp-no-grid .portal-brand-mark { display:flex; align-items:center; justify-content:center; }
.erp-no-flex-gap .portal-tabs > * + *, .erp-no-flex-gap .portal-brand > * + *, .erp-no-flex-gap .portal-actions > * + *, .erp-no-flex-gap .module-actions > * + *, .erp-no-flex-gap .table-actions > * + *, .erp-no-flex-gap .topbar-right > * + * { margin-left:8px; }
.erp-no-flex-gap .portal-message-dot { margin-right:14px; }
.erp-no-flex-gap .nav-icon { margin-right:10px; }
.erp-no-flex-gap .sidebar-header .logo-icon { margin-right:8px; }
.erp-no-flex-gap .topbar-left > * + * { margin-left:8px; }
@media screen and (max-width:768px) {
  .erp-old-layout .content-area { padding:20px 12px 24px; }
  .erp-old-layout .sidebar, .erp-old-layout .sidebar.collapsed { width:280px; max-width:calc(100vw - 44px); padding:0; }
  .erp-old-layout .sidebar-backdrop { top:0; right:0; bottom:0; left:0; }
  .erp-old-layout .modal-footer { padding:12px 16px; max-height:35vh; }
  .erp-old-layout .topbar { padding:8px 12px; }
  .erp-old-layout .portal-hero { padding:16px 12px; }
  .erp-no-grid .topbar { display:flex; flex-wrap:wrap; height:auto; }
  .erp-no-grid .topbar-left, .erp-no-grid .topbar-right { display:flex; width:100%; align-items:center; justify-content:space-between; }
  .erp-no-grid .topbar-left { margin-bottom:4px; }
  .erp-no-grid #page-title { flex:1; margin:0 10px; min-width:0; }
  .erp-no-grid .topbar-right { flex-direction:row-reverse; }
  .erp-no-grid .form-row, .erp-no-grid .form-row.cols-3, .erp-no-grid .form-row.cols-4 { display:block; }
  .erp-no-grid .form-row > * { padding-right:0; }
  .erp-no-grid .kpi-grid > *, .erp-no-grid .laundry-pipeline > * { flex-basis:45%; }
  .erp-no-grid .dashboard-grid > *, .erp-no-grid .report-grid > * { flex-basis:100%; }
  .erp-no-grid .modal-footer { display:flex; flex-wrap:wrap; }
  .erp-no-grid .modal-footer > * { flex:1 1 100px; margin:4px; }
  .erp-no-grid .mobile-records td { display:flex; flex-wrap:wrap; }
  .erp-no-grid .mobile-field-label { width:100px; flex-shrink:0; }
  .erp-no-grid .mobile-field-value { flex:1; }
  .erp-no-grid .mobile-records td.mobile-wide { display:block; }
  .erp-no-grid .mobile-records thead { clip:rect(0,0,0,0); }
}
