/* --- THEMA & BASIS STIJLEN --- */
:root {
    --ro-blauw: #0073b3;
    --ro-donkerblauw: #015a8c;
    --achtergrond-kleur: #f0f4f8;
    --tekst-kleur: #333;
    --header-achtergrond: #ffffff;
    --accent-groen: #27ae60;
    --accent-lichtblauw: #3498db;
    --accent-rood: #c0392b;
    --disclaimer-geel: #fffbe6;
    --disclaimer-rand: #ffe58f;
}

/* --- ALGEMENE ANIMATIES --- */
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.1); } }
@keyframes typing { from { width: 0 } to { width: 6ch; } }
@keyframes blink-caret { from, to { border-color: transparent } 50% { border-color: var(--ro-blauw); } }

/* --- BASISSTRUCTUUR --- */
body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    background-color: var(--achtergrond-kleur);
    color: var(--tekst-kleur);
    line-height: 1.6;
}

#app-wrapper { display: flex; flex-direction: column; min-height: 100vh; }
#app { flex: 1 0 auto; display: flex; flex-direction: column; }

/* --- WACHTWOORD OVERLAY --- */
.password-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(135deg, rgba(0, 80, 120, 0.95), rgba(0, 20, 40, 0.95));
    display: flex; justify-content: center; align-items: center; z-index: 1000;
    backdrop-filter: blur(5px);
}
.password-box {
    background-color: white; padding: 2rem 2.5rem; border-radius: 5px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3); text-align: center;
    width: 100%; max-width: 400px; animation: fadeIn 0.5s ease-out;
    margin: 0 1rem; /* Zorgt voor ruimte op de allerkleinste schermen */
}
.password-box h2 { margin-top: 0; font-family: 'Space Grotesk', sans-serif; }
.password-box input { width: 100%; padding: 0.75rem; margin-top: 1rem; border: 1px solid #ccc; border-radius: 4px; box-sizing: border-box; }
.password-box button {
    width: 100%; padding: 0.75rem; margin-top: 1rem; background-color: var(--ro-blauw);
    color: white; border: none; border-radius: 4px; font-weight: bold; cursor: pointer; transition: background-color 0.3s;
}
.password-box button:hover { background-color: var(--ro-donkerblauw); }
.error-message { color: var(--accent-rood); margin-top: 1rem; font-weight: bold; }

/* --- HEADER --- */
.ro-header {
    background-color: var(--header-achtergrond);
    border-bottom: 1px solid #e1e1e1;
    padding: 0.5rem 2rem;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    min-height: 80px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.ro-logo { justify-self: start; grid-column: 1; }
.ro-logo img { height: 60px; }
.header-center { text-align: center; grid-column: 2; }
.header-center h1 { font-family: 'Space Grotesk', sans-serif; font-size: 1.5rem; margin: 0; color: var(--ro-donkerblauw); }
.header-center p { margin: 0; font-size: 0.9rem; color: #666; }
.user-info { justify-self: end; grid-column: 3; display: flex; align-items: center; }
.user-name { font-weight: 700; }
.user-icon { width: 24px; height: 24px; margin-left: 0.75rem; color: #555; }

/* --- DISCLAIMER BANNER --- */
.disclaimer-banner {
    background-color: var(--disclaimer-geel);
    color: #5d5224;
    padding: 1rem 2rem;
    text-align: center;
    font-weight: 500;
    display: flex;
    justify-content: center;
    align-items: center;
    border-bottom: 1px solid var(--disclaimer-rand);
}
.disclaimer-banner-icon { font-size: 1.5rem; margin-right: 1rem; }

/* --- HOOFDINHOUD --- */
.main-container { max-width: 1400px; margin: 2rem auto; padding: 0 2rem; }
.page-intro {
    text-align: center;
    margin-bottom: 3rem;
    animation: fadeIn 0.8s ease-out;
}
.page-intro h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2.5rem;
    color: var(--ro-donkerblauw);
    display: inline-block;
    overflow: hidden;
    white-space: nowrap;
    border-right: .15em solid var(--ro-blauw);
    animation: typing 2s steps(6, end), blink-caret .75s step-end infinite;
    width: 6ch;
}
.page-intro p { font-size: 1.1rem; color: #555; max-width: 800px; margin: 0.5rem auto 0; }

/* --- CONTROLS --- */
.controls-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    gap: 2rem;
    flex-wrap: wrap; /* Zorgt dat de controls onder elkaar springen op smalle schermen */
}
.ai-insight-box {
    background: linear-gradient(135deg, var(--ro-donkerblauw), var(--ro-blauw));
    color: white;
    border-radius: 8px;
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    box-shadow: 0 10px 20px rgba(0, 115, 179, 0.2);
    animation: fadeIn 1s ease-out;
    flex-grow: 1;
}
.ai-insight-icon { font-size: 2rem; margin-right: 1.5rem; flex-shrink: 0; }
.ai-insight-content h4 { margin: 0 0 0.25rem 0; font-family: 'Space Grotesk', sans-serif; font-size: 1.1rem; }
.ai-insight-content p { margin: 0; opacity: 0.9; font-size: 0.9rem; }

.view-toggle { display: flex; align-items: center; font-size: 0.9rem; color: #555; flex-shrink: 0; }
.toggle-switch {
    position: relative; display: inline-block; width: 50px; height: 26px; margin: 0 0.75rem;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.slider {
    position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0;
    background-color: #ccc; transition: .4s; border-radius: 26px;
}
.slider:before {
    position: absolute; content: ""; height: 20px; width: 20px; left: 3px; bottom: 3px;
    background-color: white; transition: .4s; border-radius: 50%;
}
input:checked + .slider { background-color: var(--ro-blauw); }
input:checked + .slider:before { transform: translateX(24px); }

.category-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5rem;
    margin: 2.5rem 0 1.5rem 0;
    border-bottom: 2px solid var(--ro-blauw);
    padding-bottom: 0.5rem;
}

/* --- TEGELS --- */
.tiles-grid {
    position: relative;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 2rem;
}
.tiles-grid > a {
    display: flex;
}
.tile-move, .tile-enter-active, .tile-leave-active { transition: all 0.6s cubic-bezier(0.55, 0, 0.1, 1); }
.tile-enter-from, .tile-leave-to { opacity: 0; transform: scale(0.5); }
.tile-leave-active { position: absolute; }

.tile {
    background-color: #fdfdfd; border: 1px solid #e8e8e8; border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.07); overflow: hidden; display: flex; flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease; cursor: pointer;
    width: 100%;
    flex-grow: 1;
}
.tile:hover { transform: translateY(-8px); box-shadow: 0 12px 25px rgba(0,0,0,0.12); }
.tile-header { 
    background-color: #f5f9fc; border-bottom: 1px solid #e8e8e8;
    padding: 1rem 1.5rem; display: flex; align-items: center; 
}
.tile-icon { width: 40px; height: 40px; margin-right: 1rem; color: var(--ro-blauw); }
.tile-icon svg { width: 100%; height: 100%; }
.tile-title { font-family: 'Space Grotesk', sans-serif; font-size: 1.25rem; margin: 0; flex-grow: 1; color: var(--tekst-kleur); }
.tile-status { display: flex; align-items: center; font-size: 0.8rem; font-weight: 700; padding: 0.2rem 0.6rem; border-radius: 12px; }
.status-light { width: 8px; height: 8px; border-radius: 50%; margin-right: 0.5rem; }
.status-online { background-color: rgba(39, 174, 96, 0.1); color: var(--accent-groen); }
.status-online .status-light { background-color: var(--accent-groen); animation: pulse 2s infinite; }
.status-toekomstig { background-color: rgba(52, 152, 219, 0.1); color: var(--accent-lichtblauw); }
.status-toekomstig .status-light { background-color: var(--accent-lichtblauw); }
.status-offline { background-color: rgba(192, 57, 43, 0.1); color: var(--accent-rood); }
.status-offline .status-light { background-color: var(--accent-rood); }
.tile-content { padding: 1.5rem; flex-grow: 1; display: flex; flex-direction: column; }
.tile-description { margin: 0 0 1.5rem 0; }
.tile-link { display: inline-block; text-decoration: none; font-weight: 700; align-self: flex-start; margin-top: auto; color: var(--ro-blauw); }
.tile-link:after { content: ' →'; transition: transform 0.2s ease-out; display: inline-block; }
.tile-link:hover:after { transform: translateX(4px); }

/* --- FOOTER --- */
.site-footer {
    background-color: #333;
    color: #eee;
}
.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    text-align: center;
    padding: 2rem;
}
.footer-content h4 {
    font-family: 'Space Grotesk', sans-serif;
    margin-top: 0;
    font-size: 1.2rem;
}
.footer-content a {
    display: inline-block;
    background-color: var(--ro-blauw);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 700;
    transition: background-color 0.3s;
}
.footer-content a:hover {
    background-color: var(--ro-donkerblauw);
}
.footer-copyright {
    text-align: center;
    padding: 1rem;
    background-color: #222;
    color: #aaa;
    font-size: 0.9rem;
}

/* --- RESPONSIVE AANPASSINGEN VOOR MOBIEL --- */
@media (max-width: 768px) {
    .ro-header, .disclaimer-banner, .main-container, .footer-content {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .header-center {
        display: none; /* Verberg de centrale titel op mobiel voor meer ruimte */
    }

    .ro-header {
        grid-template-columns: 1fr auto; /* Pas de header layout aan */
    }

    .page-intro h2 {
        font-size: 2rem;
    }

    .tiles-grid {
        grid-template-columns: 1fr; /* Zet tegels onder elkaar op mobiel */
    }
}
