/* ============================================================
   beheer.css – Admin panel styles for oppatt.io
   Matches the design language from index.html
   Mobile-first responsive approach
   ============================================================ */

/* ── 1. Root variables ── */
:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: rgba(37, 99, 235, .1);
    --accent: #10b981;
    --accent-dark: #059669;
    --accent-light: rgba(16, 185, 129, .1);
    --light: #f0f9ff;
    --text: #1e293b;
    --muted: #64748b;
    --white: #ffffff;
    --border: rgba(37, 99, 235, .08);
    --shadow-sm: 0 2px 12px rgba(0, 0, 0, .05);
    --shadow-md: 0 2px 24px rgba(0, 0, 0, .06);
    --shadow-lg: 0 8px 36px rgba(0, 0, 0, .1);
    --shadow-xl: 0 8px 48px rgba(0, 0, 0, .1);
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 24px;
    --radius-pill: 999px;
    --transition: .25s ease;
    --font: 'Nunito', sans-serif;

    /* Danger / warning / info / success */
    --danger: #ef4444;
    --danger-light: rgba(239, 68, 68, .1);
    --warning: #f59e0b;
    --warning-light: rgba(245, 158, 11, .1);
    --info: #3b82f6;
    --info-light: rgba(59, 130, 246, .1);
    --success: #10b981;
    --success-light: rgba(16, 185, 129, .1);
    --purple: #7c3aed;
    --purple-light: rgba(139, 92, 246, .1);
    --orange: #ea580c;
    --orange-light: rgba(249, 115, 22, .1);
}


/* ── 2. Base body styles ── */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    font-family: var(--font);
    background: linear-gradient(135deg, #e0f2fe 0%, #f0fdf4 50%, #eff6ff 100%);
    min-height: 100vh;
    color: var(--text);
    overflow-x: hidden;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}


/* ── 3. Animated background blobs ── */
.blob {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.25;
    z-index: 0;
    animation: float 10s ease-in-out infinite;
    pointer-events: none;
}

.blob-1 {
    width: 500px;
    height: 500px;
    background: var(--primary);
    top: -150px;
    right: -150px;
    animation-delay: 0s;
}

.blob-2 {
    width: 400px;
    height: 400px;
    background: var(--accent);
    bottom: -100px;
    left: -100px;
    animation-delay: 4s;
}

.blob-3 {
    width: 300px;
    height: 300px;
    background: #a78bfa;
    bottom: 30%;
    right: 5%;
    animation-delay: 2s;
}

@keyframes float {
    0%, 100% { transform: translateY(0) scale(1); }
    50%      { transform: translateY(-30px) scale(1.05); }
}


/* ── 4. Wrapper with z-index above blobs ── */
.wrapper {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.content-wrapper {
    flex: 1;
    padding: 1rem;
    padding-top: 70px; /* Space for mobile topbar */
}

@media (min-width: 768px) {
    .content-wrapper {
        padding: 1.5rem;
        padding-top: 80px;
    }
}

@media (min-width: 992px) {
    .wrapper {
        margin-left: 260px; /* Sidebar width */
    }
    .content-wrapper {
        padding: 2rem;
        padding-top: 2rem;
    }
}

@media (min-width: 1200px) {
    .wrapper {
        margin-left: 280px;
    }
}


/* ── 5. Sidebar ── */

/* --- 5a. Mobile top bar --- */
.mobile-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: 60px;
    background: rgba(30, 41, 59, .92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
}

.mobile-topbar .logo {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    text-decoration: none;
}

.mobile-topbar .logo-icon {
    width: 34px;
    height: 34px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #fff;
    box-shadow: 0 4px 14px rgba(37, 99, 235, .3);
}

.mobile-topbar .logo-text {
    font-size: 1.1rem;
    font-weight: 900;
    color: #fff;
    letter-spacing: -.5px;
}

.mobile-topbar .logo-text span {
    color: var(--accent);
}

.sidebar-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 10px;
    color: #fff;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all var(--transition);
}

.sidebar-toggle:hover {
    background: rgba(255, 255, 255, .15);
}

@media (min-width: 992px) {
    .mobile-topbar {
        display: none;
    }
}

/* --- 5b. Sidebar overlay (mobile) --- */
.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 199;
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s ease, visibility .3s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

@media (min-width: 992px) {
    .sidebar-overlay {
        display: none;
    }
}

/* --- 5c. Sidebar panel --- */
.sidebar {
    position: fixed;
    top: 0;
    right: -300px; /* Hidden off-screen right on mobile */
    width: 280px;
    height: 100vh;
    background: rgba(30, 41, 59, .97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 200;
    display: flex;
    flex-direction: column;
    transition: right .35s cubic-bezier(.4, 0, .2, 1);
    overflow-y: auto;
    overflow-x: hidden;
    border-left: 1px solid rgba(255, 255, 255, .06);
}

.sidebar.open {
    right: 0;
}

@media (min-width: 992px) {
    .sidebar {
        left: 0;
        right: auto;
        width: 260px;
        border-left: none;
        border-right: 1px solid rgba(255, 255, 255, .06);
        transition: none;
    }
}

@media (min-width: 1200px) {
    .sidebar {
        width: 280px;
    }
}

/* --- 5d. Sidebar header --- */
.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.25rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, .06);
}

.sidebar-header .logo {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    text-decoration: none;
}

.sidebar-header .logo-icon {
    width: 46px;
    height: 46px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: #fff;
    box-shadow: 0 4px 14px rgba(37, 99, 235, .3);
}

.sidebar-header .logo-text {
    font-size: 1.4rem;
    font-weight: 900;
    color: #fff;
    letter-spacing: -.5px;
    margin-top: -9px;
    display: block;
}

.sidebar-header .logo-text span {
    color: var(--accent);
}

.sidebar-header .logo-payoff {
    font-size: .65rem;
    color: rgba(255, 255, 255, .5);
    font-weight: 600;
    letter-spacing: .01em;
    line-height: 1;
    margin-top: -4px;
}

.sidebar-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 8px;
    color: rgba(255, 255, 255, .5);
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--transition);
}

.sidebar-close:hover {
    background: rgba(255, 255, 255, .12);
    color: #fff;
}

@media (min-width: 992px) {
    .sidebar-close {
        display: none;
    }
}

