@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    /* These will be overridden by theme_loader if available, but providing robust defaults */
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --primary-light: rgba(37, 99, 235, 0.1);
    --secondary: #64748b;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --bg-main: #f8fafc;
    --sidebar-bg: #ffffff;
    --text-main: #334155;
    --text-muted: #64748b;
    --radius: 16px;
    --glass-bg: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(255, 255, 255, 0.5);
    --shadow-soft: 0 4px 20px -5px rgba(0, 0, 0, 0.05);
    --shadow-premium: 0 20px 40px -10px rgba(0, 0, 0, 0.08);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Outfit', sans-serif;
    background: #f1f5f9;
    color: var(--text-main);
    min-height: 100vh;
}

.admin-layout {
    display: flex;
    min-height: 100vh;
}

/* SIDEBAR - Ultra Clean */
.admin-sidebar {
    width: var(--sidebar-width, 260px);
    background: var(--sidebar-bg);
    border-right: 1px solid #f1f5f9;
    padding: 2.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 100;
}

.logo-container {
    padding: 0 1rem;
    margin-bottom: 4rem;
    flex-shrink: 0;
}

.logo {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-main);
    text-decoration: none;
    letter-spacing: -0.04em;
    display: block;
}

.sidebar-subtitle {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 4px;
}

.admin-sidebar nav {
    flex-grow: 1;
}

.admin-sidebar nav ul {
    list-style: none;
}

.admin-sidebar nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.9rem 1.25rem;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    border-radius: 14px;
    margin-bottom: 0.5rem;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.admin-sidebar nav a:hover {
    background: #f8fafc;
    color: var(--text-main);
}

.admin-sidebar nav a.active {
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 700;
}

.sidebar-footer {
    padding: 1.5rem 1rem 1.5rem;
    border-top: 1px solid #f1f5f9;
    flex-shrink: 0;
}

.sidebar-footer .user-info {
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
}

.sidebar-footer .user-info .name {
    font-weight: 700;
    display: block;
}

.sidebar-footer .user-info .email {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.admin-main {
    flex-grow: 1;
    width: 100%;
}

.admin-sidebar nav a i {
    width: 18px;
    height: 18px;
    stroke-width: 2px;
}

h1 {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.05em;
    margin-bottom: 3rem;
    color: #0f172a;
}

h2 {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.admin-header h1,
.admin-header h2 {
    margin: 0;
}

/* CARDS / PANELS */
.glass-panel {
    background: white;
    border-radius: var(--radius);
    padding: 3rem;
    margin-bottom: 2.5rem;
    border: 1px solid #f1f5f9;
    box-shadow: var(--shadow-soft);
}

.shadow-premium {
    box-shadow: var(--shadow-premium);
}

/* STATS GRID */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 3.5rem;
}

.stat-card {
    background: white;
    padding: 2.5rem;
    border-radius: var(--radius);
    border: 1px solid #f1f5f9;
    box-shadow: var(--shadow-soft);
}

.stat-card h3 {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

.stat-card .number {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.02em;
}

/* BUTTONS */
.btn-primary {
    background: var(--primary);
    color: white;
    padding: 0.9rem 1.75rem;
    border-radius: 14px;
    border: none;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    box-shadow: 0 10px 20px -5px var(--primary-light);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 15px 30px -10px var(--primary-light);
}

.btn-secondary {
    background: #f1f5f9;
    color: var(--text-main);
    padding: 0.9rem 1.75rem;
    border-radius: 14px;
    border: none;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s;
}

.btn-secondary:hover {
    background: #e2e8f0;
}

.btn-small {
    padding: 0.4rem 0.6rem;
    font-size: 0.8rem;
    border-radius: 8px;
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-small:hover {
    background: #f1f5f9;
    color: var(--text-main);
    border-color: #e2e8f0;
}

/* TABLES */
.admin-table-container {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid #f1f5f9;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th {
    background: #fbfcfe;
    text-align: left;
    padding: 1.25rem 1.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-bottom: 2px solid #f1f5f9;
}

.admin-table td {
    padding: 1.5rem;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.95rem;
}

.admin-table tr:last-child td {
    border-bottom: none;
}

.admin-table tr:hover td {
    background: #fbfcfe;
}

/* FORM ELEMENTS */
.form-group {
    margin-bottom: 2rem;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-main);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="date"],
select,
textarea {
    width: 100%;
    padding: 1rem 1.25rem;
    background: #f8fafc;
    border: 2px solid #f1f5f9;
    border-radius: 12px;
    font-family: inherit;
    font-size: 1rem;
    color: var(--text-main);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px var(--primary-light);
}

/* TABS - Premium Pill Style */
.event-tabs {
    display: inline-flex;
    background: #f1f5f9;
    padding: 0.4rem;
    border-radius: 16px;
    margin-bottom: 3rem;
    gap: 4px;
}

.event-tab {
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.event-tab:hover {
    color: var(--text-main);
}

.event-tab.active {
    background: white;
    color: var(--primary);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

/* BADGES */
.badge {
    padding: 0.4rem 0.8rem;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 700;
}

.badge.success {
    background: #dcfce7;
    color: #166534;
}

.badge.danger {
    background: #fee2e2;
    color: #991b1b;
}

.badge.warning {
    background: #fef3c7;
    color: #92400e;
}

/* ALERT MESSAGES */
.alert {
    padding: 1.25rem 2rem;
    border-radius: 16px;
    margin-bottom: 2rem;
    font-weight: 600;
    animation: slideDown 0.4s ease-out;
}

/* FILE UPLOAD COMPONENT */
.file-upload-wrapper {
    margin-top: 1rem;
}

.file-upload-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 1rem 1.5rem;
    background: #f8fafc;
    border: 2px dashed #e2e8f0;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-muted);
    font-weight: 600;
}

.file-upload-label:hover {
    border-color: var(--primary);
    background: #f1f5f9;
    color: var(--primary);
}

.file-upload-label i {
    width: 20px;
    height: 20px;
}

.file-status-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    margin-top: 1rem;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.file-info i {
    color: var(--danger);
    width: 32px;
    height: 32px;
}

.file-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-main);
}

.file-actions {
    display: flex;
    gap: 10px;
}

/* PREMIUM INPUT GROUPS (FOR COPY & TOGGLE) */
.input-group-premium {
    display: flex;
    align-items: stretch;
    gap: 8px;
    position: relative;
}

.input-group-premium input {
    flex-grow: 1;
}

.input-group-premium input:read-only {
    background: #f1f5f9;
    color: var(--text-muted);
    cursor: default;
    border-color: #e2e8f0;
}

.input-group-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    background: white;
    border: 2px solid #f1f5f9;
    border-radius: 12px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
}

