/* SET Digital Signage - basisstijl (mobile first, white-label via --brand) */

:root {
    --brand: #2563EB;
    --brand-dark: #1E293B;
    --sidebar-w: 250px;
    --bg: #f4f6fa;
    --card-radius: 14px;
}

body { background: var(--bg); color: #1e293b; }

/* ---- Merkknop ---- */
.btn-brand { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-brand:hover, .btn-brand:focus { filter: brightness(0.93); color: #fff; }

/* =====================================================================
   Gastenlayout (login e.d.)
   ===================================================================== */
.guest-body { background: linear-gradient(160deg, var(--brand-dark), #0f172a); min-height: 100vh; }
.guest-wrap { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px; }
.guest-card { width: 100%; max-width: 400px; background: #fff; border-radius: var(--card-radius); padding: 32px 28px; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.guest-brand { text-align: center; margin-bottom: 20px; }
.guest-logo { max-height: 48px; }
.guest-logo-text { font-size: 1.25rem; font-weight: 700; color: var(--brand-dark); }
.guest-heading { font-size: 1.4rem; font-weight: 700; margin-bottom: 4px; }
.guest-sub { color: #64748b; font-size: .9rem; margin-bottom: 20px; }
.guest-footer { color: rgba(255,255,255,.6); font-size: .8rem; margin-top: 18px; }

/* =====================================================================
   App-shell (sidebar + content)
   ===================================================================== */
.app-shell { display: flex; min-height: 100vh; }

.app-sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; width: var(--sidebar-w);
    background: var(--brand-dark); color: #cbd5e1; z-index: 1040;
    transform: translateX(-100%); transition: transform .2s ease;
    display: flex; flex-direction: column; overflow-y: auto;
}
.app-sidebar.open { transform: translateX(0); }

.sidebar-brand { padding: 18px 20px; border-bottom: 1px solid rgba(255,255,255,.08); }
.sidebar-logo { max-height: 34px; }
.sidebar-logo-text { color: #fff; font-weight: 700; font-size: 1.05rem; }

.sidebar-nav { padding: 12px 0; }
.sidebar-nav ul { list-style: none; margin: 0; padding: 0; }
.sidebar-nav .nav-section { padding: 14px 20px 6px; font-size: .72rem; text-transform: uppercase; letter-spacing: .5px; color: #64748b; }
.sidebar-nav .nav-link { display: flex; align-items: center; gap: 12px; padding: 11px 20px; color: #cbd5e1; text-decoration: none; font-size: .94rem; border-left: 3px solid transparent; }
.sidebar-nav .nav-link i { font-size: 1.05rem; width: 20px; text-align: center; }
.sidebar-nav .nav-link:hover { background: rgba(255,255,255,.06); color: #fff; }
.sidebar-nav .nav-link.active { background: rgba(255,255,255,.08); color: #fff; border-left-color: var(--brand); }

.app-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }

.app-header {
    position: sticky; top: 0; z-index: 1030; background: #fff;
    display: flex; align-items: center; gap: 8px;
    padding: 12px 18px; border-bottom: 1px solid #e2e8f0;
}
.app-title { font-size: 1.15rem; font-weight: 700; margin: 0; }

.app-content { padding: 20px 18px; flex: 1; }
.app-footer { padding: 14px 18px; color: #94a3b8; font-size: .82rem; border-top: 1px solid #e2e8f0; }

/* Overlay bij open mobiel menu */
.sidebar-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 1035; display: none; }
.sidebar-backdrop.show { display: block; }

/* =====================================================================
   Statistiekkaarten
   ===================================================================== */
.stat-card { background: #fff; border-radius: var(--card-radius); padding: 18px; display: flex; align-items: center; gap: 14px; height: 100%; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.stat-icon { width: 46px; height: 46px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; flex-shrink: 0; }
.stat-value { font-size: 1.6rem; font-weight: 700; line-height: 1; }
.stat-label { color: #64748b; font-size: .85rem; margin-top: 2px; }
.stat-info    .stat-icon { background: #dbeafe; color: #2563eb; }
.stat-success .stat-icon { background: #dcfce7; color: #16a34a; }
.stat-danger  .stat-icon { background: #fee2e2; color: #dc2626; }
.stat-warning .stat-icon { background: #fef3c7; color: #d97706; }

/* Statuslabels (consistente kleuren) */
.status-badge { font-size: .78rem; padding: .25rem .55rem; border-radius: 999px; font-weight: 600; }
.status-online  { background: #dcfce7; color: #166534; }
.status-offline { background: #fee2e2; color: #991b1b; }
.status-warning { background: #fef3c7; color: #92400e; }
.status-info    { background: #dbeafe; color: #1e40af; }

/* =====================================================================
   Paginakop en knoppen
   ===================================================================== */
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.card-surface { background: #fff; border-radius: var(--card-radius); box-shadow: 0 1px 3px rgba(0,0,0,.06); }

/* Bestandsbibliotheek: thumbnails */
.file-thumb { aspect-ratio: 4 / 3; background: #f1f5f9; border-radius: 8px; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.file-thumb img { width: 100%; height: 100%; object-fit: cover; }
.file-thumb-icon { font-size: 2rem; color: #94a3b8; }

/* Content-preview op device-detail */
.content-preview { max-width: 320px; border-radius: 8px; border: 1px solid #e2e8f0; }

/* Rechten-selectie in rolformulier */
.perm-group { border: 1px solid #e2e8f0; border-radius: 10px; padding: 14px 16px; margin-bottom: 12px; }
.perm-group h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .4px; color: #64748b; margin-bottom: 10px; }

/* =====================================================================
   Responsive tabel: op mobiel worden rijen kaarten (via data-label)
   ===================================================================== */
.rtable { width: 100%; border-collapse: collapse; background: #fff; }
.rtable th, .rtable td { text-align: left; padding: 12px 14px; border-bottom: 1px solid #eef2f7; vertical-align: middle; }
.rtable thead th { font-size: .78rem; text-transform: uppercase; letter-spacing: .4px; color: #64748b; background: #f8fafc; }
.rtable tbody tr:last-child td { border-bottom: 0; }

@media (max-width: 767px) {
    .rtable thead { display: none; }
    .rtable, .rtable tbody, .rtable tr, .rtable td { display: block; width: 100%; }
    .rtable tr { border: 1px solid #e2e8f0; border-radius: 12px; margin-bottom: 12px; padding: 6px 4px; }
    .rtable td { border: 0; display: flex; justify-content: space-between; gap: 12px; padding: 8px 14px; }
    .rtable td::before { content: attr(data-label); font-weight: 600; color: #64748b; }
    .rtable td.rtable-actions { justify-content: flex-end; }
    .rtable td.rtable-actions::before { content: ""; }
}

/* =====================================================================
   Desktop
   ===================================================================== */
@media (min-width: 992px) {
    .app-sidebar { transform: translateX(0); }
    .app-main { margin-left: var(--sidebar-w); }
    .app-content { padding: 24px 28px; }
}
