/* ============================================
   Reanimatie.nl - Module Styles
   SPA tab navigation + module-specifieke stijlen
   ============================================ */

/* ---- Topbar ---- */
.topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(30, 58, 95, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    transition: var(--transition);
}
.topbar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    gap: 16px;
}
.topbar__logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.25rem;
    color: #fff;
    text-decoration: none;
}
.logo-icon {
    width: 36px;
    height: 36px;
    background: var(--accent);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #fff;
    flex-shrink: 0;
}
.logo-icon-svg {
    width: 52px;
    height: 52px;
    flex-shrink: 0;
    margin: -8px 0;
}
.logo-text { color: #fff; }
.logo-accent { color: var(--accent); }

.topbar__user {
    display: flex;
    align-items: center;
    gap: 10px;
}
.topbar__greeting {
    font-size: 0.875rem;
    color: rgba(255,255,255,0.7);
    display: flex;
    align-items: center;
    gap: 6px;
}
.topbar__hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}
.topbar__hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: var(--transition);
}

/* ---- Module Tab Navigation ---- */
.module-nav {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    z-index: 999;
    background: #fff;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}
.module-tabs {
    display: flex;
    list-style: none;
    gap: 0;
    padding: 0;
    overflow-x: auto;
    scrollbar-width: none;
}
.module-tabs::-webkit-scrollbar { display: none; }
.module-tabs li { flex-shrink: 0; }

.module-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 24px;
    height: 52px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    border-bottom: 3px solid transparent;
    transition: var(--transition);
    white-space: nowrap;
    position: relative;
}
.module-tab i { font-size: 0.95rem; }

.module-tab:hover {
    color: var(--primary);
    background: var(--bg-secondary);
}

.module-tab.active {
    color: var(--primary);
    border-bottom-color: var(--accent);
    font-weight: 600;
}

/* Sliding indicator animation */
.module-tab::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent);
    transform: scaleX(0);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.module-tab.active::after {
    transform: scaleX(1);
}

/* ---- Page offset for fixed bars ---- */
.page-content {
    padding-top: 116px; /* 64px topbar + 52px module nav */
    min-height: 100vh;
}

/* ---- Module Section Transitions ---- */
.module-section {
    display: none;
    animation: fadeSlideIn 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.module-section.active {
    display: block;
}
.module-section.exiting {
    animation: fadeSlideOut 0.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes fadeSlideIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeSlideOut {
    from { opacity: 1; transform: translateY(0); }
    to   { opacity: 0; transform: translateY(-8px); }
}

/* ---- Buttons (extra) ---- */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 8px 18px; border-radius: var(--radius-sm); font-size: 0.875rem; font-weight: 500; cursor: pointer; border: none; transition: var(--transition); text-decoration: none; }
.btn-sm { padding: 6px 14px; font-size: 0.8rem; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); transform: translateY(-1px); }
.btn-outline { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,0.3); }
.btn-outline:hover { background: rgba(255,255,255,0.1); }
.btn-ghost { background: transparent; color: rgba(255,255,255,0.7); }
.btn-ghost:hover { color: #fff; }
.btn-dark { background: var(--primary); color: #fff; }
.btn-dark:hover { background: var(--primary-light); }
.btn-danger { background: var(--accent); color: #fff; }
.btn-success { background: var(--green); color: #fff; }
.btn-success:hover { background: var(--green-light); }
.w-full { width: 100%; justify-content: center; }
.mb-2 { margin-bottom: 8px; }

/* ---- Module Hero ---- */
.module-hero {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 60%, var(--primary-light) 100%);
    color: #fff;
    padding: 80px 0 60px;
    position: relative;
    overflow: hidden;
}
.module-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('/assets/pattern.svg') center/cover;
    opacity: 0.04;
}
.module-hero__content { position: relative; z-index: 1; }
.module-hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 99px;
    padding: 6px 16px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 24px;
}
.module-hero h1 {
    font-size: clamp(2rem, 4vw, 3.2rem);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 20px;
}
.module-hero p {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.8);
    max-width: 600px;
    margin-bottom: 32px;
}
.module-hero__accent { color: var(--accent); }

/* ---- Cards ---- */
.card {
    background: #fff;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}
.card-icon-blue  { background: rgba(30,58,95,0.1); color: var(--primary); }
.card-icon-red   { background: rgba(230,57,70,0.1); color: var(--accent); }
.card-icon-green { background: rgba(42,157,143,0.1); color: var(--green); }
.card-icon-orange{ background: rgba(233,168,32,0.1); color: var(--orange); }

/* ---- Grid layouts ---- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

/* ---- Section container ---- */
.section { padding: 60px 0; }
.section-sm { padding: 40px 0; }
.section-lg { padding: 80px 0; }
.section__header { text-align: center; margin-bottom: 48px; }
.section__header h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 700; color: var(--text-primary); margin-bottom: 12px; }
.section__header p { font-size: 1rem; color: var(--text-secondary); max-width: 560px; margin: 0 auto; }
.section-bg { background: var(--bg-secondary); }

