@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,300&family=DM+Mono:wght@400;500&display=swap');

/* ─── ROOT VARIABLES ─────────────────────────────────────────── */
:root {
    --primary:        #0A0A0A;
    --primary-hover:  #1C1C1C;
    --secondary:      #6B7280;
    --success:        #059669;
    --danger:         #DC2626;
    --warning:        #D97706;
    --info:           #2563EB;

    --bg:             #FFFFFF;
    --bg-light:       #FAFAFA;
    --bg-dark:        #F4F4F5;
    --bg-overlay:     rgba(10, 10, 10, 0.04);

    --text:           #0A0A0A;
    --text-light:     #71717A;
    --text-muted:     #A1A1AA;

    --border:         #E4E4E7;
    --border-focus:   #0A0A0A;

    --radius-sm:      4px;
    --radius:         8px;
    --radius-lg:      12px;
    --radius-xl:      16px;
    --radius-full:    9999px;

    --shadow-xs:      0 1px 2px rgba(0,0,0,.06);
    --shadow-sm:      0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
    --shadow-md:      0 4px 8px rgba(0,0,0,.08), 0 2px 4px rgba(0,0,0,.04);
    --shadow-lg:      0 12px 24px rgba(0,0,0,.08), 0 4px 8px rgba(0,0,0,.04);
    --shadow-xl:      0 24px 48px rgba(0,0,0,.10), 0 8px 16px rgba(0,0,0,.05);

    --font-sans:      'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono:      'DM Mono', 'Fira Code', monospace;

    --transition:     0.18s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow:0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─── RESET & BASE ───────────────────────────────────────────── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ─── CONTAINER ──────────────────────────────────────────────── */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ─── TYPOGRAPHY ─────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-sans);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--text);
}

h1 { font-size: clamp(2rem, 4vw, 2.75rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.0625rem; }
h6 { font-size: 0.9375rem; }

p {
    color: var(--text-light);
    margin-bottom: 16px;
    font-size: 0.9375rem;
    line-height: 1.7;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition);
}
a:hover { color: var(--secondary); }

code, pre {
    font-family: var(--font-mono);
    font-size: 0.875em;
}

/* ─── LUCIDE ICON DEFAULTS ───────────────────────────────────── */
[data-lucide],
.icon,
svg.lucide {
    display: inline-block;
    vertical-align: middle;
    stroke-width: 1.75;
    flex-shrink: 0;
}

/* ─── BUTTONS ────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 9px 20px;
    border-radius: var(--radius);
    border: 1px solid transparent;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: -0.01em;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    white-space: nowrap;
    line-height: 1;
}
.btn:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}
.btn svg { width: 16px; height: 16px; }

.btn-primary {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: var(--shadow-xs);
}
.btn-primary:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
    color: #fff;
}
.btn-primary:active { transform: translateY(0); box-shadow: var(--shadow-xs); }

.btn-secondary {
    background: var(--bg);
    color: var(--text);
    border-color: var(--border);
    box-shadow: var(--shadow-xs);
}
.btn-secondary:hover {
    background: var(--bg-dark);
    border-color: #C4C4C9;
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
    color: var(--text);
}

.btn-ghost {
    background: transparent;
    color: var(--text-light);
    border-color: transparent;
}
.btn-ghost:hover {
    background: var(--bg-overlay);
    color: var(--text);
}

.btn-danger {
    background: var(--danger);
    color: #fff;
    border-color: var(--danger);
}
.btn-danger:hover {
    background: #B91C1C;
    border-color: #B91C1C;
    transform: translateY(-1px);
    color: #fff;
}

.btn-sm { padding: 6px 14px; font-size: 0.8125rem; }
.btn-sm svg { width: 14px; height: 14px; }

.btn-lg { padding: 12px 28px; font-size: 0.9375rem; }
.btn-lg svg { width: 18px; height: 18px; }

.btn-icon {
    padding: 8px;
    border-radius: var(--radius);
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-light);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}
.btn-icon:hover {
    background: var(--bg-dark);
    color: var(--text);
}
.btn-icon svg { width: 18px; height: 18px; }

.btn-group {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

/* ─── NAVBAR ─────────────────────────────────────────────────── */
.navbar {
    background: rgba(255,255,255,0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 100;
    height: 60px;
}
.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}
.nav-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--primary);
}
.nav-brand svg { width: 20px; height: 20px; }

.nav-links {
    display: flex;
    gap: 2px;
    align-items: center;
}
.nav-links a {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-light);
    font-size: 0.875rem;
    font-weight: 450;
    transition: all var(--transition);
}
.nav-links a:hover {
    color: var(--text);
    background: var(--bg-dark);
}
.nav-links a.active {
    color: var(--text);
    background: var(--bg-dark);
}
.nav-links a svg { width: 15px; height: 15px; }

.nav-auth {
    display: flex;
    gap: 8px;
    align-items: center;
}
.nav-divider {
    width: 1px;
    height: 20px;
    background: var(--border);
    margin: 0 4px;
}

/* ─── HERO ───────────────────────────────────────────────────── */
.hero {
    padding: 96px 0 80px;
    text-align: center;
}
.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    background: var(--bg-dark);
    border: 1px solid var(--border);
    font-size: 0.78125rem;
    font-weight: 500;
    color: var(--text-light);
    letter-spacing: 0.02em;
    text-transform: uppercase;
    margin-bottom: 24px;
}
.hero-eyebrow svg { width: 13px; height: 13px; }

.hero h1 {
    margin-bottom: 20px;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}
.hero p {
    font-size: 1.0625rem;
    margin-bottom: 36px;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
}
.hero .btn-group { justify-content: center; }

.hero-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 20px;
    font-size: 0.8125rem;
    color: var(--text-muted);
}
.hero-note svg { width: 14px; height: 14px; }

/* ─── FEATURES ───────────────────────────────────────────────── */
.features {
    background: var(--bg-light);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 80px 0;
}
.section-header {
    text-align: center;
    margin-bottom: 56px;
}
.section-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 12px;
}
.section-label svg { width: 13px; height: 13px; }
.section-header h2 { margin-bottom: 12px; }
.section-header p { max-width: 480px; margin: 0 auto; }

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    overflow: hidden;
}
.feature-card {
    background: var(--bg);
    padding: 32px 28px;
    transition: background var(--transition);
}
.feature-card:hover { background: var(--bg-light); }