/* --- 5e. Sidebar navigation --- */
.sidebar-nav {
    flex: 1;
    padding: .75rem 0;
    display: flex;
    flex-direction: column;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-menu-item a {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .7rem 1.25rem;
    color: rgba(255, 255, 255, .55);
    text-decoration: none;
    font-size: .88rem;
    font-weight: 600;
    transition: all .2s ease;
    border-left: 3px solid transparent;
    position: relative;
}

.sidebar-menu-item a i {
    width: 20px;
    text-align: center;
    font-size: .95rem;
    flex-shrink: 0;
}

.sidebar-menu-item a span {
    flex: 1;
}

.sidebar-menu-item a:hover {
    color: rgba(255, 255, 255, .85);
    background: rgba(255, 255, 255, .04);
    border-left-color: rgba(255, 255, 255, .15);
}

.sidebar-menu-item.active a {
    color: #fff;
    background: rgba(37, 99, 235, .15);
    border-left-color: var(--primary);
    font-weight: 700;
}

.sidebar-menu-item.active a i {
    color: var(--primary);
}

.sidebar-menu-item-cta { margin-top: .5rem; margin-left: .75rem; margin-right: .75rem; }
.sidebar-menu-item-cta a {
    background: linear-gradient(135deg, var(--primary), var(--accent)) !important;
    color: #fff !important; border-radius: 12px !important;
    border-left: none !important; font-weight: 700;
    padding: 10px 16px !important;
}
.sidebar-menu-item-cta a:hover {
    opacity: .9; background: linear-gradient(135deg, var(--primary), var(--accent)) !important;
    color: #fff !important;
}
.sidebar-menu-item-cta a i { color: #fff !important; }

.sidebar-menu-item-danger a {
    color: rgba(239, 68, 68, .6);
}

.sidebar-menu-item-danger a:hover {
    color: rgba(239, 68, 68, .9);
    background: rgba(239, 68, 68, .06);
    border-left-color: rgba(239, 68, 68, .3);
}

.sidebar-badge {
    font-size: .65rem;
    font-weight: 700;
    padding: .15rem .5rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, .08);
    color: rgba(255, 255, 255, .4);
    letter-spacing: .03em;
    text-transform: uppercase;
    white-space: nowrap;
}

.sidebar-divider {
    height: 1px;
    background: rgba(255, 255, 255, .06);
    margin: .5rem 1.25rem;
}

/* --- 5f. Sidebar user identity --- */
.sidebar-user-identity {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .35rem 1.25rem .25rem;
}

.avatar-sidebar {
    width: 26px;
    height: 26px;
    min-width: 26px;
    min-height: 26px;
    max-width: 26px;
    max-height: 26px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    font-weight: 800;
    font-size: .65rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

img.avatar-sidebar {
    object-fit: cover;
}

.sidebar-user-identity .sidebar-user-name {
    font-size: .8rem;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.avatar-sm {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    font-weight: 800;
    font-size: .75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}


/* ── 6. Page header / title styles ── */
.page-header {
    margin-bottom: 1.5rem;
}

.page-header .page-title {
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    font-weight: 900;
    letter-spacing: -1px;
    line-height: 1.15;
    margin: 0 0 .35rem;
    color: var(--text);
}

.page-header .page-title .highlight {
    background: linear-gradient(90deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-header .page-subtitle {
    font-size: 1rem;
    color: var(--muted);
    margin: 0;
    line-height: 1.6;
    max-width: 600px;
}

.page-header-actions {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

@media (min-width: 768px) {
    .page-header {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 1.5rem;
        margin-bottom: 2rem;
    }

    .page-header-actions {
        margin-top: 0;
        flex-shrink: 0;
    }
}


/* ── 7. Card styles (.card-modern) ── */
.card-modern {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    transition: transform var(--transition), box-shadow var(--transition);
    animation: fadeInUp .4s ease both;
}

.card-modern:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.card-modern.no-hover:hover {
    transform: none;
    box-shadow: var(--shadow-md);
}

.card-modern .card-header-modern {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f1f5f9;
}

.card-modern .card-header-modern h3 {
    font-size: 1.1rem;
    font-weight: 800;
    margin: 0;
    display: flex;
    align-items: center;
    gap: .5rem;
}

.card-modern .card-header-modern h3 i {
    color: var(--primary);
    font-size: .95rem;
}

.card-modern .card-body-modern {
    /* Used for inner card content */
}

.card-modern .card-footer-modern {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
}

@media (min-width: 768px) {
    .card-modern {
        padding: 2rem;
    }
}


/* ── 8. Stats card for dashboard ── */
.stat-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    text-align: center;
    transition: transform var(--transition), box-shadow var(--transition);
    animation: fadeInUp .4s ease both;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.stat-card .stat-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    margin: 0 auto 1rem;
}

.stat-card .stat-number {
    font-size: 2.2rem;
    font-weight: 900;
    line-height: 1;
    margin-bottom: .25rem;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -1px;
}

.stat-card .stat-label {
    font-size: .85rem;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .04em;
}

.stat-card .stat-change {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    font-size: .78rem;
    font-weight: 700;
    margin-top: .5rem;
    padding: .2rem .6rem;
    border-radius: var(--radius-pill);
}

.stat-card .stat-change.positive {
    background: var(--success-light);
    color: var(--accent-dark);
}

.stat-card .stat-change.negative {
    background: var(--danger-light);
    color: var(--danger);
}

/* Horizontal stat card variant */
.stat-card-horizontal {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-align: left;
}

.stat-card-horizontal .stat-icon {
    margin: 0;
    flex-shrink: 0;
}

.stat-card-horizontal .stat-number {
    font-size: 1.8rem;
}


/* ── 9. Form styling ── */
.form-label-modern {
    display: block;
    font-size: .85rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: .4rem;
    letter-spacing: .02em;
}

.form-label-modern .required {
    color: var(--danger);
    margin-left: .15rem;
}

.form-hint {
    display: block;
    font-size: .78rem;
    color: var(--muted);
    margin-top: .25rem;
    line-height: 1.5;
}

.form-control-modern {
    display: block;
    width: 100%;
    padding: .7rem 1rem;
    font-family: var(--font);
    font-size: .9rem;
    font-weight: 600;
    color: var(--text);
    background: var(--white);
    border: 2px solid #e2e8f0;
    border-radius: var(--radius-sm);
    outline: none;
    transition: border-color var(--transition), box-shadow var(--transition);
    appearance: none;
    -webkit-appearance: none;
}

.form-control-modern::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

.form-control-modern:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, .12);
}

.form-control-modern:disabled,
.form-control-modern[readonly] {
    background: #f8fafc;
    color: var(--muted);
    cursor: not-allowed;
}

.form-control-modern.is-invalid {
    border-color: var(--danger);
}

.form-control-modern.is-invalid:focus {
    box-shadow: 0 0 0 4px rgba(239, 68, 68, .12);
}

.form-control-modern.is-valid {
    border-color: var(--accent);
}

.form-control-modern.is-valid:focus {
    box-shadow: 0 0 0 4px rgba(16, 185, 129, .12);
}

textarea.form-control-modern {
    min-height: 120px;
    resize: vertical;
}

select.form-control-modern {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8.825a.5.5 0 0 1-.354-.146l-4-4a.5.5 0 0 1 .708-.708L6 7.617l3.646-3.646a.5.5 0 0 1 .708.708l-4 4A.5.5 0 0 1 6 8.825z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 12px;
    padding-right: 2.5rem;
    cursor: pointer;
}

/* Checkbox and radio */
.form-check-modern {
    display: flex;
    align-items: center;
    gap: .5rem;
    cursor: pointer;
    font-size: .9rem;
    font-weight: 600;
}

.form-check-modern input[type="checkbox"],
.form-check-modern input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
    flex-shrink: 0;
}

/* Input group */
.input-group-modern {
    display: flex;
    align-items: stretch;
}

.input-group-modern .form-control-modern {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.input-group-modern .input-group-append {
    display: flex;
}

.input-group-modern .input-group-append .btn,
.input-group-modern .input-group-append button {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

/* Form group spacing */
.form-group-modern {
    margin-bottom: 1.25rem;
}


/* ── 10. Button styles ── */
.btn-base {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: .65rem 1.25rem;
    font-family: var(--font);
    font-size: .88rem;
    font-weight: 700;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition);
    white-space: nowrap;
    line-height: 1.4;
}

.btn-base:disabled {
    opacity: .55;
    cursor: not-allowed;
    transform: none !important;
}

/* Primary gradient button */
.btn-primary-gradient {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    box-shadow: 0 4px 14px rgba(37, 99, 235, .3);
}

.btn-primary-gradient:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, .4);
    color: #fff;
    text-decoration: none;
}

.btn-primary-gradient:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(37, 99, 235, .3);
}

/* Solid primary button */
.btn-primary-solid {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 14px rgba(37, 99, 235, .2);
}

.btn-primary-solid:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, .3);
    color: #fff;
    text-decoration: none;
}

/* Outline modern button */
.btn-outline-modern {
    background: var(--white);
    color: var(--text);
    border: 2px solid #e2e8f0;
    box-shadow: var(--shadow-sm);
}

.btn-outline-modern:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    text-decoration: none;
}

/* Accent button */
.btn-accent {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 4px 14px rgba(16, 185, 129, .2);
}

.btn-accent:hover {
    background: var(--accent-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, .3);
    color: #fff;
    text-decoration: none;
}

/* Danger button */
.btn-danger {
    background: var(--danger);
    color: #fff;
    box-shadow: 0 4px 14px rgba(239, 68, 68, .2);
}

.btn-danger:hover {
    background: #dc2626;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, .3);
    color: #fff;
    text-decoration: none;
}

/* Ghost button */
.btn-ghost {
    background: transparent;
    color: var(--muted);
    border: none;
    box-shadow: none;
}

.btn-ghost:hover {
    color: var(--text);
    background: rgba(0, 0, 0, .04);
    text-decoration: none;
}

/* Button sizes */
.btn-sm {
    padding: .4rem .85rem;
    font-size: .8rem;
    border-radius: 8px;
}

.btn-lg {
    padding: .85rem 1.75rem;
    font-size: 1rem;
    border-radius: var(--radius-md);
}

/* Button with icon only */
.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: var(--radius-sm);
}

.btn-icon.btn-sm {
    width: 32px;
    height: 32px;
}


/* ── 11. Table / list styles ── */
.table-modern {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.table-modern thead th {
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--muted);
    padding: .75rem 1rem;
    border-bottom: 2px solid #e2e8f0;
    text-align: left;
    white-space: nowrap;
    background: transparent;
}

.table-modern tbody td {
    padding: .85rem 1rem;
    font-size: .9rem;
    font-weight: 600;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

.table-modern tbody tr:last-child td {
    border-bottom: none;
}

.table-modern tbody tr {
    transition: background var(--transition);
}

.table-modern tbody tr:hover {
    background: rgba(37, 99, 235, .03);
}

.table-modern .table-actions {
    display: flex;
    align-items: center;
    gap: .35rem;
    justify-content: flex-end;
}

/* Responsive table wrapper */
.table-responsive-modern {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -1.5rem;
    padding: 0 1.5rem;
}

@media (min-width: 768px) {
    .table-responsive-modern {
        margin: 0;
        padding: 0;
    }
}

/* Location list items */
.location-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.location-list-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid #f1f5f9;
    transition: background var(--transition);
}

.location-list-item:last-child {
    border-bottom: none;
}

.location-list-item:hover {
    background: rgba(37, 99, 235, .03);
}

