:root {
    --bg-main: #f4f6f9;
    --bg-card: #ffffff;
    --bg-sidebar: #1e293b;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --accent: #ff5e57;
    --accent-hover: #ff3f34;
    --border-color: #e2e8f0;
    --subtle-bg: #f8fafc;
}

body.dark-mode {
    --bg-main: #0f172a;
    --bg-card: #1e293b;
    --bg-sidebar: #090d16;
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --border-color: #334155;
    --subtle-bg: #0f172a;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

body {
    background: var(--bg-main);
    color: var(--text-main);
    min-height: 100vh;
    transition: background 0.25s, color 0.25s;
}

/* INLOGSCHERM */
.login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #ff5e57 0%, #ffa801 100%);
    padding: 20px;
}

.login-card {
    background: #ffffff;
    color: #1e293b;
    padding: 45px 35px;
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.2);
    text-align: center;
    max-width: 440px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.logo-circle {
    font-size: 56px;
    background: #fff0f0;
    width: 100px;
    height: 100px;
    line-height: 100px;
    border-radius: 50%;
    margin: 0 auto;
}

.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-wrapper input {
    padding-right: 45px;
}

.eye-btn {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
}

.remember-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #475569;
    cursor: pointer;
}

.remember-row input {
    width: 18px;
    height: 18px;
}

.error-msg {
    background: #fee2e2;
    color: #dc2626;
    padding: 12px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
}

/* GROOT APP DASHBOARD LAYOUT */
.app-layout {
    display: grid;
    grid-template-columns: 270px 1fr;
    min-height: 100vh;
}

@media (max-width: 980px) {
    .app-layout {
        grid-template-columns: 1fr;
    }
}

/* SIDEBAR */
.sidebar {
    background: var(--bg-sidebar);
    color: white;
    padding: 28px 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.brand-box {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-bottom: 25px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.brand-icon {
    font-size: 38px;
}

.brand-box h2 {
    font-size: 22px;
    color: #ff5e57;
}

.brand-box small {
    color: #94a3b8;
    font-size: 13px;
}

.side-nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 25px 0 auto 0;
}

.nav-btn {
    background: transparent;
    color: #cbd5e1;
    border: none;
    padding: 14px 16px;
    border-radius: 12px;
    text-align: left;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: 0.2s;
}

.nav-btn:hover {
    background: rgba(255,255,255,0.08);
    color: white;
}

.nav-btn.active {
    background: var(--accent);
    color: white;
    box-shadow: 0 6px 16px rgba(255, 94, 87, 0.35);
}

.nav-badge {
    background: rgba(0,0,0,0.25);
    padding: 3px 9px;
    border-radius: 20px;
    font-size: 12px;
}

.sidebar-footer {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.theme-btn, .logout-btn {
    padding: 11px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.2);
    background: transparent;
    color: white;
    cursor: pointer;
    font-weight: 600;
}

/* HOOFDGEBIED RECHTS */
.main-area {
    padding: 30px 40px;
    max-width: 1500px;
    width: 100%;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .main-area {
        padding: 20px;
    }
}

/* STATISTIEKEN BOVENIN */
.stats-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 18px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--bg-card);
    padding: 18px 22px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}

.stat-icon {
    font-size: 32px;
    background: var(--subtle-bg);
    width: 56px;
    height: 56px;
    line-height: 56px;
    text-align: center;
    border-radius: 14px;
}

.stat-card small {
    color: var(--text-muted);
    font-size: 13px;
    display: block;
}

.stat-card strong {
    font-size: 18px;
}

/* TABS & GRIDS */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.rad-dashboard-grid {
    display: grid;
    grid-template-columns: 420px 1fr;
    gap: 28px;
}

.boek-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 28px;
}

@media (max-width: 1150px) {
    .rad-dashboard-grid, .boek-grid {
        grid-template-columns: 1fr;
    }
}

.card {
    background: var(--bg-card);
    padding: 30px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    box-shadow: 0 6px 20px rgba(0,0,0,0.04);
}

.narrow-card {
    max-width: 800px;
    margin: 0 auto;
}