.feature-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    background: var(--bg-dark);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    transition: all var(--transition);
}
.feature-card:hover .feature-icon {
    background: var(--primary);
    border-color: var(--primary);
}
.feature-icon svg {
    width: 18px;
    height: 18px;
    color: var(--text);
    transition: color var(--transition);
}
.feature-card:hover .feature-icon svg { color: #fff; }

.feature-card h3 {
    font-size: 1rem;
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}
.feature-card p {
    font-size: 0.875rem;
    margin: 0;
    line-height: 1.65;
}

/* ─── QR CODE HERO 3D ────────────────────────────────────────── */
.qr-hero-wrapper {
    flex-shrink: 0;
    perspective: 800px;
    width: 280px;
    height: 340px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.qr-hero-scene {
    position: relative;
    width: 240px;
    height: 310px;
}
.qr-hero-card {
    width: 240px;
    height: 290px;
    border-radius: 24px;
    background: #fff;
    border: 1px solid #E4E4E7;
    box-shadow: 0 24px 60px rgba(0,0,0,0.12), 0 8px 20px rgba(0,0,0,0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 20px;
    animation: qr-float 4s ease-in-out infinite, qr-rotate 8s ease-in-out infinite;
    transform-style: preserve-3d;
    position: relative;
    z-index: 1;
}
.qr-svg {
    width: 160px;
    height: 160px;
    color: var(--primary);
}
.qr-hero-label {
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-align: center;
}
.qr-hero-shadow {
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 160px;
    height: 24px;
    background: radial-gradient(ellipse, rgba(0,0,0,0.15) 0%, transparent 70%);
    border-radius: 50%;
    animation: qr-shadow 4s ease-in-out infinite;
    z-index: 0;
}

@keyframes qr-float {
    0%, 100% { transform: rotateX(8deg) rotateY(-12deg) translateY(0px); }
    50%       { transform: rotateX(4deg) rotateY(12deg)  translateY(-14px); }
}
@keyframes qr-rotate {
    0%   { transform: rotateX(8deg)  rotateY(-12deg) translateY(0px); }
    25%  { transform: rotateX(12deg) rotateY(6deg)   translateY(-8px); }
    50%  { transform: rotateX(4deg)  rotateY(12deg)  translateY(-14px); }
    75%  { transform: rotateX(10deg) rotateY(-6deg)  translateY(-6px); }
    100% { transform: rotateX(8deg)  rotateY(-12deg) translateY(0px); }
}
@keyframes qr-shadow {
    0%, 100% { transform: translateX(-50%) scaleX(1);    opacity: 0.6; }
    50%       { transform: translateX(-50%) scaleX(0.75); opacity: 0.3; }
}

@media (max-width: 768px) {
    .qr-hero-wrapper { display: none; }
    .hero .container { text-align: center !important; }
    .hero .btn-group { justify-content: center; }
}

/* ─── PRICING ────────────────────────────────────────────────── */
.pricing { padding: 80px 0; text-align: center; }

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 20px;
    align-items: stretch;
}
.pricing-card {
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 32px 28px;
    background: var(--bg);
    text-align: left;
    transition: box-shadow var(--transition);
    position: relative;
    overflow: hidden;
}
.pricing-card:hover { box-shadow: var(--shadow-lg); }

.pricing-featured {
    border-color: var(--primary);
    background: var(--primary);
    color: #fff;
}
.pricing-featured h3,
.pricing-featured .price,
.pricing-featured li { color: #fff; }
.pricing-featured .price-period,
.pricing-featured li { color: rgba(255,255,255,0.65); }
.pricing-featured .pricing-badge { background: rgba(255,255,255,0.12); color: #fff; }

.pricing-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 0.70rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: var(--bg-dark);
    color: var(--text-light);
    margin-bottom: 20px;
}
.pricing-badge svg { width: 11px; height: 11px; }

.pricing-card h3 {
    font-size: 1.0625rem;
    margin-bottom: 20px;
    font-weight: 600;
}
.price {
    font-size: 2.75rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.04em;
    line-height: 1;
    margin-bottom: 4px;
}
.price-period {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 28px;
}
.pricing-divider {
    height: 1px;
    background: var(--border);
    margin-bottom: 20px;
}
.pricing-featured .pricing-divider { background: rgba(255,255,255,0.12); }

.pricing-card ul {
    list-style: none;
    margin-bottom: 28px;
}
.pricing-card li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 0;
    color: var(--text-light);
    font-size: 0.875rem;
    line-height: 1.5;
}
.pricing-card li svg {
    width: 15px;
    height: 15px;
    color: var(--success);
    flex-shrink: 0;
    margin-top: 2px;
}
.pricing-featured li svg { color: rgba(255,255,255,0.7); }

/* ─── ADMIN / SIDEBAR LAYOUT ─────────────────────────────────── */
.admin-layout {
    display: flex;
    height: 100vh;
    background: var(--bg-light);
}

.sidebar {
    width: 232px;
    background: var(--bg);
    border-right: 1px solid var(--border);
    padding: 0;
    overflow-y: auto;
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    z-index: 50;
    display: flex;
    flex-direction: column;
}
.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 20px 16px;
    font-size: 0.9375rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--primary);
    border-bottom: 1px solid var(--border);
    margin-bottom: 8px;
}
.sidebar-brand svg { width: 18px; height: 18px; flex-shrink: 0; }

.sidebar-section-label {
    padding: 12px 16px 4px;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 1px;
    padding: 4px 8px;
    flex: 1;
}
.nav-item {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 10px;
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 450;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--transition);
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
}
.nav-item:hover {
    background: var(--bg-dark);
    color: var(--text);
}
.nav-item.active {
    background: var(--bg-dark);
    color: var(--text);
    font-weight: 500;
}
.nav-item svg { width: 16px; height: 16px; flex-shrink: 0; }

.nav-item-badge {
    margin-left: auto;
    background: var(--bg-overlay);
    color: var(--text-muted);
    border-radius: var(--radius-full);
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 1px 7px;
    min-width: 20px;
    text-align: center;
}
.nav-item.active .nav-item-badge { background: var(--primary); color: #fff; }

.sidebar-footer {
    padding: 12px 8px;
    border-top: 1px solid var(--border);
    margin-top: auto;
}

/* ─── MAIN CONTENT ───────────────────────────────────────────── */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    margin-left: 232px;
    min-height: 100vh;
    overflow: hidden;
}

.topbar {
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 0 28px;
    height: 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 40;
}
.topbar h1 {
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}
.topbar-actions {
    display: flex;
    gap: 6px;
    align-items: center;
}

#page-container {
    flex: 1;
    overflow-y: auto;
    padding: 28px;
}

/* ─── PAGE HEADER ────────────────────────────────────────────── */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 28px;
    gap: 16px;
}
.page-header-text h1 { margin: 0; font-size: 1.375rem; }
.page-header-text p { margin: 4px 0 0; font-size: 0.875rem; }
.page-header-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

/* ─── STAT CARDS ─────────────────────────────────────────────── */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.stat-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    position: relative;
    overflow: hidden;
    transition: box-shadow var(--transition);
}
.stat-card:hover { box-shadow: var(--shadow-md); }

.stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius);
    background: var(--bg-dark);
    margin-bottom: 14px;
}
.stat-icon svg { width: 17px; height: 17px; color: var(--text-light); }

.stat-value {
    font-size: 1.625rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    color: var(--text);
    line-height: 1;
    margin-bottom: 4px;
}
.stat-label {
    font-size: 0.8125rem;
    color: var(--text-muted);
    font-weight: 450;
}
.stat-delta {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 8px;
    padding: 2px 8px;
    border-radius: var(--radius-full);
}
.stat-delta svg { width: 12px; height: 12px; }
.stat-delta.up { color: var(--success); background: #ECFDF5; }
.stat-delta.down { color: var(--danger); background: #FEF2F2; }

/* ─── CARD ───────────────────────────────────────────────────── */
.card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: box-shadow var(--transition);
    overflow: hidden;
}
.card:hover { box-shadow: var(--shadow-md); }

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    border-bottom: 1px solid var(--border);
}
.card-header h3 {
    font-size: 0.9375rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin: 0;
}
.card-header-actions { display: flex; gap: 6px; }

.card-body { padding: 20px; }

.card-footer {
    padding: 14px 20px;
    border-top: 1px solid var(--border);
    background: var(--bg-light);
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    align-items: center;
}

