/* Base palette — overridden per restaurant via an inline <style> tag
   (see theme_style_tag() in src/helpers.php) that redefines --accent and
   --accent-dark. This block is only the fallback for pages with no
   restaurant context yet (home, login, register). */
:root {
    --ink: #23262b;
    --muted: #6b7280;
    --line: #e7e5e2;
    --accent: #da3743;
    --accent-dark: #b32c37;
    --bg: #f7f6f4;
    --card: #ffffff;
    --ok: #1e824c;
    --warn: #c0392b;
    --seated: #1d6fb3;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
}

.wrap {
    max-width: 640px;
    margin: 0 auto;
    padding: 40px 20px 64px;
}

.wrap.wide {
    max-width: 1100px;
}

h1, h2, h3 { line-height: 1.25; letter-spacing: -0.01em; }
h1 { font-size: 1.9rem; font-weight: 800; }
h3 { font-weight: 700; }

a { color: var(--accent); }

.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 22px;
    margin-bottom: 18px;
    box-shadow: 0 1px 2px rgba(20, 20, 20, 0.03), 0 6px 16px rgba(20, 20, 20, 0.04);
}

label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--muted);
    margin: 14px 0 5px;
}

input, select, textarea, button {
    font: inherit;
}

input[type=text], input[type=tel], input[type=email], input[type=password],
input[type=date], input[type=time], input[type=number], select, textarea {
    width: 100%;
    padding: 11px 13px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: #fff;
    color: var(--ink);
    transition: border-color .15s ease, box-shadow .15s ease;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}

input[type=color] { padding: 3px; cursor: pointer; }

button, .btn {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 12px 22px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    letter-spacing: 0.1px;
    transition: background-color .15s ease, transform .05s ease;
}

button:hover, .btn:hover { background: var(--accent-dark); }
button:active, .btn:active { transform: translateY(1px); }
button:disabled { background: var(--line); color: var(--muted); cursor: not-allowed; }

button.secondary, .btn.secondary {
    background: transparent;
    color: var(--ink);
    border: 1.5px solid var(--line);
}
button.secondary:hover, .btn.secondary:hover { background: var(--bg); border-color: #d5d2cd; }

button.outline, .btn.outline {
    background: transparent;
    color: var(--accent);
    border: 1.5px solid var(--accent);
}
button.outline:hover, .btn.outline:hover { background: var(--accent); color: #fff; }

.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid var(--line);
    background: #fff;
    box-shadow: 0 1px 3px rgba(20, 20, 20, 0.04);
    position: sticky;
    top: 0;
    z-index: 5;
}

.top-nav strong { color: var(--accent); font-size: 1.15rem; font-weight: 800; letter-spacing: -0.01em; }
.top-nav a {
    margin-left: 18px;
    font-weight: 600;
    font-size: 0.92rem;
    text-decoration: none;
    color: var(--ink);
    padding-bottom: 3px;
    border-bottom: 2px solid transparent;
    transition: border-color .15s ease, color .15s ease;
}
.top-nav a:hover { color: var(--accent); border-bottom-color: var(--accent); }

.flash {
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 18px;
    font-size: 0.92rem;
    font-weight: 500;
}

.flash.error { background: #fbe9e7; color: var(--warn); }
.flash.ok { background: #e5f4ea; color: var(--ok); }

.status-pill {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.status-confirmed { background: #fdecc8; color: #8a5a00; }
.status-pending { background: #fff0b8; color: #7a5200; border: 1px dashed #c8a44d; }
.status-seated { background: #dbe9fb; color: var(--seated); }
.status-completed { background: #ececec; color: var(--muted); }
.status-cancelled { background: #f8e3e1; color: #8a2c2c; }
.status-no_show { background: #f3dfe9; color: #7a2250; }

table.list { width: 100%; border-collapse: collapse; }
table.list th {
    text-align: left; padding: 10px; font-size: 0.78rem; font-weight: 700;
    color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em;
    border-bottom: 2px solid var(--line);
}
table.list td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); font-size: 0.92rem; }
table.list tr:hover td { background: color-mix(in srgb, var(--accent) 4%, transparent); }