/* ---- Badge / Status chips ---- */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 99px; font-size: 0.75rem; font-weight: 600; }
.badge-pending  { background: rgba(233,168,32,0.12); color: #a07000; }
.badge-active   { background: rgba(42,157,143,0.12); color: var(--green); }
.badge-inactive { background: rgba(139,141,163,0.12); color: var(--text-muted); }
.badge-danger   { background: rgba(230,57,70,0.12); color: var(--accent); }

/* ---- Forms ---- */
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-size: 0.875rem; font-weight: 500; color: var(--text-primary); margin-bottom: 6px; }
.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-family: var(--font);
    color: var(--text-primary);
    background: #fff;
    transition: var(--transition);
    outline: none;
}
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(30,58,95,0.08); }
.form-control::placeholder { color: var(--text-muted); }
select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 100px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-hint { font-size: 0.78rem; color: var(--text-muted); margin-top: 4px; }
.form-error { font-size: 0.78rem; color: var(--accent); margin-top: 4px; }

/* ---- Alert boxes ---- */
.alert { padding: 14px 18px; border-radius: var(--radius-sm); font-size: 0.9rem; margin-bottom: 16px; display: flex; align-items: flex-start; gap: 10px; }
.alert i { margin-top: 2px; flex-shrink: 0; }
.alert-success { background: rgba(42,157,143,0.1); color: #1a6b60; border: 1px solid rgba(42,157,143,0.2); }
.alert-error   { background: rgba(230,57,70,0.1); color: #b52230; border: 1px solid rgba(230,57,70,0.2); }
.alert-info    { background: rgba(30,58,95,0.08); color: var(--primary); border: 1px solid rgba(30,58,95,0.15); }
.alert-warning { background: rgba(233,168,32,0.1); color: #8a6000; border: 1px solid rgba(233,168,32,0.2); }

/* ---- Tables ---- */
.table-wrap { overflow-x: auto; border-radius: var(--radius-md); border: 1px solid var(--border); }
.table { width: 100%; border-collapse: collapse; }
.table th { background: var(--bg-secondary); padding: 12px 16px; text-align: left; font-size: 0.8rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; border-bottom: 1px solid var(--border); }
.table td { padding: 14px 16px; font-size: 0.9rem; border-bottom: 1px solid var(--border-light); }
.table tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: var(--bg-secondary); }

/* ---- Progress bar ---- */
.progress { background: var(--border); border-radius: 99px; height: 10px; overflow: hidden; }
.progress-bar { height: 100%; background: var(--accent); border-radius: 99px; transition: width 0.6s ease; }
.progress-bar-green { background: var(--green); }

/* ---- Stat cards ---- */
.stat-card { text-align: center; }
.stat-card .stat-value { font-size: 2rem; font-weight: 800; color: var(--primary); line-height: 1; }
.stat-card .stat-label { font-size: 0.85rem; color: var(--text-muted); margin-top: 4px; }

/* ---- Dashboard layout ---- */
.dashboard-layout { display: grid; grid-template-columns: 260px 1fr; gap: 32px; align-items: start; }
.sidebar { position: sticky; top: 140px; }
.sidebar-nav { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; }
.sidebar-nav a { display: flex; align-items: center; gap: 10px; padding: 13px 18px; font-size: 0.875rem; color: var(--text-secondary); border-left: 3px solid transparent; transition: var(--transition); }
.sidebar-nav a:hover { background: var(--bg-secondary); color: var(--primary); }
.sidebar-nav a.active { background: rgba(30,58,95,0.06); color: var(--primary); border-left-color: var(--primary); font-weight: 600; }
.sidebar-nav a i { width: 18px; text-align: center; }

/* ---- Mobile menu ---- */
.mobile-overlay { display: none; position: fixed; inset: 0; z-index: 2000; background: rgba(0,0,0,0.5); }
.mobile-overlay.open { display: block; }
.mobile-menu {
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    height: 100%;
    background: #fff;
    padding: 24px;
    overflow-y: auto;
    animation: slideInRight 0.3s ease;
}
@keyframes slideInRight {
    from { transform: translateX(100%); }
    to   { transform: translateX(0); }
}
.mobile-menu__close { position: absolute; top: 16px; right: 16px; background: none; border: none; font-size: 1.4rem; cursor: pointer; color: var(--text-secondary); }
.mobile-nav { margin-top: 48px; list-style: none; }
.mobile-nav a { display: flex; align-items: center; gap: 10px; padding: 13px 0; border-bottom: 1px solid var(--border-light); font-size: 1rem; color: var(--text-primary); }
.mobile-nav a.active { color: var(--primary); font-weight: 600; }
.mobile-user { margin-top: 24px; }
.mobile-greeting { font-size: 0.9rem; color: var(--text-secondary); margin-bottom: 12px; }

/* ---- Login / Auth page ---- */
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--primary-dark), var(--primary)); padding: 24px; padding-top: 100px; }
.auth-card { background: #fff; border-radius: var(--radius-xl); padding: 40px; width: 100%; max-width: 440px; box-shadow: var(--shadow-xl); }
.auth-logo { text-align: center; margin-bottom: 32px; }
.auth-logo a { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.4rem; color: var(--primary); }
.auth-tabs { display: flex; border-bottom: 1px solid var(--border); margin-bottom: 28px; }
.auth-tab { flex: 1; text-align: center; padding: 12px; font-size: 0.9rem; font-weight: 500; color: var(--text-muted); cursor: pointer; border-bottom: 2px solid transparent; transition: var(--transition); }
.auth-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.auth-form { display: none; }
.auth-form.active { display: block; }

/* ---- Lease module ---- */
.lease-hero { background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%); }
.price-display { font-size: 3rem; font-weight: 800; color: var(--accent); line-height: 1; }
.price-sub { font-size: 0.85rem; color: var(--text-muted); }