/* ─── DATA TABLE ─────────────────────────────────────────────── */
.table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: var(--bg);
}
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}
thead { background: var(--bg-light); }
th {
    padding: 11px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
th:first-child { padding-left: 20px; }
th:last-child { padding-right: 20px; }

td {
    padding: 13px 16px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    vertical-align: middle;
}
td:first-child { padding-left: 20px; }
td:last-child { padding-right: 20px; }
tbody tr:last-child td { border-bottom: none; }
tbody tr { transition: background var(--transition); }
tbody tr:hover { background: var(--bg-light); }

.table-actions { display: flex; gap: 4px; align-items: center; }

/* ─── FORMS ──────────────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }

label {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text);
}
label svg { width: 14px; height: 14px; color: var(--text-muted); }

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}
.input-icon {
    position: absolute;
    left: 11px;
    color: var(--text-muted);
    pointer-events: none;
    display: flex;
}
.input-icon svg { width: 15px; height: 15px; }

input,
textarea,
select {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: var(--font-sans);
    font-size: 0.9rem;
    color: var(--text);
    background: var(--bg);
    transition: all var(--transition);
    line-height: 1.5;
    -webkit-appearance: none;
    appearance: none;
}
.has-icon input,
.has-icon select { padding-left: 34px; }

input:hover,
textarea:hover,
select:hover { border-color: #C4C4C9; }

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(10, 10, 10, 0.06);
}
input::placeholder,
textarea::placeholder { color: var(--text-muted); }

textarea {
    resize: vertical;
    min-height: 96px;
    line-height: 1.65;
}

.form-hint {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 5px;
    font-size: 0.78125rem;
    color: var(--text-muted);
}
.form-hint svg { width: 12px; height: 12px; }
.form-hint.error { color: var(--danger); }
.form-hint.success { color: var(--success); }

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

/* ─── RESTAURANT LAYOUT ──────────────────────────────────────── */
.restaurant-layout {
    display: flex;
    flex-direction: column;
    height: 100vh;
}
.restaurant-topbar {
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 0 28px;
    height: 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.restaurant-topbar h1 { font-size: 1rem; font-weight: 600; }

.restaurant-main {
    flex: 1;
    overflow-y: auto;
    padding: 24px 28px;
}

.tables-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
    gap: 12px;
}
.table-card {
    background: var(--bg);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px 12px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition);
    user-select: none;
}
.table-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}
.table-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    color: var(--text-muted);
}
.table-card-icon svg { width: 22px; height: 22px; }

.table-card.occupied {
    border-color: var(--success);
    background: #F0FDF4;
}
.table-card.occupied .table-card-icon { color: var(--success); }

.table-card.busy {
    border-color: var(--danger);
    background: #FFF1F2;
}
.table-card.busy .table-card-icon { color: var(--danger); }

.table-number {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    margin-bottom: 4px;
}
.table-info {
    font-size: 0.6875rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* ─── ALERTS ─────────────────────────────────────────────────── */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: var(--radius);
    margin-bottom: 14px;
    font-size: 0.875rem;
    border: 1px solid;
}
.alert svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; }
.alert-content { flex: 1; }
.alert-title { font-weight: 600; margin-bottom: 2px; }
.alert-desc { color: inherit; opacity: 0.8; margin: 0; font-size: 0.8125rem; }

