/* ── LOCAL FONTS (Inter + Poppins — identiques au prototype React original) ── */

/* Inter latin-ext (accents, caracteres speciaux) */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/inter-latin-ext-400-normal.woff2') format('woff2'),
       url('../fonts/inter-latin-ext-400-normal.woff') format('woff');
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/inter-latin-ext-500-normal.woff2') format('woff2'),
       url('../fonts/inter-latin-ext-500-normal.woff') format('woff');
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/inter-latin-ext-600-normal.woff2') format('woff2'),
       url('../fonts/inter-latin-ext-600-normal.woff') format('woff');
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/inter-latin-ext-700-normal.woff2') format('woff2'),
       url('../fonts/inter-latin-ext-700-normal.woff') format('woff');
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Inter latin (caracteres de base) */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/inter-latin-400-normal.woff2') format('woff2'),
       url('../fonts/inter-latin-400-normal.woff') format('woff');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/inter-latin-500-normal.woff2') format('woff2'),
       url('../fonts/inter-latin-500-normal.woff') format('woff');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/inter-latin-600-normal.woff2') format('woff2'),
       url('../fonts/inter-latin-600-normal.woff') format('woff');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/inter-latin-700-normal.woff2') format('woff2'),
       url('../fonts/inter-latin-700-normal.woff') format('woff');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Poppins latin-ext */
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/poppins-latin-ext-500-normal.woff2') format('woff2'),
       url('../fonts/poppins-latin-ext-500-normal.woff') format('woff');
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/poppins-latin-ext-600-normal.woff2') format('woff2'),
       url('../fonts/poppins-latin-ext-600-normal.woff') format('woff');
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/poppins-latin-ext-700-normal.woff2') format('woff2'),
       url('../fonts/poppins-latin-ext-700-normal.woff') format('woff');
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Poppins latin */
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/poppins-latin-500-normal.woff2') format('woff2'),
       url('../fonts/poppins-latin-500-normal.woff') format('woff');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/poppins-latin-600-normal.woff2') format('woff2'),
       url('../fonts/poppins-latin-600-normal.woff') format('woff');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/poppins-latin-700-normal.woff2') format('woff2'),
       url('../fonts/poppins-latin-700-normal.woff') format('woff');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* GH Gestion Hoteliere v3 - N'Djamena, Tchad */
/* Fonts systeme - pas de dependance externe */
/* Pour Inter et Poppins, telechargez et placez dans css/fonts/
   Sinon les polices systeme sont utilisees comme fallback */

:root {
  --radius: 0.75rem;
  --background: oklch(0.985 0.005 250);
  --foreground: oklch(0.18 0.04 260);
  --surface: oklch(1 0 0);
  --card: oklch(1 0 0);
  --card-foreground: oklch(0.18 0.04 260);
  --primary: oklch(0.24 0.07 260);
  --primary-foreground: oklch(0.985 0.005 250);
  --secondary: oklch(0.96 0.01 255);
  --secondary-foreground: oklch(0.24 0.07 260);
  --muted: oklch(0.96 0.008 250);
  --muted-foreground: oklch(0.5 0.025 258);
  --success: oklch(0.65 0.16 155);
  --success-foreground: oklch(0.99 0.005 150);
  --warning: oklch(0.74 0.16 65);
  --warning-foreground: oklch(0.2 0.05 60);
  --destructive: oklch(0.6 0.22 25);
  --destructive-foreground: oklch(0.99 0.005 0);
  --info: oklch(0.62 0.14 250);
  --info-foreground: oklch(0.99 0.005 250);
  --gold: oklch(0.78 0.12 85);
  --border: oklch(0.92 0.01 255);
  --input: oklch(0.92 0.01 255);
  --ring: oklch(0.45 0.12 258);
  --sidebar-bg: oklch(0.2 0.06 262);
  --sidebar-fg: oklch(0.92 0.01 250);
  --sidebar-fg-muted: oklch(0.65 0.02 250);
  --sidebar-accent: oklch(0.27 0.07 262);
  --sidebar-border: oklch(0.3 0.06 262);
  --shadow-soft: 0 1px 2px oklch(0.2 0.04 260 / 0.05), 0 1px 3px oklch(0.2 0.04 260 / 0.07);
  --shadow-card: 0 4px 16px -4px oklch(0.2 0.04 260 / 0.1), 0 2px 6px -2px oklch(0.2 0.04 260 / 0.06);
  --shadow-elevated: 0 20px 40px -12px oklch(0.15 0.05 260 / 0.2);
  --shadow-glow: 0 0 0 1px oklch(0.55 0.18 250 / 0.2), 0 8px 32px -8px oklch(0.45 0.18 250 / 0.4);
  --sidebar-w: 256px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--background);
  color: var(--foreground);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}
