/* ========================================
   NafaTicket Admin - Styles
   ======================================== */

:root {
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 70px;
    --topbar-height: 60px;
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --bg-dark: #0f172a;
    --bg-sidebar: #1e293b;
    --bg-main: #f1f5f9;
    --bg-card: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-light: #94a3b8;
    --text-sidebar: #cbd5e1;
    --border-color: #e2e8f0;
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #06b6d4;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-main);
    color: var(--text-primary);
}

/* ========= LOADING ========= */
.loading-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    gap: 1rem;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ========= LAYOUT ========= */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

/* ========= SIDEBAR ========= */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    color: var(--text-sidebar);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    transition: width 0.3s ease;
    overflow: hidden;
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

.sidebar-header {
    display: flex;
    align-items: center;
    padding: 1rem;
    gap: 0.75rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    min-height: 60px;
}

.logo { width: 32px; height: 32px; flex-shrink: 0; }

.brand-text {
    font-weight: 700;
    font-size: 1.1rem;
    color: #fff;
    white-space: nowrap;
}

.toggle-btn {
    background: none;
    border: none;
    color: var(--text-sidebar);
    font-size: 1.3rem;
    cursor: pointer;
    margin-left: auto;
    padding: 0.25rem;
}

.toggle-btn:hover { color: #fff; }

/* ========= NAV MENU ========= */
.nav-menu {
    list-style: none;
    padding: 0.5rem 0;
    flex: 1;
    overflow-y: auto;
}

.nav-item { margin: 2px 8px; }
.nav-item.nav-item-scanner { margin: 8px 8px 12px; }
.nav-item.nav-item-scanner .nav-link { background: linear-gradient(135deg, #7c3aed, #a855f7); color: #fff; font-weight: 700; letter-spacing: .3px; box-shadow: 0 4px 14px rgba(124,58,237,.4); }
.nav-item.nav-item-scanner .nav-link:hover { background: linear-gradient(135deg, #6d28d9, #9333ea); box-shadow: 0 6px 20px rgba(124,58,237,.5); transform: translateY(-1px); }
.nav-item.nav-item-scanner .nav-link.active { background: linear-gradient(135deg, #5b21b6, #7c3aed); }

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 1rem;
    border-radius: 8px;
    color: var(--text-sidebar);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
    white-space: nowrap;
}

.nav-link:hover {
    background: rgba(255,255,255,0.08);
    color: #fff;
}

.nav-link.active {
    background: var(--primary);
    color: #fff;
}

.nav-link i { font-size: 1.2rem; flex-shrink: 0; min-width: 24px; text-align: center; }

.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.btn-logout {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.7rem 1rem;
    border: none;
    border-radius: 8px;
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}

.btn-logout:hover { background: rgba(239, 68, 68, 0.3); }
.btn-logout i { font-size: 1.2rem; }

/* ========= MAIN CONTENT ========= */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    transition: margin-left 0.3s ease;
}

.sidebar.collapsed ~ .main-content {
    margin-left: var(--sidebar-collapsed-width);
}

/* ========= TOP BAR ========= */
.top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--topbar-height);
    padding: 0 1.5rem;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 50;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-main);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    width: 320px;
}

.search-box input {
    border: none;
    background: none;
    outline: none;
    font-size: 0.9rem;
    width: 100%;
}

.search-box i { color: var(--text-light); }

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.notification-btn {
    position: relative;
    background: none;
    border: none;
    font-size: 1.3rem;
    color: var(--text-secondary);
    cursor: pointer;
}

.notification-btn .badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--danger);
    color: #fff;
    font-size: 0.65rem;
    padding: 2px 5px;
    border-radius: 10px;
}

.user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.user-name { font-weight: 600; font-size: 0.9rem; }
.user-role { font-size: 0.75rem; color: var(--text-light); }

/* ========= PAGE CONTENT ========= */
.page-content {
    padding: 1.5rem;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.page-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
}