.alert-success { background: #F0FDF4; border-color: #BBF7D0; color: #166534; }
.alert-danger  { background: #FFF1F2; border-color: #FECDD3; color: #9F1239; }
.alert-warning { background: #FFFBEB; border-color: #FDE68A; color: #92400E; }
.alert-info    { background: #EFF6FF; border-color: #BFDBFE; color: #1E40AF; }

/* ─── BADGES ─────────────────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 9px;
    border-radius: var(--radius-full);
    font-size: 0.70rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    white-space: nowrap;
}
.badge svg { width: 11px; height: 11px; }

.badge-default  { background: var(--bg-dark); color: var(--text-light); }
.badge-primary  { background: #EFF6FF; color: #1D4ED8; }
.badge-success  { background: #F0FDF4; color: #166534; }
.badge-danger   { background: #FFF1F2; color: #9F1239; }
.badge-warning  { background: #FFFBEB; color: #92400E; }

/* ─── AVATAR ─────────────────────────────────────────────────── */
.avatar {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    background: var(--bg-dark);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-light);
    overflow: hidden;
    flex-shrink: 0;
}
.avatar svg { width: 16px; height: 16px; }
.avatar-sm { width: 26px; height: 26px; }
.avatar-lg { width: 40px; height: 40px; }
.avatar-lg svg { width: 20px; height: 20px; }

.avatar-group {
    display: flex;
    align-items: center;
}
.avatar-group .avatar {
    margin-left: -6px;
    border: 2px solid var(--bg);
    box-shadow: none;
}
.avatar-group .avatar:first-child { margin-left: 0; }

/* ─── DROPDOWN ───────────────────────────────────────────────── */
.dropdown { position: relative; display: inline-block; }
.dropdown-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    padding: 5px;
    min-width: 180px;
    z-index: 200;
    animation: dropdown-in 0.12s ease;
}
@keyframes dropdown-in {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}
.dropdown-item {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    color: var(--text);
    cursor: pointer;
    transition: background var(--transition);
    text-decoration: none;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}
.dropdown-item:hover { background: var(--bg-dark); }
.dropdown-item.danger { color: var(--danger); }
.dropdown-item.danger:hover { background: #FFF1F2; }
.dropdown-item svg { width: 15px; height: 15px; color: var(--text-muted); flex-shrink: 0; }
.dropdown-item.danger svg { color: var(--danger); }
.dropdown-divider {
    height: 1px;
    background: var(--border);
    margin: 4px 0;
}

/* ─── TABS ───────────────────────────────────────────────────── */
.tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
    gap: 0;
    margin-bottom: 24px;
}
.tab {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 10px 16px;
    font-size: 0.875rem;
    font-weight: 450;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: all var(--transition);
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
    white-space: nowrap;
}
.tab:hover { color: var(--text); }
.tab.active {
    color: var(--text);
    font-weight: 600;
    border-bottom-color: var(--primary);
}
.tab svg { width: 15px; height: 15px; }

/* ─── MODAL ──────────────────────────────────────────────────── */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.32);
    backdrop-filter: blur(4px);
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    animation: fade-in 0.15s ease;
}
@keyframes fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}
.modal {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 480px;
    overflow: hidden;
    animation: modal-in 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes modal-in {
    from { opacity: 0; transform: scale(0.95) translateY(8px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 20px 22px;
    border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-size: 1rem; font-weight: 600; margin: 0; }
.modal-body { padding: 22px; }
.modal-footer {
    padding: 14px 22px;
    border-top: 1px solid var(--border);
    background: var(--bg-light);
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* ─── SEARCH INPUT ───────────────────────────────────────────── */
.search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}
.search-wrapper input {
    padding-left: 36px;
    padding-right: 12px;
    border-radius: var(--radius-full);
    background: var(--bg-light);
    border-color: var(--border);
    font-size: 0.875rem;
}
.search-wrapper input:focus {
    background: var(--bg);
    border-radius: var(--radius-full);
}
.search-icon {
    position: absolute;
    left: 12px;
    color: var(--text-muted);
    pointer-events: none;
    display: flex;
}
.search-icon svg { width: 14px; height: 14px; }

/* ─── EMPTY STATE ────────────────────────────────────────────── */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}
.empty-icon {
    width: 52px;
    height: 52px;
    background: var(--bg-dark);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}
.empty-icon svg { width: 24px; height: 24px; color: var(--text-muted); }
.empty-state h3 { font-size: 1rem; margin-bottom: 8px; }
.empty-state p { margin: 0 0 20px; max-width: 300px; }

/* ─── TOAST ──────────────────────────────────────────────────── */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 500;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}
.toast {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    background: var(--primary);
    color: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    font-size: 0.875rem;
    max-width: 320px;
    pointer-events: all;
    animation: toast-in 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes toast-in {
    from { opacity: 0; transform: translateY(12px) scale(0.95); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
.toast svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; }
.toast-success { background: var(--success); }
.toast-danger  { background: var(--danger); }
.toast-warning { background: var(--warning); }

/* ─── SCROLLBAR ──────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: #C4C4C9; }

/* ─── UTILITIES ──────────────────────────────────────────────── */
.sr-only {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0,0,0,0); white-space: nowrap; border-width: 0;
}
.text-muted   { color: var(--text-muted); }
.text-light   { color: var(--text-light); }
.text-success { color: var(--success); }
.text-danger  { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-info    { color: var(--info); }

.flex   { display: flex; align-items: center; }
.flex-1 { flex: 1; }
.gap-1  { gap: 4px; }
.gap-2  { gap: 8px; }
.gap-3  { gap: 12px; }
.gap-4  { gap: 16px; }

.mt-auto { margin-top: auto; }
.ml-auto { margin-left: auto; }

/* ─── RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width: 768px) {
    .navbar .container { gap: 12px; }
    .nav-links { display: none; }

    .hero { padding: 60px 0; }
    .hero .btn-group { flex-direction: column; align-items: center; }

    .features-grid { grid-template-columns: 1fr; gap: 1px; }

    .admin-layout { flex-direction: column; }
    .sidebar {
        position: static;
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }
    .sidebar-nav {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 4px;
        padding: 8px;
    }
    .nav-item {
        flex: none;
        font-size: 0.8125rem;
        padding: 7px 10px;
    }
    .main-content { margin-left: 0; }

    #page-container { padding: 16px; }

    .content-grid { grid-template-columns: repeat(2, 1fr); }
    .page-header { flex-direction: column; align-items: flex-start; }
    .page-header-actions { width: 100%; }

    .tables-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }

    .modal-backdrop { padding: 16px; }
    .modal { max-width: 100%; }

    .pricing-grid { grid-template-columns: 1fr; }
    .toast-container { bottom: 16px; right: 16px; left: 16px; }
    .toast { max-width: 100%; }
}

@media (max-width: 480px) {
    .container { padding: 0 16px; }
    .content-grid { grid-template-columns: 1fr; }
    .tables-grid { grid-template-columns: repeat(2, 1fr); }
    .form-row { grid-template-columns: 1fr; }

    .btn { width: 100%; justify-content: center; }
    .btn-group { flex-direction: column; }
    .btn-icon { width: auto; }

    .topbar { padding: 0 16px; }
    .restaurant-topbar { padding: 0 16px; }
    .restaurant-main { padding: 16px; }
}

/* ─── BTN OUTLINE ────────────────────────────────────────────── */
.btn-outline {
    background: transparent;
    color: var(--text);
    border-color: var(--border);
    box-shadow: var(--shadow-xs);
}
.btn-outline:hover {
    background: var(--bg-dark);
    border-color: #C4C4C9;
    color: var(--text);
    transform: translateY(-1px);
}

/* ─── LOGIN PAGE ─────────────────────────────────────────────── */
.login-page {
    background: var(--bg-light);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.login-container {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    padding: 40px 36px;
    width: 100%;
    max-width: 420px;
}

.login-container > h1 {
    font-size: 1.375rem;
    text-align: center;
    margin-bottom: 28px;
    letter-spacing: -0.03em;
}

.login-tabs {
    display: flex;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 3px;
    gap: 3px;
    margin-bottom: 28px;
    background: var(--bg-light);
}

.tab-btn {
    flex: 1;
    padding: 8px 12px;
    border: none;
    border-radius: calc(var(--radius) - 2px);
    background: transparent;
    font-family: var(--font-sans);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition);
}
.tab-btn.active {
    background: var(--bg);
    color: var(--text);
    box-shadow: var(--shadow-xs);
}
.tab-btn:hover:not(.active) {
    color: var(--text-light);
}

.tab-content {
    display: none;
}
.tab-content.active {
    display: block;
}

.tab-content .btn {
    width: 100%;
    margin-top: 4px;
}

.toggle-signup {
    text-align: center;
    margin-top: 20px;
}
.toggle-signup button {
    background: none;
    border: none;
    font-family: var(--font-sans);
    font-size: 0.8125rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: color var(--transition);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.toggle-signup button:hover {
    color: var(--text);
}

.error {
    color: var(--danger);
    font-size: 0.8125rem;
    margin-top: 10px;
    min-height: 18px;
}
.success {
    color: var(--success);
    font-size: 0.8125rem;
    margin-top: 10px;
    min-height: 18px;
}

/* ─── ADMIN / RESTAURANT CONTAINER LAYOUT ───────────────────── */
.admin-container,
.restaurant-container {
    display: flex;
    height: 100vh;
    background: var(--bg-light);
}

.admin-container .sidebar,
.restaurant-container .sidebar {
    display: flex;
    flex-direction: column;
    padding: 0;
}

.admin-container .sidebar h2,
.restaurant-container .sidebar h2 {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    padding: 20px 16px;
    border-bottom: 1px solid var(--border);
    margin: 0 0 8px;
}

.sidebar-menu {
    list-style: none;
    padding: 4px 8px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.menu-btn {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 8px 10px;
    border: none;
    border-radius: var(--radius);
    background: transparent;
    font-family: var(--font-sans);
    font-size: 0.875rem;
    font-weight: 450;
    color: var(--text-light);
    cursor: pointer;
    transition: all var(--transition);
    text-align: left;
}
.menu-btn:hover {
    background: var(--bg-dark);
    color: var(--text);
}
.menu-btn.active {
    background: var(--bg-dark);
    color: var(--text);
    font-weight: 500;
}

.sidebar hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 8px 16px;
}

.logout-btn {
    display: flex;
    align-items: center;
    width: calc(100% - 16px);
    margin: 4px 8px 12px;
    padding: 8px 10px;
    border: none;
    border-radius: var(--radius);
    background: transparent;
    font-family: var(--font-sans);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--danger);
    cursor: pointer;
    transition: all var(--transition);
    text-align: left;
}
.logout-btn:hover {
    background: #FFF1F2;
}

.admin-container .main-content,
.restaurant-container .main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    margin-left: 232px;
    min-height: 100vh;
    overflow: hidden;
}

.header {
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 0 28px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 40;
    gap: 12px;
}
.header h1 {
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin: 0;
}

.section {
    display: none;
    padding: 28px;
    flex: 1;
    overflow-y: auto;
}
.section.active {
    display: block;
}

/* ─── STATS GRID (admin dashboard) ──────────────────────────── */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card .value {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    color: var(--text);
    line-height: 1;
    margin-top: 8px;
}

.stat-card h3 {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
    margin: 0;
}

/* ─── TABLE CONTAINER ────────────────────────────────────────── */
.table-container {
    overflow-x: auto;
}

/* ─── INFO BOX ───────────────────────────────────────────────── */
.info-box {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px 28px;
    max-width: 560px;
}
.info-box h3 {
    font-size: 1rem;
    margin-bottom: 12px;
}
.info-box p {
    font-size: 0.875rem;
    margin-bottom: 8px;
}
.info-box p:last-child { margin-bottom: 0; }

/* ─── TRIAL WARNING ──────────────────────────────────────────── */
.trial-warning {
    background: #FFFBEB;
    border: 1px solid #FDE68A;
    border-radius: var(--radius);
    padding: 12px 16px;
    font-size: 0.875rem;
    color: #92400E;
    margin-bottom: 20px;
}

/* ─── LANDING PAGE ───────────────────────────────────────────── */
.landing-stats {
    background: var(--bg-dark);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 56px 0;
}
.landing-stats .container {
    display: flex;
    justify-content: center;
    gap: 64px;
    flex-wrap: wrap;
}
.stat {
    text-align: center;
}
.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    color: var(--text);
    line-height: 1;
    margin-bottom: 6px;
}
.stat .stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* ─── CTA SECTION ────────────────────────────────────────────── */
.cta {
    padding: 80px 0;
    text-align: center;
    background: var(--primary);
}
.cta h2 {
    color: #fff;
    margin-bottom: 12px;
}
.cta p {
    color: rgba(255,255,255,0.65);
    margin-bottom: 32px;
    font-size: 1rem;
}
.cta .btn {
    background: #fff;
    color: var(--primary);
    border-color: #fff;
}
.cta .btn:hover {
    background: var(--bg-dark);
    border-color: var(--bg-dark);
    color: var(--primary);
}

/* ─── FOOTER ─────────────────────────────────────────────────── */
.footer {
    background: var(--bg-light);
    border-top: 1px solid var(--border);
    padding: 56px 0 32px;
}
.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}
.footer-section h4 {
    font-size: 0.9375rem;
    font-weight: 600;
    margin-bottom: 14px;
    letter-spacing: -0.01em;
}
.footer-section p {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: 0;
}
.footer-section ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.footer-section ul li a {
    font-size: 0.875rem;
    color: var(--text-muted);
    transition: color var(--transition);
}
.footer-section ul li a:hover {
    color: var(--text);
}
.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 24px;
}
.footer-bottom p {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin: 0;
    text-align: center;
}