h1,h2,h3,h4 { font-family: 'Poppins', 'Segoe UI', Arial, sans-serif; letter-spacing: -0.015em; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
img { display: block; max-width: 100%; }
input, textarea, select { font-family: inherit; }

/* ── LAYOUT ── */
.app-shell { display: flex; min-height: 100vh; }
.app-main { margin-left: var(--sidebar-w); flex: 1; display: flex; flex-direction: column; min-width: 0; transition: margin-left 0.3s; }
.app-main.sidebar-collapsed { margin-left: 0; }
.page-content { flex: 1; padding: 1.5rem; }

/* ── SIDEBAR ── */
.sidebar {
  width: var(--sidebar-w);
  position: fixed; top: 0; left: 0; bottom: 0;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-border);
  display: flex; flex-direction: column;
  z-index: 40;
  overflow: hidden;
  transition: transform 0.3s ease, width 0.3s ease;
}
.sidebar.hidden { transform: translateX(-100%); }
.sidebar-scroll { flex: 1; overflow-y: auto; overflow-x: hidden; }
.sidebar-scroll::-webkit-scrollbar { width: 3px; }
.sidebar-scroll::-webkit-scrollbar-thumb { background: var(--sidebar-border); border-radius: 2px; }

.sidebar-header {
  padding: 1rem 1rem 0.875rem;
  border-bottom: 1px solid var(--sidebar-border);
  flex-shrink: 0;
}
.sidebar-logo { display: flex; align-items: center; gap: 0.75rem; }
.sidebar-logo-icon {
  width: 36px; height: 36px; border-radius: 0.5rem; flex-shrink: 0;
  background: linear-gradient(135deg, var(--info), var(--primary));
  box-shadow: var(--shadow-glow);
  display: flex; align-items: center; justify-content: center;
}
.sidebar-logo-icon svg { color: white; width: 20px; height: 20px; }
.sidebar-logo-name { font-family: 'Poppins', sans-serif; font-size: 1rem; font-weight: 700; color: var(--sidebar-fg); line-height: 1.1; }
.sidebar-logo-sub { font-size: 0.6875rem; color: var(--sidebar-fg-muted); margin-top: 1px; }

.sidebar-section { padding: 0.625rem 0.5rem 0; }
.sidebar-section-label {
  font-size: 0.625rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--sidebar-fg-muted); padding: 0.375rem 0.75rem 0.25rem; display: block;
}
.sidebar-nav { list-style: none; }

.snav-link, .snav-parent-btn {
  display: flex; align-items: center; gap: 0.625rem;
  padding: 0.5rem 0.75rem; border-radius: 0.5rem; margin: 1px 0;
  font-size: 0.8125rem; font-weight: 400;
  color: var(--sidebar-fg); background: none; border: none;
  cursor: pointer; width: 100%; text-align: left; text-decoration: none;
  transition: background 0.12s, color 0.12s;
}
.snav-link:hover, .snav-parent-btn:hover { background: oklch(1 0 0 / 0.07); color: white; }
.snav-link.active { background: oklch(1 0 0 / 0.12); color: white; font-weight: 500; }
.snav-icon { width: 17px; height: 17px; flex-shrink: 0; opacity: 0.85; }
.snav-label { flex: 1; }
.snav-chevron { width: 14px; height: 14px; opacity: 0.5; transition: transform 0.2s; flex-shrink: 0; }
.snav-parent-btn.open .snav-chevron { transform: rotate(90deg); }

