/* ==========================================================================
   MCV Ticketing - Pure Neutral Charcoal Dark Theme (Zero Blue Tint)
   Font: Montserrat (Google Fonts)
   Background: Matte Obsidian Black (#090909)
   Surface / Cards: Neutral Dark Charcoal (#121212 / #181818)
   Borders: Neutral Gray (#262626 / #333333)
   Text: Pure White (#ffffff) & Neutral Gray (#a3a3a3)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400&display=swap');

:root {
    --mcv-bg: #090909;
    --mcv-surface: #121212;
    --mcv-surface-2: #1a1a1a;
    --mcv-surface-3: #141414;
    --mcv-sidebar: #050505;
    --mcv-border: #262626;
    --mcv-border-light: #333333;
    --mcv-text: #ffffff;
    --mcv-muted: #a3a3a3;
    --mcv-accent: #ffffff;
    --mcv-accent-hover: #e5e5e5;
    --mcv-gold: #ffffff;
    --mcv-gold-hover: #e5e5e5;
    --mcv-success: #10b981;
    --mcv-danger: #f43f5e;
    --mcv-warning: #f59e0b;
    --mcv-navy: #ffffff;
    --sidebar-width: 268px;
}

* {
    box-sizing: border-box;
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

body {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
    background-color: var(--mcv-bg) !important;
    color: var(--mcv-text) !important;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    letter-spacing: -0.01em;
}

h1, h2, h3, h4, h5, h6, .navbar-brand, .btn, .badge, input, select, textarea, table {
    font-family: 'Montserrat', sans-serif !important;
}

/* Global Dark Mode Overrides for Bootstrap Utility Classes (Zero Blue Shades) */
.bg-white {
    background-color: var(--mcv-surface) !important;
    color: var(--mcv-text) !important;
}

.bg-light {
    background-color: var(--mcv-surface-2) !important;
    color: var(--mcv-text) !important;
}

.bg-black,
.bg-dark {
    background-color: #050505 !important;
    color: #ffffff !important;
}

.bg-secondary {
    background-color: #262626 !important;
    color: #ffffff !important;
}

.text-dark,
.text-black,
.text-secondary-emphasis {
    color: var(--mcv-text) !important;
}

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

.text-primary,
.text-info-emphasis,
.text-success,
.text-danger,
.text-warning,
.text-warning-emphasis {
    color: #ffffff !important;
}

.border,
.border-top,
.border-bottom,
.border-start,
.border-end {
    border-color: var(--mcv-border) !important;
}

.border-success,
.border-success-subtle,
.border-danger,
.border-danger-subtle,
.border-warning,
.border-warning-subtle,
.border-info,
.border-info-subtle,
.border-primary,
.border-light {
    border-color: rgba(255, 255, 255, 0.4) !important;
}

hr {
    border-color: var(--mcv-border-light) !important;
    opacity: 0.5;
}

/* Subtle Backgrounds in Neutral Dark + White Theme */
.bg-warning-subtle,
.bg-success-subtle,
.bg-danger-subtle,
.bg-info-subtle,
.bg-primary-subtle,
.bg-secondary-subtle {
    background-color: rgba(255, 255, 255, 0.08) !important;
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.35) !important;
}

.bg-success,
.bg-danger,
.bg-warning,
.bg-info,
.bg-primary {
    background-color: #ffffff !important;
    color: #050505 !important;
}

.bg-success i,
.bg-danger i,
.bg-warning i,
.bg-info i,
.bg-primary i {
    color: #050505 !important;
}

/* Alerts in Neutral Dark + White Mode */
.alert,
.alert-success,
.alert-warning,
.alert-danger,
.alert-info {
    background-color: #161616 !important;
    border: 1px solid rgba(255, 255, 255, 0.35) !important;
    color: #ffffff !important;
}

.btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

/* Navbar & Public Header */
.mcv-navbar {
    background: #050505;
    border-bottom: 1px solid var(--mcv-border);
    padding: 0.9rem 0;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.6);
}

.mcv-brand-badge {
    background: #ffffff;
    color: #050505;
    font-weight: 800;
    padding: 0.32rem 0.72rem;
    border-radius: 7px;
    letter-spacing: 1px;
    font-size: 0.88rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.mcv-navbar .nav-link {
    color: #d4d4d4 !important;
    font-weight: 600;
    font-size: 0.92rem;
    padding: 0.5rem 1rem !important;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.mcv-navbar .nav-link:hover,
.mcv-navbar .nav-link.active {
    color: #050505 !important;
    background: #ffffff;
}

/* Hero Banner (Pure Neutral Charcoal Gradient - Zero Blue) */
.mcv-hero {
    background: radial-gradient(circle at top right, #1f1f1f 0%, #090909 68%);
    color: #ffffff;
    padding: 4.5rem 0;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--mcv-border);
    flex: 1;
    display: flex;
    align-items: center;
}

.mcv-hero::after {
    content: '';
    position: absolute;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.06) 0%, transparent 70%);
    top: -120px;
    right: -80px;
    pointer-events: none;
}

