/* ===================== Brand Fonts ===================== */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@1,500&family=Outfit:wght@200;300;400&display=swap');

/* ===================== CSS Variables ===================== */
:root {
    --brand-gold: #C97A12;
    --c-primary: #6366f1;
    --c-primary-dark: #4f46e5;
    --c-bg: #f9fafb;
    --c-surface: #ffffff;
    --c-border: #e5e7eb;
    --c-text: #111827;
    --c-muted: #6b7280;
    --c-shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --c-shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
    --s-pending: #f59e0b;
    --s-inkitchen: #3b82f6;
    --s-ready: #22c55e;
    --s-delivered: #9ca3af;
    --s-cancelled: #ef4444;
    --radius: 12px;
    --radius-sm: 6px;
}

/* ===================== Reset ===================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif; background: var(--c-bg); color: var(--c-text); line-height: 1.5; font-size: 16px; }
a { color: var(--c-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
button { cursor: pointer; font-family: inherit; border: none; }
input, textarea, select { font-family: inherit; font-size: 1rem; }
ul { list-style: none; }

/* ===================== Buttons ===================== */
.btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 16px; border-radius: var(--radius-sm);
    font-size: 0.875rem; font-weight: 500; transition: all 0.15s;
    border: 1.5px solid transparent;
}
.btn-primary { background: var(--c-primary); color: #fff; }
.btn-primary:hover { background: var(--c-primary-dark); }
.btn-secondary { background: var(--c-surface); color: var(--c-text); border-color: var(--c-border); }
.btn-secondary:hover { background: var(--c-bg); }
.btn-danger { background: #fee2e2; color: #dc2626; border-color: #fca5a5; }
.btn-danger:hover { background: #fecaca; }
.inline-confirm { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.inline-confirm-text { font-size: 0.85rem; color: #dc2626; font-weight: 600; }
.btn-danger:hover { background: #fca5a5; }
.btn-sm { padding: 4px 10px; font-size: 0.8rem; }
.btn-lg { padding: 12px 24px; font-size: 1rem; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ===================== Forms ===================== */
.form-group { display: flex; flex-direction: column; gap: 4px; }
.form-label { font-size: 0.85rem; font-weight: 500; color: var(--c-muted); }
.form-input {
    padding: 8px 12px; border: 1.5px solid var(--c-border);
    border-radius: var(--radius-sm); background: var(--c-surface);
    transition: border-color 0.15s;
}
.form-input:focus { outline: none; border-color: var(--c-primary); }
.form-row { display: flex; gap: 12px; flex-wrap: wrap; }
.form-row > * { flex: 1; min-width: 140px; }

/* ===================== Cards ===================== */
.card {
    background: var(--c-surface); border-radius: var(--radius);
    box-shadow: var(--c-shadow); padding: 16px;
}
.card-title { font-size: 1rem; font-weight: 600; margin-bottom: 12px; }

/* ===================== App Header ===================== */
.app-header {
    background: var(--c-surface); border-bottom: 1px solid var(--c-border);
    padding: 0 20px; height: 52px;
    display: flex; align-items: center; gap: 20px;
}
/* ===================== Logo Mark ===================== */
.e-mark {
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--brand-gold); border-radius: 18%; flex-shrink: 0; line-height: 1;
}
.e-mark-letter {
    font-family: 'Cormorant Garamond', Georgia, serif; font-style: italic; font-weight: 500;
    color: #fff; line-height: 1; display: block; transform: translateY(0.04em);
}
.logo-lockup { display: inline-flex; align-items: center; gap: 0; text-decoration: none; }
.logo-lockup:hover { text-decoration: none; }
.logo-lockup-table {
    font-family: 'Outfit', 'Helvetica Neue', sans-serif; font-weight: 200;
    color: var(--c-text); letter-spacing: 0.02em; line-height: 1;
}

.app-logo { font-size: 1.2rem; font-weight: 700; color: var(--c-primary); }
.app-nav { display: flex; gap: 16px; font-size: 0.9rem; }
.app-main { padding: 20px; max-width: 1200px; margin: 0 auto; }

/* ===================== Home Page ===================== */
.home-hero { text-align: center; padding: 60px 20px 40px; }
.home-hero h1 { font-size: 3rem; font-weight: 800; color: var(--c-primary); margin-bottom: 8px; }
.home-hero > p { color: var(--c-muted); font-size: 1.1rem; margin-bottom: 40px; }
.home-links { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; }
.link-group { background: var(--c-surface); border-radius: var(--radius); box-shadow: var(--c-shadow); padding: 20px 28px; min-width: 180px; text-align: left; }
.link-group h2 { font-size: 1rem; color: var(--c-muted); font-weight: 500; margin-bottom: 16px; text-align: center; }
.link-group h3 { font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--c-muted); margin-bottom: 8px; }
.link-group li { margin-bottom: 6px; }
.link-group a { color: var(--c-text); font-size: 0.95rem; }
.link-group a:hover { color: var(--c-primary); }

/* ===================== Public Menu Page ===================== */
.menu-page { min-height: 100vh; background: var(--c-bg); padding-bottom: 100px; }
.menu-hero {
    background: var(--c-primary); color: #fff;
    padding: 24px 20px 20px; text-align: center;
}
.menu-tenant-logo { max-height: 72px; max-width: 180px; object-fit: contain; border-radius: 8px; margin-bottom: 10px; display: block; margin-left: auto; margin-right: auto; }
.menu-hero h1 { font-size: 1.5rem; font-weight: 700; }
.menu-hero .table-badge {
    display: inline-block; margin-top: 6px;
    background: rgba(255,255,255,0.2); padding: 4px 12px; border-radius: 20px;
    font-size: 0.9rem;
}
.menu-body { padding: 16px; max-width: 640px; margin: 0 auto; }
.menu-category { margin-bottom: 24px; }
.menu-category-title {
    font-size: 1.1rem; font-weight: 700; color: var(--c-text);
    padding: 8px 0; margin-bottom: 12px;
    border-bottom: 2px solid var(--c-primary);
}
.menu-items-list { display: flex; flex-direction: column; gap: 10px; }
.menu-item {
    background: var(--c-surface); border-radius: var(--radius);
    box-shadow: var(--c-shadow); padding: 14px 16px;
    display: flex; align-items: flex-start; gap: 12px;
}
.menu-item-info { flex: 1; }
.menu-item-name { font-weight: 600; font-size: 0.95rem; }
.menu-item-desc { color: var(--c-muted); font-size: 0.85rem; margin-top: 2px; }
.menu-item-price { font-weight: 700; color: var(--c-primary); font-size: 0.95rem; margin-top: 4px; }
.menu-item-controls { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.qty-control { display: flex; align-items: center; gap: 8px; }
.qty-btn {
    width: 28px; height: 28px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: var(--c-bg); border: 1.5px solid var(--c-border);
    font-size: 1.1rem; font-weight: 600; color: var(--c-text);
    transition: all 0.15s;
}
.qty-btn:hover { border-color: var(--c-primary); color: var(--c-primary); }
.qty-num { min-width: 24px; text-align: center; font-weight: 600; }
.notes-input {
    font-size: 0.8rem; padding: 4px 8px;
    border: 1px solid var(--c-border); border-radius: var(--radius-sm);
    width: 140px; max-width: 100%;
}
.notes-input:focus { outline: none; border-color: var(--c-primary); }

/* Cart sticky bar */
.cart-bar {
    position: fixed; bottom: 0; left: 0; right: 0;
    background: var(--c-primary); color: #fff;
    padding: 12px 20px; box-shadow: 0 -4px 12px rgba(0,0,0,0.15);
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    z-index: 100;
}
.cart-bar-info { font-size: 0.9rem; }
.cart-bar-count { font-weight: 700; font-size: 1.1rem; }
.cart-bar-btn {
    background: #fff; color: var(--c-primary);
    padding: 8px 20px; border-radius: var(--radius-sm);
    font-weight: 700; font-size: 0.95rem; flex-shrink: 0;
}
.cart-bar-btn:hover { background: #f0f0ff; }
.cart-bar-btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* Order confirmation */
.order-confirm {
    text-align: center; padding: 40px 20px;
    max-width: 400px; margin: 40px auto;
    background: var(--c-surface); border-radius: var(--radius);
    box-shadow: var(--c-shadow-md);
}
.order-confirm .icon { font-size: 3rem; margin-bottom: 12px; }
.order-confirm h2 { font-size: 1.3rem; font-weight: 700; margin-bottom: 8px; }
.order-confirm p { color: var(--c-muted); margin-bottom: 20px; }
.order-id { font-family: monospace; background: var(--c-bg); padding: 6px 12px; border-radius: var(--radius-sm); font-size: 0.85rem; }

.alert-error { background: #fee2e2; color: #dc2626; padding: 10px 14px; border-radius: var(--radius-sm); font-size: 0.9rem; margin-bottom: 12px; }
.not-found { text-align: center; padding: 60px 20px; color: var(--c-muted); }
.not-found h2 { font-size: 1.5rem; color: var(--c-text); margin-bottom: 8px; }

/* ===================== Kitchen Page ===================== */
.kitchen-page { min-height: 100vh; background: #0f172a; color: #e2e8f0; }
.kitchen-header {
    background: #1e293b; padding: 14px 20px;
    display: flex; align-items: center; justify-content: space-between;
    border-bottom: 1px solid #334155;
}
.kitchen-header h1 { font-size: 1.2rem; font-weight: 700; color: #f1f5f9; }
.kitchen-tenant { font-size: 0.85rem; color: #94a3b8; }
.kitchen-live { display: flex; align-items: center; gap: 6px; font-size: 0.8rem; color: #4ade80; }
.panel-switcher {
    background: #334155; color: #f1f5f9; border: 1px solid #475569;
    border-radius: 8px; padding: 6px 12px; font-size: 0.95rem; font-weight: 600;
    cursor: pointer; outline: none;
}
.panel-switcher:focus { border-color: #7c3aed; }
.kitchen-live::before { content: '●'; animation: blink 1.5s infinite; }
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0.3} }
.kitchen-body { padding: 16px; }
.kitchen-empty { text-align: center; padding: 80px 20px; color: #64748b; }
.kitchen-empty .icon { font-size: 3rem; margin-bottom: 12px; }
.kitchen-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.order-card {
    background: #1e293b; border-radius: var(--radius);
    border: 1px solid #334155; overflow: hidden;
    transition: box-shadow 0.2s;
}
.order-card:hover { box-shadow: 0 0 0 1px #6366f1; }
.order-card-header {
    padding: 10px 14px;
    display: flex; justify-content: space-between; align-items: center;
    border-bottom: 1px solid #334155;
}
.order-table { font-weight: 700; font-size: 1rem; }
.order-time { font-size: 0.8rem; color: #94a3b8; }
.order-items-list { padding: 12px 14px; border-bottom: 1px solid #334155; }
.order-item-line { display: flex; gap: 8px; font-size: 0.9rem; margin-bottom: 4px; }
.order-item-qty { font-weight: 700; color: #6366f1; }
.order-item-notes { font-size: 0.8rem; color: #94a3b8; margin-left: 20px; font-style: italic; }
.order-card-footer { padding: 10px 14px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.status-badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 10px; border-radius: 20px; font-size: 0.8rem; font-weight: 600;
}
.status-Pending { background: rgba(245,158,11,0.2); color: #fbbf24; }
.status-InKitchen { background: rgba(59,130,246,0.2); color: #60a5fa; }
.status-Ready { background: rgba(34,197,94,0.2); color: #4ade80; }
.status-Delivered { background: rgba(156,163,175,0.2); color: #9ca3af; }
.status-Cancelled { background: rgba(239,68,68,0.2); color: #f87171; }
.order-actions { display: flex; gap: 6px; }
.action-btn {
    padding: 5px 12px; border-radius: var(--radius-sm);
    font-size: 0.8rem; font-weight: 600; transition: all 0.15s;
}
.action-accept { background: #1d4ed8; color: #fff; }
.action-accept:hover { background: #2563eb; }
.action-ready { background: #15803d; color: #fff; }
.action-ready:hover { background: #16a34a; }
.action-deliver { background: #334155; color: #cbd5e1; }
.action-deliver:hover { background: #475569; }
.action-cancel { background: #7f1d1d; color: #fca5a5; }
.action-cancel:hover { background: #991b1b; }

/* ===================== Manager Page ===================== */
.manager-page { }
.manager-header {
    background: var(--c-surface); border-bottom: 1px solid var(--c-border);
    padding: 16px 20px;
}
.manager-header h1 { font-size: 1.2rem; font-weight: 700; }
.manager-tenant { color: var(--c-muted); font-size: 0.9rem; }
.tab-bar { display: flex; gap: 4px; padding: 16px 20px 0; border-bottom: 2px solid var(--c-border); }
.tab {
    padding: 8px 20px; border-radius: 6px 6px 0 0;
    font-size: 0.9rem; font-weight: 500; color: var(--c-muted);
    cursor: pointer; background: transparent; border: none;
    border-bottom: 2px solid transparent; margin-bottom: -2px;
    transition: all 0.15s;
}
.tab:hover { color: var(--c-text); }
.tab.active { color: var(--c-primary); border-bottom-color: var(--c-primary); font-weight: 600; }
.manager-body { padding: 20px; max-width: 900px; }
.section-title { font-size: 1rem; font-weight: 700; margin-bottom: 12px; }
.limit-banner { padding: 10px 14px; background: #fef3c7; color: #92400e; border-radius: 8px; font-size: 0.85rem; border: 1px solid #fcd34d; }
.section-card { background: var(--c-surface); border-radius: var(--radius); box-shadow: var(--c-shadow); padding: 16px; margin-bottom: 16px; }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.data-table th { text-align: left; padding: 8px 12px; border-bottom: 2px solid var(--c-border); color: var(--c-muted); font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.data-table td { padding: 10px 12px; border-bottom: 1px solid var(--c-border); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }
.slug-code { font-family: monospace; background: var(--c-bg); padding: 2px 6px; border-radius: 4px; font-size: 0.8rem; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 20px; font-size: 0.75rem; font-weight: 600; }
.badge-active { background: #dcfce7; color: #15803d; }
.badge-inactive { background: #f3f4f6; color: #6b7280; }
.add-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.add-form .form-group { flex: 1; min-width: 140px; }
.category-section { margin-bottom: 20px; }
.category-header { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--c-border); margin-bottom: 10px; }
.category-name { font-weight: 600; }

/* ===================== Reports Tab ===================== */
.report-view-toggle { display:flex; border:1px solid var(--c-border); border-radius:8px; overflow:hidden; }
.report-view-toggle button { padding:4px 12px; font-size:0.82rem; background:transparent; color:var(--c-muted); border:none; cursor:pointer; }
.report-view-toggle button.active { background:var(--c-primary); color:#fff; }

.report-table-group { margin-top:24px; border:1px solid var(--c-border); border-radius:10px; overflow:hidden; }
.report-table-group-header {
    display:flex; justify-content:space-between; align-items:center;
    padding:10px 14px; background:var(--c-surface2,#e5e7eb); font-weight:700; font-size:0.95rem;
}
.report-session-block { border-top:1px solid var(--c-border); }
.report-session-header {
    display:flex; justify-content:space-between; align-items:center;
    padding:7px 14px; background:var(--c-surface,#f9fafb);
    font-size:0.82rem; color:var(--c-muted); border-bottom:1px solid var(--c-border);
}
.report-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}
.report-kpi {
    background: var(--c-bg); border-radius: var(--radius-sm);
    border: 1.5px solid var(--c-border); padding: 14px 16px;
}
.report-kpi-danger { border-color: #fca5a5; background: #fff5f5; }
.report-kpi-label { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--c-muted); margin-bottom: 6px; }
.report-kpi-value { font-size: 1.6rem; font-weight: 800; color: var(--c-text); }
.report-kpi-green { color: #15803d; }
.report-kpi-danger .report-kpi-value { color: #dc2626; }

.report-status-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 4px; }
.report-status-pill {
    display: flex; align-items: center; gap: 6px;
    padding: 5px 12px; border-radius: 20px;
    font-size: 0.8rem; border: 1.5px solid;
}
.report-status-count { font-weight: 700; font-size: 1rem; }
.report-status-label { font-weight: 500; }
.report-status-Pending    { background: #fef3c7; color: #92400e; border-color: #fcd34d; }
.report-status-InKitchen  { background: #dbeafe; color: #1e40af; border-color: #93c5fd; }
.report-status-Ready      { background: #dcfce7; color: #166534; border-color: #86efac; }
.report-status-Delivered  { background: #f3f4f6; color: #4b5563; border-color: #d1d5db; }
.report-status-Cancelled  { background: #fee2e2; color: #991b1b; border-color: #fca5a5; }

.report-badge {
    display: inline-block; padding: 2px 9px; border-radius: 20px;
    font-size: 0.75rem; font-weight: 600;
}
.report-badge-Pending    { background: #fef3c7; color: #92400e; }
.report-badge-InKitchen  { background: #dbeafe; color: #1e40af; }
.report-badge-Ready      { background: #dcfce7; color: #166534; }
.report-badge-Delivered  { background: #f3f4f6; color: #4b5563; }
.report-badge-Cancelled  { background: #fee2e2; color: #991b1b; }

/* ===================== Admin Page ===================== */
.admin-page { }
.admin-header { padding: 20px; border-bottom: 1px solid var(--c-border); background: var(--c-surface); }
.admin-header h1 { font-size: 1.2rem; font-weight: 700; }
.admin-body { padding: 20px; max-width: 800px; }
.tenant-card { background: var(--c-surface); border-radius: var(--radius); box-shadow: var(--c-shadow); padding: 16px; margin-bottom: 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tenant-name { font-weight: 600; }
.tenant-slug { font-size: 0.85rem; color: var(--c-muted); }
.tenant-links { display: flex; gap: 8px; font-size: 0.85rem; }

/* ===================== Waiter Page ===================== */
.btn-success { background: #16a34a; color: #fff; border-color: #15803d; }
.btn-success:hover { background: #15803d; }

.waiter-page { min-height: 100vh; background: var(--c-bg); }
.waiter-header {
    background: var(--c-surface); border-bottom: 1px solid var(--c-border);
    padding: 14px 20px;
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 12px;
}
.waiter-header h1 { font-size: 1.2rem; font-weight: 700; }
.waiter-tenant { font-size: 0.85rem; color: var(--c-muted); }
.waiter-live { display: flex; align-items: center; gap: 6px; font-size: 0.8rem; color: #4ade80; }
.waiter-live::before { content: '●'; animation: blink 1.5s infinite; }

.tables-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px; padding: 20px;
    max-width: 1200px; margin: 0 auto;
}

/* Table cards */
.table-card {
    background: var(--c-surface); border-radius: var(--radius);
    box-shadow: var(--c-shadow); overflow: hidden;
    display: flex; flex-direction: column;
    border: 2px solid var(--c-border);
    transition: box-shadow 0.2s, border-color 0.2s;
}
.table-card:hover { box-shadow: var(--c-shadow-md); }
.table-libre     { border-color: #d1fae5; }
.table-open-empty{ border-color: #e0e7ff; }
.table-ocupada   { border-color: #fde68a; }
.table-ready     { border-color: #4ade80; box-shadow: 0 0 0 2px rgba(74,222,128,.35); }

.table-card-header {
    padding: 12px 14px;
    display: flex; align-items: center; justify-content: space-between;
    border-bottom: 1px solid var(--c-border);
}
.table-card-label { font-weight: 700; font-size: 1.05rem; }

/* Badge variants for table state */
.badge-libre    { background: #dcfce7; color: #15803d; }
.badge-open     { background: #e0e7ff; color: #4338ca; }
.badge-ocupada  { background: #fef9c3; color: #a16207; }

/* Summary block */
.table-summary { padding: 12px 14px; flex: 1; display: flex; flex-direction: column; gap: 10px; }
.table-total { font-size: 1.6rem; font-weight: 800; color: var(--c-text); }

.table-status-pills { display: flex; flex-wrap: wrap; gap: 4px; }
.status-pill { font-size: 0.72rem; font-weight: 600; padding: 2px 8px; border-radius: 20px; }
.status-pill-Pending    { background: #fef3c7; color: #92400e; }
.status-pill-InKitchen  { background: #dbeafe; color: #1e40af; }
.status-pill-Ready      { background: #dcfce7; color: #166534; }
.status-pill-Delivered  { background: #f3f4f6; color: #4b5563; }

.table-empty-note { padding: 12px 14px; flex: 1; font-size: 0.85rem; color: var(--c-muted); font-style: italic; }

.table-card-actions {
    padding: 12px 14px; border-top: 1px solid var(--c-border);
    display: flex; gap: 8px; flex-wrap: wrap;
}
.table-action-full { flex: 1; justify-content: center; }

.btn-cobrar {
    flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px;
    background: #7c3aed; color: #fff;
    padding: 9px 16px; border-radius: var(--radius-sm);
    font-size: 0.9rem; font-weight: 700; border: none; cursor: pointer;
    transition: background 0.15s;
}
.btn-cobrar:hover { background: #6d28d9; }

.btn-recover {
    width: 100%; padding: 5px 8px; font-size: 0.75rem;
    background: transparent; color: var(--c-muted);
    border: 1px dashed var(--c-border); border-radius: 6px;
    cursor: pointer; transition: color 0.15s, border-color 0.15s;
}
.btn-recover:hover { color: var(--c-text); border-color: var(--c-muted); }

/* Bill confirmation */
.bill-confirm { padding: 14px; flex: 1; display: flex; flex-direction: column; gap: 0; }
.bill-title { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--c-muted); margin-bottom: 8px; }
.bill-line {
    display: flex; justify-content: space-between; align-items: baseline;
    font-size: 0.85rem; padding: 4px 0;
    border-bottom: 1px dashed var(--c-border);
}
.bill-pending-warning {
    margin-top: 10px; padding: 8px 10px; border-radius: 6px;
    background: #fef3c7; border: 1px solid #fcd34d;
}
.bill-pending-title { font-size: 0.8rem; font-weight: 700; color: #92400e; margin-bottom: 4px; }
.bill-pending-line { font-size: 0.78rem; color: #78350f; }

.bill-total {
    display: flex; justify-content: space-between; align-items: baseline;
    font-size: 1.05rem; font-weight: 800; padding: 10px 0 4px;
}

/* ===================== Utils ===================== */
.text-muted { color: var(--c-muted); }
.text-center { text-align: center; }
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }
.loading { text-align: center; padding: 40px; color: var(--c-muted); }
.error { color: #dc2626; font-size: 0.9rem; margin-top: 6px; }
.success { color: #15803d; font-size: 0.9rem; margin-top: 6px; }

/* ===================== Login Page ===================== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--c-bg);
    padding: 20px;
}
.login-card {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: 12px;
    padding: 40px;
    width: 100%;
    max-width: 380px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.06);
}
.login-logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--c-primary);
    text-align: center;
    margin-bottom: 4px;
}
.login-tenant {
    text-align: center;
    color: var(--c-muted);
    font-size: 0.85rem;
    margin-bottom: 28px;
}
.login-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.875rem;
    margin-bottom: 20px;
}
.login-field {
    margin-bottom: 16px;
}
.login-field label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--c-text);
    margin-bottom: 6px;
}
.login-field input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--c-border);
    border-radius: 8px;
    font-size: 0.95rem;
    background: var(--c-bg);
    color: var(--c-text);
    box-sizing: border-box;
    transition: border-color 0.15s;
}
.login-field input:focus {
    outline: none;
    border-color: var(--c-primary);
}
.login-submit {
    width: 100%;
    margin-top: 8px;
    padding: 12px;
    font-size: 1rem;
}
.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
}

/* ===================== Landing Page ===================== */
.lp-nav {
    position: sticky; top: 0; z-index: 200;
    background: rgba(255,255,255,0.95); backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--c-border);
}
.lp-nav-inner {
    max-width: 1100px; margin: 0 auto; padding: 0 24px;
    height: 60px; display: flex; align-items: center; justify-content: space-between;
}
.lp-brand { display: inline-flex; align-items: center; text-decoration: none; }
.lp-brand:hover { text-decoration: none; }
.lp-brand .logo-lockup-table { color: var(--c-text); }
.lp-acceder-btn {
    background: var(--c-primary); color: #fff;
    padding: 9px 20px; border-radius: var(--radius-sm);
    font-size: 0.9rem; font-weight: 600; border: none; cursor: pointer;
    transition: background 0.15s;
}
.lp-acceder-btn:hover { background: var(--c-primary-dark); }

.lp-hero {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 55%, #4338ca 100%);
    color: #fff; padding: 100px 24px 120px; text-align: center;
}
.lp-hero-inner { max-width: 720px; margin: 0 auto; }
.lp-hero-badge {
    display: inline-block; background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.2);
    padding: 5px 16px; border-radius: 20px; font-size: 0.8rem;
    letter-spacing: 0.04em; margin-bottom: 28px; color: rgba(255,255,255,0.85);
}
.lp-hero-title {
    font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 800;
    line-height: 1.15; letter-spacing: -0.03em; margin-bottom: 20px;
}
.lp-hero-sub {
    font-size: 1.1rem; color: rgba(255,255,255,0.75);
    max-width: 560px; margin: 0 auto 36px; line-height: 1.7;
}
.lp-btn-hero {
    display: inline-block;
    background: #fff; color: var(--c-primary-dark);
    padding: 14px 28px; font-size: 1rem; font-weight: 700;
    border-radius: var(--radius-sm); border: none; cursor: pointer;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    transition: transform 0.15s, box-shadow 0.15s;
}
.lp-btn-hero:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.25); }

.lp-features { background: var(--c-bg); padding: 80px 24px; }
.lp-features-inner {
    max-width: 960px; margin: 0 auto;
    display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}
.lp-feature-card {
    background: var(--c-surface); border-radius: var(--radius);
    box-shadow: var(--c-shadow-md); padding: 32px 28px; text-align: center;
}
.lp-feature-icon { font-size: 2.4rem; margin-bottom: 16px; }
.lp-feature-card h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 10px; }
.lp-feature-card p { color: var(--c-muted); font-size: 0.9rem; line-height: 1.65; }

.lp-cta {
    background: linear-gradient(135deg, #1e1b4b, #4f46e5);
    color: #fff; text-align: center; padding: 80px 24px;
}
.lp-cta h2 { font-size: 1.9rem; font-weight: 800; margin-bottom: 12px; }
.lp-cta p { color: rgba(255,255,255,0.72); margin-bottom: 32px; font-size: 1rem; }

.lp-footer {
    background: #111827; color: #6b7280;
    text-align: center; padding: 20px; font-size: 0.8rem;
}

.lp-overlay {
    position: fixed; inset: 0; z-index: 1000;
    background: rgba(0,0,0,0.5); backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center; padding: 20px;
}
.lp-modal {
    background: var(--c-surface); border-radius: var(--radius);
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
    padding: 40px 36px; width: 100%; max-width: 380px;
    position: relative; text-align: center;
}
.lp-modal-close {
    position: absolute; top: 14px; right: 16px;
    background: none; color: var(--c-muted); font-size: 1.1rem;
    border: none; cursor: pointer; line-height: 1; padding: 4px;
}
.lp-modal-close:hover { color: var(--c-text); }
.lp-modal-logo {
    font-size: 1.8rem; font-weight: 800; color: var(--c-primary);
    letter-spacing: -0.03em; margin-bottom: 20px;
}
.lp-modal-title { font-size: 1.2rem; font-weight: 700; margin-bottom: 6px; }
.lp-modal-sub { color: var(--c-muted); font-size: 0.88rem; margin-bottom: 24px; }
.lp-modal-input {
    width: 100%; padding: 12px 14px;
    border: 1.5px solid var(--c-border); border-radius: var(--radius-sm);
    font-size: 0.95rem; background: var(--c-bg); color: var(--c-text);
    text-align: center; margin-bottom: 12px;
    transition: border-color 0.15s;
}
.lp-modal-input:focus { outline: none; border-color: var(--c-primary); box-shadow: 0 0 0 3px rgba(99,102,241,0.12); }
.lp-modal-submit {
    width: 100%; padding: 12px; font-size: 1rem; font-weight: 700;
    background: var(--c-primary); color: #fff;
    border: none; border-radius: var(--radius-sm); cursor: pointer;
    transition: background 0.15s;
}
.lp-modal-submit:hover { background: var(--c-primary-dark); }
.lp-modal-submit:disabled { opacity: 0.5; cursor: not-allowed; }