.snav-sub { list-style: none; max-height: 0; overflow: hidden; transition: max-height 0.25s ease; }
.snav-sub.open { max-height: 300px; }
.snav-sub-link {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.375rem 0.75rem 0.375rem 2.125rem;
  margin: 1px 0; border-radius: 0.375rem;
  font-size: 0.78125rem; color: oklch(0.75 0.02 250);
  background: none; border: none; cursor: pointer;
  width: 100%; text-align: left; text-decoration: none;
  transition: background 0.12s, color 0.12s;
}
.snav-sub-link:hover { background: oklch(1 0 0 / 0.06); color: var(--sidebar-fg); }
.snav-sub-link.active { background: oklch(1 0 0 / 0.1); color: white; font-weight: 500; }
.snav-sub-icon { width: 13px; height: 13px; flex-shrink: 0; }

.sidebar-footer {
  padding: 0.875rem 1rem; border-top: 1px solid var(--sidebar-border); flex-shrink: 0;
}
.sidebar-user { display: flex; align-items: center; gap: 0.75rem; }
.sidebar-avatar {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--gold), var(--warning));
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8125rem; font-weight: 700; color: oklch(0.2 0.05 60);
}
.sidebar-user-name { font-size: 0.8125rem; font-weight: 600; color: var(--sidebar-fg); line-height: 1.2; }
.sidebar-user-role { font-size: 0.6875rem; color: var(--sidebar-fg-muted); }

/* ── HEADER ── */
.app-header {
  height: 60px; position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0 1.25rem;
  border-bottom: 1px solid var(--border);
  background: oklch(1 0 0 / 0.85);
  backdrop-filter: blur(12px);
}
.sidebar-toggle-btn {
  width: 34px; height: 34px; border-radius: 0.5rem;
  display: flex; align-items: center; justify-content: center;
  border: none; background: none; color: var(--muted-foreground);
  cursor: pointer; transition: background 0.12s, color 0.12s; flex-shrink: 0;
}
.sidebar-toggle-btn:hover { background: var(--muted); color: var(--foreground); }
.header-search {
  position: relative; flex: 1; max-width: 420px;
}
.header-search svg { position: absolute; left: 0.75rem; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--muted-foreground); pointer-events: none; }
.header-search input {
  width: 100%; height: 36px; padding: 0 0.75rem 0 2.2rem;
  border-radius: 0.5rem; border: 1px solid transparent;
  background: oklch(0.96 0.008 250 / 0.6);
  font-size: 0.8125rem; color: var(--foreground); outline: none;
  transition: background 0.15s, border-color 0.15s;
}
.header-search input:focus { background: white; border-color: var(--border); }
.header-search input::placeholder { color: var(--muted-foreground); }
.header-end { margin-left: auto; display: flex; align-items: center; gap: 0.25rem; }
.h-icon-btn {
  width: 34px; height: 34px; border-radius: 0.5rem; border: none; background: none;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  color: var(--foreground); position: relative; transition: background 0.12s;
}
.h-icon-btn:hover { background: var(--muted); }
.h-icon-btn svg { width: 17px; height: 17px; }
.h-badge {
  position: absolute; top: -1px; right: -1px;
  min-width: 16px; height: 16px; border-radius: 9999px; padding: 0 3px;
  font-size: 9px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; line-height: 1;
}
.h-badge-info { background: var(--info); color: white; }
.h-badge-red { background: var(--destructive); color: white; }
.h-divider { width: 1px; height: 28px; background: var(--border); margin: 0 0.25rem; }
.h-user-btn {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.2rem 0.6rem 0.2rem 0.2rem;
  border-radius: 9999px; border: none; background: none; cursor: pointer;
  transition: background 0.12s;
}
.h-user-btn:hover { background: var(--muted); }
.h-avatar {
  width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--info), var(--primary));
  display: flex; align-items: center; justify-content: center;
  font-size: 0.6875rem; font-weight: 700; color: white;
}
.h-user-name { font-size: 0.8125rem; font-weight: 500; line-height: 1.2; }
.h-user-sub { font-size: 0.6875rem; color: var(--muted-foreground); }