.location-list-item .location-number {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    font-size: .8rem;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.location-list-item .location-info {
    flex: 1;
    min-width: 0;
}

.location-list-item .location-name {
    font-size: .95rem;
    font-weight: 700;
    margin: 0 0 .15rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.location-list-item .location-coords {
    font-size: .78rem;
    color: var(--muted);
}

.location-list-item .location-actions {
    display: flex;
    align-items: center;
    gap: .35rem;
    flex-shrink: 0;
}


/* ── 12. Map container styles ── */
.map-container {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
    background: #e2e8f0;
    position: relative;
    min-height: 300px;
}

.map-container .map-inner {
    width: 100%;
    height: 100%;
    min-height: 300px;
}

.map-container.map-lg .map-inner {
    min-height: 400px;
}

.map-container .map-overlay {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.map-container .map-overlay .btn-base {
    box-shadow: var(--shadow-md);
}

@media (min-width: 768px) {
    .map-container .map-inner {
        min-height: 400px;
    }

    .map-container.map-lg .map-inner {
        min-height: 500px;
    }
}

@media (min-width: 1200px) {
    .map-container.map-lg .map-inner {
        min-height: 600px;
    }
}


/* ── 13. Alert styles ── */
.alert-modern {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    font-size: .9rem;
    font-weight: 600;
    line-height: 1.6;
    border: 1px solid transparent;
    animation: fadeInUp .3s ease both;
}

.alert-modern i {
    font-size: 1rem;
    margin-top: .15rem;
    flex-shrink: 0;
}

.alert-modern .alert-content {
    flex: 1;
}

.alert-modern .alert-title {
    font-weight: 800;
    font-size: .9rem;
    margin-bottom: .15rem;
}

.alert-modern .alert-message {
    font-weight: 600;
    font-size: .85rem;
}

.alert-modern .alert-close {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    font-size: 1rem;
    opacity: .6;
    padding: 0;
    flex-shrink: 0;
    transition: opacity var(--transition);
}

.alert-modern .alert-close:hover {
    opacity: 1;
}

/* Alert variants */
.alert-success {
    background: var(--success-light);
    color: var(--accent-dark);
    border-color: rgba(16, 185, 129, .2);
}

.alert-danger {
    background: var(--danger-light);
    color: var(--danger);
    border-color: rgba(239, 68, 68, .2);
}

.alert-warning {
    background: var(--warning-light);
    color: #b45309;
    border-color: rgba(245, 158, 11, .2);
}

.alert-info {
    background: var(--info-light);
    color: #1d4ed8;
    border-color: rgba(59, 130, 246, .2);
}


/* ── 14. Badge / pill styles ── */
.badge-modern {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .25rem .7rem;
    font-size: .72rem;
    font-weight: 700;
    border-radius: var(--radius-pill);
    letter-spacing: .03em;
    text-transform: uppercase;
    white-space: nowrap;
}

.badge-primary {
    background: var(--primary-light);
    color: var(--primary);
}

.badge-accent {
    background: var(--accent-light);
    color: var(--accent-dark);
}

.badge-success {
    background: var(--success-light);
    color: var(--accent-dark);
}

.badge-danger {
    background: var(--danger-light);
    color: var(--danger);
}

.badge-warning {
    background: var(--warning-light);
    color: #b45309;
}

.badge-info {
    background: var(--info-light);
    color: #1d4ed8;
}

.badge-purple {
    background: var(--purple-light);
    color: var(--purple);
}

.badge-orange {
    background: var(--orange-light);
    color: var(--orange);
}

.badge-muted {
    background: #f1f5f9;
    color: var(--muted);
}

/* Badge with dot indicator */
.badge-dot {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .3rem .85rem;
    font-size: .78rem;
    font-weight: 700;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border);
    background: rgba(37, 99, 235, .06);
    color: var(--primary);
    letter-spacing: .04em;
    text-transform: uppercase;
}

.badge-dot .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%      { opacity: .5; transform: scale(1.4); }
}


/* ── 15. Sortable list styles (drag-drop locations) ── */
.sortable-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sortable-item {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .85rem 1rem;
    background: var(--white);
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-sm);
    margin-bottom: .5rem;
    cursor: grab;
    transition: all var(--transition);
    user-select: none;
}

.sortable-item:active {
    cursor: grabbing;
}

.sortable-item:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.sortable-item.dragging {
    opacity: .5;
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
    transform: scale(1.02);
}

.sortable-item .drag-handle {
    color: #cbd5e1;
    font-size: 1rem;
    flex-shrink: 0;
    cursor: grab;
    transition: color var(--transition);
}

.sortable-item:hover .drag-handle {
    color: var(--muted);
}