/* ========= CARDS ========= */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 1.25rem;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.stat-icon.primary { background: rgba(99,102,241,0.1); color: var(--primary); }
.stat-icon.success { background: rgba(34,197,94,0.1); color: var(--success); }
.stat-icon.warning { background: rgba(245,158,11,0.1); color: var(--warning); }
.stat-icon.danger { background: rgba(239,68,68,0.1); color: var(--danger); }
.stat-icon.info { background: rgba(6,182,212,0.1); color: var(--info); }

.stat-info h3 { font-size: 1.5rem; font-weight: 700; margin-bottom: 0.25rem; }
.stat-info p { font-size: 0.85rem; color: var(--text-secondary); margin: 0; }

/* ========= TABLE ========= */
.data-card {
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.data-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
}

.data-card-header h2 { font-size: 1.1rem; font-weight: 600; }

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    text-align: left;
    padding: 0.75rem 1.25rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: var(--bg-main);
    border-bottom: 1px solid var(--border-color);
}

.data-table td {
    padding: 0.75rem 1.25rem;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: rgba(99,102,241,0.02); }

/* ========= BADGES ========= */
.badge-status {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
}

.badge-success { background: rgba(34,197,94,0.1); color: var(--success); }
.badge-warning { background: rgba(245,158,11,0.1); color: var(--warning); }
.badge-danger { background: rgba(239,68,68,0.1); color: var(--danger); }
.badge-info { background: rgba(6,182,212,0.1); color: var(--info); }
.badge-primary { background: rgba(99,102,241,0.1); color: var(--primary); }
.badge-secondary { background: rgba(100,116,139,0.1); color: var(--text-secondary); }

/* ========= BUTTONS ========= */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-success { background: var(--success); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-outline { background: transparent; border: 1px solid var(--border-color); color: var(--text-primary); }
.btn-outline:hover { background: var(--bg-main); }
.btn-sm { padding: 0.35rem 0.75rem; font-size: 0.8rem; }
.btn-icon { width: 36px; height: 36px; padding: 0; justify-content: center; border-radius: 8px; }

/* ========= FORM ========= */
.form-group { margin-bottom: 1rem; }

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.35rem;
}

.form-control {
    width: 100%;
    padding: 0.6rem 0.85rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.9rem;
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.1);
}

/* ========= PAGINATION ========= */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
}

.page-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
}

.page-btn:hover { background: var(--bg-main); }
.page-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.page-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ========= FILTERS ========= */
.filters-bar {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.filter-select {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.85rem;
    background: var(--bg-card);
    cursor: pointer;
}

.filter-input {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.85rem;
    min-width: 240px;
}

/* ========= MODAL ========= */
.modal-backdrop {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 1.5rem;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.modal-header h3 { font-size: 1.15rem; font-weight: 600; }
.modal-footer { display: flex; justify-content: flex-end; gap: 0.75rem; margin-top: 1.5rem; }

/* ========= LOGIN ========= */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-sidebar) 100%);
}

.login-card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 2.5rem;
    width: 90%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.login-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.login-header i {
    font-size: 3rem;
    color: var(--primary);
    display: block;
    margin-bottom: 0.75rem;
}

