/* ------------ Yuverta (official palette) + Basis variabelen ------------ */

:root {
    /* Yuverta kleuren (official) */
    --yuv-lila: #B8A1FF;
    --yuv-rood: #FF2F00;
    --yuv-lichtblauw: #7CCBFF;
    --yuv-donkerbruin: #431F17;
    --yuv-lime: #A7FF00;
    --yuv-donkerblauw: #000644;
    --yuv-grijs: #B2B7B8;

    --yuv-zwart: #000000;
    --yuv-wit: #FFFFFF;

    /* Layout kleuren (jouw design, maar Yuverta-gestuurd) */
    --bg-page: #eef2f7;
    --bg-shell-top: #f5f7fb;
    --bg-shell-bottom: #e5edf7;
    --bg-card: #ffffff;
    --bg-card-soft: #f9fafb;

    /* Panel kleur → Yuverta */
    --bg-sensor-panel: var(--yuv-donkerblauw);

    --text-main: #111827;
    --text-muted: #6b7280;
    --text-invert: #f9fafb;

    /* Accenten → Yuverta */
    --accent-blue: var(--yuv-donkerblauw);
    --accent-blue-soft: rgba(0, 6, 68, 0.12);
    --accent-orange: var(--yuv-rood);

    --border-subtle: #e5e7eb;

    --radius-lg: 18px;
    --radius-sm: 10px;

    --shadow-soft: 0 18px 40px rgba(15, 23, 42, 0.16);
    --shadow-card: 0 10px 25px rgba(15, 23, 42, 0.08);
}

/* ------------ Basis: layout ------------ */

/* Volledige achtergrond */
body {
    background: radial-gradient(circle at top, #f5f7fb 0%, #eef2f7 45%, #dde4f0 100%);
    color: var(--text-main);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Links */
a {
    color: var(--accent-blue);
}

a:hover {
    color: var(--accent-orange);
}

/* Navbar (kleur uit Yuverta) */
.navbar {
    background-color: var(--yuv-donkerblauw) !important;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.22);
    border-bottom: none;
}

/* Navbar tekst */
.navbar .navbar-brand,
.navbar .nav-link {
    color: var(--yuv-wit) !important;
}

.navbar .nav-link:hover {
    color: var(--yuv-lime) !important;
}

/* Login/Logout kleuren (je gebruikt text-success/text-danger) */
.navbar .text-success {
    color: var(--yuv-lime) !important;
}

.navbar .text-danger {
    color: var(--yuv-rood) !important;
}

/* Shell waar je content in zit */
.page-shell {
    max-width: 1180px;
    margin: 30px auto 40px;
    background: linear-gradient(to bottom, var(--bg-shell-top), var(--bg-shell-bottom));
    border-radius: 24px;
    box-shadow: var(--shadow-soft);
    padding: 24px 28px 28px;
}

/* Titel */
.page-title {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    text-align: left;
    margin-bottom: 22px;
    color: var(--yuv-donkerblauw);
}

/* Subtitel */
.page-subtitle {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: -8px;
    margin-bottom: 18px;
}

/* ------------ Cards (bovenste blokken) ------------ */

.card,
.metric-card,
.chart-card,
.table-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: var(--shadow-card);
    padding: 18px 20px;
}

/* Zorg dat Bootstrap .card niet alles overschrijft */
.card {
    border: 1px solid rgba(255, 255, 255, 0.6) !important;
}

/* Kleine header in cards */
.card-header-title {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.11em;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 6px;
}

/* Grote waarde */
.card-value {
    font-size: 2rem;
    font-weight: 700;
}

.card-unit {
    font-size: 0.95rem;
    margin-left: 4px;
    color: var(--text-muted);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(260px, 1.2fr);
    gap: 20px;
}

.dashboard-main {
    display: grid;
    grid-template-rows: auto auto 1fr;
    gap: 16px;
}

.metrics-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.dashboard-side {
    display: grid;
    grid-template-rows: auto auto;
    gap: 16px;
}

/* ------------ Sensor panel rechts ------------ */

.sensor-panel {
    background: var(--bg-sensor-panel);
    color: var(--text-invert);
    border-radius: var(--radius-lg);
    padding: 18px 18px 16px;
    box-shadow: var(--shadow-card);
}

.sensor-panel-title {
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: rgba(249, 250, 251, 0.7);
    margin-bottom: 10px;
}

.sensor-list {
    list-style: none;
    padding: 0;
    margin: 0 0 12px;
}

.sensor-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(15, 23, 42, 0.16);
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 0.85rem;
    margin-bottom: 6px;
}

.live-block {
    margin-top: 6px;
}

.live-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: rgba(249, 250, 251, 0.65);
}

.live-value {
    font-size: 1.4rem;
    font-weight: 700;
}

/* ------------ Grafieken + tabel ------------ */

.chart-card {
    padding: 16px 18px 10px;
}

.chart-frame {
    width: 100%;
    height: 220px;
    border: none;
    border-radius: var(--radius-sm);
}

.table-card {
    padding: 14px 18px 12px;
}

.table {
    margin-bottom: 0;
    font-size: 0.82rem;
    color: var(--text-main);
}

