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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f5f5f5;
    color: #222;
    min-height: 100vh;
}

/* Nav */
nav {
    background: #1a1a2e;
    color: #fff;
    padding: 0.75rem 1rem;
}
.nav-inner {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.nav-brand {
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
}
.nav-links {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.9rem;
}
.nav-links a { color: #aad4f5; text-decoration: none; }
.nav-links a:hover { color: #fff; }
.btn-link {
    background: none;
    border: none;
    color: #aad4f5;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0;
}
.btn-link:hover { color: #fff; }

/* Layout */
.container {
    max-width: 900px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}
.page-header h1 { margin: 0; }
.admin-nav-links { display: flex; gap: 0.5rem; }

h1 { font-size: 1.75rem; margin-bottom: 1.25rem; }
h2 { font-size: 1.25rem; margin-bottom: 1rem; }

/* Cards */
.card {
    background: #fff;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* Alerts */
.alert {
    padding: 0.75rem 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}
.alert-success { background: #d1fae5; color: #065f46; border: 1px solid #6ee7b7; }
.alert-error   { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.5rem 1.1rem;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: opacity 0.15s;
}
.btn:hover { opacity: 0.85; }
.btn-primary   { background: #2563eb; color: #fff; }
.btn-secondary { background: #e5e7eb; color: #374151; }
.btn-danger    { background: #dc2626; color: #fff; }
.btn-full      { display: block; width: 100%; text-align: center; }
.btn-sm        { padding: 0.3rem 0.75rem; font-size: 0.82rem; }

/* Vote buttons */
.vote-buttons { display: flex; gap: 0.75rem; margin-bottom: 0.75rem; }
.btn-yes { background: #16a34a; color: #fff; padding: 0.6rem 1.5rem; font-size: 1rem; border-radius: 6px; border: 2px solid transparent; cursor: pointer; }
.btn-no  { background: #e5e7eb; color: #374151; padding: 0.6rem 1.5rem; font-size: 1rem; border-radius: 6px; border: 2px solid transparent; cursor: pointer; }
.btn-yes:hover { background: #15803d; }
.btn-no:hover  { background: #d1d5db; }
.btn-yes.btn-active { border-color: #14532d; box-shadow: 0 0 0 3px rgba(22,163,74,0.3); }
.btn-no.btn-active  { border-color: #374151; box-shadow: 0 0 0 3px rgba(55,65,81,0.2); }

.vote-counts { font-size: 0.95rem; color: #555; display: flex; gap: 1rem; margin-top: 0.25rem; }
.count-yes { color: #16a34a; font-weight: 600; }
.count-no  { color: #888; }

/* Day card */
.day-card h2 { display: flex; align-items: center; gap: 0.5rem; }
.badge {
    font-size: 0.7rem;
    background: #fef3c7;
    color: #92400e;
    border-radius: 4px;
    padding: 0.1rem 0.4rem;
    font-weight: 500;
}

.week-label { color: #555; margin-bottom: 0.5rem; font-size: 0.95rem; }
.muted { color: #888; }
.text-green { color: #16a34a; }
.text-red   { color: #dc2626; }

/* Login page */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: #f0f4ff;
}
.login-card {
    background: #fff;
    border-radius: 10px;
    padding: 2.5rem 2rem;
    width: 100%;
    max-width: 380px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}
.login-card h1 { font-size: 1.4rem; color: #1a1a2e; margin-bottom: 0.25rem; }
.login-card h2 { font-size: 1rem; color: #555; font-weight: 400; margin-bottom: 1.5rem; }

.field { margin-bottom: 1rem; }
.field label { display: block; font-size: 0.85rem; font-weight: 500; margin-bottom: 0.3rem; color: #374151; }
.field input, .field select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.15s;
}
.field input:focus, .field select:focus { border-color: #2563eb; box-shadow: 0 0 0 2px rgba(37,99,235,0.15); }

/* Config table */
.config-table { width: 100%; border-collapse: collapse; }
.config-table th { text-align: left; font-size: 0.8rem; color: #555; font-weight: 600; padding: 0.5rem 0.75rem; border-bottom: 2px solid #e5e7eb; }
.config-table td { padding: 0.6rem 0.75rem; border-bottom: 1px solid #f3f4f6; vertical-align: middle; font-size: 0.9rem; }
.config-input { width: 100%; padding: 0.35rem 0.6rem; border: 1px solid #d1d5db; border-radius: 4px; font-size: 0.9rem; min-width: 220px; }
code { font-size: 0.82rem; background: #f3f4f6; padding: 0.15rem 0.35rem; border-radius: 3px; }
.form-actions { margin-top: 1.25rem; }

/* Data table */
.data-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.data-table th { text-align: left; font-size: 0.8rem; color: #555; font-weight: 600; padding: 0.5rem 0.75rem; border-bottom: 2px solid #e5e7eb; }
.data-table td { padding: 0.6rem 0.75rem; border-bottom: 1px solid #f3f4f6; vertical-align: middle; }
.data-table .row-inactive { opacity: 0.5; }
.action-cell { display: flex; gap: 0.4rem; align-items: flex-start; flex-wrap: wrap; }

/* Status badges */
.status-badge { font-size: 0.78rem; padding: 0.2rem 0.5rem; border-radius: 4px; font-weight: 600; }
.status-voting          { background: #dbeafe; color: #1d4ed8; }
.status-tuesday_booked  { background: #d1fae5; color: #065f46; }
.status-thursday_booked { background: #d1fae5; color: #065f46; }
.status-no_quorum       { background: #fee2e2; color: #991b1b; }
.status-cancelled       { background: #f3f4f6; color: #6b7280; }

/* Add user form */
.field-row { display: flex; gap: 1rem; align-items: flex-end; flex-wrap: wrap; }
.field-row .field { flex: 1; min-width: 140px; margin-bottom: 0; }
.field-action { flex: 0; }

/* Kill switch */
.kill-switch-card { border-left: 6px solid; }
.kill-switch-active  { border-color: #16a34a; background: #f0fdf4; }
.kill-switch-disabled { border-color: #dc2626; background: #fef2f2; }
.kill-switch-inner { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.kill-switch-status { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.25rem; }
.kill-switch-sub { font-size: 0.85rem; color: #555; }
.kill-switch-btn { font-size: 1rem; padding: 0.6rem 1.4rem; font-weight: 700; }
.kill-switch-btn-on  { background: #dc2626; color: #fff; }
.kill-switch-btn-on:hover  { background: #b91c1c; opacity: 1; }
.kill-switch-btn-off { background: #16a34a; color: #fff; }
.kill-switch-btn-off:hover { background: #15803d; opacity: 1; }

/* Pikmin easter egg flash */
.pikmin-flash {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    background: rgba(255,255,255,0.65);
    pointer-events: none;
}
.pikmin-flash img {
    max-width: 280px;
    max-height: 60vh;
    animation: pikmin-pop 0.25s ease-out;
}
@keyframes pikmin-pop {
    from { transform: scale(0.3) rotate(-8deg); opacity: 0; }
    to   { transform: scale(1) rotate(0); opacity: 1; }
}

/* Pager */
.pager { display: flex; align-items: center; gap: 1rem; margin-top: 1rem; }
.pager-info { font-size: 0.85rem; color: #555; }

/* Debt card */
.debt-card { border-left: 4px solid #f59e0b; background: #fffbeb; }
.debt-card h2 { color: #92400e; margin-bottom: 0.75rem; }

/* Status banners on completed week cards */
.status-banner { padding: 0.5rem 0.75rem; border-radius: 6px; margin-bottom: 0.75rem; font-weight: 500; font-size: 0.95rem; }
.banner-booked  { background: #d1fae5; color: #065f46; }
.banner-noquorum { background: #fee2e2; color: #991b1b; }

/* Paid row */
.row-paid { opacity: 0.55; }

/* Play date / deadline info */
.date-info { display: flex; flex-direction: column; gap: 0.2rem; margin-bottom: 1rem; }
.play-date { font-size: 1rem; color: #111; }
.vote-deadline { font-size: 0.82rem; color: #888; }

/* Voter lists */
.voter-lists { display: flex; gap: 1.5rem; margin-top: 0.75rem; }
.voter-col { flex: 1; }
.voter-header { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; padding-bottom: 0.4rem; margin-bottom: 0.3rem; border-bottom: 2px solid; }
.voter-header-yes { color: #16a34a; border-color: #16a34a; }
.voter-header-no  { color: #9ca3af; border-color: #e5e7eb; }
.voter-name { font-size: 0.9rem; padding: 0.2rem 0; }
.voter-yes { color: #15803d; }
.voter-no  { color: #6b7280; }
.voter-empty { font-size: 0.85rem; color: #ccc; }

/* Vote change history */
.change-new  { color: #555; font-size: 0.9rem; }
.change-switch { font-size: 0.9rem; }
.change-from { color: #9ca3af; text-decoration: line-through; }

/* JAR output */
.jar-output { margin-top: 1rem; }
.jar-output h3 { font-size: 0.9rem; margin-bottom: 0.5rem; color: #555; }
.jar-output pre { background: #1e1e1e; color: #d4d4d4; padding: 1rem; border-radius: 6px; font-size: 0.8rem; overflow-x: auto; max-height: 400px; overflow-y: auto; white-space: pre-wrap; }