/* Custom Buttons - All Dark & White */
.btn-mcv-gold,
.btn-primary,
.btn-success,
.btn-danger,
.btn-warning,
.btn-light {
    background: #ffffff !important;
    color: #050505 !important;
    font-weight: 700;
    border: 1px solid #ffffff !important;
    border-radius: 9px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 14px rgba(255, 255, 255, 0.1);
}

.btn-mcv-gold i,
.btn-primary i,
.btn-success i,
.btn-danger i,
.btn-warning i,
.btn-light i,
.badge.bg-white,
.badge.bg-white i {
    color: #050505 !important;
}

.badge.bg-white {
    background-color: #ffffff !important;
}

.btn-mcv-gold:hover,
.btn-mcv-gold:focus,
.btn-primary:hover,
.btn-primary:focus,
.btn-success:hover,
.btn-success:focus,
.btn-danger:hover,
.btn-danger:focus,
.btn-warning:hover,
.btn-warning:focus {
    background: #e5e5e5 !important;
    border-color: #e5e5e5 !important;
    color: #000000 !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.18);
}

.btn-mcv-navy {
    background-color: #1f1f1f;
    color: #ffffff !important;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 9px;
    padding: 0.65rem 1.4rem;
    transition: all 0.2s ease;
}

.btn-mcv-navy:hover,
.btn-mcv-navy:focus {
    background-color: #ffffff;
    border-color: #ffffff;
    color: #050505 !important;
    transform: translateY(-1px);
}

.btn-outline-dark,
.btn-outline-secondary,
.btn-outline-primary,
.btn-outline-success,
.btn-outline-danger,
.btn-outline-warning,
.btn-outline-light {
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
    background-color: transparent !important;
}

.btn-outline-dark i,
.btn-outline-secondary i,
.btn-outline-primary i,
.btn-outline-success i,
.btn-outline-danger i,
.btn-outline-warning i,
.btn-outline-light i {
    color: #ffffff !important;
}

.btn-outline-dark:hover,
.btn-outline-secondary:hover,
.btn-outline-primary:hover,
.btn-outline-success:hover,
.btn-outline-danger:hover,
.btn-outline-warning:hover,
.btn-outline-light:hover {
    background-color: #ffffff !important;
    color: #050505 !important;
    border-color: #ffffff !important;
}

.btn-outline-dark:hover i,
.btn-outline-secondary:hover i,
.btn-outline-primary:hover i,
.btn-outline-success:hover i,
.btn-outline-danger:hover i,
.btn-outline-warning:hover i,
.btn-outline-light:hover i {
    color: #050505 !important;
}

/* Cards (Pure Neutral Charcoal) */
.mcv-card {
    background: var(--mcv-surface) !important;
    color: var(--mcv-text) !important;
    border: 1px solid var(--mcv-border) !important;
    border-radius: 14px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.5);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mcv-card-header {
    background: linear-gradient(135deg, #1a1a1a 0%, #121212 100%);
    color: #ffffff;
    padding: 1.2rem 1.5rem;
    border-top-left-radius: 13px;
    border-top-right-radius: 13px;
    border-bottom: 1px solid var(--mcv-border-light);
}

/* Tables in Neutral Dark Mode */
.table {
    --bs-table-bg: transparent !important;
    --bs-table-color: #e5e5e5 !important;
    --bs-table-border-color: #262626 !important;
    --bs-table-hover-bg: rgba(255, 255, 255, 0.05) !important;
    --bs-table-hover-color: #ffffff !important;
    color: #e5e5e5 !important;
}

.table thead.table-light,
.table-light {
    --bs-table-bg: #171717 !important;
    --bs-table-color: #a3a3a3 !important;
    --bs-table-border-color: #262626 !important;
    background-color: #171717 !important;
    color: #a3a3a3 !important;
}

.table thead th {
    background-color: #171717 !important;
    color: #a3a3a3 !important;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.74rem;
    letter-spacing: 0.6px;
    border-bottom: 1px solid var(--mcv-border-light) !important;
    padding-top: 0.85rem;
    padding-bottom: 0.85rem;
}

.table tbody td {
    border-color: var(--mcv-border) !important;
    color: #e5e5e5;
}

/* Modals in Neutral Dark Mode */
.modal-content {
    background-color: var(--mcv-surface) !important;
    color: var(--mcv-text) !important;
    border: 1px solid var(--mcv-border-light) !important;
}

.modal-header,
.modal-footer {
    border-color: var(--mcv-border) !important;
}

/* Stepper */
.mcv-stepper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 680px;
    margin: 0 auto 2rem;
    position: relative;
}