.login-card h1,
.login-card h2 {
    text-align: center;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.login-card p {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.login-error {
    background: rgba(239,68,68,0.1);
    color: var(--danger);
    padding: 0.75rem;
    border-radius: 8px;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.login-btn {
    width: 100%;
    padding: 0.75rem;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.login-btn:hover { background: var(--primary-dark); }
.login-btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* ========= RESPONSIVE ========= */
@media (max-width: 768px) {
    .sidebar { display: none; }
    .main-content { margin-left: 0; }
    .search-box { width: 180px; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
}

/* ========= MOBILE DRAWER ========= */
.admin-drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 200;
}

.admin-drawer {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 280px;
    background: var(--bg-sidebar);
    z-index: 201;
    display: flex;
    flex-direction: column;
    animation: drawerSlideIn 0.22s ease;
    overflow: hidden;
}

@keyframes drawerSlideIn {
    from { transform: translateX(-100%); }
    to   { transform: translateX(0); }
}

.admin-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.2rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.04);
}

.admin-drawer-close {
    background: none;
    border: none;
    color: var(--text-sidebar);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 6px;
    transition: background 0.15s;
}
.admin-drawer-close:hover { background: rgba(255,255,255,0.1); color: #fff; }

.admin-drawer-links {
    flex: 1;
    overflow-y: auto;
    padding: 0.6rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.admin-drawer-link {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.72rem 1rem;
    border-radius: 8px;
    color: var(--text-sidebar);
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 500;
    transition: background 0.15s, color 0.15s;
}
.admin-drawer-link i { font-size: 1.1rem; min-width: 22px; text-align: center; }
.admin-drawer-link:hover { background: rgba(255,255,255,0.08); color: #fff; }
.admin-drawer-link.active { background: var(--primary); color: #fff; }

.admin-drawer-link.scanner {
    background: linear-gradient(135deg, #7c3aed, #a855f7);
    color: #fff;
    font-weight: 700;
    margin-bottom: 8px;
    box-shadow: 0 4px 14px rgba(124,58,237,.4);
}
.admin-drawer-link.scanner:hover { background: linear-gradient(135deg, #6d28d9, #9333ea); }

.admin-drawer-footer {
    padding: 1rem 0.75rem;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.admin-drawer-logout {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.7rem 1rem;
    border: none;
    border-radius: 8px;
    background: rgba(239,68,68,0.15);
    color: #fca5a5;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s;
}
.admin-drawer-logout:hover { background: rgba(239,68,68,0.3); }
.admin-drawer-logout i { font-size: 1.1rem; }

/* ========= ERROR UI ========= */
#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0,0,0,0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

/* ========= STOCK / BILLETS ========= */
.stock-cell { min-width: 180px; }

.stock-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    margin-bottom: 4px;
}

.stock-numbers strong { font-size: 1rem; }

.stock-remaining {
    font-size: 0.75rem;
    font-weight: 600;
}

.stock-bar {
    width: 100%;
    height: 6px;
    background: #e9ecef;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 4px;
}

.stock-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s ease;
}

.bar-success { background: #28a745; }
.bar-warning { background: #ffc107; }
.bar-danger { background: #dc3545; }

.btn-stock-detail {
    background: none;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 2px 8px;
    font-size: 0.7rem;
    color: var(--secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s;
}

.btn-stock-detail:hover {
    background: #f8f9fa;
    border-color: var(--primary);
    color: var(--primary);
}

.ticket-detail-row td {
    background: #f8f9fa;
    padding: 1rem !important;
}

.ticket-types-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
}

.ticket-type-card {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 12px;
    transition: box-shadow 0.2s;
}

.ticket-type-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.tt-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.tt-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.tt-price {
    font-weight: 700;
    color: var(--primary);
    font-size: 0.85rem;
}

.tt-stock-numbers {
    display: flex;
    justify-content: space-between;
    font-size: 0.78rem;
    margin-bottom: 4px;
    gap: 8px;
}

.tt-status {
    margin-top: 8px;
    text-align: right;
}

.text-danger { color: #dc3545 !important; }
.text-warning { color: #e68a00 !important; }
.text-success { color: #28a745 !important; }

/* ========= PROFILE DROPDOWN ========= */
.profile-dropdown {
    position: relative;
}

.profile-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    background: none;
    border: 1px solid transparent;
    border-radius: 10px;
    padding: 6px 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.profile-toggle:hover {
    background: rgba(232, 90, 42, 0.06);
    border-color: rgba(232, 90, 42, 0.15);
}

.profile-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #ff7849);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.profile-avatar-lg {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #ff7849);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.profile-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.3;
}

.profile-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text);
}

.profile-role {
    font-size: 0.72rem;
    color: var(--secondary);
}

.profile-chevron {
    font-size: 0.7rem;
    color: var(--secondary);
    transition: transform 0.2s;
}

.profile-chevron.open {
    transform: rotate(180deg);
}

.profile-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 280px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    border: 1px solid #e9ecef;
    z-index: 1001;
    overflow: hidden;
    animation: profileMenuIn 0.15s ease-out;
}

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

.profile-menu-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: #f8f9fa;
}

.profile-menu-header strong {
    display: block;
    font-size: 0.95rem;
    color: var(--text);
}

.profile-menu-header small {
    display: block;
    font-size: 0.78rem;
    color: var(--secondary);
    margin-top: 2px;
}

.profile-menu-divider {
    height: 1px;
    background: #e9ecef;
}

.profile-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 12px 16px;
    background: none;
    border: none;
    color: var(--text);
    font-size: 0.88rem;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s;
}

.profile-menu-item:hover {
    background: #f8f9fa;
}

.profile-menu-item i {
    font-size: 1rem;
    width: 20px;
    text-align: center;
    color: var(--secondary);
}

.profile-menu-item.logout {
    color: #dc3545;
}

.profile-menu-item.logout i {
    color: #dc3545;
}

.profile-menu-item.logout:hover {
    background: #fff5f5;
}

.profile-menu-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
}

/* ══════════════════════════════════════════
   Image Upload Zone
   ══════════════════════════════════════════ */

.image-upload-zone {
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    position: relative;
    transition: all 0.3s;
    cursor: pointer;
    background: #fafafa;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.image-upload-zone:hover {
    border-color: #6366f1;
    background: #f0f0ff;
}

.image-upload-zone.has-image {
    padding: 0;
    border-style: solid;
    border-color: #6366f1;
    min-height: auto;
}

.image-upload-zone .preview-image {
    width: 100%;
    max-height: 300px;
    object-fit: cover;
    border-radius: 10px;
    display: block;
}

.image-upload-zone .remove-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    padding: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.upload-placeholder i {
    font-size: 3rem;
    color: #6366f1;
    opacity: 0.5;
    display: block;
}

.upload-placeholder p {
    margin: 12px 0 4px;
    font-weight: 500;
    color: #374151;
    font-size: 1rem;
}

.upload-placeholder span {
    font-size: 0.85rem;
    color: #9ca3af;
}

.image-upload-zone input[type="file"],
.image-upload-zone .file-input {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    opacity: 0 !important;
    cursor: pointer !important;
    z-index: 10 !important;
}

/* Create Event Form Sections */
.form-section {
    background: #ffffff;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 16px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.form-section-title {
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6366f1;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f5;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-section-title i {
    font-size: 1.1rem;
}

.form-section .form-label {
    font-weight: 600;
    font-size: 0.875rem;
    color: #374151;
    margin-bottom: 6px;
}

.form-section .form-control,
.form-section .form-select {
    border-radius: 10px;
    border: 1px solid #d1d5db;
    padding: 10px 14px;
    font-size: 0.95rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-section .form-control-lg,
.form-section .form-select-lg {
    padding: 10px 14px;
    font-size: 0.95rem;
    border-radius: 10px;
}

.form-section .form-control:focus,
.form-section .form-select:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
}

.form-section textarea.form-control {
    min-height: 90px;
}

/* Modal overrides for create/edit event */
.modal-dialog.modal-xl .modal-body,
.modal-dialog .modal-body {
    max-height: 85vh;
    overflow-y: auto;
}

.modal-dialog .modal-body::-webkit-scrollbar {
    width: 6px;
}

.modal-dialog .modal-body::-webkit-scrollbar-track {
    background: transparent;
}

.modal-dialog .modal-body::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

.modal-dialog .modal-body::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

.ticket-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 12px;
    transition: box-shadow 0.2s, border-color 0.2s;
}

.ticket-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border-color: #c7c9f5;
}

.ticket-card .form-control {
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 0.95rem;
    border: 1px solid #d1d5db;
}

.ticket-card .form-control:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99,102,241,0.12);
}

.ticket-card .form-label {
    font-size: 0.85rem;
    margin-bottom: 4px;
    color: #4b5563;
}

/* ══════════════════════════════════════════
   Event Modal responsive
   ══════════════════════════════════════════ */

@media (max-width: 1200px) {
    .modal-dialog-scrollable .ticket-card .row .col-lg-3 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

@media (max-width: 768px) {
    .modal-dialog-scrollable .modal-body {
        padding: 1rem !important;
    }
    .form-section {
        padding: 16px;
    }
    .ticket-card {
        padding: 14px;
    }
}