/* ─── PRICING PAGE EXTRAS ────────────────────────────────────── */
.pricing-features {
    list-style: none;
    margin-bottom: 28px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.pricing-features li {
    font-size: 0.875rem;
    color: var(--text-light);
    padding: 4px 0;
}
.pricing-card.featured .pricing-features li {
    color: rgba(255,255,255,0.8);
}

.pricing-card .period {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}
.pricing-card.featured .period {
    color: rgba(255,255,255,0.6);
}

.badge-featured {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background: rgba(255,255,255,0.18);
    color: #fff;
    margin-bottom: 12px;
}

/* ─── RESPONSIVE ADDITIONS ───────────────────────────────────── */
@media (max-width: 768px) {
    .admin-container,
    .restaurant-container {
        flex-direction: column;
    }
    .admin-container .sidebar,
    .restaurant-container .sidebar {
        position: static;
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }
    .sidebar-menu {
        flex-direction: row;
        flex-wrap: wrap;
        padding: 8px;
    }
    .menu-btn {
        flex: none;
        font-size: 0.8125rem;
        padding: 7px 10px;
    }
    .admin-container .main-content,
    .restaurant-container .main-content {
        margin-left: 0;
    }
    .section { padding: 16px; }
    .header { padding: 0 16px; }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 28px;
    }
    .landing-stats .container {
        gap: 36px;
    }
}

/* ─── FEATURE ICON (lucide) ──────────────────────────────────── */
.feature-icon svg {
    width: 20px;
    height: 20px;
    color: var(--text-light);
    transition: color var(--transition);
}
.feature-card:hover .feature-icon svg {
    color: #fff;
}

/* ─── PRICING FEATURES LIST (lucide) ────────────────────────── */
.pricing-features li {
    display: flex;
    align-items: center;
    gap: 8px;
}
.pricing-features li svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    color: var(--success);
}
.pricing-features li svg[data-lucide="x"] {
    color: var(--text-muted);
}
.pricing-card.featured .pricing-features li svg {
    color: rgba(255, 255, 255, 0.75);
}
.pricing-card.featured .pricing-features li svg[data-lucide="x"] {
    color: rgba(255, 255, 255, 0.35);
}

/* ─── LOGIN BRAND ────────────────────────────────────────────── */
.login-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--text);
    margin-bottom: 28px;
}
.login-brand svg {
    width: 20px;
    height: 20px;
}

/* ─── LOGIN NOTE ─────────────────────────────────────────────── */
.login-note {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin-top: 16px;
    font-size: 0.8125rem;
    color: var(--text-muted);
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 10px 12px;
    line-height: 1.5;
}
.login-note svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    margin-top: 1px;
}

/* ─── SIDEBAR MENU BTN WITH ICON ─────────────────────────────── */
.menu-btn {
    display: flex;
    align-items: center;
    gap: 8px;
}
.menu-btn svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}
.logout-btn {
    display: flex;
    align-items: center;
    gap: 8px;
}
.logout-btn svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}

/* ─── STATUS BADGE ───────────────────────────────────────────── */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 9px 2px 6px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid;
    white-space: nowrap;
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
    display: inline-block;
}

/* ─── STATUS CELL ────────────────────────────────────────────── */
.status-cell {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ─── CUSTOM STATUS DROPDOWN ─────────────────────────────────── */
.status-dropdown {
    position: relative;
    display: inline-block;
}

.sd-trigger {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 8px 4px 7px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg);
    font-family: var(--font-sans);
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: border-color var(--transition), box-shadow var(--transition);
    white-space: nowrap;
}
.sd-trigger:hover {
    border-color: #C4C4C9;
    box-shadow: var(--shadow-xs);
}
.sd-trigger svg {
    color: var(--text-muted);
    flex-shrink: 0;
}

.sd-menu {
    display: none;
    position: fixed;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    padding: 4px;
    min-width: 160px;
    z-index: 9999;
    animation: dropdown-in 0.12s ease;
    max-height: 280px;
    overflow-y: auto;
}
.status-dropdown.open .sd-menu {
    display: block;
}

.sd-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    cursor: pointer;
    transition: background var(--transition);
}
.sd-option:hover {
    background: var(--bg-dark);
}
.sd-option.selected {
    background: var(--bg-light);
}

/* Form dropdown full-width */
.form-status-dropdown {
    display: block;
}
.form-status-dropdown .sd-trigger {
    width: 100%;
    justify-content: flex-start;
    padding: 9px 12px;
    font-size: 0.9rem;
}
.form-status-dropdown .sd-trigger svg {
    margin-left: auto;
}

/* ─── PRICING GRID 4 COLS ────────────────────────────────────── */
.pricing .pricing-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    margin-bottom: 40px;
}

.price-sub {
    font-size: 1rem;
    font-weight: 500;
    opacity: 0.65;
    letter-spacing: 0;
}

/* ─── PRICING ADDONS ─────────────────────────────────────────── */
.pricing-addons {
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 28px 32px;
    background: var(--bg-light);
}

.pricing-addons-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 20px;
}
.pricing-addons-header svg {
    width: 15px;
    height: 15px;
}

.addons-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.addon-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border);
    background: var(--bg);
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-light);
    transition: all var(--transition);
    cursor: default;
}
.addon-item:hover {
    border-color: var(--primary);
    color: var(--text);
    background: var(--bg);
    box-shadow: var(--shadow-xs);
}
.addon-item svg {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .pricing .pricing-grid {
        grid-template-columns: 1fr;
    }
    .pricing-addons {
        padding: 20px;
    }
}

/* ─── MENU EDITOR ────────────────────────────────────────────── */
.menu-item-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    border-bottom: 1px solid var(--border);
    gap: 12px;
    transition: background var(--transition);
}
.menu-item-row:last-child {
    border-bottom: none;
}
.menu-item-row:hover {
    background: var(--bg-light);
}

.menu-item-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.menu-item-photo {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    object-fit: cover;
    border: 1px solid var(--border);
    flex-shrink: 0;
}

.menu-item-photo-placeholder {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    background: var(--bg-dark);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--text-muted);
}
.menu-item-photo-placeholder svg {
    width: 18px;
    height: 18px;
}

.menu-item-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.menu-item-details strong {
    font-size: 0.9rem;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.menu-item-desc {
    font-size: 0.8125rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.menu-item-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.menu-item-price {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.02em;
    min-width: 56px;
    text-align: right;
}

/* ─── MENU ITEM AVAILABILITY ─────────────────────────────────── */
.menu-item-unavailable {
    opacity: 0.55;
    background: var(--bg-light);
}
.menu-item-unavailable .menu-item-details strong {
    text-decoration: line-through;
    color: var(--text-muted);
}
.menu-item-unavailable .menu-item-price {
    color: var(--text-muted);
}
.availability-toggle {
    font-size: 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}
.availability-toggle svg {
    width: 13px;
    height: 13px;
}

/* ─── FORMATS PANEL ──────────────────────────────────────────── */
.formats-panel {
    border-top: 1px dashed var(--border);
    background: #FAFAFA;
}
.formats-panel-inner {
    padding: 16px 20px;
}
.formats-panel-header {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 14px;
    font-size: 0.875rem;
    color: var(--text);
}
.formats-panel-header svg {
    width: 15px;
    height: 15px;
    color: var(--text-muted);
}

.formats-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 14px;
}
.format-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.format-row-name {
    flex: 1;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text);
}
.format-row-price {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text);
    min-width: 56px;
    text-align: right;
}
.format-row-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.formats-add-row {
    display: flex;
    gap: 8px;
    align-items: center;
}
.formats-add-row input {
    padding: 7px 10px;
    font-size: 0.875rem;
}

.formats-btn {
    font-size: 0.75rem;
    gap: 4px;
    color: var(--text-light);
    border-color: var(--border);
    background: var(--bg);
}
.formats-btn:hover {
    color: var(--text);
    background: var(--bg-dark);
}
.formats-btn svg {
    width: 13px;
    height: 13px;
}

