/* ===== Base ===== */
body { font-family: Inter, Arial, sans-serif; font-size: 16px; margin: 40px; background: #F4F6F3; color: #1c2b24; }
.container { max-width: 600px; margin: auto; background: #fff; padding: 30px; border-radius: 8px; box-shadow: 0 4px 6px rgba(0,0,0,0.1); }
.dashboard-container { max-width: 950px; margin: auto; background: #fff; padding: 30px; border-radius: 12px; box-shadow: 0 4px 6px rgba(0,0,0,0.1); }

.dashboard-container h2, .panel-box h3 { font-family: Fraunces, Georgia, serif; font-weight: 600; }

.dashboard-welcome { font-size: 24px; display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.dashboard-welcome button { font-size: 16px; }

.error { color: #d9534f; background: #f2dede; padding: 10px; border-radius: 4px; margin-bottom: 15px; }
.success { color: #3c763d; background: #dff0d8; padding: 10px; border-radius: 4px; margin-bottom: 15px; }

/* ===== Tables ===== */
table { width: 100%; border-collapse: collapse; margin-top: 15px; }
th, td { padding: 10px; border-bottom: 1px solid #ddd; text-align: left; }
th { background: #f1f5f2; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: #4a5a52; }
tr:hover td { background: #fafcfb; }

/* ===== Links & buttons ===== */
a { color: #1F4D3A; text-decoration: none; cursor: pointer; }
a:hover { text-decoration: underline; }
.btn { background: #1F4D3A; color: white; padding: 8px 12px; border: none; border-radius: 4px; cursor: pointer; }
.btn:hover { background: #123226; }
.btn-approve { background: #388e3c; color: white; padding: 4px 8px; width: auto; }
.btn-delete { background: #d9534f; color: white; padding: 4px 8px; width: auto; }
.btn-edit { background: #f0ad4e; color: white; padding: 4px 8px; width: auto; }

input[type="text"], input[type="email"], input[type="password"], input[type="date"], input[type="number"], textarea { width: 100%; padding: 8px; margin-top: 5px; margin-bottom: 15px; box-sizing: border-box; }

.form-box { display: block; }
.form-box.hidden { display: none !important; }

.toggle-link { margin-top: 15px; text-align: center; font-size: 14px; }

/* ===== Badges ===== */
.badge-countdown { background: #fbefd2; color: #7a5a10; padding: 4px 8px; border-radius: 4px; font-weight: bold; font-size: 13px; }
.badge-recurring { background: #e0f2fe; color: #0369a1; padding: 2px 6px; border-radius: 4px; font-size: 11px; margin-left: 6px; }
.last-updated { color: #666; font-size: 12px; font-weight: normal; margin-left: 8px; }

/* ===== Panels ===== */
.panel-box {
    background: #fff;
    border: 1px solid #e3e8e4;
    padding: 24px;
    border-radius: 12px;
    margin-bottom: 25px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.1);
}

.panel-narrow { max-width: 600px; }

/* ===== Admin tabs ===== */
.admin-menu-bar {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 4px;
    margin: 0 0 25px;
    padding: 0;
    border-bottom: 3px solid #1F4D3A;
}
.admin-menu-btn {
    background: #eaf0ec;
    color: #1F4D3A;
    border: 1px solid #cfd8d2;
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    padding: 10px 6px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
}
.admin-menu-btn:hover { background: #dbe5df; }
.admin-menu-btn.active,
.admin-menu-btn.active:hover {
    background: #1F4D3A;
    border-color: #1F4D3A;
    color: #fff;
}
.admin-menu-btn:focus-visible { outline: 3px solid #E0A93B; outline-offset: -3px; }

/* Approvals tab when requests are waiting */
.admin-menu-btn.has-pending { background: #fbe3a6; border-color: #E0A93B; color: #5c3d00; }
.admin-menu-btn.has-pending:hover { background: #f6d37f; }
.admin-menu-btn.has-pending.active,
.admin-menu-btn.has-pending.active:hover { background: #1F4D3A; border-color: #1F4D3A; color: #fff; }
.pending-badge { display: inline-block; min-width: 20px; padding: 1px 7px; margin-left: 4px; border-radius: 999px; background: #b00020; color: #fff; font-size: 12px; line-height: 18px; text-align: center; }

.admin-panel-section { display: none; }
.admin-panel-section.active-panel { display: block; }

/* ===== Password field ===== */
.password-container { position: relative; width: 100%; }
.password-container input { padding-right: 40px; }
.toggle-password {
    position: absolute; right: 10px; top: 38%; transform: translateY(-50%);
    background: none; border: none; cursor: pointer; padding: 0; display: flex; align-items: center; color: #666;
}
.toggle-password svg { width: 20px; height: 20px; fill: currentColor; }

/* ===== Events table ===== */
.events-table { table-layout: fixed; }
.events-table th:nth-child(1), .events-table td:nth-child(1) { width: 50%; }
.events-table th:nth-child(2), .events-table td:nth-child(2) { width: 25%; }
.events-table th:nth-child(3), .events-table td:nth-child(3) { width: 25%; }

/* ===== Print ===== */
@media print {
    body * { visibility: hidden; }
    #shopping-list-panel, #shopping-list-panel * { visibility: visible; }
    #shopping-list-panel { position: absolute; left: 0; top: 0; width: 100%; background: #fff !important; border: none !important; box-shadow: none !important; }
    .no-print { display: none !important; }
    #shopping-list-panel a { color: #000; text-decoration: none; }
}

/* ===== Login screen ===== */
body.login-page { margin: 0; background: #F4F6F3; font-family: Inter, Arial, sans-serif; }
.login-split { display: flex; min-height: 100vh; }
.login-side { flex: 1 1 50%; background: #1F4D3A; color: #fff; padding: 64px; box-sizing: border-box; display: flex; flex-direction: column; justify-content: space-between; }
.login-eyebrow { font-size: 24px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #E0A93B; }
.login-side h1 { margin: 0 0 20px; font-family: Fraunces, Georgia, serif; font-size: 56px; line-height: 1.08; font-weight: 600; }
.login-side p { margin: 0; font-size: 18px; line-height: 1.6; max-width: 440px; color: #d9e6df; }
.login-points { display: flex; gap: 32px; font-size: 14px; color: #d9e6df; }
.login-points strong { display: block; font-size: 15px; color: #fff; }

.login-main { flex: 1 1 50%; display: flex; align-items: center; justify-content: center; padding: 48px 24px; box-sizing: border-box; }
.login-card { width: 100%; max-width: 400px; color: #1c2b24; }
.login-card h2 { margin: 0 0 8px; font-family: Fraunces, Georgia, serif; font-size: 36px; font-weight: 600; }
.login-sub { margin: 0 0 32px; font-size: 16px; color: #4a5a52; }
.login-card label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 6px; }
.login-card .label-row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.login-card .label-row label { margin: 0; }
.login-card .label-row a { font-size: 14px; }
.login-card input[type="text"], .login-card input[type="email"], .login-card input[type="password"] {
    height: 48px; padding: 0 14px; font-size: 16px; border: 1px solid #8a9a92; border-radius: 8px; background: #fff; margin: 0 0 20px; width: 100%; box-sizing: border-box;
}
.login-card input:focus { outline: 3px solid #E0A93B; outline-offset: 1px; }
.login-card a { color: #1F4D3A; }
.login-card .password-container { margin-bottom: 8px; }
.login-card .password-container input { padding-right: 52px; margin-bottom: 20px; }
.login-card .toggle-password { top: 24px; right: 4px; width: 44px; height: 44px; justify-content: center; }
.login-card .btn-login { width: 100%; height: 50px; margin-top: 8px; background: #1F4D3A; border-radius: 8px; font-size: 16px; font-weight: 600; }
.login-card .btn-login:hover { background: #123226; }
.login-card .toggle-link { margin-top: 24px; font-size: 15px; color: #4a5a52; }
.login-card .req { color: #b00020; }
.login-version { margin-top: 48px; text-align: right; font-size: 12px; color: #5f6f67; }

@media (max-width: 820px) {
    .login-side { display: none; }
    .login-split { background: #F4F6F3; }
}
