:root {
    --ink: #17212b;
    --muted: #64748b;
    --paper: #f4f7f9;
    --card: #ffffff;
    --brand: #123b5d;
    --brand-dark: #0b2f4a;
    --accent: #f59e0b;
    --accent-dark: #d97706;
    --success: #15803d;
    --danger: #dc2626;
    --line: #dce5ea;
    --shadow: 0 10px 30px rgba(18, 59, 93, .09);
}

html, body { background: var(--paper); color: var(--ink); }
a { color: var(--brand); }

button, .button {
    border-color: var(--brand);
    background: var(--brand);
    color: #fff;
}
button:hover, .button:hover { background: var(--brand-dark); }
button:focus-visible, .button:focus-visible, a:focus-visible {
    outline: 3px solid rgba(245, 158, 11, .36);
    outline-offset: 2px;
}
button:disabled, .button:disabled {
    border-color: #94a3b8;
    background: #94a3b8;
    color: #fff;
}

.secondary, button.secondary, .button.secondary {
    border: 1px solid var(--brand);
    background: #fff;
    color: var(--brand);
}
.secondary:hover, button.secondary:hover, .button.secondary:hover {
    border-color: var(--brand-dark);
    background: #e8f1f7;
    color: var(--brand-dark);
}
.danger, button.danger, .button.danger {
    border-color: var(--danger);
    background: var(--danger);
    color: #fff;
}
.danger:hover, button.danger:hover, .button.danger:hover { background: #b91c1c; }

input:focus, select:focus, textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px #fef3c7;
}
.eyebrow { color: var(--accent); }

.owner-sidebar, .auth-brand { background-color: var(--brand); }
.owner-sidebar nav a:hover, .owner-sidebar nav a.active { background: #1b5278; color: #fff; }
.summary.main-summary { background: linear-gradient(125deg, var(--brand), #1b5278); }
.sidebar-logout { background: var(--danger); }
.sidebar-logout:hover { background: #b91c1c; }

.order-now-fixed {
    border-color: var(--accent);
    background: var(--accent);
    color: #17212b;
    box-shadow: 0 5px 18px rgba(245, 158, 11, .3);
}
.order-now-fixed:hover { background: var(--accent-dark); color: #17212b; }
.order-now-fixed:disabled {
    border-color: #94a3b8;
    background: #94a3b8;
    color: #fff;
    box-shadow: none;
}

.featured-badge {
    background: #fef3c7;
    color: #92400e;
}
.admin-price b { color: var(--accent-dark); }

.orders-grid {
    grid-template-columns: repeat(auto-fill, 260px);
    justify-content: start;
}
.orders-grid .order {
    width: 260px;
}
.orders-grid .order button {
    border-color: var(--success);
    background: var(--success);
}
.orders-grid .order button:hover { background: #166534; }
.order-item-list { display: grid; gap: 5px; margin: 14px 0; padding: 0; list-style: none; }
.order-item-list li { margin: 0; font-size: .82rem; line-height: 1.35; }
.order-note { margin: 10px 0; padding: 8px 10px; border-left: 3px solid var(--accent, #f3a712); border-radius: 6px; background: #fff8df; color: #624600; font-size: .76rem; font-weight: 700; line-height: 1.4; overflow-wrap: anywhere; }
.status-dot, .status-updated, .big-status { color: var(--success); }
.status-dot::before { background: var(--success); }

.order-phone-link {
    border-color: #bbd7c5;
    background: #ecfdf3;
    color: var(--success);
}
.order-phone-link::before { background: var(--success); }
.order-phone-link:hover, .order-phone-link:focus-visible {
    border-color: var(--success);
    background: #dcfce7;
    color: #166534;
}

.alert {
    border-color: #f4c35e;
    background: #fff7e6;
    color: #854d0e;
}
.password-success {
    border-color: #86c99c;
    background: #ecfdf3;
    color: var(--success);
}
.settings-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
    align-items: stretch;
}
.settings-grid.single {
    grid-template-columns: minmax(0, 520px);
    justify-content: center;
}
.staff-table { overflow: visible; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.staff-row { display: grid; grid-template-columns: minmax(120px, 1fr) auto auto; gap: 10px; padding: 10px 12px; align-items: center; border-bottom: 1px solid var(--line); }
.staff-row:last-child { border-bottom: 0; }
.staff-identity { display: grid; gap: 2px; min-width: 0; }
.staff-identity strong, .staff-identity small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.staff-empty { margin: 0; padding: 16px; color: var(--muted); }
.staff-status { padding: 5px 9px; border-radius: 999px; font-size: .68rem; font-weight: 800; }
.staff-status.active { background: #dcfce7; color: var(--success); }
.staff-status.inactive { background: #e2e8f0; color: #475569; }
.staff-actions { display: flex; gap: 5px; align-items: center; }
.staff-actions details { position: relative; }
.staff-actions summary { width: fit-content; list-style: none; cursor: pointer; }
.staff-actions summary::-webkit-details-marker { display: none; }
.staff-actions form { margin: 0; }
.staff-actions button, .staff-actions .button { min-height: 28px; padding: 5px 8px; border-radius: 7px; font-size: .62rem; }
.staff-edit-form { position: absolute; z-index: 10; top: calc(100% + 6px); right: 0; display: grid; width: 250px; gap: 7px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; box-shadow: var(--shadow); }
.staff-edit-form input { min-height: 34px; padding: 7px 9px; font-size: .72rem; }
.delete-dialog { width: min(420px, calc(100% - 32px)); padding: 28px; border: 0; border-radius: 18px; background: #fff; color: var(--ink); text-align: center; box-shadow: 0 24px 70px rgba(15, 23, 42, .28); }
.delete-dialog::backdrop { background: rgba(15, 23, 42, .58); backdrop-filter: blur(2px); }
.delete-dialog-icon { display: grid; width: 48px; height: 48px; margin: 0 auto 14px; place-items: center; border-radius: 50%; background: #fee2e2; color: var(--danger); font-size: 1.35rem; font-weight: 900; }
.delete-dialog h2 { margin: 0; font-size: 1.35rem; }
.delete-dialog p { margin: 10px 0 22px; color: var(--muted); font-size: .86rem; line-height: 1.6; }
.delete-dialog-actions { display: flex; gap: 10px; justify-content: center; }
.delete-dialog-actions button { min-width: 120px; }

.auth-body, .auth-card { background: #fff; }
.auth-submit { background: var(--brand); }
.auth-submit:hover { background: var(--brand-dark); }
.auth-switch a { color: var(--brand); }

.app-install-button {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 1000;
    min-height: 42px;
    padding: 10px 16px;
    border: 1px solid rgba(255,255,255,.25);
    border-radius: 999px;
    background: var(--brand);
    color: #fff;
    font-size: .75rem;
    font-weight: 800;
    box-shadow: 0 10px 30px rgba(15,23,42,.25);
}

.app-install-button:hover { background: var(--brand-dark); }

@media print {
    html, body { background: #fff; }
}

@media (max-width: 760px) {
    .settings-grid, .settings-grid.single {
        grid-template-columns: 1fr;
    }
    .staff-row { grid-template-columns: minmax(0, 1fr) auto; }
    .staff-actions { grid-column: 1 / -1; flex-wrap: wrap; }
    .staff-edit-form { right: auto; left: 0; }
    .orders-grid { grid-template-columns: minmax(0, 1fr); }
    .orders-grid .order { width: 100%; }
}
