@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Outfit:wght@400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&family=Roboto:wght@400;500;700&family=Playfair+Display:wght@400;500;600&family=Fira+Code:wght@400;500;600&display=swap');

/* ================================
   KLEUREN & THEMA'S
   ================================ */

/* Basisvariabelen (worden overschreven door theme- en mode-klassen) */
:root {
    --bg: #f4f6f8;
    --bg-alt: #e7ebf0;
    --card-bg: #ffffff;
    --card-bg-soft: #f8fafc;
    --text: #0f172a;
    --muted: #64748b;
    --border-subtle: #e2e8f0;

    --primary: #3b6fd8;
    --primary-soft: rgba(59, 111, 216, 0.12);

    --accent-ok: #22c55e;
    --accent-warn: #eab308;
    --accent-critical: #ef4444;

    --shadow-soft: 0 10px 30px rgba(15, 23, 42, 0.12);
    --font-base: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --radius-lg: 16px;
}

/* Thema-kleuren (accent) */
body.theme-blue {
    --primary: #3b82f6;
    --primary-soft: rgba(59, 130, 246, 0.12);
}

body.theme-green {
    --primary: #22c55e;
    --primary-soft: rgba(34, 197, 94, 0.12);
}

body.theme-purple {
    --primary: #a855f7;
    --primary-soft: rgba(168, 85, 247, 0.12);
}

/* Modus: LIGHT */
body.mode-light {
    --bg: #f4f6f8;
    --bg-alt: #e7ebf0;
    --card-bg: #ffffff;
    --card-bg-soft: #f8fafc;
    --text: #0f172a;
    --muted: #64748b;
    --border-subtle: #e2e8f0;
    --shadow-soft: 0 10px 30px rgba(15, 23, 42, 0.08);
}

/* Modus: DARK */
body.mode-dark {
    --bg: #020617;
    --bg-alt: #020617;
    --card-bg: #020617;
    --card-bg-soft: #020617;
    --text: #e5e7eb;
    --muted: #9ca3af;
    --border-subtle: rgba(148, 163, 184, 0.3);
    --shadow-soft: 0 18px 40px rgba(0,0,0,0.6);
}

/* Modus: AUTO (volgt voorkeur van OS) – basis licht */
body.mode-auto {
    --bg: #f4f6f8;
    --bg-alt: #e7ebf0;
    --card-bg: #ffffff;
    --card-bg-soft: #f8fafc;
    --text: #0f172a;
    --muted: #64748b;
    --border-subtle: #e2e8f0;
    --shadow-soft: 0 10px 30px rgba(15, 23, 42, 0.08);
}

@media (prefers-color-scheme: dark) {
    body.mode-auto {
        --bg: #020617;
        --bg-alt: #020617;
        --card-bg: #020617;
        --card-bg-soft: #020617;
        --text: #e5e7eb;
        --muted: #9ca3af;
        --border-subtle: rgba(148, 163, 184, 0.3);
        --shadow-soft: 0 18px 40px rgba(0,0,0,0.6);
    }
}

/* ================================
   BASIS
   ================================ */

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

body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    font-family: var(--font-base);
    background:
        radial-gradient(140% 180% at 12% 0%, rgba(59,111,216,0.05), transparent 65%),
        radial-gradient(160% 200% at 88% 0%, rgba(37,99,235,0.04), transparent 70%),
        var(--bg);
    color: var(--text);
}

