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

:root {
    --green: #2d6a4f;
    --green-light: #52b788;
    --green-pale: #d8f3dc;
    --sand: #f8f4ec;
    --text: #1b2a23;
    --muted: #6b7c72;
    --white: #ffffff;
    --radius: 10px;
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--sand);
    color: var(--text);
    min-height: 100vh;
}

#app {
    display: none;
}

#login-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 1rem;
}

.login-box {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 2.5rem 2rem;
    width: 100%;
    max-width: 380px;
    text-align: center;
}

.login-box h1 {
    font-size: 2rem;
    color: var(--green);
    margin-bottom: 0.25rem;
}

.login-box p {
    color: var(--muted);
    margin-bottom: 2rem;
}

input[type=email],
input[type=password],
input[type=text],
input[type=date] {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1.5px solid #d1d9d4;
    border-radius: var(--radius);
    font-size: 1rem;
    margin-bottom: 0.75rem;
    outline: none;
    transition: border-color 0.2s;
}

input:focus {
    border-color: var(--green-light);
}

button {
    cursor: pointer;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    padding: 0.75rem 1.5rem;
    transition: opacity 0.15s, background 0.15s;
}

button:hover {
    opacity: 0.88;
}

.btn-primary {
    background: var(--green);
    color: var(--white);
    width: 100%;
}

.btn-small {
    background: var(--green-pale);
    color: var(--green);
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
}

.btn-danger {
    background: #ffe0e0;
    color: #c0392b;
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
}

.error-msg {
    color: #c0392b;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

/* Header */
header {
    background: var(--green);
    color: var(--white);
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

header h1 {
    font-size: 1.4rem;
    letter-spacing: 0.03em;
}

header span {
    font-size: 0.9rem;
    opacity: 0.8;
}

header button {
    background: transparent;
    color: var(--white);
    padding: 0.3rem 0.8rem;
    border: 1.5px solid rgba(255, 255, 255, 0.4);
    width: auto;
    font-size: 0.85rem;
}

/* Nav */
nav {
    background: var(--white);
    display: flex;
    justify-content: center;
    border-bottom: 1.5px solid #e0e8e3;
    padding: 0 1rem;
}

nav button {
    background: transparent;
    color: var(--muted);
    padding: 0.9rem 1.2rem;
    border-radius: 0;
    border-bottom: 2.5px solid transparent;
    font-size: 0.95rem;
    width: auto;
}

nav button.active {
    color: var(--green);
    border-bottom-color: var(--green);
}

/* Main */
main {
    padding: 1.5rem;
    max-width: 700px;
    margin: 0 auto;
}

.card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.card h2 {
    font-size: 1.1rem;
    color: var(--green);
    margin-bottom: 1rem;
}

.logo-palm {
    display: block;
    font-size: 1.3em;
    line-height: 1;
    margin-bottom: 0.2rem;
}

.logo-palm.inline {
    display: inline;
    font-size: 1em;
    margin-bottom: 0;
    margin-right: 0.4rem;
}

/* Calendar */
.calendar-grid {
    display: grid;
    grid-template-columns: 1.4rem repeat(7, 1fr);
    gap: 3px;
    margin-bottom: 1.5rem;
    align-items: center;
}

.cal-header {
    text-align: center;
    font-size: 0.75rem;
    color: var(--muted);
    padding: 0.3rem 0;
    font-weight: 600;
}

.cal-week {
    text-align: center;
    font-size: 0.7rem;
    color: var(--muted);
    font-weight: 600;
    opacity: 0.7;
}

.cal-week.spacer {
    visibility: hidden;
}

.cal-day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    position: relative;
}

.cal-day:hover {
    background: var(--green-pale);
}

.cal-day.other-month {
    color: #ccc;
}

.cal-day.today {
    font-weight: 700;
    color: var(--green);
}

.cal-day.booked {
    background: var(--green-pale);
}

.cal-day .dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--green-light);
    position: absolute;
    bottom: 3px;
}

.cal-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.cal-nav button {
    background: var(--green-pale);
    color: var(--green);
    width: auto;
    padding: 0.4rem 1rem;
}

.booking-list {
    margin-top: 1rem;
}

.booking-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.9rem;
}

.booking-item:last-child {
    border-bottom: none;
}

.booking-who {
    font-weight: 600;
    color: var(--green);
    margin-right: 0.5rem;
}

/* Add booking form */
.add-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
    align-items: flex-end;
}

.add-form input {
    flex: 1;
    min-width: 120px;
    margin-bottom: 0;
}

.add-form button {
    flex-shrink: 0;
}

.add-form label {
    font-size: 0.8rem;
    color: var(--muted);
    display: block;
    margin-bottom: 2px;
}

.add-form .field {
    flex: 1;
    min-width: 120px;
}

/* Lists */
.list-input {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.list-input input {
    flex: 1;
    margin-bottom: 0;
}

.list-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.list-item:last-child {
    border-bottom: none;
}

.list-item.done .item-text {
    text-decoration: line-through;
    color: var(--muted);
}

.item-text {
    flex: 1;
    font-size: 0.95rem;
}

.item-who {
    font-size: 0.78rem;
    color: var(--muted);
}

.list-item input[type=checkbox] {
    width: 18px;
    height: 18px;
    accent-color: var(--green);
    flex-shrink: 0;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

@media (max-width: 480px) {
    main {
        padding: 1rem;
    }

    .add-form {
        flex-direction: column;
    }

    .add-form .field,
    .add-form input {
        width: 100%;
    }
}