/* HET RAD */
.rad-panel {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.wheel-wrapper {
    position: relative;
    margin: 15px 0;
}

.wheel-pointer {
    font-size: 28px;
    color: var(--accent);
    margin-bottom: -12px;
    position: relative;
    z-index: 5;
}

.wheel {
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: conic-gradient(
        #ff5e57 0deg 60deg, 
        #ffa801 60deg 120deg, 
        #0be881 120deg 180deg, 
        #0fbcf9 180deg 240deg, 
        #575fcf 240deg 300deg, 
        #ef5777 300deg 360deg
    );
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 12px 30px rgba(0,0,0,0.18);
    border: 10px solid var(--bg-card);
    transition: transform 0.9s cubic-bezier(0.18, 0.89, 0.32, 1.15);
}

.wheel-inner {
    background: var(--bg-card);
    width: 105px;
    height: 105px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 52px;
    box-shadow: inset 0 3px 8px rgba(0,0,0,0.12);
}

.spin-btn {
    width: 100%;
    padding: 18px;
    font-size: 19px;
    font-weight: 800;
    background: linear-gradient(90deg, #ff5e57, #ff8e53);
    color: white;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    box-shadow: 0 8px 22px rgba(255,94,87,0.35);
}

.secondary-outline-btn {
    width: 100%;
    padding: 12px;
    background: transparent;
    border: 2px solid var(--border-color);
    color: var(--text-main);
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
}

.three-choices {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: left;
}

/* RECEPTKAART RECHTS */
.empty-state {
    min-height: 420px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    text-align: center;
    border: 2px dashed var(--border-color);
    border-radius: 16px;
    padding: 30px;
    gap: 12px;
}

.empty-icon {
    font-size: 64px;
}

.recipe-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 14px;
}

.badge-group {
    display: flex;
    gap: 10px;
}

.badge {
    background: #ffe5e5;
    color: #d90429;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
}

.time-badge {
    background: #e0fbfc;
    color: #0077b6;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
}

.portion-control {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--subtle-bg);
    padding: 6px 14px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.port-btn {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: none;
    background: var(--accent);
    color: white;
    font-weight: 800;
    cursor: pointer;
}

.recipe-main-title {
    font-size: 28px;
    margin-bottom: 20px;
}

.recipe-columns {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 24px;
    margin: 22px 0;
    background: var(--subtle-bg);
    padding: 24px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
}

@media (max-width: 700px) {
    .recipe-columns {
        grid-template-columns: 1fr;
    }
}

.recipe-columns h4 {
    margin-bottom: 12px;
    color: var(--accent);
    font-size: 17px;
}

.recipe-columns ul, .recipe-columns ol {
    padding-left: 20px;
    line-height: 1.85;
    font-size: 15px;
}

.action-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 18px;
    border-top: 1px solid var(--border-color);
}

.act-btn {
    padding: 12px 16px;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    color: white;
    font-size: 14px;
}

.act-btn.fav { background: #ffa801; }
.act-btn.groc { background: #05c46b; }
.act-btn.arch { background: #0fbcf9; }
.act-btn.plan { background: #3c40c6; }

.quick-plan {
    display: flex;
    gap: 8px;
}

/* FORMULIEREN & ELEMENTEN */
input, select, textarea {
    padding: 12px 14px;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-main);
    border-radius: 10px;
    font-size: 15px;
    width: 100%;
}

.primary-btn {
    background: var(--accent);
    color: white;
    border: none;
    padding: 13px 20px;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
}

.danger-btn {
    background: #ef233c;
    color: white;
    border: none;
    padding: 9px 15px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.whatsapp-btn {
    background: #25D366;
    color: white;
    border: none;
    padding: 9px 15px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.divider {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 25px 0;
}

.form-stack {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 14px;
}

.form-row {
    display: flex;
    gap: 12px;
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 10px;
}

.search-bar {
    margin-bottom: 16px;
}

.recipe-mini-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 14px;
    max-height: 600px;
    overflow-y: auto;
    padding-right: 6px;
}

.mini-card {
    border: 1px solid var(--border-color);
    padding: 15px;
    border-radius: 12px;
    background: var(--subtle-bg);
    cursor: pointer;
    transition: 0.15s;
}

.mini-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.mini-card h4 {
    font-size: 15px;
    margin-bottom: 6px;
}

.mini-card span {
    font-size: 13px;
    color: var(--text-muted);
}

/* MAANDARCHIEF */
.archive-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 20px;
}

.month-block {
    background: var(--subtle-bg);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 18px;
}

.month-block h4 {
    color: var(--accent);
    margin-bottom: 12px;
    font-size: 18px;
}

/* CHECKLIST & KALENDER */
.manual-grocery {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.checklist {
    list-style: none;
}

.checklist li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
    font-size: 15px;
}

.checklist li.checked span {
    text-decoration: line-through;
    color: var(--text-muted);
}

.calendar-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.day-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--subtle-bg);
    padding: 14px 18px;
    border-radius: 12px;
    border-left: 6px solid #3c40c6;
}

/* DIGITALE TIMER */
.timer-display-box {
    text-align: center;
    background: var(--subtle-bg);
    padding: 22px;
    border-radius: 16px;
    margin-top: 14px;
    border: 1px solid var(--border-color);
}

.digital-clock {
    font-size: 54px;
    font-weight: 800;
    letter-spacing: 2px;
    color: var(--accent);
    margin-bottom: 14px;
}

.timer-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.styled-list {
    list-style: none;
    margin-top: 12px;
}

.styled-list li {
    padding: 10px 14px;
    background: var(--subtle-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    margin-bottom: 8px;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.alarm-box {
    background: #fff3cd;
    color: #856404;
    padding: 14px;
    border-radius: 10px;
    font-weight: 700;
}