body.font-system {
    --font-base: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.font-inter {
    --font-base: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.font-outfit {
    --font-base: 'Outfit', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.font-space_grotesk {
    --font-base: 'Space Grotesk', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.font-roboto {
    --font-base: 'Roboto', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.font-playfair_display {
    --font-base: 'Playfair Display', "Times New Roman", serif;
}

body.font-fira_code {
    --font-base: 'Fira Code', "SFMono-Regular", Menlo, monospace;
}

/* Scrollbar iets mooier in desktop-browsers */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}
::-webkit-scrollbar-track {
    background: rgba(15,23,42,0.04);
}
::-webkit-scrollbar-thumb {
    background: rgba(148,163,184,0.7);
    border-radius: 999px;
}

/* Links */
a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Container */
.container {
    max-width: 1150px;
    margin: 32px auto 40px;
    padding: 0 20px 40px;
}

/* Titel */
h1 {
    margin: 0;
    font-size: 1.85rem;
    letter-spacing: 0.03em;
    color: #f8fafc;
}

.page-hero {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 30px;
    background:
        linear-gradient(140deg, rgba(15,23,42,0.94), rgba(15,23,42,0.78));
    border-radius: 34px;
    padding: 26px 34px;
    box-shadow: 0 25px 60px rgba(15,23,42,0.35);
    border: 1px solid rgba(255,255,255,0.08);
    margin: 0 0 20px;
    position: relative;
    overflow: visible;
}

.mode-light .page-hero {
    background:
        linear-gradient(140deg, rgba(255,255,255,0.96), rgba(255,255,255,0.86));
    box-shadow: 0 18px 40px rgba(15,23,42,0.15);
    border: 1px solid rgba(148,163,184,0.35);
}

.page-hero::after {
    content: "";
    position: absolute;
    inset: 8px;
    border-radius: 28px;
    border: 1px solid rgba(255,255,255,0.12);
    pointer-events: none;
}

.page-hero__logo {
    display: flex;
    align-items: center;
    gap: 18px;
    z-index: 1;
}

.page-hero__logo-img {
    height: 84px;
    width: auto;
    display: block;
    filter: drop-shadow(0 5px 20px rgba(15,23,42,0.35));
}

.mode-light .page-hero__logo-img {
    filter: drop-shadow(0 8px 24px rgba(15,23,42,0.2));
}

.page-hero__logo-symbol {
    width: 76px;
    height: 76px;
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(255,255,255,0.18), rgba(255,255,255,0.05));
    border: 1px solid rgba(255,255,255,0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 0.15em;
    color: #f8fafc;
    text-transform: uppercase;
}

.page-hero__logo-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    color: rgba(248,250,252,0.95);
}

.page-hero__logo-name {
    font-size: 1.4rem;
    text-transform: uppercase;
    letter-spacing: 0.3em;
}

.page-hero__logo-tag {
    font-size: 0.85rem;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    opacity: 0.7;
}

.mode-light .page-hero h1,
.mode-light .page-hero__logo-text,
.mode-light .page-hero__logo-symbol,
.mode-light .page-hero__subtitle,
.mode-light .page-hero__user {
    color: var(--text);
}

.mode-light .page-hero__logo-symbol {
    background: linear-gradient(135deg, rgba(255,255,255,0.9), rgba(255,255,255,0.65));
    border-color: rgba(148,163,184,0.4);
}

.mode-light .page-hero__user-label {
    color: var(--muted);
}

.mode-light .page-hero__user a {
    color: var(--primary);
}

.page-hero__text {
    z-index: 1;
}

.page-hero__subtitle {
    margin: 10px 0 0;
    color: rgba(248,250,252,0.85);
    font-size: 1rem;
    letter-spacing: 0.02em;
}

}

.page-hero__user {
    text-align: center;
    color: rgba(248,250,252,0.98);
    z-index: 1;
    align-self: flex-start;
    justify-self: end;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

.page-hero__avatar {
    width: 82px;
    height: 82px;
    border-radius: 24px;
    border: 1px solid rgba(255,255,255,0.4);
    background-color: rgba(15,23,42,0.35);
    position: relative;
    box-shadow: 0 12px 26px rgba(15,23,42,0.35);
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-hero__avatar:hover {
    cursor: pointer;
}

.page-hero__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: inherit;
}

.page-hero__avatar span {
    font-size: 1.1rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(248,250,252,0.95);
    position: relative;
    z-index: 1;
}

.mode-light .page-hero__avatar {
    border-color: rgba(148,163,184,0.4);
    background-color: rgba(255,255,255,0.9);
    box-shadow: 0 12px 24px rgba(15,23,42,0.16);
}

.mode-light .page-hero__avatar span {
    color: var(--text);
}

.page-hero__avatar-label {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 25%;
    padding: 0 10px;
    font-size: 0.85rem;
    letter-spacing: 0.03em;
    background: rgba(2,6,23,0.3);
    color: #f8fafc;
    backdrop-filter: blur(6px);
    border-bottom-left-radius: 24px;
    border-bottom-right-radius: 24px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-shadow: 0 2px 6px rgba(0,0,0,0.35);
}

.mode-light .page-hero__avatar-label {
    background: rgba(255,255,255,0.45);
    color: var(--text);
    text-shadow: 0 1px 3px rgba(255,255,255,0.7);
}

.avatar-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 180px;
    background: var(--card-bg);
    border-radius: 16px;
    border: 1px solid rgba(148,163,184,0.25);
    box-shadow: 0 20px 40px rgba(15,23,42,0.25);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px);
    transition: opacity 0.18s ease, transform 0.18s ease;
    z-index: 5;
}

.avatar-dropdown.open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.avatar-dropdown a {
    display: block;
    padding: 10px 14px;
    color: var(--text);
    text-decoration: none;
}

.avatar-dropdown a:first-child {
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
}

.avatar-dropdown a:last-child {
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
}

.avatar-dropdown a + a {
    border-top: 1px solid rgba(148,163,184,0.2);
}

.avatar-dropdown a:hover {
    background: rgba(148,163,184,0.12);
}

.logout-footer {
    margin: 40px auto 10px;
    text-align: center;
}

.logout-footer a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

.logout-footer a:hover {
    text-decoration: underline;
}

@media (max-width: 700px) {
    .page-hero {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 24px;
    }

    .page-hero__logo {
        width: 100%;
        justify-content: center;
    }

    .page-hero__text {
        text-align: center;
    }

    .page-hero__user {
        text-align: center;
    }

    .page-hero__avatar {
        position: relative;
        width: 100%;
        height: 180px;
        border-radius: 24px;
        margin-bottom: 12px;
    }
}

/* Subtitels */
h2 {
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.card h3 {
    margin-top: 1rem;
    margin-bottom: 0.4rem;
    font-size: 1rem;
}

.warning-card {
    background: rgba(239,68,68,0.05);
    border: 1px solid rgba(239,68,68,0.2);
    padding: 16px;
    border-radius: 16px;
}

.warning-card__header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.warning-card__icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(239,68,68,0.16);
    color: #b91c1c;
    font-size: 1rem;
}

.warning-card__title {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text);
}