.input-group-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}

.input-group-btn i {
    width: 18px;
    height: 18px;
}

.tooltip-copied {
    position: absolute;
    top: -30px;
    right: 0;
    background: var(--text-main);
    color: white;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    transform: translateY(5px);
}

.tooltip-copied.show {
    opacity: 1;
    transform: translateY(0);
}

@keyframes slideDown {
    from {
        transform: translateY(-10px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* LIVE PREVIEW LAYOUT */
.split-layout {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 3rem;
    align-items: start;
}

.preview-sticky {
    position: sticky;
    top: 2rem;
}

.email-preview-card {
    background: white;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.05);
}

.email-preview-header {
    background: #f8fafc;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.email-preview-to {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.email-preview-subject {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
}

.email-preview-body {
    padding: 2.5rem;
    font-family: Arial, sans-serif;
    color: #444;
    line-height: 1.6;
    background: white;
    min-height: 400px;
    font-size: 0.95rem;
}

.email-preview-body h2 {
    color: var(--text-main);
    margin-top: 0;
}

.email-preview-body ul {
    padding-left: 20px;
    margin: 1rem 0;
}

.email-info-block {
    background: #f1f5f9;
    padding: 20px;
    border-radius: 12px;
    margin: 20px 0;
    color: var(--text-main);
}

.email-info-block p {
    margin: 0 0 10px 0;
    font-weight: 700;
}

@media (max-width: 1200px) {
    .split-layout {
        grid-template-columns: 1fr;
    }
}

/* PREMIUM TOGGLE SWITCHES */
.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 32px;
    flex-shrink: 0;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--danger);
    transition: .3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

.slider:before {
    position: absolute;
    content: "";
    height: 24px;
    width: 24px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    z-index: 2;
}

/* ON/OFF Text Labels */
.slider:after {
    content: "OFF";
    color: white;
    display: block;
    position: absolute;
    transform: translateY(-50%);
    top: 50%;
    right: 10px;
    font-size: 9px;
    font-weight: 800;
    transition: .3s;
    letter-spacing: 0.05em;
}

input:checked+.slider {
    background-color: var(--success);
}

input:checked+.slider:before {
    transform: translateX(28px);
}

input:checked+.slider:after {
    content: "ON";
    right: auto;
    left: 10px;
}

input:focus+.slider {
    box-shadow: 0 0 0 4px var(--primary-light), inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* DASHBOARD ENHANCEMENTS */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius);
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
}

.stat-card h3 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    font-weight: 700;
}

.stat-card .number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-main);
}

.stat-card .trend {
    font-size: 0.8rem;
    font-weight: 600;
}

.trend.success {
    color: var(--success);
}

.trend.danger {
    color: var(--danger);
}

.stat-card-icon {
    position: absolute;
    right: 1.25rem;
    top: 1.25rem;
    opacity: 0.35;
    color: var(--primary);
    width: 24px;
    height: 24px;
    pointer-events: none;
    stroke-width: 2.5px;
}