.table thead {
    background: var(--bg-card-soft);
}

.table thead th {
    border-bottom: none;
    color: var(--text-muted);
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.09em;
}

.table tbody tr:nth-child(even) {
    background-color: #f3f4f6;
}

.table tbody tr:hover {
    background-color: #e5edf7;
}

/* ------------ Buttons & inputs ------------ */

/* Primary knop: Yuverta donkerblauw gradient */
.btn-primary {
    background: linear-gradient(135deg, var(--yuv-donkerblauw), #00107a);
    border: none;
    border-radius: 999px;
    padding: 0.35rem 1.1rem;
    font-weight: 500;
    box-shadow: 0 8px 18px rgba(0, 6, 68, 0.35);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #00107a, var(--yuv-donkerblauw));
}

/* Outline primary: Yuverta stijl */
.btn-outline-primary {
    color: var(--yuv-donkerblauw);
    border-color: var(--yuv-donkerblauw);
    border-radius: 999px;
    padding: 0.35rem 1.1rem;
    font-weight: 500;
}

.btn-outline-primary:hover {
    background-color: var(--yuv-donkerblauw);
    border-color: var(--yuv-donkerblauw);
    color: var(--yuv-wit);
}

/* Inputs */
.form-control,
.form-select {
    border-radius: 999px;
    border: 1px solid var(--border-subtle);
    background-color: var(--bg-card-soft);
    font-size: 0.9rem;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--yuv-donkerblauw);
    box-shadow: 0 0 0 2px rgba(167, 255, 0, 0.25);
    /* Yuverta lime */
}

/* ------------ Sensor grafieken GRID (nieuw) ------------ */

.sensor-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 20px;
}

.sensor-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: var(--shadow-card);
    padding: 18px 20px;
}

.sensor-card h4 {
    margin-bottom: 12px;
    color: var(--yuv-donkerblauw);
}

/* ------------ Contact pagina panel ------------ */

.contact-panel {
    background-color: var(--yuv-donkerblauw);
    color: var(--yuv-wit);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.contact-panel hr {
    border-color: rgba(255, 255, 255, 0.18);
}

/* ------------ Footer ------------ */

footer {
    color: rgba(0, 0, 0, 0.65);
}

footer a {
    color: var(--yuv-donkerblauw);
}

footer a:hover {
    color: var(--yuv-rood);
}

/* ------------ Responsive ------------ */

@media (max-width: 992px) {
    .dashboard-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 768px) {
    .metrics-row {
        grid-template-columns: minmax(0, 1fr);
    }

    .page-shell {
        padding: 18px 16px 22px;
        border-radius: 16px;
    }
}

.sensor-img {
    width: 100%;
    height: 220px;
    object-fit: contain;
    background: #ffffff;
    border-radius: 12px;
    padding: 12px;
}

.badge-plant {
    background-color: white;
    /* vulling wit */
    color: #28a745;
    /* groene tekst */
    border: 1px solid #28a745;
    /* groene rand */
    font-weight: 500;
}

.badge-plant {
    background-color: white;
    /* achtergrond wit */
    color: #28a745;
    /* groene tekst */
    border: 2px solid #28a745;
    /* groene rand */
    border-radius: 12px;
    /* ronde badge */
    padding: 0.25em 0.6em;
    /* iets bredere padding voor cirkelvorm */
    font-weight: 500;
    display: inline-block;
    text-align: center;
}



.topic-foto {
    width: 100%;
    height: auto;
    max-height: 200px;
    padding: 1px;
    background: var(--bg-card-soft);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
    object-fit: cover;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.topic-foto:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.14);
    border-color: var(--accent-blue-soft);
}

.foto-slots {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    margin: 24px auto 32px auto;
    padding: 16px 0;
}

.foto-slot {
    flex: 1 1 100%;
    max-width: 300px;
    aspect-ratio: 3 / 2;
    background: #f1f1f1;
    border: 2px dashed #bbb;
    border-radius: 16px;
    cursor: pointer;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.25s ease, background 0.25s ease;
}

.foto-slot:hover {
    border-color: #666;
    background: #eaeaea;
}

.foto-slot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.foto-slider {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 2;
    overflow: hidden;
    border-radius: 16px;
}

.foto-slider .topic-foto {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.foto-slider button.slide-left,
.foto-slider button.slide-right {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2rem;
    color: white;
    border: none;
    background: rgba(0,0,0,0.3);
    cursor: pointer;
    padding: 0 8px;
    border-radius: 50%;
    z-index: 10;
    user-select: none;
}

.foto-slider button.slide-left { left: 8px; }
.foto-slider button.slide-right { right: 8px; }

@media (max-width: 768px) {
    .foto-slot, .topic-foto {
        max-width: 100%;
        height: auto;
    }

    .foto-slider {
        aspect-ratio: auto;
        height: auto;
    }
}
.foto-wrapper {
  position: relative;
  display: inline-block;
}

.foto-wrapper .delete-foto-btn {
  position: absolute;
  top: 2px;
  right: 2px;
  background: red;
  color: white;
  border: none;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  font-size: 14px;
  cursor: pointer;
  line-height: 18px;
  text-align: center;
  padding: 0;
}