/* Dropdown */
.dropdown-wrap { position: relative; }
.dropdown-menu {
  position: absolute; right: 0; top: calc(100% + 6px);
  min-width: 200px; background: white; border: 1px solid var(--border);
  border-radius: 0.625rem; box-shadow: var(--shadow-card); z-index: 60;
  overflow: hidden;
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity 0.15s, transform 0.15s, visibility 0.15s;
}
.dropdown-menu.open { opacity: 1; visibility: visible; transform: translateY(0); }
.dd-label { padding: 0.625rem 0.875rem 0.375rem; font-size: 0.75rem; font-weight: 600; color: var(--muted-foreground); }
.dd-sep { height: 1px; background: var(--border); margin: 0.25rem 0; }
.dd-item {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.5rem 0.875rem; font-size: 0.8125rem;
  background: none; border: none; cursor: pointer; width: 100%;
  color: var(--foreground); transition: background 0.1s; text-decoration: none;
}
.dd-item:hover { background: var(--muted); }
.dd-item svg { width: 15px; height: 15px; flex-shrink: 0; }
.dd-item.danger { color: var(--destructive); }
.dd-item.danger:hover { background: oklch(0.6 0.22 25 / 0.06); }

/* ── PAGE HEADER ── */
.page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.page-title { font-family: 'Poppins', sans-serif; font-size: 1.5rem; font-weight: 700; line-height: 1.2; }
.page-subtitle { font-size: 0.875rem; color: var(--muted-foreground); margin-top: 0.25rem; }
.page-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }

/* ── CARDS ── */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); }
.shadow-soft { box-shadow: var(--shadow-soft); }
.shadow-card { box-shadow: var(--shadow-card); }
.shadow-elevated { box-shadow: var(--shadow-elevated); }
.card-header { padding: 1.125rem 1.375rem 0.625rem; }
.card-title { font-family: 'Poppins', sans-serif; font-size: 0.9375rem; font-weight: 600; }
.card-subtitle { font-size: 0.75rem; color: var(--muted-foreground); margin-top: 0.125rem; }
.card-body { padding: 1.125rem 1.375rem; }
.card-body-flush { padding: 0; }

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.375rem;
  padding: 0.5rem 1rem; border-radius: calc(var(--radius) - 2px);
  font-size: 0.8125rem; font-weight: 500; border: 1px solid transparent;
  cursor: pointer; transition: background 0.12s, opacity 0.12s, transform 0.1s;
  font-family: inherit; line-height: 1; white-space: nowrap; text-decoration: none;
}
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; }
.btn svg { width: 15px; height: 15px; flex-shrink: 0; }
.btn-sm { padding: 0.35rem 0.75rem; font-size: 0.75rem; }
.btn-sm svg { width: 13px; height: 13px; }
.btn-icon { width: 34px; height: 34px; padding: 0; }
.btn-icon-sm { width: 30px; height: 30px; padding: 0; }
.btn-icon-xs { width: 26px; height: 26px; padding: 0; }
.btn-primary { background: var(--primary); color: var(--primary-foreground); }
.btn-primary:hover { background: oklch(0.28 0.07 260); }
.btn-outline { background: transparent; border-color: var(--border); color: var(--foreground); }
.btn-outline:hover { background: var(--muted); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--foreground); }
.btn-ghost:hover { background: var(--muted); }
.btn-danger { background: var(--destructive); color: var(--destructive-foreground); }
.btn-danger:hover { background: oklch(0.55 0.22 25); }
.btn-success { background: var(--success); color: var(--success-foreground); }
.w-full { width: 100%; }