.warning-card__subtitle {
    font-size: 0.86rem;
    color: var(--muted);
}

.warning-list {
    display: grid;
    gap: 10px;
}

.warning-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(239,68,68,0.05);
    border: 1px solid rgba(239,68,68,0.18);
}

body.mode-dark .warning-item {
    background: rgba(239,68,68,0.05);
}

.warning-item.compact {
    padding: 10px 12px;
}

.warning-item__name {
    font-weight: 600;
    color: var(--text);
}

.warning-item__dose {
    font-weight: 500;
    color: var(--muted);
    margin-left: 6px;
}

.warning-item__meta {
    font-size: 0.82rem;
    color: var(--muted);
    margin-top: 2px;
}

.warning-item__badge {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(34,197,94,0.12);
    color: #15803d;
    white-space: nowrap;
}

.warning-item__badge.badge-muted {
    background: rgba(148,163,184,0.15);
    color: var(--muted);
}

.warning-item__badge.badge-warn {
    background: rgba(239,68,68,0.12);
    color: #b91c1c;
}

.warning-soft {
    border: 1px solid rgba(239,68,68,0.2);
    background: rgba(239,68,68,0.03);
}

/* ================================
   TOPBAR & NAVIGATIE
   ================================ */

.top-bar {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
    width: 100%;
}

.nav-links {
    display: inline-flex;
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px;
    border-radius: 999px;
    background: rgba(15,23,42,0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(148,163,184,0.5);
    font-size: clamp(0.78rem, 0.9rem, 1rem);
}

.mode-light .nav-links {
    background: rgba(255,255,255,0.92);
    border-color: rgba(148,163,184,0.35);
    box-shadow: 0 8px 24px rgba(15,23,42,0.08);
}

body.mode-dark .nav-links {
    background: rgba(15,23,42,0.85);
}

.nav-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: clamp(0.78rem, 0.9rem, 1rem);
    font-weight: 500;
    color: var(--muted);
    text-decoration: none;
    white-space: nowrap;
    position: relative;
    line-height: 1.2;
    transition:
        background 0.18s ease,
        color 0.18s ease,
        transform 0.08s ease,
        box-shadow 0.08s ease;
}