/* Format tags inline sous le nom du plat */
.formats-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px;
}
.format-tag {
    display: inline-flex;
    align-items: center;
    padding: 1px 8px;
    border-radius: var(--radius-full);
    background: var(--bg-dark);
    border: 1px solid var(--border);
    font-size: 0.70rem;
    font-weight: 500;
    color: var(--text-light);
}

/* ─── TABLE RENAME BUTTON ────────────────────────────────────── */
.table-card {
    position: relative;
}
.table-rename-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 22px;
    height: 22px;
    border-radius: var(--radius-sm);
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition), background var(--transition), color var(--transition);
    padding: 0;
}
.table-card:hover .table-rename-btn {
    opacity: 1;
}
.table-rename-btn:hover {
    background: var(--bg-dark);
    color: var(--text);
}
.table-card.occupied .table-rename-btn:hover {
    background: rgba(5, 150, 105, 0.12);
}
.table-card.busy .table-rename-btn:hover {
    background: rgba(220, 38, 38, 0.1);
}

/* ─── TABLE STATUS : RESERVED (bleu) ────────────────────────── */
.table-card.reserved {
    border-color: #2563EB;
    background: #EFF6FF;
}
.table-card.reserved .table-card-icon { color: #2563EB; }
.table-card.reserved .table-number    { color: #1D4ED8; }

/* ─── TABLE STATUS : CLOSED (rouge) ─────────────────────────── */
.table-card.closed {
    border-color: var(--danger);
    background: #FFF1F2;
    opacity: 0.75;
}
.table-card.closed .table-card-icon { color: var(--danger); }
.table-card.closed .table-number    { color: var(--danger); }

/* ─── TABLE ACTION GRID ──────────────────────────────────────── */
.table-action-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.table-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 18px 12px;
    border-radius: var(--radius-lg);
    border: 2px solid transparent;
    background: var(--bg-light);
    font-family: var(--font-sans);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
}
.table-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.table-action-btn.occupied {
    border-color: #FDE68A;
    color: #92400E;
    background: #FFFBEB;
}
.table-action-btn.occupied:hover { background: #FEF3C7; }

.table-action-btn.reserved {
    border-color: #BFDBFE;
    color: #1D4ED8;
    background: #EFF6FF;
}
.table-action-btn.reserved:hover { background: #DBEAFE; }

.table-action-btn.closed {
    border-color: #FECDD3;
    color: #9F1239;
    background: #FFF1F2;
}
.table-action-btn.closed:hover { background: #FFE4E6; }

.table-action-btn.free {
    border-color: #BBF7D0;
    color: #166534;
    background: #F0FDF4;
}
.table-action-btn.free:hover { background: #DCFCE7; }

/* ─── TABLE STATUS COLORS (override) ────────────────────────── */
/* Libre → vert */
.table-card.free {
    border-color: #059669;
    background: #F0FDF4;
}
.table-card.free .table-card-icon { color: #059669; }
.table-card.free .table-number    { color: #065F46; }
.table-card.free .table-info      { color: #059669; }

/* Occupée → orange */
.table-card.occupied {
    border-color: #D97706;
    background: #FFFBEB;
}
.table-card.occupied .table-card-icon { color: #D97706; }
.table-card.occupied .table-number    { color: #92400E; }
.table-card.occupied .table-info      { color: #D97706; }

/* ─── STATS DASHBOARD ────────────────────────────────────────── */
.stats-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}
.stats-kpi-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: box-shadow var(--transition);
}
.stats-kpi-card:hover { box-shadow: var(--shadow-md); }
.stats-kpi-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 4px;
}
.stats-kpi-value {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    color: var(--text);
    line-height: 1;
}
.stats-kpi-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* ─── STATS TABS ─────────────────────────────────────────────── */
.stats-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
    background: var(--bg-dark);
    border-radius: var(--radius);
    padding: 3px;
    width: fit-content;
}
.stats-tab {
    padding: 6px 16px;
    border: none;
    border-radius: calc(var(--radius) - 2px);
    background: transparent;
    font-family: var(--font-sans);
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition);
}
.stats-tab.active {
    background: var(--bg);
    color: var(--text);
    box-shadow: var(--shadow-xs);
}
.stats-tab:hover:not(.active) { color: var(--text-light); }

/* ─── STATS TABLE DETAIL ─────────────────────────────────────── */
.stats-table-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    border-bottom: 1px solid var(--border);
}
.stats-table-row:last-child { border-bottom: none; }
.stats-table-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text);
    min-width: 60px;
}
.stats-table-bar-wrap {
    flex: 1;
    height: 8px;
    background: var(--bg-dark);
    border-radius: 99px;
    overflow: hidden;
}
.stats-table-bar {
    height: 100%;
    border-radius: 99px;
    transition: width 0.4s ease;
}
.stats-table-badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: var(--radius-full);
    white-space: nowrap;
    min-width: 80px;
    text-align: center;
}

/* ─── STATS LEGEND ───────────────────────────────────────────── */
.stats-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: var(--text-muted);
}
.stats-legend-item span {
    width: 10px;
    height: 10px;
    border-radius: 2px;
    display: inline-block;
}

@media (max-width: 480px) {
    .stats-kpi-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ─── STATS TABLE SELECT ─────────────────────────────────────── */
.stats-table-select {
    padding: 5px 10px;
    font-size: 0.8125rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
    cursor: pointer;
    font-family: var(--font-sans);
    min-width: 160px;
    appearance: auto;
    -webkit-appearance: auto;
}
.stats-table-select:focus {
    outline: none;
    border-color: var(--primary);
}

/* ─── ORDERS PANEL ───────────────────────────────────────────── */
.orders-columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    align-items: start;
}

.orders-column-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    font-size: 0.875rem;
    font-weight: 700;
    margin-bottom: 10px;
}
.orders-column-header.pending    { background: #FFFBEB; color: #92400E; border: 1px solid #FDE68A; }
.orders-column-header.in-progress{ background: #EFF6FF; color: #1D4ED8; border: 1px solid #BFDBFE; }
.orders-column-header.done       { background: #F0FDF4; color: #166534; border: 1px solid #BBF7D0; }

.orders-column-count {
    background: rgba(0,0,0,0.08);
    border-radius: var(--radius-full);
    padding: 1px 8px;
    font-size: 0.75rem;
}

.orders-empty-col {
    font-size: 0.8125rem;
    color: var(--text-muted);
    text-align: center;
    padding: 20px 0;
    margin: 0;
}

.order-card {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 14px;
    margin-bottom: 10px;
    transition: box-shadow var(--transition);
}
.order-card:hover { box-shadow: var(--shadow-md); }

.order-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.order-card-table {
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text);
}
.order-card-time {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

.order-card-items {
    border-top: 1px solid rgba(0,0,0,0.06);
    border-bottom: 1px solid rgba(0,0,0,0.06);
    padding: 8px 0;
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.order-item-line {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8125rem;
}
.order-item-qty {
    font-weight: 700;
    color: var(--text);
    min-width: 20px;
}
.order-item-name {
    flex: 1;
    color: var(--text);
}
.order-item-price {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.order-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.order-card-total {
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text);
}

@media (max-width: 768px) {
    .orders-columns { grid-template-columns: 1fr; }
}

/* ─── ORDER NOTIFICATION ─────────────────────────────────────── */
.order-notif {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: #0A0A0A;
    color: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    min-width: 280px;
    max-width: 340px;
    pointer-events: all;
    animation: notif-in 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}
@keyframes notif-in {
    from { opacity: 0; transform: translateX(60px) scale(0.9); }
    to   { opacity: 1; transform: translateX(0) scale(1); }
}
@keyframes notif-out {
    from { opacity: 1; transform: translateX(0) scale(1); }
    to   { opacity: 0; transform: translateX(60px) scale(0.9); }
}
.order-notif-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    background: #D97706;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.order-notif-body { flex: 1; }
.order-notif-title {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 2px;
}
.order-notif-desc {
    font-size: 0.8125rem;
    color: rgba(255,255,255,0.7);
}
.order-notif-close {
    background: none;
    border: none;
    color: rgba(255,255,255,0.5);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    flex-shrink: 0;
}
.order-notif-close:hover { color: #fff; }

/* ─── ARCHIVES ───────────────────────────────────────────────── */
.archive-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin-bottom: 8px;
    transition: box-shadow var(--transition);
}
.archive-row:hover { box-shadow: var(--shadow-sm); }
.archive-row-left {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}
.archive-row-table {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text);
}
.archive-row-items {
    font-size: 0.8125rem;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.archive-item-line {
    font-size: 0.8125rem;
    color: var(--text-light);
}
.archive-row-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
    flex-shrink: 0;
}
.archive-row-total {
    font-size: 0.9375rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text);
}
.archive-row-time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ─── ARCHIVE ROW STATS ──────────────────────────────────────── */
.archive-row-stats {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 6px;
}
.archive-row-stats span {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.archive-row-stats svg {
    flex-shrink: 0;
}

/* ─── SETTINGS SECTION ───────────────────────────────────────── */
#settings .card {
    overflow: visible; /* allow dropdowns to escape */
}

#settings .card-body .form-group label {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 4px;
}

#settings .card-body p {
    margin: 0;
    font-size: 0.9375rem;
    color: var(--text);
}

