@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,600&family=Sora:wght@400;500;600;700&display=swap');

:root {
    --ink: #16211a;
    --paper: #f4efe6;
    --paper-raised: #fffdf9;
    --moss: #2f5233;
    --moss-dark: #1f3a23;
    --clay: #c1602b;
    --line: #ddd3c1;
    --muted: #6b6558;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Sora', sans-serif;
    background: var(--ink);
    color: var(--paper);
    min-height: 100vh;
}

.center-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.auth-card {
    background: var(--paper-raised);
    color: var(--ink);
    border-radius: 18px;
    padding: 2.5rem;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 30px 60px -25px rgba(0,0,0,0.5);
}

.auth-card h1 {
    font-family: 'Fraunces', serif;
    font-size: 1.6rem;
    margin-bottom: 0.4rem;
}

.auth-card .hint {
    color: var(--muted);
    font-size: 0.9rem;
    margin-bottom: 1.6rem;
}

label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--muted);
    margin-bottom: 0.35rem;
    margin-top: 1rem;
}
label:first-of-type { margin-top: 0; }

input {
    width: 100%;
    font-family: 'Sora', sans-serif;
    font-size: 1rem;
    padding: 0.75rem 0.9rem;
    border-radius: 10px;
    border: 1.5px solid var(--line);
    background: var(--paper);
    color: var(--ink);
}
input:focus { outline: none; border-color: var(--moss); }

.btn-primary {
    margin-top: 1.6rem;
    width: 100%;
    background: var(--clay);
    color: white;
    border: none;
    font-family: 'Sora', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    padding: 0.85rem;
    border-radius: 10px;
    cursor: pointer;
}
.btn-primary:hover { filter: brightness(1.08); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-secondary {
    background: transparent;
    border: 1.5px solid var(--line);
    color: var(--ink);
    font-family: 'Sora', sans-serif;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
}

.msg {
    margin-top: 1.1rem;
    padding: 0.75rem 0.9rem;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 500;
}
.msg:empty { display: none; }
.msg.error { background: #fbe4dd; color: #8a2f0e; }
.msg.success { background: #e2ead9; color: var(--moss-dark); }

/* dashboard */
.dash-wrap {
    max-width: 960px;
    margin: 0 auto;
    padding: 3rem 1.5rem 5rem;
}

.dash-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2.5rem;
    border-bottom: 2px solid var(--paper);
    padding-bottom: 1.5rem;
}

.dash-header h1 {
    font-family: 'Fraunces', serif;
    font-size: 2rem;
}

.dash-header .eyebrow {
    font-size: 0.8rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--clay);
    font-weight: 700;
}

.card {
    background: var(--paper-raised);
    color: var(--ink);
    border-radius: 16px;
    padding: 1.8rem;
    margin-bottom: 1.8rem;
}

.card h2 {
    font-family: 'Fraunces', serif;
    font-size: 1.25rem;
    margin-bottom: 1.2rem;
}

.add-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    align-items: flex-end;
}

.field { display: flex; flex-direction: column; }
.field label { margin: 0 0 0.3rem; }

.time-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0.8rem 0;
}

.time-chip {
    background: var(--paper);
    border: 1.5px solid var(--line);
    border-radius: 999px;
    padding: 0.4rem 0.9rem;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.time-chip button {
    background: none;
    border: none;
    color: var(--clay);
    font-weight: 700;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
}

.day-block { margin-bottom: 1.6rem; }
.day-block h3 {
    font-family: 'Fraunces', serif;
    font-size: 1.05rem;
    margin-bottom: 0.7rem;
}

.slot-list { display: flex; flex-direction: column; gap: 0.5rem; }

.slot-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--paper);
    border-radius: 10px;
    padding: 0.7rem 1rem;
    font-size: 0.92rem;
}

.slot-item .time { font-weight: 700; min-width: 110px; }
.slot-item .who { color: var(--muted); flex: 1; }
.slot-item.booked { border-left: 4px solid var(--clay); }
.slot-item.free { border-left: 4px solid var(--moss); }

.tag-free { color: var(--moss-dark); font-weight: 600; font-size: 0.82rem; }
.tag-booked { color: var(--clay); font-weight: 600; font-size: 0.82rem; }

.empty-state {
    color: var(--muted);
    font-size: 0.92rem;
    padding: 1rem 0;
}

.logout-link {
    background: none;
    border: none;
    color: var(--paper);
    opacity: 0.7;
    cursor: pointer;
    font-size: 0.85rem;
    text-decoration: underline;
}
