/* ============================================
   Reanimatie.nl - Shared UI Components
   Gedeeld door alle subdomeinen
   ============================================ */

/* ---- 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;
    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); }

/* ---- Site Navigation (replaces module tabs) ---- */
.site-nav { display: flex; align-items: center; }
.site-nav__list { display: flex; list-style: none; gap: 4px; padding: 0; margin: 0; }
.site-nav__link {
    display: flex; align-items: center; gap: 6px;
    padding: 8px 16px; border-radius: var(--radius-sm);
    font-size: 0.875rem; font-weight: 500;
    color: rgba(255,255,255,0.7); text-decoration: none;
    transition: var(--transition); white-space: nowrap;
}
.site-nav__link:hover { color: #fff; background: rgba(255,255,255,0.08); }
.site-nav__link.active { color: #fff; background: rgba(255,255,255,0.12); font-weight: 600; }
.site-nav__link i { font-size: 0.85rem; }

/* ---- Page offset for fixed topbar ---- */
.page-content {
    padding-top: 64px;
    min-height: 100vh;
}

/* ---- Buttons ---- */
.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; font-family: var(--font); }
.btn-sm { padding: 6px 14px; font-size: 0.8rem; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark, #c62833); 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: #e63946; 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__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: #e63946; }
.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); }
.card-icon-purple{ background: rgba(139,92,246,0.1); color: #8b5cf6; }

/* ---- Grid layouts ---- */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.grid-5 { display: grid; grid-template-columns: repeat(5, 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: #e63946; }

/* ---- 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(--accent); 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: #e63946; 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: 88px; }
.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(--accent); 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); }

/* ---- 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; }

/* ---- Footer ---- */
.site-footer { background: var(--bg-dark, #0f1923); color: rgba(255,255,255,0.7); padding: 60px 0 24px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-brand p { font-size: 0.875rem; line-height: 1.6; margin-top: 12px; }
.footer-logo { display: inline-flex; align-items: center; gap: 8px; font-size: 1.2rem; font-weight: 700; color: #fff; }
.footer-logo span { color: var(--accent); }
.footer-links h4, .footer-contact h4 { font-size: 0.9rem; font-weight: 600; color: #fff; margin-bottom: 16px; }
.footer-links ul { list-style: none; }
.footer-links a { display: flex; align-items: center; gap: 8px; font-size: 0.875rem; color: rgba(255,255,255,0.6); padding: 5px 0; transition: var(--transition); }
.footer-links a:hover { color: #fff; }
.footer-contact ul { list-style: none; }
.footer-contact li { display: flex; align-items: center; gap: 8px; font-size: 0.875rem; padding: 5px 0; }
.footer-contact a { color: rgba(255,255,255,0.6); }
.footer-contact a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 20px; display: flex; justify-content: space-between; font-size: 0.8rem; color: rgba(255,255,255,0.4); }
.footer-bottom a { color: rgba(255,255,255,0.5); }
.footer-bottom a:hover { color: #fff; }

/* ---- 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); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

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