#settings .card-body .form-row {
    margin-bottom: 0;
}

#settings .card-body .form-group {
    margin-bottom: 16px;
}

#settings .card-body .form-group:last-of-type {
    margin-bottom: 0;
}

/* Info card — read-only values */
#settings .card:first-of-type .card-body {
    padding: 20px;
}

/* Editable card */
#settings .card:last-of-type .card-body {
    padding: 20px;
}

/* ─── TAG PICKER (menu editor) ───────────────────────────────── */
.tag-picker {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.tag-group-label {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-top: 4px;
}
.tag-group-items {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.tag-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px 4px 7px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border);
    background: var(--bg);
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-light);
    cursor: pointer;
    transition: all var(--transition);
    line-height: 1;
}
.tag-chip:hover {
    border-color: #C4C4C9;
    color: var(--text);
}
.tag-chip.selected {
    font-weight: 600;
}
.tag-chip-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
}
.tag-chip-icon svg {
    width: 14px;
    height: 14px;
}

/* ─── ITEM TAG BADGES (editor list) ─────────────────────────── */
.item-tag-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 5px;
}
.item-tag-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px 2px 5px;
    border-radius: var(--radius-full);
    border: 1px solid;
    font-size: 0.6875rem;
    font-weight: 600;
    line-height: 1;
}
.item-tag-badge-icon {
    width: 12px;
    height: 12px;
    display: flex;
    align-items: center;
}
.item-tag-badge-icon svg {
    width: 12px;
    height: 12px;
}

/* ─── CLIENT TAG BADGES (menu.html) ─────────────────────────── */
.client-tag-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin: 5px 0 6px;
}
.client-tag-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px 3px 6px;
    border-radius: var(--radius-full);
    border: 1px solid;
    font-size: 0.6875rem;
    font-weight: 600;
    line-height: 1;
}
.client-tag-icon {
    width: 13px;
    height: 13px;
    display: flex;
    align-items: center;
}
.client-tag-icon svg {
    width: 13px;
    height: 13px;
}

/* ─── SIDEBAR PROFILE CARD ───────────────────────────────────── */
.sidebar-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    margin: 4px 8px 8px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: var(--bg-light);
    cursor: pointer;
    transition: all var(--transition);
}
.sidebar-profile:hover {
    background: var(--bg-dark);
    border-color: #C4C4C9;
}
.sidebar-profile-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-size: 0.875rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    border: 2px solid var(--border);
}
.sidebar-profile-info {
    flex: 1;
    min-width: 0;
}
.sidebar-profile-name {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: visible;
    display: flex;
    align-items: center;
    gap: 4px;
}
.sidebar-profile-role {
    font-size: 0.6875rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* ─── PROFILE AVATAR PREVIEW ─────────────────────────────────── */
.profile-avatar-preview {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-size: 1.25rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    border: 2px solid var(--border);
}

/* ─── EMPLOYEE PROFILE VIEW ──────────────────────────────────── */
.emp-profile-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}
.emp-profile-row svg {
    color: var(--text-muted);
    flex-shrink: 0;
}
.emp-profile-label {
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 2px;
}
.emp-profile-value {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text);
}

/* ─── CHAT FAB (restaurant side) ────────────────────────────── */
#chat-fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1000;
}
.chat-fab-btn {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-xl);
    transition: all var(--transition);
    position: relative;
}
.chat-fab-btn:hover { background: var(--primary-hover); transform: scale(1.05); }
.chat-fab-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--danger);
    color: #fff;
    font-size: 0.6875rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
}

/* ─── CHAT WIDGET (restaurant floating) ─────────────────────── */
.chat-widget {
    position: fixed;
    bottom: 88px;
    right: 24px;
    width: 340px;
    max-height: 480px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    display: flex;
    flex-direction: column;
    z-index: 999;
    overflow: hidden;
    animation: modal-in 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.chat-widget-header {
    background: var(--primary);
    color: #fff;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.875rem;
    font-weight: 600;
    flex-shrink: 0;
}
.chat-online-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4ade80;
    flex-shrink: 0;
}

/* ─── CHAT MESSAGES ──────────────────────────────────────────── */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 200px;
}
.chat-empty {
    color: var(--text-muted);
    font-size: 0.875rem;
    text-align: center;
    padding: 20px;
}
.chat-msg {
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-width: 80%;
}
.chat-msg-mine  { align-self: flex-end; align-items: flex-end; }
.chat-msg-theirs { align-self: flex-start; align-items: flex-start; }
.chat-bubble {
    padding: 8px 12px;
    border-radius: 16px;
    font-size: 0.875rem;
    line-height: 1.5;
    word-break: break-word;
}
.chat-msg-mine .chat-bubble {
    background: var(--primary);
    color: #fff;
    border-bottom-right-radius: 4px;
}
.chat-msg-theirs .chat-bubble {
    background: var(--bg-dark);
    color: var(--text);
    border-bottom-left-radius: 4px;
}
.chat-time {
    font-size: 0.6875rem;
    color: var(--text-muted);
    padding: 0 4px;
}

/* ─── CHAT INPUT ─────────────────────────────────────────────── */
.chat-input-row {
    display: flex;
    gap: 8px;
    padding: 10px 12px;
    border-top: 1px solid var(--border);
    background: var(--bg);
    flex-shrink: 0;
}
.chat-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-family: var(--font-sans);
    font-size: 0.875rem;
    background: var(--bg-light);
    outline: none;
    transition: border-color var(--transition);
}
.chat-input:focus { border-color: var(--primary); background: var(--bg); }
.chat-send-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background var(--transition);
}
.chat-send-btn:hover { background: var(--primary-hover); }

/* ─── SUPPORT LAYOUT (admin side) ───────────────────────────── */
.support-layout {
    display: flex;
    height: calc(100vh - 60px);
    overflow: hidden;
}
.support-sidebar {
    width: 280px;
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    background: var(--bg);
    overflow-y: auto;
}
.support-sidebar-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}
.support-sidebar-header h3 { margin: 0; font-size: 0.9375rem; }
.support-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.support-main-header {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
    background: var(--bg);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}
.support-main .chat-messages { padding: 16px 20px; }
.support-main .chat-input-row { padding: 12px 20px; }