.mcv-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 2;
    flex: 1;
    text-align: center;
}

.mcv-step-circle {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--mcv-surface-2);
    color: var(--mcv-muted);
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.45rem;
    border: 2px solid var(--mcv-border-light);
}

.mcv-step.active .mcv-step-circle,
.mcv-step.completed .mcv-step-circle {
    background: #ffffff;
    color: #050505;
    border-color: #ffffff;
    box-shadow: 0 0 14px rgba(255, 255, 255, 0.3);
}

.mcv-step-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--mcv-muted);
}

.mcv-step.active .mcv-step-label,
.mcv-step.completed .mcv-step-label {
    color: #ffffff;
    font-weight: 700;
}

/* Form Controls in Neutral Dark Mode */
.form-label {
    color: #e5e5e5;
}

.form-text {
    color: var(--mcv-muted) !important;
}

.form-control,
.form-select {
    background-color: #171717 !important;
    border-radius: 8px;
    padding: 0.65rem 0.95rem;
    border: 1px solid #333333 !important;
    color: #ffffff !important;
    font-weight: 500;
}

.form-control::placeholder {
    color: #737373 !important;
}

.form-control:focus,
.form-select:focus {
    background-color: #1a1a1a !important;
    border-color: #ffffff !important;
    color: #ffffff !important;
    box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.16) !important;
}

.input-group-text {
    background-color: #1f1f1f !important;
    border-color: #333333 !important;
    color: #d4d4d4 !important;
}

/* Drag and Drop Upload Box */
.upload-dropzone {
    border: 2px dashed #404040;
    border-radius: 12px;
    background-color: #161616;
    padding: 2rem 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--mcv-text);
}

.upload-dropzone:hover,
.upload-dropzone.dragover {
    border-color: #ffffff;
    background-color: rgba(255, 255, 255, 0.05);
}

/* Payment Method Box */
.payment-method-card {
    border: 1px solid var(--mcv-border-light);
    border-left: 4px solid #ffffff;
    border-radius: 10px;
    padding: 1.15rem;
    background: var(--mcv-surface-2);
    color: var(--mcv-text);
    transition: all 0.2s ease;
}

.payment-method-card.accent-gold {
    border-left-color: #ffffff;
}

.copy-btn {
    font-size: 0.78rem;
    padding: 0.2rem 0.55rem;
    border-radius: 6px;
    font-weight: 600;
}

/* ==========================================================================
   ADMIN PANEL SIDEBAR & LAYOUT (PURE CHARCOAL DARK THEME)
   ========================================================================== */

.admin-wrapper {
    display: flex;
    min-height: 100vh;
    width: 100%;
    background-color: var(--mcv-bg);
}

.admin-sidebar {
    width: var(--sidebar-width);
    background: var(--mcv-sidebar);
    color: #ffffff;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--mcv-border);
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1040;
    transition: transform 0.25s ease;
}

.admin-sidebar-header {
    padding: 1.3rem 1.25rem;
    border-bottom: 1px solid var(--mcv-border);
}

.admin-nav {
    list-style: none;
    padding: 1rem 0.75rem;
    margin: 0;
    flex: 1;
    overflow-y: auto;
}

.admin-nav-item {
    margin-bottom: 0.35rem;
}

.admin-nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.72rem 1rem;
    color: #a3a3a3;
    text-decoration: none;
    border-radius: 9px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.admin-nav-link i {
    font-size: 1.15rem;
    color: #ffffff;
}

.admin-nav-link:hover {
    background: #171717;
    color: #ffffff;
}

.admin-nav-link.active {
    background: #ffffff;
    color: #050505;
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(255, 255, 255, 0.14);
}

.admin-nav-link.active i {
    color: #050505;
}

.admin-main {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-width: 0;
    background-color: var(--mcv-bg);
}

.admin-topbar {
    background: #0d0d0d;
    border-bottom: 1px solid var(--mcv-border);
    padding: 0.9rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1020;
}

.admin-content {
    padding: 1.75rem;
    flex: 1;
}