/* Progress Bars */
.progress-container {
    width: 100%;
    height: 8px;
    background: #f1f5f9;
    border-radius: 4px;
    margin-top: 1rem;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--primary);
    border-radius: 4px;
    transition: width 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.progress-bar.warning {
    background: var(--warning);
}

.progress-bar.danger {
    background: var(--danger);
}

.progress-bar.success {
    background: var(--success);
}

/* Dashboard Columns */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 2rem;
    align-items: start;
}

/* Activity Feed */
.activity-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    transition: all 0.2s;
}

.activity-item:hover {
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transform: translateX(4px);
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.activity-icon.bg-primary {
    background: var(--primary-light);
    color: var(--primary);
}

.activity-content {
    flex: 1;
}

.activity-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
    display: block;
}

.activity-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* T-Shirt Breakdown Table */
.tshirt-table {
    width: 100%;
    border-spacing: 0;
}

.tshirt-table td {
    padding: 0.75rem 0;
    font-size: 0.9rem;
    border-bottom: 1px solid #f1f5f9;
}

.tshirt-table tr:last-child td {
    border-bottom: none;
}

.tshirt-size-badge {
    width: 32px;
    height: 32px;
    background: #f1f5f9;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.75rem;
    color: var(--text-main);
}

/* DESIGN SETTINGS ENHANCEMENTS */
.color-picker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 1.5rem;
}

input[type="color"].round-picker {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 60px;
    height: 60px;
    background-color: transparent;
    border: 3px solid #f1f5f9;
    border-radius: 50%;
    cursor: pointer;
    padding: 0;
    overflow: hidden;
    transition: transform 0.2s, border-color 0.2s;
}

input[type="color"].round-picker:hover {
    transform: scale(1.1);
    border-color: var(--primary);
}

input[type="color"].round-picker::-webkit-color-swatch {
    border: none;
    border-radius: 50%;
    padding: 0;
}

input[type="color"].round-picker::-moz-color-swatch {
    border: none;
    border-radius: 50%;
}