.sortable-item .sortable-number {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    font-size: .75rem;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sortable-item .sortable-content {
    flex: 1;
    min-width: 0;
}

.sortable-item .sortable-title {
    font-size: .9rem;
    font-weight: 700;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sortable-item .sortable-meta {
    font-size: .78rem;
    color: var(--muted);
}

.sortable-item .sortable-actions {
    display: flex;
    align-items: center;
    gap: .3rem;
    flex-shrink: 0;
}

/* Sortable placeholder (drop zone) */
.sortable-placeholder {
    border: 2px dashed var(--primary);
    background: var(--primary-light);
    border-radius: var(--radius-sm);
    margin-bottom: .5rem;
    min-height: 56px;
}


/* ── 16. Mini-map styles ── */
.mini-map {
    width: 100%;
    height: 150px;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border);
    background: linear-gradient(135deg, #dbeafe, #d1fae5);
    position: relative;
}

.mini-map .map-inner {
    width: 100%;
    height: 100%;
}

.mini-map .mini-map-overlay {
    position: absolute;
    bottom: .5rem;
    right: .5rem;
    z-index: 10;
}

.mini-map .mini-map-pin {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid var(--white);
    box-shadow: 0 2px 6px rgba(0, 0, 0, .2);
    background: var(--primary);
}

@media (min-width: 768px) {
    .mini-map {
        height: 200px;
    }
}


/* ── 17. GPS help / status styles ── */
.gps-status {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .75rem 1rem;
    border-radius: var(--radius-sm);
    font-size: .85rem;
    font-weight: 600;
}

.gps-status .gps-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.gps-status.gps-connected {
    background: var(--success-light);
    color: var(--accent-dark);
}

.gps-status.gps-connected .gps-indicator {
    background: var(--accent);
    animation: pulse 1.5s infinite;
}

.gps-status.gps-disconnected {
    background: var(--danger-light);
    color: var(--danger);
}

.gps-status.gps-disconnected .gps-indicator {
    background: var(--danger);
}

.gps-status.gps-searching {
    background: var(--warning-light);
    color: #b45309;
}

.gps-status.gps-searching .gps-indicator {
    background: var(--warning);
    animation: pulse 1s infinite;
}

/* GPS help box */
.gps-help {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.gps-help .gps-help-title {
    font-size: .95rem;
    font-weight: 800;
    margin: 0 0 .75rem;
    display: flex;
    align-items: center;
    gap: .5rem;
}

.gps-help .gps-help-title i {
    color: var(--primary);
}

.gps-help .gps-help-steps {
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: gps-step;
}

.gps-help .gps-help-steps li {
    counter-increment: gps-step;
    position: relative;
    padding: .5rem 0 .5rem 2.5rem;
    font-size: .85rem;
    color: var(--muted);
    line-height: 1.5;
    border-bottom: 1px solid #f1f5f9;
}

.gps-help .gps-help-steps li:last-child {
    border-bottom: none;
}

.gps-help .gps-help-steps li::before {
    content: counter(gps-step);
    position: absolute;
    left: 0;
    top: .5rem;
    width: 24px;
    height: 24px;
    border-radius: 8px;
    background: var(--primary-light);
    color: var(--primary);
    font-size: .72rem;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* GPS accuracy display */
.gps-accuracy {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    font-size: .8rem;
    font-weight: 600;
    color: var(--muted);
}

.gps-accuracy .accuracy-bar {
    display: flex;
    gap: 2px;
}

.gps-accuracy .accuracy-bar span {
    width: 4px;
    height: 12px;
    border-radius: 2px;
    background: #e2e8f0;
}

.gps-accuracy.excellent .accuracy-bar span {
    background: var(--accent);
}

.gps-accuracy.good .accuracy-bar span:nth-child(-n+3) {
    background: var(--accent);
}

.gps-accuracy.fair .accuracy-bar span:nth-child(-n+2) {
    background: var(--warning);
}

.gps-accuracy.poor .accuracy-bar span:nth-child(1) {
    background: var(--danger);
}


/* ── 18. Breadcrumb styles ── */
.breadcrumb-modern {
    display: flex;
    align-items: center;
    gap: .25rem;
    list-style: none;
    padding: 0;
    margin: 0 0 1rem;
    flex-wrap: wrap;
}

.breadcrumb-modern li {
    display: inline-flex;
    align-items: center;
    font-size: .82rem;
    font-weight: 600;
}

.breadcrumb-modern li a {
    color: var(--muted);
    text-decoration: none;
    transition: color var(--transition);
}

.breadcrumb-modern li a:hover {
    color: var(--primary);
}

.breadcrumb-modern li.active {
    color: var(--text);
    font-weight: 700;
}

.breadcrumb-modern .breadcrumb-separator {
    color: #cbd5e1;
    font-size: .7rem;
    margin: 0 .2rem;
}


/* ── 19. Mobile-first responsive ── */

/* Grid helpers */
.grid-admin {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr;
}

@media (min-width: 576px) {
    .grid-admin.grid-2 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 768px) {
    .grid-admin {
        gap: 1.25rem;
    }

    .grid-admin.grid-3 {
        grid-template-columns: repeat(3, 1fr);
    }

    .grid-admin.grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 992px) {
    .grid-admin.grid-4 {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 1200px) {
    .grid-admin {
        gap: 1.5rem;
    }
}

/* Two-column layout (page sidebar + main) */
.layout-page-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.layout-page-sidebar .page-sidebar {
    width: 100%;
}

.layout-page-sidebar .main-content {
    width: 100%;
    min-width: 0;
}

@media (min-width: 992px) {
    .layout-page-sidebar {
        flex-direction: row;
    }

    .layout-page-sidebar .page-sidebar {
        width: 320px;
        flex-shrink: 0;
    }

    .layout-page-sidebar .main-content {
        flex: 1;
    }
}

/* Stack utilities for mobile */
.stack-mobile {
    display: flex;
    flex-direction: column;
    gap: .75rem;
}

@media (min-width: 768px) {
    .stack-mobile {
        flex-direction: row;
        align-items: center;
    }
}

/* Hide/show on breakpoints */
.hide-mobile {
    display: none !important;
}

@media (min-width: 768px) {
    .hide-mobile {
        display: initial !important;
    }

    .hide-desktop {
        display: none !important;
    }
}

/* Compact spacing on mobile */
@media (max-width: 767px) {
    .card-modern {
        padding: 1.25rem;
    }

    .table-modern thead th,
    .table-modern tbody td {
        padding: .65rem .75rem;
        font-size: .82rem;
    }

    .stat-card .stat-number {
        font-size: 1.8rem;
    }

    .page-header .page-title {
        font-size: 1.5rem;
    }
}


/* ── 20. Transition animations ── */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(24px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(.92);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Staggered animation delays for child elements */
.stagger > *:nth-child(1) { animation-delay: .05s; }
.stagger > *:nth-child(2) { animation-delay: .1s; }
.stagger > *:nth-child(3) { animation-delay: .15s; }
.stagger > *:nth-child(4) { animation-delay: .2s; }
.stagger > *:nth-child(5) { animation-delay: .25s; }
.stagger > *:nth-child(6) { animation-delay: .3s; }
.stagger > *:nth-child(7) { animation-delay: .35s; }
.stagger > *:nth-child(8) { animation-delay: .4s; }

/* Animation utility classes */
.animate-fade-in {
    animation: fadeIn .4s ease both;
}

.animate-fade-in-up {
    animation: fadeInUp .4s ease both;
}

.animate-slide-in-right {
    animation: slideInRight .4s ease both;
}

.animate-slide-in-down {
    animation: slideInDown .4s ease both;
}

.animate-scale-in {
    animation: scaleIn .3s ease both;
}


/* ── 21. Empty state styles ── */
.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    animation: fadeInUp .4s ease both;
}

.empty-state .empty-icon {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--primary-light), var(--accent-light));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--primary);
    margin: 0 auto 1.25rem;
}

.empty-state .empty-title {
    font-size: 1.2rem;
    font-weight: 800;
    margin: 0 0 .5rem;
    color: var(--text);
}

.empty-state .empty-description {
    font-size: .9rem;
    color: var(--muted);
    max-width: 360px;
    margin: 0 auto 1.5rem;
    line-height: 1.6;
}

.empty-state .empty-action {
    margin-top: .5rem;
}

@media (min-width: 768px) {
    .empty-state {
        padding: 4rem 2rem;
    }

    .empty-state .empty-icon {
        width: 96px;
        height: 96px;
        font-size: 2.5rem;
    }

    .empty-state .empty-title {
        font-size: 1.4rem;
    }
}


/* ── Utility: Icon color helpers (matching index.html) ── */
.icon-blue   { background: rgba(37, 99, 235, .1);  color: var(--primary); }
.icon-green  { background: rgba(16, 185, 129, .1); color: var(--accent); }
.icon-purple { background: rgba(139, 92, 246, .1); color: #7c3aed; }
.icon-orange { background: rgba(249, 115, 22, .1); color: #ea580c; }

/* ── Utility: Text helpers ── */
.text-primary { color: var(--primary) !important; }
.text-accent  { color: var(--accent) !important; }
.text-muted   { color: var(--muted) !important; }
.text-danger  { color: var(--danger) !important; }
.text-warning { color: #b45309 !important; }
.text-gradient {
    background: linear-gradient(90deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── Utility: Spacing helpers ── */
.mt-0 { margin-top: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }
.mt-1 { margin-top: .5rem !important; }
.mb-1 { margin-bottom: .5rem !important; }
.mt-2 { margin-top: 1rem !important; }
.mb-2 { margin-bottom: 1rem !important; }
.mt-3 { margin-top: 1.5rem !important; }
.mb-3 { margin-bottom: 1.5rem !important; }
.gap-sm { gap: .5rem; }
.gap-md { gap: 1rem; }
.gap-lg { gap: 1.5rem; }

/* ── Utility: Divider ── */
.divider {
    height: 1px;
    background: #f1f5f9;
    margin: 1.25rem 0;
    border: none;
}

/* ── Utility: Truncate ── */
.truncate {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Utility: Avatar ── */
.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .85rem;
    font-weight: 800;
    flex-shrink: 0;
}

.avatar-sm {
    width: 28px;
    height: 28px;
    font-size: .72rem;
}

.avatar-lg {
    width: 48px;
    height: 48px;
    font-size: 1.1rem;
}

.avatar-xl {
    width: 64px;
    height: 64px;
    font-size: 1.5rem;
}

/* Icon box - used for list item icons (e.g. template/page overview) */
.icon-box {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2em;
    flex-shrink: 0;
}

.icon-box-sm {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    font-size: .9em;
}

/* Text color utilities */
.text-primary-color {
    color: var(--primary) !important;
}

.text-accent-color {
    color: var(--accent) !important;
}

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

/* Error page styles */
.error-page-title {
    color: var(--danger);
    font-size: 2rem;
    font-weight: 900;
}

.error-page-link {
    color: var(--primary);
    font-weight: 700;
    text-decoration: none;
}

.error-page-link:hover {
    text-decoration: underline;
}

/* Sidebar user info */
.sidebar-user-info {
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-user-name {
    color: #fff;
    font-weight: 600;
    font-size: .85em;
    line-height: 1.2;
}

.sidebar-user-role {
    color: rgba(255, 255, 255, 0.5);
    font-size: .75em;
}

.sidebar-section-label {
    padding: 8px 20px;
    font-size: .7em;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: rgba(255, 255, 255, 0.3);
}

/* Dashboard stat card */
.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-bottom: .5rem;
}

.stat-icon-blue {
    background: var(--primary-light);
    color: var(--primary);
}

.stat-icon-green {
    background: var(--accent-light);
    color: var(--accent);
}

.stat-icon-purple {
    background: var(--purple-light);
    color: var(--purple);
}

.stat-icon-orange {
    background: var(--orange-light);
    color: var(--orange);
}

.stat-number {
    font-weight: 900;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: .8rem;
    font-weight: 700;
    color: var(--muted);
}

/* Quick action card */
.quick-action-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.quick-action-icon-generator {
    background: linear-gradient(135deg, var(--purple), var(--primary));
}

.quick-action-icon-new {
    background: linear-gradient(135deg, var(--primary), var(--accent));
}

.quick-action-icon-list {
    background: var(--primary-light);
    color: var(--primary);
}

.quick-action-desc {
    font-size: .85rem;
    color: var(--muted);
}

.share-section-desc {
    font-size: .85rem;
    color: var(--muted);
}

.lock-icon {
    font-size: .75rem;
    color: var(--warning);
}

/* ── Utility: Skeleton loading ── */
.skeleton {
    background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: var(--radius-sm);
}

@keyframes skeleton-loading {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-text {
    height: 14px;
    margin-bottom: .5rem;
    width: 100%;
}

.skeleton-text.short {
    width: 60%;
}

.skeleton-title {
    height: 20px;
    width: 40%;
    margin-bottom: .75rem;
}

.skeleton-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
}

/* ── Utility: Tooltip (CSS-only) ── */
[data-tooltip] {
    position: relative;
}

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    padding: .35rem .65rem;
    font-size: .72rem;
    font-weight: 700;
    color: #fff;
    background: var(--text);
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all .15s ease;
    z-index: 50;
}

[data-tooltip]:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ── Utility: Modal / Dialog backdrop ── */
.modal-backdrop-modern {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 200;
    animation: fadeIn .2s ease both;
}

.modal-modern {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 201;
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    width: 90%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    animation: scaleIn .25s ease both;
}

.modal-modern .modal-header-modern {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #f1f5f9;
}

.modal-modern .modal-header-modern h3 {
    font-size: 1.1rem;
    font-weight: 800;
    margin: 0;
}

.modal-modern .modal-body-modern {
    padding: 1.5rem;
}

.modal-modern .modal-footer-modern {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .75rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid #f1f5f9;
}

/* ── Utility: Dropdown ── */
.dropdown-modern {
    position: relative;
    display: inline-block;
}

.dropdown-menu-modern {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 50;
    min-width: 180px;
    background: var(--white);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    padding: .35rem;
    animation: slideInDown .15s ease both;
}

.dropdown-menu-modern .dropdown-item {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .55rem .75rem;
    font-size: .85rem;
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
    border-radius: 8px;
    transition: background var(--transition);
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-family: var(--font);
}

.dropdown-menu-modern .dropdown-item:hover {
    background: var(--light);
}

.dropdown-menu-modern .dropdown-item i {
    color: var(--muted);
    width: 16px;
    text-align: center;
    font-size: .85rem;
}

.dropdown-menu-modern .dropdown-item.danger {
    color: var(--danger);
}

.dropdown-menu-modern .dropdown-item.danger i {
    color: var(--danger);
}

.dropdown-menu-modern .dropdown-divider {
    height: 1px;
    background: #f1f5f9;
    margin: .35rem 0;
}

/* ── Footer ── */
.footer-admin {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 1.5rem;
    font-size: .8rem;
    color: var(--muted);
    border-top: 1px solid rgba(0, 0, 0, .06);
}

.footer-admin a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.footer-admin a:hover {
    text-decoration: underline;
}

/* ── Utility: Tabs ── */
.tabs-modern {
    display: flex;
    gap: .25rem;
    border-bottom: 2px solid #e2e8f0;
    margin-bottom: 1.5rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.tabs-modern::-webkit-scrollbar {
    display: none;
}

.tabs-modern .tab-item {
    padding: .65rem 1rem;
    font-size: .85rem;
    font-weight: 700;
    color: var(--muted);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all var(--transition);
    white-space: nowrap;
    cursor: pointer;
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
    font-family: var(--font);
}

.tabs-modern .tab-item:hover {
    color: var(--text);
}

.tabs-modern .tab-item.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* ── Utility: Toggle / Switch ── */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-switch .toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: #e2e8f0;
    border-radius: 24px;
    transition: all var(--transition);
}

.toggle-switch .toggle-slider::before {
    content: '';
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: var(--white);
    border-radius: 50%;
    transition: all var(--transition);
    box-shadow: 0 1px 3px rgba(0, 0, 0, .15);
}

.toggle-switch input:checked + .toggle-slider {
    background: var(--primary);
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(20px);
}

/* ── Utility: Progress bar ── */
.progress-modern {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: var(--radius-pill);
    overflow: hidden;
}

.progress-modern .progress-bar-modern {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: var(--radius-pill);
    transition: width .5s ease;
}

/* ── Print styles ── */
@media print {
    .blob,
    .navbar-admin,
    .btn-base,
    .footer-admin {
        display: none !important;
    }

    body {
        background: #fff !important;
    }

    .wrapper {
        min-height: auto;
    }

    .content-wrapper {
        padding-top: 0 !important;
    }

    .card-modern {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
        break-inside: avoid;
    }
}


/* ── Media upload per vraag ── */
.media-tab-btn.active {
    background: var(--primary) !important;
    color: #fff !important;
    border-color: var(--primary) !important;
}

.media-preview-image img {
    border: 1px solid var(--border);
    object-fit: cover;
}

.media-remove-btn {
    line-height: 1;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .15);
}

/* ── Generator wizard ── */
.generator-progress {
    position: relative;
}

.generator-progress-bar {
    height: 6px;
    background: var(--border);
    border-radius: var(--radius-pill);
    overflow: hidden;
    margin-bottom: 12px;
}

.generator-progress-fill {
    height: 100%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: var(--radius-pill);
    transition: width .4s ease;
}

.generator-steps {
    display: flex;
    justify-content: space-between;
}

.generator-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.generator-step span {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: .85rem;
    background: var(--border);
    color: var(--muted);
    transition: all var(--transition);
}

.generator-step small {
    font-size: .7rem;
    color: var(--muted);
    font-weight: 600;
}

.generator-step.active span {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    box-shadow: 0 2px 10px rgba(37, 99, 235, .3);
}

.generator-step.active small {
    color: var(--primary);
}

.generator-step.completed span {
    background: var(--accent);
    color: #fff;
}

.generator-step.completed small {
    color: var(--accent);
}

/* Selectable cards (gebruikt in generator) */
.selectable-card {
    position: relative;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    padding: 14px;
    cursor: pointer;
    transition: all var(--transition);
    text-align: left;
    background: var(--white);
    user-select: none;
}

.selectable-card:hover {
    border-color: var(--primary);
    background: var(--primary-light);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.selectable-card.selected {
    border-color: var(--primary);
    background: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .15);
}

/* Vinkje rechts op de top rij */
.selectable-card-top::after {
    content: '';
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid #e2e8f0;
    flex-shrink: 0;
    margin-left: auto;
    margin-top: -4px;
    transition: all .2s;
}
.selectable-card.selected .selectable-card-top::after {
    border-color: var(--primary);
    background: var(--primary);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z'/%3E%3C/svg%3E");
    background-size: 12px;
    background-repeat: no-repeat;
    background-position: center;
}

/* Icon + titel op een rij, uitleg eronder */
.selectable-card-top {
    display: flex;
    align-items: center;
    gap: .6rem;
}

.selectable-card-icon {
    width: 60px;
    height: 60px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
    background: rgba(37, 99, 235, .08);
}

.selectable-card-label {
    font-weight: 800;
    font-size: 1rem;
    color: var(--text);
    line-height: 1.2;
    text-align: left;
}

.selectable-card-desc {
    font-size: .9rem;
    color: var(--muted);
    line-height: 1.4;
    margin: 0;
    text-align: left;
}

#desktop-bron-content, #gps-bron-content {
    background: #fff;
    border: 1px solid rgba(0,0,0,.08);
    border-top: none;
    border-radius: 0 0 12px 12px;
    padding: 1rem;
    margin-top: 0;
}

.selectable-card-number {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--text);
    line-height: 1;
}

/* Generator stap animatie */
.generator-stap {
    animation: fadeInUp .3s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive: stap labels verbergen op mobiel */
@media (max-width: 576px) {
    .generator-step small {
        display: none;
    }
    .generator-step span {
        width: 28px;
        height: 28px;
        font-size: .75rem;
    }
}


/* ── Theme toggle ── */
.sidebar-theme-toggle {
    display: flex;
    justify-content: center;
}

.theme-toggle-btn {
    position: relative;
    width: 56px;
    height: 28px;
    border-radius: 999px;
    border: none;
    background: rgba(255, 255, 255, .12);
    cursor: pointer;
    padding: 0;
    transition: background var(--transition);
}

.theme-toggle-btn .theme-icon-light,
.theme-toggle-btn .theme-icon-dark {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: .7rem;
    transition: opacity var(--transition);
}

.theme-icon-light {
    left: 7px;
    color: #fbbf24;
    opacity: 0.4;
}

.theme-icon-dark {
    right: 7px;
    color: #94a3b8;
    opacity: 1;
}

.theme-toggle-slider {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #fff;
    transition: transform var(--transition);
    box-shadow: 0 1px 4px rgba(0,0,0,.2);
}

[data-theme="dark"] .theme-toggle-slider {
    transform: translateX(28px);
}

[data-theme="dark"] .theme-icon-light {
    opacity: 1;
}

[data-theme="dark"] .theme-icon-dark {
    opacity: 0.4;
}


/* ── Dark theme ── */
[data-theme="dark"] {
    --light: #1a1f2e;
    --text: #e2e8f0;
    --muted: #94a3b8;
    --white: #0f1219;
    --border: rgba(148, 163, 184, .12);
    --shadow-sm: 0 2px 12px rgba(0, 0, 0, .3);
    --shadow-md: 0 2px 24px rgba(0, 0, 0, .3);
    --shadow-lg: 0 8px 36px rgba(0, 0, 0, .4);
    --shadow-xl: 0 8px 48px rgba(0, 0, 0, .4);
}

[data-theme="dark"] body {
    background: linear-gradient(135deg, #0f172a 0%, #1e1b2e 50%, #0f172a 100%);
    color: var(--text);
}

[data-theme="dark"] .sidebar {
    background: linear-gradient(180deg, #0c1220, #111827);
    border-right-color: rgba(148, 163, 184, .08);
}

[data-theme="dark"] .mobile-topbar {
    background: rgba(15, 18, 25, .95);
    border-bottom-color: rgba(148, 163, 184, .08);
}

[data-theme="dark"] .account-card,
[data-theme="dark"] .card,
[data-theme="dark"] .stats-card {
    background: #1a1f2e;
    border-color: rgba(148, 163, 184, .1);
    color: var(--text);
}

[data-theme="dark"] .table {
    color: var(--text);
}

[data-theme="dark"] .table > :not(caption) > * > * {
    background-color: transparent;
    border-bottom-color: rgba(148, 163, 184, .1);
    color: var(--text);
}

[data-theme="dark"] .table thead th {
    background: rgba(148, 163, 184, .06);
    color: var(--muted);
}

[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select {
    background-color: #111827;
    border-color: rgba(148, 163, 184, .15);
    color: var(--text);
}

[data-theme="dark"] .form-control:focus,
[data-theme="dark"] .form-select:focus {
    background-color: #111827;
    border-color: var(--primary);
    color: var(--text);
}

[data-theme="dark"] .form-control::placeholder {
    color: #4b5563;
}

[data-theme="dark"] .alert-light {
    background-color: rgba(148, 163, 184, .08);
    border-color: rgba(148, 163, 184, .12);
    color: var(--text);
}

[data-theme="dark"] .bg-light {
    background-color: #111827 !important;
}

[data-theme="dark"] .border {
    border-color: rgba(148, 163, 184, .12) !important;
}

[data-theme="dark"] .text-dark {
    color: var(--text) !important;
}

[data-theme="dark"] .dropdown-menu {
    background-color: #1a1f2e;
    border-color: rgba(148, 163, 184, .12);
}

[data-theme="dark"] .dropdown-item {
    color: var(--text);
}

[data-theme="dark"] .dropdown-item:hover {
    background-color: rgba(148, 163, 184, .08);
}

[data-theme="dark"] .blob {
    opacity: 0.1;
}

[data-theme="dark"] .modal-content {
    background-color: #1a1f2e;
    border-color: rgba(148, 163, 184, .12);
    color: var(--text);
}

[data-theme="dark"] .btn-outline-secondary {
    border-color: rgba(148, 163, 184, .2);
    color: var(--muted);
}

[data-theme="dark"] .btn-outline-secondary:hover {
    background-color: rgba(148, 163, 184, .1);
    color: var(--text);
}

[data-theme="dark"] .selectable-card {
    border-color: rgba(148, 163, 184, .15);
    background: #111827;
}

[data-theme="dark"] .selectable-card:hover {
    border-color: var(--primary);
}

[data-theme="dark"] .badge.bg-light {
    background-color: rgba(148, 163, 184, .15) !important;
    color: var(--text) !important;
}

[data-theme="dark"] .theme-toggle-btn {
    background: rgba(148, 163, 184, .2);
}

/* =============================================
   Hunt Cards & Filter Bar
   Used by: account/speurtochten.php, beheer/speurtocht.php
   ============================================= */
.hunt-filter-bar { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.hunt-filter-search { font-size: .82rem; font-weight: 600; padding: .45rem .85rem .45rem 2.2rem; border-radius: 999px; border: 1px solid rgba(37,99,235,.12); background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='%2394a3b8' viewBox='0 0 512 512'%3E%3Cpath d='M416 208c0 45.9-14.9 88.3-40 122.7L502.6 457.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376c-34.4 25.2-76.8 40-122.7 40C93.1 416 0 322.9 0 208S93.1 0 208 0S416 93.1 416 208zM208 352a144 144 0 1 0 0-288 144 144 0 1 0 0 288z'/%3E%3C/svg%3E") no-repeat 12px center; min-width: 180px; color: var(--text); transition: all .2s; }
.hunt-filter-search:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.filter-dropdown { position: relative; display: inline-block; }
.filter-trigger { display: inline-flex; align-items: center; gap: .4rem; padding: .45rem .85rem; border-radius: 999px; font-size: .82rem; font-weight: 700; background: #fff; color: var(--text); border: 1px solid rgba(37,99,235,.12); cursor: pointer; transition: all .2s; white-space: nowrap; user-select: none; }
.filter-trigger:hover { border-color: var(--primary); color: var(--primary); }
.filter-trigger.has-value { background: var(--primary); color: #fff; border-color: var(--primary); box-shadow: 0 2px 8px rgba(37,99,235,.2); }
.filter-trigger i { font-size: .7rem; }
.filter-trigger .fa-chevron-down { font-size: .55rem; margin-left: .1rem; transition: transform .2s; }
.filter-trigger.has-value .fa-chevron-down { color: rgba(255,255,255,.7); }
.filter-dropdown-menu { display: none; position: absolute; top: calc(100% + 6px); left: 0; background: #fff; border-radius: 14px; border: 1px solid rgba(37,99,235,.08); box-shadow: 0 8px 36px rgba(0,0,0,.12); z-index: 50; min-width: 200px; max-height: 280px; overflow-y: auto; padding: .4rem; }
.filter-dropdown-menu.open { display: block; }
.filter-option { display: flex; align-items: center; gap: .5rem; padding: .55rem .75rem; border-radius: 10px; font-size: .82rem; font-weight: 600; color: var(--text); cursor: pointer; transition: background .15s; }
.filter-option:hover { background: var(--light, #f8fafc); }
.filter-option.selected { background: rgba(37,99,235,.08); color: var(--primary); font-weight: 700; }
.filter-option i { width: 18px; text-align: center; font-size: .85rem; }
.hunt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 1rem; }
.hunt-card { background: #fff; border-radius: 16px; border: 1px solid rgba(0,0,0,.06); box-shadow: 0 2px 12px rgba(0,0,0,.04); overflow: hidden; transition: box-shadow .2s, transform .15s; display: flex; flex-direction: column; }
.hunt-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,.08); transform: translateY(-2px); }
.hunt-card-map { height: 140px; background: #f1f5f9; position: relative; overflow: hidden; }
.hunt-card-map img { width: 100%; height: 100%; object-fit: cover; }
.hunt-card-map .hunt-status { position: absolute; top: 10px; left: 10px; }
.hunt-card-map .hunt-access { position: absolute; top: 10px; right: 10px; }
.hunt-card-body { padding: 1rem; flex: 1; display: flex; flex-direction: column; }
.hunt-card-title { font-weight: 800; font-size: 1rem; margin-bottom: .25rem; color: var(--text); }
.hunt-card-meta { font-size: .75rem; color: var(--muted); margin-bottom: .5rem; }
.hunt-card-meta i { width: 14px; text-align: center; }
.hunt-card-badges { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .75rem; }
.hunt-badge { font-size: .65rem; padding: .2rem .55rem; border-radius: 6px; font-weight: 600; display: inline-flex; align-items: center; gap: .3rem; }
.hunt-card-stats { display: flex; gap: 1rem; font-size: .75rem; color: var(--muted); padding-top: .5rem; border-top: 1px solid rgba(0,0,0,.05); margin-top: auto; }
.hunt-card-stats .stat { display: flex; align-items: center; gap: .3rem; }
.hunt-card-stats .stat i { font-size: .7rem; }
.hunt-card-actions { display: flex; flex-wrap: wrap; gap: 6px; padding: .75rem; }
.hunt-card-actions .hunt-action { display: inline-flex; align-items: center; gap: .35rem; padding: .4rem .7rem; font-size: .75rem; font-weight: 700; text-decoration: none; border: none; border-radius: 20px; cursor: pointer; transition: all .2s; background: rgba(37,99,235,.06); color: #2563eb; }
.hunt-card-actions .hunt-action:hover { background: rgba(37,99,235,.14); transform: translateY(-1px); }
.hunt-card-actions .hunt-action i { font-size: .7rem; }
.hunt-card-actions .hunt-action.action-danger { background: rgba(239,68,68,.06); color: #ef4444; }
.hunt-card-actions .hunt-action.action-danger:hover { background: rgba(239,68,68,.14); }
.hunt-card-actions .hunt-action.action-success { background: rgba(16,185,129,.06); color: #10b981; }
.hunt-card-actions .hunt-action.action-success:hover { background: rgba(16,185,129,.14); }
.hunt-card-actions .hunt-action.action-purple { background: rgba(139,92,246,.06); color: #8b5cf6; }
.hunt-card-actions .hunt-action.action-purple:hover { background: rgba(139,92,246,.14); }
.hunt-card-actions .hunt-action.action-amber { background: rgba(245,158,11,.06); color: #d97706; }
.hunt-card-actions .hunt-action.action-amber:hover { background: rgba(245,158,11,.14); }

/* ── Global action-btn pill buttons (reusable anywhere) ── */
.action-btn { display: inline-flex; align-items: center; gap: .35rem; padding: .4rem .7rem; font-size: .75rem; font-weight: 700; text-decoration: none; border: none; border-radius: 20px; cursor: pointer; transition: all .2s; background: rgba(37,99,235,.06); color: #2563eb; }
.action-btn:hover { background: rgba(37,99,235,.14); transform: translateY(-1px); color: #2563eb; }
.action-btn i { font-size: .7rem; }
.action-btn.action-danger { background: rgba(239,68,68,.06); color: #ef4444; }
.action-btn.action-danger:hover { background: rgba(239,68,68,.14); color: #ef4444; }
.action-btn.action-success { background: rgba(16,185,129,.06); color: #10b981; }
.action-btn.action-success:hover { background: rgba(16,185,129,.14); color: #10b981; }
.action-btn.action-purple { background: rgba(139,92,246,.06); color: #8b5cf6; }
.action-btn.action-purple:hover { background: rgba(139,92,246,.14); color: #8b5cf6; }
.action-btn.action-warning { background: rgba(245,158,11,.08); color: #d97706; }
.action-btn.action-warning:hover { background: rgba(245,158,11,.16); color: #d97706; }
.action-btn.action-amber { background: rgba(245,158,11,.06); color: #d97706; }
.action-btn.action-amber:hover { background: rgba(245,158,11,.14); color: #d97706; }

.hunt-card.inactive { opacity: .6; }
.hunt-card.inactive:hover { opacity: .8; }
.hunt-empty-map { display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 2rem; }
.hunt-count-bar { font-size: .85rem; color: var(--muted); }
@media (max-width: 576px) {
	.hunt-grid { grid-template-columns: 1fr; }
	.hunt-filter-search { min-width: 0; flex: 1; }
	.hunt-filter-bar { gap: .4rem; }
}

/* =============================================
   Stat Grid, Stat Mini, Filter Bar & Rank List
   Used by: beheer/statistieken.php, beheer/betalingen.php
   ============================================= */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: .75rem; }
.stat-mini { background: #fff; border-radius: 16px; padding: 1rem; border: 1px solid rgba(0,0,0,.04); box-shadow: 0 1px 8px rgba(0,0,0,.04); text-align: center; }
.stat-mini-value { font-size: 1.5rem; font-weight: 900; background: linear-gradient(90deg,#2563eb,#10b981); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.stat-mini-label { font-size: .75rem; font-weight: 700; color: var(--muted); margin-top: .2rem; }
.stat-mini-icon { width: 36px; height: 36px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; font-size: 1rem; margin-bottom: .5rem; }
.filter-bar { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.filter-bar .btn-filter { padding: .35rem .8rem; border-radius: 10px; font-size: .8rem; font-weight: 700; border: 1px solid rgba(0,0,0,.08); background: #fff; color: var(--text); text-decoration: none; transition: all .15s; }
.filter-bar .btn-filter:hover, .filter-bar .btn-filter.active { background: #2563eb; color: #fff; border-color: #2563eb; }
.rank-list { list-style: none; padding: 0; margin: 0; }
.rank-list li { display: flex; align-items: center; gap: .75rem; padding: .6rem 0; border-bottom: 1px solid rgba(0,0,0,.04); font-size: .85rem; }
.rank-list li:last-child { border-bottom: none; }
.rank-num { width: 24px; height: 24px; border-radius: 8px; background: linear-gradient(135deg,#2563eb,#10b981); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: .7rem; flex-shrink: 0; }
.rank-num.gold { background: linear-gradient(135deg,#f59e0b,#eab308); }
.rank-num.silver { background: linear-gradient(135deg,#94a3b8,#64748b); }
.rank-num.bronze { background: linear-gradient(135deg,#c2703e,#a0522d); }

/* =============================================
   Betalingen - Status Badges
   Used by: beheer/betalingen.php
   ============================================= */
.status-badge { padding: .25rem .6rem; border-radius: 20px; font-size: .7rem; font-weight: 700; display: inline-block; }
.status-completed { background: rgba(16,185,129,.15); color: #059669; }
.status-pending { background: rgba(245,158,11,.15); color: #d97706; }
.status-failed { background: rgba(239,68,68,.15); color: #dc2626; }
.status-refunded { background: rgba(59,130,246,.15); color: #2563eb; }

/* =============================================
   Speurtocht Generator - Wizard Steps & Cards
   Used by: account/speurtocht-generator.php
   ============================================= */
.generator-progress { position: relative; margin-bottom: 1rem; }
.generator-progress-bar { height: 4px; background: #e2e8f0; border-radius: 999px; overflow: hidden; }
.generator-progress-fill { height: 100%; background: linear-gradient(90deg, var(--primary), var(--accent)); transition: width .4s ease; border-radius: 999px; }
.generator-steps { display: flex; justify-content: space-between; margin-top: .75rem; }
.generator-step { text-align: center; flex: 1; position: relative; cursor: pointer; }
.generator-step:not(.completed):not(.active) { cursor: default; opacity: 0.6; }
.generator-step span { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: #e2e8f0; color: var(--muted); font-size: .75rem; font-weight: 700; transition: all .3s; }
.generator-step small { display: block; font-size: .65rem; color: var(--muted); margin-top: .25rem; font-weight: 600; }
.generator-step.active span { background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; box-shadow: 0 2px 8px rgba(37,99,235,.3); }
.generator-step.completed span { background: var(--accent); color: #fff; }
.selectable-card { border: 2px solid #e2e8f0; border-radius: 16px; padding: 1rem; text-align: center; cursor: pointer; transition: all .25s; position: relative; }
.selectable-card:hover { border-color: var(--primary); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(37,99,235,.1); }
.selectable-card.selected { border-color: var(--primary); background: rgba(37,99,235,.04); box-shadow: 0 0 0 3px rgba(37,99,235,.15); }
.selectable-card-label { font-weight: 700; font-size: .9rem; margin-bottom: .2rem; }
.selectable-card-number { font-size: 1.5rem; font-weight: 900; color: var(--primary); }

/* Styled radio buttons */
.gen-radio-group { display: flex; flex-direction: column; gap: .5rem; }
.gen-radio-option { cursor: pointer; margin: 0; }
.gen-radio-option input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; }
.gen-radio-box { display: flex; align-items: center; gap: .75rem; padding: .85rem 1rem; border: 2px solid #e2e8f0; border-radius: 14px; transition: all .2s; background: #fff; }
.gen-radio-option:hover .gen-radio-box { border-color: rgba(37,99,235,.3); background: rgba(37,99,235,.01); }
.gen-radio-option input:checked ~ .gen-radio-box { border-color: var(--primary); background: rgba(37,99,235,.03); box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
.gen-radio-icon { width: 60px; height: 60px; border-radius: 14px; background: rgba(37,99,235,.06); display: flex; align-items: center; justify-content: center; font-size: 1.3rem; flex-shrink: 0; }
.gen-radio-content { flex: 1; min-width: 0; }
.gen-radio-label { display: block; font-weight: 800; font-size: 1rem; color: var(--text); }
.gen-radio-desc { display: block; font-size: .9rem; color: var(--muted); margin-top: .25rem; }
.gen-radio-check { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #e2e8f0; display: flex; align-items: center; justify-content: center; font-size: .6rem; color: transparent; flex-shrink: 0; transition: all .2s; }
.gen-radio-option input:checked ~ .gen-radio-box .gen-radio-check { border-color: var(--primary); background: var(--primary); color: #fff; }

/* Stap 4: Locaties kaart */
.locatie-lijst-item { display: flex; align-items: center; gap: .5rem; padding: .5rem .75rem; border-radius: 10px; cursor: pointer; transition: background .15s; border: 2px solid transparent; margin-bottom: .25rem; }
.locatie-lijst-item:hover { background: rgba(37,99,235,.04); }
.locatie-lijst-item.active { background: rgba(37,99,235,.06); border-color: var(--primary); }
.locatie-lijst-item .loc-nr { width: 24px; height: 24px; border-radius: 50%; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-size: .7rem; font-weight: 700; flex-shrink: 0; }
.locatie-lijst-item .loc-info { flex: 1; min-width: 0; }
.locatie-lijst-item .loc-info small { font-size: .7rem; color: var(--muted); }
.locatie-lijst-item .loc-vragen-count { font-size: .65rem; font-weight: 700; padding: .15rem .5rem; border-radius: 999px; }
.loc-vragen-count.has-vragen { background: rgba(16,185,129,.1); color: var(--accent); }
.loc-vragen-count.no-vragen { background: rgba(239,68,68,.1); color: #ef4444; }

/* Stap 5: Vragen per locatie */
.vragen-layout { display: grid; grid-template-columns: 280px 1fr; gap: 1rem; min-height: 500px; }
.vragen-sidebar { border-right: 1px solid #e2e8f0; padding-right: 1rem; }
.vragen-panel { min-width: 0; }

.vraag-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; padding: .85rem; margin-bottom: .5rem; position: relative; }
.vraag-card .vraag-remove { position: absolute; top: .5rem; right: .5rem; color: #ef4444; cursor: pointer; font-size: .75rem; opacity: .5; transition: opacity .15s; }
.vraag-card .vraag-remove:hover { opacity: 1; }
.vraag-card-type { font-size: .6rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: .15rem .45rem; border-radius: 999px; }

/* Vraag toevoegen panel */
.vraag-toevoegen-panel { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 14px; padding: 1rem; }
.vraag-tab-nav { display: flex; gap: .25rem; margin-bottom: 1rem; flex-wrap: wrap; }
.vraag-tab-btn { padding: .4rem .75rem; border-radius: 999px; font-size: .75rem; font-weight: 700; border: 1px solid #e2e8f0; background: #fff; color: var(--muted); cursor: pointer; transition: all .15s; }
.vraag-tab-btn:hover { border-color: var(--primary); color: var(--primary); }
.vraag-tab-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.vraag-tab-content { display: none; }
.vraag-tab-content.active { display: block; }

.zoek-resultaat { border: 1px solid #e2e8f0; border-radius: 10px; padding: .75rem; margin-bottom: .5rem; cursor: pointer; transition: all .15s; background: #fff; }
.zoek-resultaat:hover { border-color: var(--primary); background: rgba(37,99,235,.02); }
.zoek-resultaat.selected { border-color: var(--accent); background: rgba(16,185,129,.04); }

/* Flow-keuze responsive */
@media (max-width: 767px) {
    #flow-keuze-card { display: block; }
    .vragen-layout { grid-template-columns: 1fr; }
    .vragen-sidebar { border-right: none; border-bottom: 1px solid #e2e8f0; padding-right: 0; padding-bottom: 1rem; }
    .generator-nav-buttons {
        position: fixed; bottom: 0; left: 0; right: 0; z-index: 1050;
        background: #fff; border-top: 1px solid rgba(0,0,0,.08);
        box-shadow: 0 -4px 20px rgba(0,0,0,.08);
        padding: .75rem 1rem; margin: 0;
        flex-direction: row; gap: .5rem;
    }
    .generator-nav-buttons .ms-auto { margin-left: 0 !important; flex: 1; }
    #btnVorige { flex: 1; padding: .75rem; font-size: .95rem; }
    .generator-nav-right { flex: 1; }
    .generator-nav-right .btn { width: 100%; padding: .75rem; font-size: .95rem; }
    /* Ruimte onderaan zodat content niet achter sticky bar verdwijnt */
    .generator-content-wrap { padding-bottom: 80px; }
    #zichtbaarheid-grid .col-4, #beoordeling-grid .col-4 { flex: 0 0 100%; max-width: 100%; }
    #transport-grid .col-6, #transport-grid .col-md-3 { flex: 0 0 100%; max-width: 100%; }
}

/* =============================================
   Speurtocht Generator - Searchable Lists & Tags
   Used by: account/speurtocht-generator.php (2nd style block)
   ============================================= */
.sv-chip input:checked + .badge { background:rgba(37,99,235,.15) !important; border-color:#2563eb !important; }
.sv-vraag-row { padding:8px 12px; border-bottom:1px solid #f1f5f9; transition:background .15s; cursor:pointer; }
.sv-vraag-row:hover { background:rgba(37,99,235,.02); }
.sv-vraag-row.selected { background:rgba(16,185,129,.04); }
.sv-vraag-check { width:18px; height:18px; cursor:pointer; }
.sv-searchable-list { border:1px solid rgba(0,0,0,.1); border-radius:8px; overflow:hidden; background:#fff; }
.sv-searchable-list .sv-search-input { border:none; border-bottom:1px solid rgba(0,0,0,.06); border-radius:0 !important; font-size:.82rem; padding:8px 10px; }
.sv-searchable-list .sv-search-input:focus { box-shadow:none; border-color:rgba(37,99,235,.2); }
.sv-list-items { max-height:140px; overflow-y:auto; }
.sv-list-item { display:flex; align-items:center; gap:8px; padding:6px 10px; cursor:pointer; font-size:.82rem; transition:background .1s; }
.sv-list-item:hover { background:#f8fafc; }
.sv-list-item input { margin:0; cursor:pointer; flex-shrink:0; }
.sv-list-item.d-none { display:none !important; }
.sv-list-placeholder { display:block; padding:8px 10px; font-size:.8rem; color:#94a3b8; }
.sv-selected-tags { display:flex; flex-wrap:wrap; gap:4px; padding:6px 8px; border-top:1px solid rgba(0,0,0,.04); min-height:32px; }
.sv-selected-tags:empty { display:none; }
.sv-tag { display:inline-flex; align-items:center; gap:4px; padding:2px 8px; background:rgba(37,99,235,.08); color:#2563eb; border-radius:20px; font-size:.72rem; font-weight:600; }
.sv-tag-remove { cursor:pointer; opacity:.6; font-size:.8rem; line-height:1; }
.sv-tag-remove:hover { opacity:1; }
@media (max-width:767px) {
    .sv-list-items { max-height:160px; }
}

/* =============================================
   Profiel - Link Cards
   Used by: account/profiel.php
   ============================================= */
.profile-link-card {
    background: rgba(0,0,0,.02);
    border: 1px solid rgba(0,0,0,.06);
    transition: all .2s ease;
}
.profile-link-card:hover {
    background: rgba(37,99,235,.03);
    border-color: rgba(37,99,235,.15);
    transform: translateX(2px);
}
.profile-link-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

/* =============================================
   Registreren - Password Checks & Reward
   Used by: account/registreren.php
   ============================================= */
.pw-checks { display: flex; flex-direction: column; gap: 4px; }
.pw-check { font-size: 0.85rem; color: #94a3b8; transition: color .2s; }
.pw-check i { margin-right: 4px; }
.pw-check.valid { color: #10b981; }
.pw-check.valid i::before { content: "\f058"; } /* fa-circle-check */
.pw-reward {
    font-size: 0.9rem; font-weight: 700; color: #f59e0b;
    animation: rewardPop .4s ease;
}
@keyframes rewardPop {
    0% { transform: scale(0.8); opacity: 0; }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

/* =============================================
   Speurtocht Generator - losse pagina zonder afleiding
   Logo erboven, één wit blok, iedere stap een eigen view.
   Used by: account/speurtocht-generator.php
   ============================================= */
.account-container.generator-container { max-width: 880px; padding-top: 28px; padding-bottom: 40px; }
.generator-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 20px; }
.generator-top .logo { text-decoration: none; }
.generator-sluit {
    display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
    width: 40px; height: 40px; border-radius: 50%;
    background: #fff; color: var(--muted); border: 1px solid rgba(37, 99, 235, .08);
    box-shadow: 0 2px 12px rgba(0, 0, 0, .05); font-size: 1.1rem; text-decoration: none;
    transition: color .15s, transform .15s;
}
.generator-sluit:hover, .generator-sluit:focus-visible { color: var(--text); transform: scale(1.05); }

/* Kop van het blok: titel (alleen stap 1), stapteller en voortgang */
.generator-kop { margin-bottom: 1.5rem; }
.generator-intro { margin-bottom: 1.25rem; }
.generator-shell h1 { font-weight: 900; }
.generator-shell .generator-stap h2 { font-weight: 900; }
.generator-shell:not([data-stap="1"]) .generator-intro { display: none; }
.generator-stapinfo { display: flex; align-items: baseline; justify-content: space-between; gap: .75rem; margin-bottom: .5rem; font-size: .8rem; font-weight: 700; color: var(--muted); }
.generator-stapinfo-naam { color: var(--text); font-weight: 800; }
.generator-shell .generator-progress { margin-bottom: 0; }

/* Kaarten binnen de stappen worden secties van het ene blok */
.generator-shell .generator-stap .account-card { background: none; border: 0; box-shadow: none; border-radius: 0; padding: 0; }
.generator-shell .generator-stap .account-card + .account-card { margin-top: 1.75rem; padding-top: 1.75rem; border-top: 1px solid #eef2f7; }
.generator-shell #vastVragenEditor .account-card { border: 1px solid rgba(0, 0, 0, .06) !important; border-radius: 14px; padding: 1rem; }

/* Knoppen onderaan het blok */
.generator-shell .generator-nav-buttons { margin-top: 1.75rem; padding-top: 1.25rem; border-top: 1px solid #eef2f7; }
.generator-shell .generator-nav-buttons .btn { padding: .7rem 1.4rem; font-weight: 800; }

@media (min-width: 768px) {
    .generator-shell .generator-stapinfo { display: none; }
}

@media (max-width: 767px) {
    .account-container.generator-container { padding: 14px 12px 24px; }
    .generator-top { margin-bottom: 14px; padding: 0 4px; }
    .generator-top .logo-payoff { display: none; }
    .generator-shell { padding: 20px 18px; border-radius: 18px; }
    .generator-kop { margin-bottom: 1.25rem; }
    .generator-intro h1 { font-size: 1.25rem; }
    .generator-intro p { font-size: .9rem; }
    /* Op mobiel: stapteller + dunne balk in plaats van acht bolletjes */
    .generator-shell .generator-steps { display: none; }
    .generator-shell .generator-stap h2 { font-size: 1.1rem; }
    .generator-shell .form-control, .generator-shell .form-select { font-size: 16px; } /* voorkomt inzoomen op iOS */
    .generator-shell .generator-nav-buttons {
        margin-top: 0; border-top: 1px solid rgba(0, 0, 0, .08);
        padding: .75rem 12px calc(.75rem + env(safe-area-inset-bottom));
    }
    .generator-shell .generator-content-wrap { padding-bottom: 72px; }
    .generator-shell #genLocatiesMap { height: 58vh !important; min-height: 320px; }
    .generator-shell #genStartMap { height: 300px !important; }
}
@media (max-width: 767px) {
    /* Locatielijst: alleen het prullenbak-icoon, zodat de naam niet afbreekt */
    .generator-shell .btn-remove-locatie { font-size: 0 !important; padding: 5px 9px !important; }
    .generator-shell .btn-remove-locatie i { font-size: .8rem; margin: 0 !important; }
    .generator-shell #resetLocaties { font-size: .75rem; }
}

/* Klein label "optioneel" naast een veldnaam */
.generator-optioneel {
    display: inline-block; vertical-align: middle; margin-left: .35rem;
    padding: .1rem .45rem; border-radius: 999px;
    background: #f1f5f9; color: var(--muted);
    font-size: .65rem; font-weight: 700; line-height: 1.4; letter-spacing: .02em; text-transform: lowercase;
}

/* Staptitel: iets meer lucht boven, uitleg er dichter onder */
.generator-shell .generator-stap > .account-card:first-child { padding-top: 1rem; } /* padding: een marge zou samenvallen met die van de kop */
.generator-shell .generator-stap h2 + p { margin-top: -.5rem; }