.nav-links a.active {
    color: var(--text);
    background: var(--primary-soft);
    box-shadow: 0 0 0 1px rgba(148,163,184,0.4);
}

.nav-links a:hover {
    transform: translateY(-1px);
    color: var(--text);
}

.nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    margin-left: 6px;
    border-radius: 50%;
    background: #ffffff;
    color: #111827;
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 1;
    box-shadow: 0 1px 2px rgba(15,23,42,0.25);
}

.nav-badge.nav-badge-alert {
    background: #ef4444 !important;
    color: #ffffff !important;
}

.nav-badge.nav-badge-success {
    background: #22c55e !important;
    color: #ffffff !important;
}

.mode-light .nav-badge {
    background: #ffffff;
    color: #111827;
}

body.mode-dark .nav-badge {
    background: #ffffff;
    color: #0f172a;
}

@media (prefers-color-scheme: dark) {
    body.mode-auto .nav-badge {
        background: #ffffff;
        color: #0f172a;
    }
}

.tab-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 8px;
    background: rgba(15,23,42,0.05);
    border-radius: 999px;
    border: 1px solid rgba(148,163,184,0.3);
    margin: 0 auto 20px;
    width: 100%;
    box-sizing: border-box;
}

.tab-nav a {
    padding: 6px 16px;
    border-radius: 999px;
    font-size: 0.85rem;
    color: var(--muted);
    text-decoration: none;
}

.tab-nav a.active {
    background: var(--primary-soft);
    color: var(--text);
}


/* ================================
   CARDS
   ================================ */

.card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    padding: 18px 20px 16px;
    margin-bottom: 20px;
    border: 1px solid rgba(148,163,184,0.2);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(148,163,184,0.12), transparent 55%);
    opacity: 0.4;
    pointer-events: none;
}

/* Badge boven titel (optioneel) */
.card-header-note {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    margin-bottom: 2px;
}

/* ================================
   FORMULIEREN
   ================================ */

form {
    display: grid;
    gap: 12px;
}

label {
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--muted);
    margin-bottom: 2px;
    display: block;
}

input[type="text"],
input[type="password"],
input[type="number"],
input[type="datetime-local"],
select,
textarea {
    width: 100%;
    padding: 9px 11px;
    border-radius: 10px;
    border: 1px solid var(--border-subtle);
    font-size: 0.94rem;
    background: var(--card-bg-soft);
    color: var(--text);
    outline: none;
    transition: border 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, transform 0.06s ease;
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 1px rgba(59,130,246,0.4);
    transform: translateY(-1px);
}

select:not([multiple]) {
    min-height: 42px;
    line-height: 1.2;
}

textarea {
    resize: vertical;
    min-height: 70px;
}

.settings-divider {
    border: 0;
    border-top: 1px solid var(--border-subtle);
    margin: 20px 0;
}

.settings-tip {
    font-size: 0.85rem;
    color: var(--muted);
    margin-bottom: 12px;
}

.settings-subsection + .settings-subsection {
    margin-top: 24px;
}

.settings-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    margin: 16px 0;
}

.settings-panel {
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid rgba(148,163,184,0.35);
    background: rgba(15,23,42,0.02);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.settings-panel h3 {
    margin: 0;
    font-size: 1rem;
    color: var(--text);
}

.settings-panel p {
    margin: 0;
    color: var(--muted);
    font-size: 0.86rem;
}

.settings-panel small {
    display: block;
    margin-top: -4px;
}

.settings-panel ul {
    margin: 0;
    padding-left: 1.2rem;
    color: var(--muted);
    font-size: 0.86rem;
    line-height: 1.4;
}

.settings-panel ul li + li {
    margin-top: 4px;
}

.toggle-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 6px 0 4px;
}

.toggle {
    position: relative;
    display: inline-flex;
    width: 52px;
    height: 30px;
}

.toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    inset: 0;
    background: rgba(148,163,184,0.4);
    border-radius: 999px;
    transition: background 0.2s ease;
}