.design-preview-container {
    background: linear-gradient(135deg, var(--bg-start, #f0f4f8) 0%, var(--bg-end, #d9e2ec) 100%);
    border-radius: var(--radius);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 1rem;
    border: 1px solid #e2e8f0;
    min-height: 400px;
    position: relative;
    overflow: hidden;
    transform: scale(0.95);
    transform-origin: top center;
}

.design-preview-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    max-width: 300px;
    text-align: center;
}

.design-preview-card h4 {
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.design-preview-card p {
    color: var(--text-main);
    font-size: 0.9rem;
}

.mockup-header {
    background: white;
    padding: 1rem;
    border-radius: var(--radius);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-soft);
}

.mockup-logo {
    font-weight: 800;
    font-size: 0.9rem;
}

.mockup-nav {
    display: flex;
    gap: 10px;
}

.mockup-nav-item {
    width: 30px;
    height: 4px;
    background: #e2e8f0;
    border-radius: 10px;
}

.mockup-body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.mockup-card {
    background: var(--glass-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 1.25rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
}

.mockup-card h5 {
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
}

.mockup-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.mockup-shift {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.5rem;
    font-size: 0.7rem;
    text-align: center;
}

.mockup-shift.active {
    border-color: var(--primary);
    background: var(--primary-light);
}

.mockup-buttons {
    display: flex;
    gap: 10px;
    margin-top: 0.5rem;
}

.mockup-btn {
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    font-size: 0.65rem;
    font-weight: 600;
    border: none;
    color: white;
}

.mockup-badges {
    display: flex;
    gap: 6px;
    margin-top: 0.5rem;
}

.mockup-badge {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.6rem;
    font-weight: 700;
    color: white;
}

/* INTERACTIVE HIGHLIGHTING */
@keyframes previewPulse {
    0% {
        transform: scale(1);
        filter: brightness(1);
    }

    50% {
        transform: scale(1.05);
        filter: brightness(1.2);
        box-shadow: 0 0 15px var(--primary);
    }

    100% {
        transform: scale(1);
        filter: brightness(1);
    }
}

.highlight-pulse {
    animation: previewPulse 0.6s ease-out;
    z-index: 10;
}

/* SAFETY WARNING BANNERS */
.warning-banner {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    margin-bottom: 2rem;
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.warning-banner i {
    color: #f97316;
    flex-shrink: 0;
}

.warning-banner-title {
    color: #9a3412;
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.warning-banner-text {
    color: #c2410c;
    font-size: 0.85rem;
    line-height: 1.5;
}

@media (max-width: 1200px) {

    .split-layout,
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .preview-sticky {
        position: static;
        margin-top: 2rem;
    }
}

/* Driver.js Customization for Premium Look */
.driver-popover {
    background-color: white !important;
    color: var(--text-main) !important;
    border-radius: 20px !important;
    padding: 25px !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25) !important;
    border: 1px solid rgba(255, 255, 255, 0.5) !important;
    max-width: 350px !important;
}

.driver-popover-title {
    font-family: 'Outfit', sans-serif !important;
    font-weight: 800 !important;
    font-size: 1.25rem !important;
    color: var(--primary) !important;
    margin-bottom: 10px !important;
}

.driver-popover-description {
    font-family: 'Outfit', sans-serif !important;
    font-weight: 500 !important;
    font-size: 0.95rem !important;
    color: var(--text-muted) !important;
    line-height: 1.5 !important;
}

.driver-popover-footer {
    margin-top: 20px !important;
    display: flex !important;
    gap: 10px !important;
    justify-content: flex-end !important;
}

.driver-popover-next-btn,
.driver-popover-prev-btn,
.driver-popover-close-btn {
    background: var(--primary) !important;
    color: white !important;
    text-shadow: none !important;
    border: none !important;
    padding: 8px 16px !important;
    border-radius: 10px !important;
    font-weight: 700 !important;
    font-size: 0.85rem !important;
    transition: all 0.2s !important;
}

.driver-popover-next-btn:hover {
    background: var(--primary-dark) !important;
}

.driver-popover-prev-btn {
    background: #f1f5f9 !important;
    color: var(--text-muted) !important;
}

.driver-popover-prev-btn:hover {
    background: #e2e8f0 !important;
    color: var(--text-main) !important;
}

.driver-popover-progress-text {
    color: var(--text-muted) !important;
    font-size: 0.8rem !important;
    font-weight: 600 !important;
}

/* Bruteforce Mobile Overrides */
@media (max-width: 991px) {
    aside.admin-sidebar {
        position: fixed !important;
        left: -280px !important;
        top: 0 !important;
        bottom: 0 !important;
        transition: left 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
        box-shadow: 20px 0 50px rgba(0, 0, 0, 0.2) !important;
        z-index: 2000 !important;
        width: 280px !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
        padding-top: 1.5rem !important;
    }

    aside.admin-sidebar .logo-container {
        margin-bottom: 1.5rem !important;
    }

    body.sidebar-open aside.admin-sidebar {
        left: 0 !important;
    }

    /* Hide tutorial button on mobile */
    #start-tour {
        display: none !important;
    }

    main.admin-main {
        padding: 60px 1rem 2rem !important;
        width: 100% !important;
        max-width: 100vw !important;
        margin-left: 0 !important;
        flex: 1 !important;
    }

    h1 {
        font-size: 1.8rem !important;
        margin-bottom: 2rem !important;
    }

    .admin-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 15px !important;
    }

    .stats-grid {
        grid-template-columns: 1fr !important;
    }

    .glass-panel {
        padding: 1.5rem !important;
    }

    /* Admin Table to Cards */
    .admin-table, 
    .admin-table tbody, 
    .admin-table tr, 
    .admin-table td {
        display: block !important;
        width: 100% !important;
    }

    .admin-table thead {
        display: none !important;
    }

    .admin-table tr {
        margin-bottom: 1.5rem !important;
        border: 1px solid #f1f5f9 !important;
        border-radius: 12px !important;
        padding: 1.25rem !important;
        background: white !important;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05) !important;
    }

    .admin-table td {
        padding: 0.75rem 0 !important;
        border: none !important;
        text-align: left !important;
    }

    .admin-table td:first-child {
        padding-top: 0 !important;
        border-bottom: 1px solid #f1f5f9 !important;
        margin-bottom: 0.5rem !important;
    }

    .admin-table td:last-child {
        padding-bottom: 0 !important;
        margin-top: 1rem !important;
        border-top: 1px solid #f1f5f9 !important;
        padding-top: 1rem !important;
    }

    /* Tab Responsiveness */
    .event-tabs {
        display: flex !important;
        flex-wrap: wrap !important;
        background: transparent !important;
        padding: 0 !important;
        gap: 8px !important;
    }

    .event-tab {
        flex: 1 1 auto !important;
        text-align: center !important;
        white-space: nowrap !important;
        padding: 0.75rem 1rem !important;
        border-radius: 12px !important;
        margin: 0 !important;
        background: #f1f5f9 !important;
    }

    .event-tab.active {
        background: white !important;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05) !important;
    }

    /* Form Grids Stacking */
    .form-card div[style*="display:grid"],
    .glass-panel div[style*="display: grid"],
    .glass-panel div[style*="display:grid"],
    div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }

    /* PDF Mockup responsiveness */
    #pdf_mockup {
        width: 100% !important;
        max-width: 320px !important;
        height: auto !important;
        min-height: 220px !important;
    }
}