/* ---- Cursus module ---- */
.cursus-card { display: flex; flex-direction: column; gap: 12px; }
.cursus-card .cursus-datum { font-size: 0.8rem; color: var(--text-muted); display: flex; align-items: center; gap: 6px; }
.cursus-card .cursus-org { font-size: 0.82rem; color: var(--blue); font-weight: 500; }
.cursus-card h3 { font-size: 1.05rem; font-weight: 600; }
.cursus-card .cursus-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.cursus-meta-item { display: flex; align-items: center; gap: 5px; font-size: 0.8rem; color: var(--text-secondary); }
.cursus-prijs { font-size: 1.3rem; font-weight: 700; color: var(--primary); }
.cursus-prijs-gratis { color: var(--green); }
.deelnemers-bar { margin-top: 8px; }
.deelnemers-bar .bar-label { display: flex; justify-content: space-between; font-size: 0.78rem; color: var(--text-muted); margin-bottom: 4px; }

/* ---- Verzamelactie module ---- */
.actie-card { position: relative; overflow: hidden; }
.actie-card .actie-img { width: 100%; height: 180px; object-fit: cover; border-radius: var(--radius-sm); margin-bottom: 16px; }
.actie-card .actie-img-placeholder { width: 100%; height: 180px; background: linear-gradient(135deg, var(--primary), var(--primary-light)); border-radius: var(--radius-sm); margin-bottom: 16px; display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,0.4); font-size: 3rem; }
.actie-bedrag { font-size: 1.5rem; font-weight: 800; color: var(--accent); }
.actie-doel { font-size: 0.85rem; color: var(--text-muted); }
.actie-pct { font-size: 0.8rem; font-weight: 600; color: var(--green); }

/* ---- Inventarisatie module ---- */
.inv-locatie-card { border-left: 4px solid var(--primary); }
.inv-locatie-card.status-inactief { border-left-color: var(--border); opacity: 0.7; }
.inv-aed-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border-light); }
.inv-aed-icon { width: 40px; height: 40px; background: rgba(230,57,70,0.08); border-radius: 8px; display: flex; align-items: center; justify-content: center; color: var(--accent); }
.inv-status-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.inv-status-dot.actief     { background: var(--green); }
.inv-status-dot.onderhoud  { background: var(--orange); }
.inv-status-dot.defect     { background: var(--accent); }

/* ---- Empty state ---- */
.empty-state { text-align: center; padding: 60px 20px; }
.empty-state i { font-size: 3rem; color: var(--border); margin-bottom: 16px; display: block; }
.empty-state h3 { font-size: 1.1rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 8px; }
.empty-state p { font-size: 0.9rem; color: var(--text-muted); }

/* ---- Pending approval ---- */
.pending-notice { background: rgba(233,168,32,0.08); border: 1px solid rgba(233,168,32,0.25); border-radius: var(--radius-md); padding: 20px 24px; display: flex; align-items: flex-start; gap: 14px; }
.pending-notice i { color: var(--orange); font-size: 1.4rem; margin-top: 2px; }

/* ---- Responsive ---- */
@media (max-width: 1100px) {
    .dashboard-layout { grid-template-columns: 1fr; }
    .sidebar { position: static; }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .topbar__user { display: none; }
    .topbar__hamburger { display: flex; }
    .module-tab span { display: none; }
    .module-tab { padding: 0 18px; }
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .module-hero { padding: 48px 0 40px; }
    .auth-card { padding: 28px 20px; }
}