.toggle-slider::after {
    content: "";
    position: absolute;
    height: 24px;
    width: 24px;
    left: 3px;
    top: 3px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    transition: transform 0.2s ease;
}

.toggle input:checked + .toggle-slider {
    background: rgba(34,197,94,0.5);
}

.toggle input:checked + .toggle-slider::after {
    transform: translateX(22px);
}

.toggle input:disabled + .toggle-slider {
    background: rgba(148,163,184,0.35);
}

.toggle input:disabled + .toggle-slider::after {
    opacity: 0.6;
}

.toggle-help {
    font-size: 0.85rem;
    color: var(--muted);
}

.time-row {
    display: grid;
    gap: 6px;
}

.time-input {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 12px;
    border: 1px solid rgba(148,163,184,0.35);
    background: rgba(255,255,255,0.6);
}

.time-input input[type="time"] {
    border: none;
    background: transparent;
    padding: 0;
    font-weight: 600;
    color: var(--text);
}

.time-suffix {
    font-size: 0.85rem;
    color: var(--muted);
}

.form-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.filter-form {
    max-width: 520px;
}

.filter-row {
    display: flex;
    align-items: flex-end;
    gap: 12px;
}

.filter-field {
    flex: 1;
}

.filter-actions input[type="submit"] {
    padding: 10px 16px;
}

.filter-form small {
    display: block;
    margin-top: 8px;
    color: var(--muted);
}

@media (max-width: 600px) {
    .filter-row {
        flex-direction: column;
        align-items: stretch;
    }
}

/* Buttons */
button,
input[type="submit"] {
    padding: 8px 14px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    background: var(--primary);
    color: white;
    font-weight: 600;
    font-size: 0.93rem;
    letter-spacing: 0.02em;
    transition:
        transform 0.08s ease,
        box-shadow 0.12s ease,
        filter 0.12s ease;
    box-shadow: 0 6px 14px rgba(15,23,42,0.12);
}

body.theme-blue button:not(.btn-link),
body.theme-blue input[type="submit"]:not(.btn-link) {
    box-shadow: 0 6px 14px rgba(37,99,235,0.25);
}

body.theme-green button:not(.btn-link),
body.theme-green input[type="submit"]:not(.btn-link) {
    box-shadow: 0 6px 14px rgba(34,197,94,0.25);
}

body.theme-purple button:not(.btn-link),
body.theme-purple input[type="submit"]:not(.btn-link) {
    box-shadow: 0 6px 14px rgba(168,85,247,0.25);
}

button:hover,
input[type="submit"]:hover {
    filter: brightness(1.05);
}

button:active,
input[type="submit"]:active {
    transform: translateY(1px);
    box-shadow: 0 4px 10px rgba(15,23,42,0.4);
}

/* Kleine secundaire link-knop (bijv. 'Bewerk') */
a.btn-link,
button.btn-link {
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.8rem;
    border: 1px solid rgba(148,163,184,0.6);
    text-decoration: none;
    color: var(--muted);
    background: rgba(15,23,42,0.02);
    box-shadow: none;
}

a.btn-link:hover,
button.btn-link:hover {
    background: var(--primary-soft);
    color: var(--text);
}

.btn-link.btn-link-danger {
    border-color: rgba(239,68,68,0.5);
    color: #dc2626;
}

.btn-link.btn-link-danger:hover {
    background: rgba(239,68,68,0.12);
    color: #dc2626;
}

.btn-link.btn-link-success {
    border-color: rgba(34,197,94,0.5);
    color: #16a34a;
}

.btn-link.btn-link-success:hover {
    background: rgba(34,197,94,0.12);
    color: #16a34a;
}

button.btn-secondary {
    background: var(--card-bg-soft);
    color: var(--muted);
    box-shadow: none;
}

button.btn-secondary:hover {
    filter: none;
    background: rgba(148,163,184,0.25);
    color: var(--text);
}

.danger-zone {
    margin-top: 28px;
    padding-top: 18px;
    border-top: 1px solid var(--border-subtle);
}

.danger-zone h3 {
    margin: 0 0 4px;
}

.danger-zone p {
    margin: 0 0 12px;
    color: var(--muted);
}

button.btn-danger {
    background: #dc2626;
    color: #fff;
    box-shadow: 0 10px 24px rgba(220,38,38,0.4);
}