/* ── INPUTS ── */
.input, .select-input {
  display: block; width: 100%; height: 38px; padding: 0 0.75rem;
  border-radius: calc(var(--radius) - 2px); border: 1px solid var(--input);
  background: white; font-size: 0.8125rem; color: var(--foreground);
  outline: none; font-family: inherit; transition: border-color 0.12s, box-shadow 0.12s;
}
.input:focus, .select-input:focus { border-color: var(--ring); box-shadow: 0 0 0 3px oklch(0.45 0.12 258 / 0.1); }
.input::placeholder { color: var(--muted-foreground); }
textarea.input { height: auto; padding: 0.5rem 0.75rem; resize: vertical; line-height: 1.5; }
.select-input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.75rem center; padding-right: 2rem; cursor: pointer; }
.label { display: block; font-size: 0.8125rem; font-weight: 500; margin-bottom: 0.3rem; }
.form-group { display: flex; flex-direction: column; }

/* ── STATUS BADGE ── */
.badge {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.2rem 0.6rem; border-radius: 9999px;
  font-size: 0.6875rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; white-space: nowrap;
}
.badge::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: 0.85; flex-shrink: 0; }
.badge-success { background: var(--success); color: var(--success-foreground); }
.badge-info { background: var(--info); color: var(--info-foreground); }
.badge-warning { background: var(--warning); color: var(--warning-foreground); }
.badge-danger { background: var(--destructive); color: var(--destructive-foreground); }
.badge-primary { background: var(--primary); color: var(--primary-foreground); }
.badge-muted { background: oklch(0.45 0.02 258); color: white; }
.badge-gold { background: var(--gold); color: oklch(0.2 0.05 60); }
.badge-neutral { background: var(--muted); color: var(--foreground); }