/* ─── SUPPORT CONVERSATION ITEMS ────────────────────────────── */
.support-conv-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid var(--border);
    transition: background var(--transition);
}
.support-conv-item:hover { background: var(--bg-light); }
.support-conv-item.active { background: var(--bg-dark); }
.support-conv-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-size: 0.875rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.support-conv-info { flex: 1; min-width: 0; }
.support-conv-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.support-conv-last {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.support-conv-badge {
    background: var(--danger);
    color: #fff;
    border-radius: 99px;
    font-size: 0.6875rem;
    font-weight: 700;
    padding: 1px 7px;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .chat-widget { width: calc(100vw - 32px); right: 16px; }
    .support-layout { flex-direction: column; }
    .support-sidebar { width: 100%; height: 200px; border-right: none; border-bottom: 1px solid var(--border); }
}

/* ─── CHAT NOTIFICATION ──────────────────────────────────────── */
.chat-notif {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: #0A0A0A;
    color: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    min-width: 280px;
    max-width: 340px;
    pointer-events: all;
    animation: notif-in 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}
.chat-notif-icon {
    width: 38px;
    height: 38px;
    border-radius: var(--radius);
    background: #2563EB;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.chat-notif-body { flex: 1; }
.chat-notif-title {
    font-size: 0.875rem;
    font-weight: 700;
    margin-bottom: 2px;
}
.chat-notif-desc {
    font-size: 0.8125rem;
    color: rgba(255,255,255,0.7);
}

/* ─── CHAT SENDER NAME ───────────────────────────────────────── */
.chat-sender-name {
    font-size: 0.6875rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 2px;
    padding: 0 4px;
    display: flex;
    align-items: center;
    gap: 3px;
}
.chat-msg-mine .chat-sender-name {
    color: var(--primary);
    justify-content: flex-end;
}

/* ─── READ RECEIPT ───────────────────────────────────────────── */
.chat-receipt {
    font-size: 0.6875rem;
    color: rgba(0,0,0,0.35);
    margin-left: 3px;
}
.chat-receipt-read {
    color: #34B7F1; /* WhatsApp blue ticks */
}
.chat-msg-mine .chat-time {
    text-align: right;
}

/* ─── IMPROVED CHAT WIDGET ───────────────────────────────────── */
.chat-widget {
    box-shadow: 0 8px 32px rgba(0,0,0,0.18), 0 2px 8px rgba(0,0,0,0.1);
}
.chat-widget-header {
    background: var(--primary);
}
.chat-msg-mine .chat-bubble {
    background: var(--primary);
    color: #fff;
}
.chat-msg-theirs .chat-bubble {
    background: var(--bg-dark);
    color: var(--text);
    border: 1px solid var(--border);
}
.chat-messages {
    background: var(--bg-light);
}
.support-main .chat-messages {
    background: var(--bg-light);
}

/* ─── VERIFIED BADGE ─────────────────────────────────────────── */
.verified-badge {
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    cursor: default;
    color: #2563EB;
}
.verified-badge-sm {
    width: 13px;
    height: 13px;
}

/* Tooltip au hover sur le badge certif */
.verified-badge[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%) scale(0.9);
    background: #18181B;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    white-space: nowrap;
    padding: 4px 8px;
    border-radius: 6px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease, transform 0.15s ease;
    z-index: 100;
    letter-spacing: 0.01em;
}
.verified-badge[data-tooltip]::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%) scale(0.9);
    border: 4px solid transparent;
    border-top-color: #18181B;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease, transform 0.15s ease;
    z-index: 100;
}
.verified-badge[data-tooltip]:hover::after,
.verified-badge[data-tooltip]:hover::before {
    opacity: 1;
    transform: translateX(-50%) scale(1);
}

/* ─── CHAT SENDER NAME FIX ───────────────────────────────────── */
/* Override: name above dark bubble must NOT be white */
.chat-msg-mine .chat-sender-name {
    color: var(--text-muted) !important;
    justify-content: flex-end;
}
/* Conversations sidebar scrolls internally, not the whole section */
#support > .support-layout {
    overflow: hidden;
}
#support > .support-layout > .support-sidebar {
    overflow-y: auto;
}

/* ─── PHOTO UPLOAD GROUP ─────────────────────────────────────── */
.photo-upload-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.photo-upload-tabs {
    display: flex;
    gap: 4px;
    background: var(--bg-dark);
    border-radius: var(--radius);
    padding: 3px;
    width: fit-content;
}
.photo-tab {
    padding: 4px 14px;
    border: none;
    border-radius: calc(var(--radius) - 2px);
    background: transparent;
    font-family: var(--font-sans);
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition);
}
.photo-tab.active {
    background: var(--bg);
    color: var(--text);
    box-shadow: var(--shadow-xs);
}

/* ─── ROLE BADGE PILL ────────────────────────────────────────── */
.role-badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px 3px 7px;
    border-radius: var(--radius-full);
    border: 1px solid;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}
.role-badge-pill svg {
    flex-shrink: 0;
}

/* ─── ROLE BADGE ICON (icon only, no text) ───────────────────── */
.role-badge-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    cursor: default;
    position: relative;
}
.role-badge-icon svg {
    width: 16px;
    height: 16px;
}

/* Tooltip au hover */
.role-badge-icon::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%) scale(0.9);
    background: #18181B;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    white-space: nowrap;
    padding: 4px 8px;
    border-radius: 6px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease, transform 0.15s ease;
    z-index: 100;
    letter-spacing: 0.01em;
}
.role-badge-icon::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%) scale(0.9);
    border: 4px solid transparent;
    border-top-color: #18181B;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease, transform 0.15s ease;
    z-index: 100;
}
.role-badge-icon:hover::after,
.role-badge-icon:hover::before {
    opacity: 1;
    transform: translateX(-50%) scale(1);
}

/* ─── TABLE REQUEST BADGE ────────────────────────────────────── */
@keyframes pulse-badge {
    0%, 100% { transform: scale(1); opacity: 1; }
    50%       { transform: scale(1.25); opacity: 0.7; }
}
.table-request-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    font-size: 1rem;
    line-height: 1;
    animation: pulse-badge 1.5s ease-in-out infinite;
    pointer-events: none;
}

/* ─── TABLE REQUEST BADGE ────────────────────────────────────── */
@keyframes pulse-badge {
    0%, 100% { transform: scale(1); }
    50%       { transform: scale(1.25); }
}

/* ─── TOGGLE SWITCH ─────────────────────────────────────────── */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
    cursor: pointer;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
    position: absolute;
    inset: 0;
    background: #D1D5DB;
    border-radius: 99px;
    transition: background 0.2s;
}
.toggle-slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    top: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.toggle-switch input:checked + .toggle-slider { background: #0A0A0A; }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(20px); }

/* ─── ASSIGN RESTAURANT CARDS ────────────────────────────────── */
.assign-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: var(--radius);
    border: 1.5px solid var(--border);
    background: var(--bg);
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    user-select: none;
}
.assign-card:hover {
    border-color: #A1A1AA;
    background: var(--bg-light);
}
.assign-card--checked {
    border-color: #2563EB;
    background: #EFF6FF;
}
.assign-card-check {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    border: 2px solid var(--border);
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: transparent;
    transition: all 0.15s;
}
.assign-card--checked .assign-card-check {
    background: #2563EB;
    border-color: #2563EB;
    color: #fff;
}
.assign-card-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.assign-card-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text);
}
.assign-card-email {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ─── BADGE CHECKBOXES ───────────────────────────────────────── */
.badge-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px;
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.badge-check-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border);
    background: var(--bg);
    cursor: pointer;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-light);
    transition: all var(--transition);
    user-select: none;
}
.badge-check-item:hover {
    border-color: #C4C4C9;
    color: var(--text);
}
.badge-check-item input[type=checkbox] {
    width: 14px;
    height: 14px;
    cursor: pointer;
    accent-color: var(--primary);
    flex-shrink: 0;
    appearance: auto;
    -webkit-appearance: auto;
}

/* ─── Role tag picker ─────────────────────────────────────── */
.role-tag { opacity: 0.45; transition: opacity 0.15s, transform 0.1s; }
.role-tag:hover { opacity: 0.7; }
.role-tag.selected { opacity: 1; transform: scale(1.04); }

/* ─── Colonnes masquées — largeur fixe pour éviter le layout shift ── */
.masked-info {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-width: 120px;
    white-space: nowrap;
}
.masked-info .masked-dots {
    display: inline-block;
    min-width: 90px;
    font-family: monospace;
}