button.btn-danger:hover {
    filter: brightness(1.05);
}

.admin-maintenance {
    display: grid;
    gap: 18px;
}

.admin-maintenance form {
    padding: 12px;
    border: 1px solid rgba(148,163,184,0.35);
    border-radius: 14px;
    background: rgba(15,23,42,0.02);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.admin-maintenance label {
    font-weight: 500;
}

.admin-maintenance small {
    font-size: 0.78rem;
    color: var(--muted);
}

.danger-form {
    border-color: rgba(239,68,68,0.3);
}

.table-actions {
    display: inline-flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.table-actions form {
    margin: 0;
}

.status-icon.status-paused {
    color: #f97316;
}

tr.med-row-inactive {
    opacity: 0.7;
}

tr.prescription-expired {
    background: rgba(239, 68, 68, 0.08);
}

.medication-name {
    display: inline-block;
    font-weight: 600;
    font-size: 1rem;
    color: var(--text);
}

/* Kleine hint-tekst */
small {
    font-size: 0.75rem;
    color: var(--muted);
}

/* ================================
   TABELLEN
   ================================ */

.table-wrapper {
    overflow-x: auto;
    border-radius: 14px;
    background: radial-gradient(circle at top left, rgba(148,163,184,0.12), transparent 55%);
    padding: 2px;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
    backdrop-filter: blur(8px);
}

th, td {
    padding: 8px 10px;
    border-bottom: 1px solid rgba(148,163,184,0.28);
    text-align: left;
}

th {
    background: rgba(15,23,42,0.03);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
}

tbody tr:nth-child(even) {
    background: rgba(15,23,42,0.015);
}

tbody tr:hover {
    background: rgba(15,23,42,0.035);
}

/* ================================
   STATUS ICONEN
   ================================ */

.status-icon {
    font-size: 1.2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.status-ok {
    color: var(--accent-ok);
}

.status-warn {
    color: var(--accent-warn);
}

.status-critical {
    color: var(--accent-critical);
}

/* ================================
   LISTS / INNAME-ITEMS
   ================================ */

.intake-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.intake-list li {
    padding: 8px 0;
    border-bottom: 1px dashed rgba(148,163,184,0.45);
}

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

.intake-time {
    font-size: 0.8rem;
    color: var(--muted);
}

.intake-comment {
    font-size: 0.8rem;
    color: var(--muted);
}

.stock-alert-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.stock-alert-list li {
    padding: 10px 0;
    border-bottom: 1px dashed rgba(148,163,184,0.45);
}

.stock-alert-list li:last-child {
    border-bottom: none;
}

.stock-alert-info {
    font-size: 0.85rem;
    color: var(--muted);
    margin: 6px 0;
}

.stock-prescription {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.75rem;
    border: 1px solid transparent;
}

.stock-prescription--ok {
    border-color: rgba(34,197,94,0.4);
    color: #15803d;
    background: rgba(34,197,94,0.12);
}

.stock-prescription--missing {
    border-color: rgba(239,68,68,0.45);
    color: #b91c1c;
    background: rgba(239,68,68,0.12);
}

.prescription-details {
    margin-top: 8px;
    border: 1px solid rgba(148,163,184,0.35);
    border-radius: 12px;
    padding: 6px 10px;
    background: rgba(15,23,42,0.02);
}

.prescription-details[open] {
    background: rgba(59,130,246,0.08);
}

.prescription-details summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--text);
}

.prescription-details__body {
    margin-top: 8px;
    font-size: 0.85rem;
}

.inline-form {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

/* ================================
   ALERT / INFO-STIJLEN
   ================================ */

.alert {
    position: relative;
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    margin-bottom: 8px;
    border: 1px solid transparent;
}

.alert.error {
    border-color: rgba(239,68,68,0.24);
    background: rgba(239,68,68,0.04);
}

.alert.success {
    border-color: rgba(34,197,94,0.28);
    background: rgba(34,197,94,0.04);
}

.alert.warn {
    border-color: rgba(234,179,8,0.45);
    background: rgba(234,179,8,0.06);
}
.schedule-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.schedule-list li {
    background: var(--card-bg-soft);
    border-radius: 12px;
    padding: 10px 14px;
    border: 1px solid rgba(148,163,184,0.25);
    font-size: 0.95rem;
}

.schedule-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(140px, 1fr));
    gap: 16px;
}