/* Dashboard Stat Cards - Pure Dark with White Borders & White Icons */
.stat-card {
    background: var(--mcv-surface);
    border-radius: 12px;
    padding: 1.35rem;
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    height: 100%;
}

.stat-card::before,
.stat-card.stat-gold::before,
.stat-card.stat-success::before,
.stat-card.stat-danger::before,
.stat-card.stat-info::before,
.stat-card.stat-purple::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #ffffff !important;
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.08) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.35) !important;
}

.stat-icon i {
    color: #ffffff !important;
}

/* Status Badges */
.badge-status {
    font-weight: 700 !important;
    letter-spacing: 0.3px;
}

/* QR Code Scanner Interface */
.scanner-container {
    max-width: 560px;
    margin: 0 auto;
    border: 2px solid #ffffff;
    border-radius: 14px;
    overflow: hidden;
    background: #000000;
    position: relative;
}

.scan-result-panel,
.scan-result-allowed,
.scan-result-used,
.scan-result-invalid,
.scan-result-unpaid {
    border-radius: 14px;
    padding: 1.75rem;
    transition: all 0.25s ease;
    background: #161616;
    border: 2px solid #ffffff;
    color: #ffffff;
}

/* Footer */
.mcv-footer {
    background-color: var(--mcv-sidebar);
    color: var(--mcv-muted);
    border-top: 1px solid var(--mcv-border);
    padding: 1.6rem 0;
    margin-top: auto;
}

/* Responsive Sidebar Collapse & Comprehensive Mobile Optimization */
@media (max-width: 991.98px) {
    .admin-sidebar {
        transform: translateX(-100%);
        width: 280px;
        box-shadow: 8px 0 32px rgba(0, 0, 0, 0.85);
    }
    .admin-sidebar.show {
        transform: translateX(0);
    }
    .admin-main {
        margin-left: 0;
        width: 100%;
    }
    .sidebar-backdrop {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.78);
        backdrop-filter: blur(2px);
        z-index: 1035;
    }
    .sidebar-backdrop.show {
        display: block;
    }
    .admin-topbar {
        padding: 0.75rem 1rem;
    }
    .admin-content {
        padding: 1.15rem 0.9rem;
    }
}

@media (max-width: 767.98px) {
    html, body {
        max-width: 100%;
        overflow-x: hidden;
    }

    /* Prevent iOS/Android auto-zoom on input focus and ensure 44px+ touch targets */
    .form-control,
    .form-select {
        font-size: 16px !important;
        min-height: 46px;
        padding: 0.6rem 0.85rem;
    }

    .form-control-sm,
    .form-select-sm {
        font-size: 15px !important;
        min-height: 42px;
    }

    .btn {
        min-height: 42px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .btn-sm {
        min-height: 36px;
        padding: 0.35rem 0.7rem;
    }

    .mcv-hero {
        padding: 2.25rem 0 2.5rem;
        text-align: left;
    }

    .mcv-hero h1.display-5 {
        font-size: 1.75rem;
        line-height: 1.25;
    }

    .mcv-hero .lead {
        font-size: 1rem;
    }

    .mcv-card-header {
        padding: 1rem 1.15rem;
    }

    .stat-card {
        padding: 1.05rem 1.15rem;
    }

    .stat-icon {
        width: 44px;
        height: 44px;
        font-size: 1.25rem;
    }

    /* Smooth horizontal touch scrolling for data tables */
    .table-responsive {
        -webkit-overflow-scrolling: touch;
        border-radius: 0 0 13px 13px;
    }

    .table th,
    .table td {
        padding: 0.65rem 0.6rem;
        white-space: nowrap;
    }

    /* Allow long emails/IBANs to wrap cleanly inside cards */
    .payment-method-card .font-monospace {
        word-break: break-all;
    }

    .upload-dropzone {
        padding: 1.5rem 1rem;
    }

    .scan-result-panel {
        padding: 1.25rem 1rem;
    }
}

@media (max-width: 575.98px) {
    .admin-content {
        padding: 0.9rem 0.65rem;
    }

    .admin-topbar h5 {
        font-size: 0.98rem;
        max-width: 175px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .mcv-hero .d-flex.flex-wrap.gap-3 .btn-lg {
        width: 100%;
    }

    .mcv-stepper {
        margin-bottom: 1.35rem;
    }

    .mcv-step-circle {
        width: 34px;
        height: 34px;
        font-size: 0.85rem;
    }

    .mcv-step-label {
        font-size: 0.7rem;
    }

    .modal-dialog {
        margin: 0.5rem;
    }
}