/* ── TABS ── */
.tabs-list {
  display: inline-flex; background: var(--muted); border-radius: 0.625rem;
  padding: 0.25rem; gap: 2px; margin-bottom: 1rem; flex-wrap: wrap;
}
.tab-btn {
  display: inline-flex; align-items: center; gap: 0.375rem;
  padding: 0.375rem 0.875rem; border-radius: 0.4375rem;
  font-size: 0.8125rem; font-weight: 500; border: none; background: transparent;
  color: var(--muted-foreground); cursor: pointer; transition: all 0.12s; white-space: nowrap;
}
.tab-btn:hover { color: var(--foreground); }
.tab-btn.active { background: white; color: var(--foreground); box-shadow: 0 1px 3px oklch(0.2 0.04 260 / 0.08); }
.tab-btn svg { width: 13px; height: 13px; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── TABLE ── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
thead tr { background: oklch(0 0 0 / 0.018); }
th { padding: 0.7rem 1rem; text-align: left; font-size: 0.75rem; font-weight: 600; color: var(--muted-foreground); border-bottom: 1px solid var(--border); white-space: nowrap; }
th.tr { text-align: right; }
td { padding: 0.7rem 1rem; font-size: 0.8125rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
td.tr { text-align: right; }
tr:last-child td { border-bottom: none; }
tbody tr { transition: background 0.1s; }
tbody tr:hover { background: oklch(0 0 0 / 0.016); }
.mono { font-family: 'Menlo', 'Consolas', monospace; font-size: 0.75rem; }

/* ── KPI CARDS ── */
.kpi-icon { width: 36px; height: 36px; border-radius: 0.5rem; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.kpi-icon svg { width: 17px; height: 17px; }
.kpi-val { font-family: 'Poppins', sans-serif; font-size: 1.375rem; font-weight: 700; font-variant-numeric: tabular-nums; margin-top: 0.875rem; line-height: 1; }
.kpi-label { font-size: 0.75rem; color: var(--muted-foreground); margin-top: 0.25rem; }
.icon-success { background: oklch(0.65 0.16 155 / 0.1); color: var(--success); }
.icon-info { background: oklch(0.62 0.14 250 / 0.1); color: var(--info); }
.icon-primary { background: oklch(0.24 0.07 260 / 0.1); color: var(--primary); }
.icon-warning { background: oklch(0.74 0.16 65 / 0.12); color: var(--warning); }
.icon-danger { background: oklch(0.6 0.22 25 / 0.1); color: var(--destructive); }
.icon-gold { background: oklch(0.78 0.12 85 / 0.15); color: oklch(0.65 0.12 75); }

/* ── MODAL ── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: oklch(0 0 0 / 0.55);
  display: flex; align-items: center; justify-content: center; padding: 1rem;
  opacity: 0; visibility: hidden; transition: opacity 0.18s, visibility 0.18s;
}
.modal-overlay.open { opacity: 1; visibility: visible; }
.modal {
  background: white; border-radius: var(--radius);
  box-shadow: var(--shadow-elevated);
  width: 100%; max-width: 480px; max-height: calc(100vh - 2rem); overflow-y: auto;
  transform: scale(0.96) translateY(8px); transition: transform 0.18s;
}
.modal-overlay.open .modal { transform: scale(1) translateY(0); }
.modal-hdr { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: 1.125rem 1.375rem; border-bottom: 1px solid var(--border); }
.modal-title { font-family: 'Poppins', sans-serif; font-size: 1rem; font-weight: 700; }
.modal-desc { font-size: 0.8125rem; color: var(--muted-foreground); margin-top: 0.25rem; }
.modal-close-btn { width: 28px; height: 28px; border-radius: 0.375rem; border: none; background: none; color: var(--muted-foreground); cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: background 0.12s; }
.modal-close-btn:hover { background: var(--muted); color: var(--foreground); }
.modal-close-btn svg { width: 15px; height: 15px; }
.modal-body { padding: 1.125rem 1.375rem; display: flex; flex-direction: column; gap: 0.875rem; }
.modal-ftr { display: flex; justify-content: flex-end; gap: 0.5rem; padding: 0.875rem 1.375rem; border-top: 1px solid var(--border); }
.modal-img { width: 100%; height: 160px; object-fit: cover; }
.modal-fields { display: flex; flex-direction: column; }
.modal-field { display: flex; gap: 0.75rem; padding: 0.6rem 0; border-bottom: 1px solid var(--border); }
.modal-field:last-child { border-bottom: none; }
.modal-field-lbl { font-size: 0.75rem; color: var(--muted-foreground); width: 110px; flex-shrink: 0; padding-top: 0.1rem; }
.modal-field-val { font-size: 0.8125rem; font-weight: 500; flex: 1; }
/* doc modal */
.doc-preview { background: white; border: 1px solid var(--border); border-radius: 0.5rem; padding: 1.375rem; font-size: 0.8125rem; }
.doc-header-row { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 1.25rem; }
.doc-logo { width: 44px; height: 44px; border-radius: 0.5rem; background: linear-gradient(135deg, var(--info), var(--primary)); display: flex; align-items: center; justify-content: center; color: white; font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 0.875rem; }
.doc-kind { font-family: 'Poppins', sans-serif; font-size: 1.125rem; font-weight: 700; color: var(--primary); }
.doc-table { width: 100%; border-collapse: collapse; margin-top: 0.875rem; }
.doc-table th { background: var(--muted); padding: 0.4rem 0.5rem; font-size: 0.75rem; text-align: left; }
.doc-table td { padding: 0.4rem 0.5rem; border-bottom: 1px solid var(--border); }
.doc-totals { margin-top: 0.75rem; display: flex; flex-direction: column; align-items: flex-end; gap: 0.2rem; }
.doc-total-row { display: flex; gap: 2rem; font-size: 0.8125rem; }
.doc-total-lbl { color: var(--muted-foreground); }
.doc-ttc { font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 1rem; color: var(--primary); border-top: 2px solid var(--primary); padding-top: 0.375rem; margin-top: 0.2rem; }

/* ── TOAST ── */
.toast-zone { position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 200; display: flex; flex-direction: column; gap: 0.5rem; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 0.5rem; padding: 0.7rem 1rem; border-radius: 0.625rem; font-size: 0.8125rem; font-weight: 500; box-shadow: var(--shadow-card); pointer-events: all; max-width: 340px; animation: toastIn 0.25s ease; }
.toast-success { background: var(--success); color: var(--success-foreground); }
.toast-info { background: var(--primary); color: var(--primary-foreground); }
.toast-warning { background: var(--warning); color: var(--warning-foreground); }
.toast-error { background: var(--destructive); color: var(--destructive-foreground); }
@keyframes toastIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ── SWITCH ── */
.switch { position: relative; display: inline-block; width: 36px; height: 20px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch-track { position: absolute; inset: 0; background: var(--muted); border-radius: 9999px; cursor: pointer; transition: background 0.2s; border: 1px solid var(--border); }
.switch-track::after { content: ''; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: white; box-shadow: 0 1px 2px oklch(0 0 0 / 0.2); transition: transform 0.2s; }
.switch input:checked + .switch-track { background: var(--primary); border-color: var(--primary); }
.switch input:checked + .switch-track::after { transform: translateX(16px); }

/* ── CALENDAR ── */
.cal-mini-grid { display: grid; grid-template-columns: repeat(7,1fr); gap: 3px; }
.cal-day-hdr { text-align: center; font-size: 0.6875rem; font-weight: 600; color: var(--muted-foreground); padding: 0.375rem 0; }
.cal-day {
  aspect-ratio: 1; border-radius: 0.375rem; border: 1px solid var(--border);
  display: flex; flex-direction: column; align-items: flex-start; padding: 0.3rem;
  cursor: pointer; transition: background 0.1s; min-height: 60px;
}
.cal-day:hover { background: var(--muted); }
.cal-day.today { border-color: var(--primary); background: oklch(0.24 0.07 260 / 0.04); }
.cal-day-num { font-size: 0.6875rem; font-weight: 500; color: var(--muted-foreground); line-height: 1; }
.cal-day.today .cal-day-num { color: var(--primary); font-weight: 700; }
.cal-event { font-size: 0.5625rem; padding: 1px 4px; border-radius: 3px; margin-top: 2px; background: oklch(0.62 0.14 250 / 0.15); color: var(--info); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
/* Gantt */
.gantt-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 0.5rem; }
.gantt-tbl { border-collapse: collapse; width: 100%; min-width: 700px; }
.gantt-tbl th, .gantt-tbl td { border: 1px solid var(--border); padding: 0; font-size: 0.6875rem; }
.gantt-tbl th { background: var(--muted); padding: 0.4rem 0.375rem; font-weight: 600; text-align: center; color: var(--muted-foreground); }
.gantt-tbl td:first-child { font-size: 0.75rem; font-weight: 500; padding: 0.5rem 0.75rem; background: oklch(0.98 0.003 250); white-space: nowrap; }
.g-free { background: white; height: 32px; }
.g-booked { background: oklch(0.74 0.16 65 / 0.3); }
.g-today { background: oklch(0.62 0.14 250 / 0.15); }
.gantt-legend { display: flex; gap: 1.25rem; margin-top: 0.75rem; font-size: 0.75rem; color: var(--muted-foreground); flex-wrap: wrap; }
.gantt-legend-item { display: flex; align-items: center; gap: 0.375rem; }
.gantt-legend-dot { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }

/* ── ROOM CARDS ── */
.resource-card { background: white; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: box-shadow 0.2s; }
.resource-card:hover { box-shadow: var(--shadow-elevated); }
.resource-img { position: relative; overflow: hidden; background: var(--muted); }
.resource-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.resource-card:hover .resource-img img { transform: scale(1.04); }
.img-badge-tl { position: absolute; top: 0.625rem; left: 0.625rem; }
.img-badge-tr { position: absolute; top: 0.625rem; right: 0.625rem; background: oklch(1 0 0 / 0.92); backdrop-filter: blur(6px); border-radius: 9999px; padding: 0.2rem 0.5rem; font-size: 0.6875rem; font-weight: 600; }

/* ── KANBAN ── */
.kanban-col { background: oklch(0 0 0 / 0.02); border-radius: 0.75rem; padding: 0.75rem; }
.kanban-hdr { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.625rem; padding: 0 0.125rem; }
.kanban-count { font-size: 0.75rem; color: var(--muted-foreground); }
.kanban-card { background: white; border: 1px solid var(--border); border-radius: 0.5rem; padding: 0.75rem; margin-bottom: 0.5rem; box-shadow: var(--shadow-soft); cursor: pointer; transition: box-shadow 0.15s; }
.kanban-card:hover { box-shadow: var(--shadow-card); }

/* ── DIVIDE ── */
.divide-y > * + * { border-top: 1px solid var(--border); }
.hover-row { transition: background 0.1s; }
.hover-row:hover { background: oklch(0 0 0 / 0.016); }

/* ── UTILS ── */
.fn { font-variant-numeric: tabular-nums; }
.text-sm { font-size: 0.8125rem; }
.text-xs { font-size: 0.75rem; }
.text-muted { color: var(--muted-foreground); }
.text-success { color: var(--success); }
.text-danger { color: var(--destructive); }
.text-info { color: var(--info); }
.text-warning { color: var(--warning); }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-display { font-family: 'Poppins', sans-serif; }
.mono { font-family: 'Menlo', 'Consolas', monospace; }
.truncate { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sticky-top { position: sticky; top: 1.25rem; }

/* ── LOGIN ── */
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.login-hero { position: relative; overflow: hidden; }
.login-hero img { width: 100%; height: 100%; object-fit: cover; }
.login-overlay { position: absolute; inset: 0; background: linear-gradient(160deg, oklch(0.2 0.06 262 / 0.88), oklch(0.24 0.07 260 / 0.72)); display: flex; flex-direction: column; justify-content: flex-end; padding: 3rem; }
.login-hero-title { font-family: 'Poppins', sans-serif; font-size: 2.25rem; font-weight: 700; color: white; line-height: 1.2; }
.login-hero-sub { font-size: 0.9375rem; color: oklch(1 0 0 / 0.75); margin-top: 0.625rem; }
.login-panel { display: flex; align-items: center; justify-content: center; padding: 2.5rem 2rem; background: var(--background); }
.login-box { width: 100%; max-width: 380px; }
.login-logo { display: flex; align-items: center; gap: 0.875rem; margin-bottom: 2.25rem; }
.login-logo-icon { width: 46px; height: 46px; border-radius: 0.75rem; background: linear-gradient(135deg, var(--info), var(--primary)); box-shadow: var(--shadow-glow); display: flex; align-items: center; justify-content: center; }
.login-logo-icon svg { width: 22px; height: 22px; color: white; }
.login-logo-name { font-family: 'Poppins', sans-serif; font-size: 1.125rem; font-weight: 700; }
.login-logo-sub { font-size: 0.75rem; color: var(--muted-foreground); }
.login-title { font-family: 'Poppins', sans-serif; font-size: 1.625rem; font-weight: 700; }
.login-sub { color: var(--muted-foreground); font-size: 0.9rem; margin-top: 0.25rem; }
.login-form { margin-top: 1.75rem; display: flex; flex-direction: column; gap: 1rem; }
@media (max-width: 768px) {
  .login-wrap { grid-template-columns: 1fr; }
  .login-hero { display: none; }
  .sidebar { transform: translateX(-100%); }
  .sidebar.mobile-open { transform: translateX(0); }
  .app-main { margin-left: 0 !important; }
  .page-content { padding: 1rem; }
}
/* sidebar backdrop */
.sidebar-backdrop { position: fixed; inset: 0; background: oklch(0 0 0 / 0.45); z-index: 39; display: none; }
.sidebar-backdrop.show { display: block; }