.schedule-block {
    min-width: 0;
}

@media (max-width: 700px) {
    .schedule-columns {
        grid-template-columns: 1fr;
    }
}

.schedule-block__time {
    font-weight: 600;
    margin-bottom: 6px;
    letter-spacing: 0.08em;
    color: var(--muted);
}


.avatar-preview {
    width: 96px;
    height: 96px;
    border-radius: 24px;
    background-size: cover;
    background-position: center;
    border: 3px solid rgba(255,255,255,0.6);
    box-shadow: 0 12px 28px rgba(15,23,42,0.25);
    margin-bottom: 12px;
}

.mode-light .avatar-preview {
    border-color: rgba(148,163,184,0.4);
    box-shadow: 0 10px 18px rgba(15,23,42,0.15);
}
.login-wrapper {
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(59,130,246,0.25), transparent 55%),
        radial-gradient(circle at bottom right, rgba(168,85,247,0.2), transparent 55%),
        var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 16px;
}

.login-card {
    width: 100%;
    max-width: 960px;
    background: var(--card-bg);
    border-radius: 32px;
    box-shadow: 0 30px 60px rgba(15,23,42,0.25);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    overflow: hidden;
    border: 1px solid rgba(148,163,184,0.25);
}

.login-card__info {
    padding: 48px;
    background:
        linear-gradient(140deg, rgba(15,23,42,0.95), rgba(30,64,175,0.75)),
        linear-gradient(120deg, rgba(59,130,246,0.55), transparent 65%);
    color: #f8fafc;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 24px;
    position: relative;
}

.login-card__info::after {
    content: "";
    position: absolute;
    inset: 18px;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 26px;
    pointer-events: none;
}

.login-card__badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(15,23,42,0.45);
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.login-card__title {
    font-size: 2rem;
    margin: 0;
    letter-spacing: 0.04em;
}

.login-card__subtitle {
    font-size: 1rem;
    color: rgba(248,250,252,0.85);
    line-height: 1.6;
    margin: 0;
}

.login-card__features {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 12px;
}

.login-card__features li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
    color: rgba(248,250,252,0.9);
}

.login-card__form {
    padding: 48px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 24px;
    background: var(--card-bg);
}

.login-card .card {
    margin: 0;
    box-shadow: none;
    border: none;
    padding: 0;
}

.login-card .card h2 {
    font-size: 1.3rem;
}

.login-card form input[type="submit"],
.login-card form button {
    width: 100%;
    padding: 12px;
}

.login-card__support {
    font-size: 0.9rem;
    color: var(--muted);
    margin: 12px 0 0;
    text-align: center;
}

.login-simple {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background:
        radial-gradient(circle at 20% 20%, rgba(59,130,246,0.12), transparent 45%),
        radial-gradient(circle at 80% 10%, rgba(59,130,246,0.08), transparent 40%);
}

.login-panel {
    width: min(420px, 100%);
    background: var(--card-bg);
    border: 1px solid rgba(148,163,184,0.35);
    border-radius: 20px;
    padding: 32px;
    box-shadow: var(--shadow-soft);
    text-align: center;
    color: #374151;
}

.login-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.login-logo img {
    width: 100%;
    height: auto;
    max-width: 100%;
}

.login-logo span {
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.login-title {
    margin: 0 0 6px;
    font-size: 1.6rem;
    color: #1f2937;
}

.login-subtitle {
    margin: 0 0 18px;
    color: #4b5563;
    font-size: 0.95rem;
}

.login-form {
    display: grid;
    gap: 12px;
    text-align: left;
}

.login-form .form-row {
    display: grid;
    gap: 6px;
}

.login-submit {
    width: 100%;
    margin-top: 6px;
}

.login-support {
    margin-top: 14px;
    color: #4b5563;
    font-size: 0.85rem;
}

@media (max-width: 700px) {
    .login-card {
        border-radius: 24px;
    }

    .login-card__info,
    .login-card__form {
        padding: 32px 24px;
    }
}
