/* 
 * Sommerfest 2026 Ticketshop - Modernes CSS Design-System
 * 100% Vanilla CSS
 */

/* --- Google Font Import --- */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

/* --- Design Tokens / Custom Properties --- */
:root {
    --font-primary: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    
    /* Harmonische Sommer-Farbpalette (Warm Amber / Ochre) */
    --color-bg: #fdf8f3;
    --color-surface: #ffffff;
    --color-surface-muted: #f9f6f0;
    --color-border: #e2e8f0;
    --color-border-hover: #cbd5e1;
    --color-primary: #d97706; /* Amber 600 */
    --color-primary-hover: #b45309; /* Amber 700 */
    --color-primary-light: #fef3c7; /* Amber 100 */
    --color-primary-dark: #78350f; /* Amber 900 */
    --color-success: #10b981; /* Emerald 500 */
    --color-success-hover: #059669; /* Emerald 600 */
    --color-success-light: #ecfdf5; /* Emerald 50 */
    --color-text-main: #1e293b; /* Slate 800 */
    --color-text-muted: #64748b; /* Slate 500 */
    --color-text-light: #94a3b8; /* Slate 400 */
    --color-danger: #ef4444; /* Red 500 */
    --color-danger-hover: #dc2626; /* Red 600 */
    
    /* Layout Tokens */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-full: 9999px;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 10px 25px -5px rgba(120, 53, 15, 0.08), 0 8px 10px -6px rgba(120, 53, 15, 0.04);
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Globale Resets & Basisstyles --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-primary);
    background-color: var(--color-bg);
    color: var(--color-text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* --- Layout Structure --- */
.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1;
    max-width: 1200px;
    width: 100%;
    margin: -32px auto 48px auto;
    padding: 0 16px;
    position: relative;
    z-index: 10;
}

.shop-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
}

@media (min-width: 992px) {
    .shop-grid {
        grid-template-columns: 2fr 1fr;
    }
}

/* --- Typography --- */
h1, h2, h3, h4 {
    font-weight: 700;
    color: var(--color-text-main);
    letter-spacing: -0.02em;
}

/* --- Header Section --- */
.app-header {
    background: linear-gradient(135deg, #d97706 0%, #b45309 50%, #78350f 100%);
    color: #ffffff;
    text-align: center;
    padding: 64px 16px 80px 16px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.app-header::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 60%);
    pointer-events: none;
    z-index: 1;
}

.header-container {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.header-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

@media (min-width: 768px) {
    .header-title {
        font-size: 3.5rem;
    }
}

.header-subtitle {
    font-size: 1.25rem;
    color: var(--color-primary-light);
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
}

.header-badge {
    display: inline-block;
    background-color: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    padding: 8px 24px;
    border-radius: var(--radius-full);
    font-size: 1rem;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Past Orders Button in Header */
.my-bookings-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    background-color: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: white;
    padding: 8px 16px;
    border-radius: var(--radius-full);
    font-family: var(--font-primary);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition-fast);
    backdrop-filter: blur(4px);
    z-index: 10;
}

.my-bookings-btn:hover {
    background-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
}

/* --- Cards & Panels --- */
.panel {
    background-color: var(--color-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--color-border);
    padding: 24px;
    margin-bottom: 24px;
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

@media (min-width: 768px) {
    .panel {
        padding: 32px;
    }
}

.panel-title {
    font-size: 1.5rem;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--color-surface-muted);
    display: flex;
    align-items: center;
    gap: 10px;
}

.panel-accent {
    border: 1px solid var(--color-primary-light);
    position: relative;
}

.panel-badge {
    position: absolute;
    top: -12px;
    left: 24px;
    background-color: var(--color-primary);
    color: white;
    padding: 2px 14px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: var(--shadow-sm);
}

/* --- Form Controls --- */
.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

@media (min-width: 768px) {
    .form-row-2 {
        grid-template-columns: 1fr 1fr;
    }
    .form-row-3 {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

label.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text-main);
    margin-bottom: 6px;
}

.input-text, .input-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-family: var(--font-primary);
    font-size: 1rem;
    color: var(--color-text-main);
    background-color: var(--color-surface);
    transition: var(--transition-fast);
    outline: none;
}

.input-text:focus, .input-textarea:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.15);
}

.input-text::placeholder, .input-textarea::placeholder {
    color: var(--color-text-light);
}

.input-textarea {
    height: 90px;
    resize: vertical;
}

.label-info-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* --- Ticket Configurator Cards --- */
.ticket-type-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

@media (min-width: 576px) {
    .ticket-type-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.ticket-card {
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 20px;
    cursor: pointer;
    transition: var(--transition-normal);
    position: relative;
    background-color: var(--color-surface);
}

.ticket-card:hover {
    border-color: var(--color-border-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.ticket-card.selected {
    border-color: var(--color-primary);
    background-color: #fffbeb;
    box-shadow: 0 4px 20px rgba(217, 119, 6, 0.08);
}

.ticket-card-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 8px;
}

.ticket-card-title {
    font-size: 1.25rem;
    font-weight: 700;
}

.ticket-card-date {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 8px;
    background-color: var(--color-surface-muted);
    border-radius: var(--radius-sm);
    color: var(--color-text-muted);
}

.selected .ticket-card-date {
    background-color: var(--color-primary-light);
    color: var(--color-primary-dark);
}

.ticket-card-desc {
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

/* Options Area */
.options-box {
    background-color: var(--color-surface-muted);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    padding: 20px;
    animation: slideDown var(--transition-normal);
}

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

.options-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.options-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Checkbox Blocks */
.option-item-checkbox {
    display: flex;
    align-items: start;
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    cursor: pointer;
    transition: var(--transition-fast);
    user-select: none;
}

.option-item-checkbox:hover {
    border-color: var(--color-primary);
}

.checkbox-input {
    margin-top: 4px;
    width: 18px;
    height: 18px;
    accent-color: var(--color-primary);
    cursor: pointer;
}

.checkbox-label-wrapper {
    flex: 1;
    margin-left: 12px;
}

.checkbox-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--color-text-main);
}

.option-price-tag {
    font-weight: 700;
    color: var(--color-text-muted);
    white-space: nowrap;
    margin-left: 8px;
}

/* Dropdown/Info Details inside checkbox option */
.info-toggle-btn {
    width: 100%;
    padding: 6px 12px;
    background-color: #fef3c7;
    border: none;
    border-top: 1px solid #fde68a;
    color: #92400e;
    font-family: var(--font-primary);
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: var(--transition-fast);
}

.info-toggle-btn:hover {
    background-color: #fde68a;
}

.info-content {
    background-color: #ffffff;
    padding: 10px 14px;
    border-top: 1px solid var(--color-border);
    font-size: 0.825rem;
    color: var(--color-text-muted);
}

.nested-info-container {
    border: 1px solid #fde68a;
    border-radius: var(--radius-sm);
    margin-top: 8px;
    overflow: hidden;
}

/* Number Counters Area */
.option-sub-panel {
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 16px;
}

.sub-panel-title {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 12px;
    display: block;
}

.counter-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

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

.counter-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--color-surface-muted);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
}

.counter-item span {
    font-size: 0.875rem;
    font-weight: 500;
}

.counter-control {
    display: inline-flex;
    align-items: center;
    height: 40px;
}

.counter-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 700;
    font-size: 1.3rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity var(--transition-fast), background-color var(--transition-fast), transform var(--transition-fast);
    user-select: none;
    outline: none;
}

.counter-btn-minus {
    border-radius: 20px 0 0 20px;
    background-color: #fee2e2;
    color: #dc2626;
    border: 1px solid #fca5a5;
    border-right: none;
    transition: opacity var(--transition-fast), background-color var(--transition-fast);
}
.counter-btn-minus:hover {
    background-color: #fecaca;
}
.counter-btn-minus:active {
    transform: scale(0.95);
}

.counter-btn-plus {
    border-radius: 0 20px 20px 0;
    background-color: #dcfce7;
    color: #16a34a;
    border: 1px solid #86efac;
    border-left: none;
}
.counter-btn-plus:hover {
    background-color: #bbf7d0;
}
.counter-btn-plus:active {
    transform: scale(0.95);
}

.counter-input {
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid var(--color-border);
    background-color: var(--color-surface);
    text-align: center;
    font-family: var(--font-primary);
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--color-text-main);
    outline: none;
    pointer-events: none;
    -moz-appearance: textfield;
    margin: 0;
}
.counter-input::-webkit-outer-spin-button,
.counter-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Ticket Configurator Footer */
.config-footer {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.config-price-summary span {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    display: block;
}

.config-price-summary .price {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-primary);
}

/* --- Buttons --- */
.btn {
    font-family: var(--font-primary);
    font-weight: 600;
    font-size: 1rem;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-normal);
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: var(--shadow-sm);
    outline: none;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background-color: var(--color-primary);
    color: #ffffff;
}

.btn-primary:hover {
    background-color: var(--color-primary-hover);
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.2);
}

.btn-primary:disabled {
    background-color: var(--color-border);
    color: var(--color-text-light);
    cursor: not-allowed;
    box-shadow: none;
}

.btn-dark {
    background-color: var(--color-text-main);
    color: #ffffff;
}

.btn-dark:hover {
    background-color: #0f172a;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--color-border);
    color: var(--color-text-muted);
}

.btn-outline:hover {
    background-color: var(--color-surface-muted);
    color: var(--color-text-main);
    border-color: var(--color-border-hover);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.85rem;
    border-radius: var(--radius-sm);
}

/* --- Sidebar / Cart System --- */
.cart-sticky {
    position: -webkit-sticky;
    position: sticky;
    top: 24px;
}

.cart-empty-state {
    text-align: center;
    padding: 40px 16px;
    color: var(--color-text-muted);
}

.cart-empty-icon {
    font-size: 3rem;
    color: var(--color-text-light);
    margin-bottom: 12px;
    opacity: 0.3;
}

.cart-items-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 40vh;
    overflow-y: auto;
    padding-right: 4px;
    margin-bottom: 20px;
}

/* Custom Scrollbar for Cart Items */
.cart-items-container::-webkit-scrollbar {
    width: 5px;
}
.cart-items-container::-webkit-scrollbar-track {
    background: var(--color-surface-muted);
    border-radius: 4px;
}
.cart-items-container::-webkit-scrollbar-thumb {
    background: var(--color-border-hover);
    border-radius: 4px;
}
.cart-items-container::-webkit-scrollbar-thumb:hover {
    background: var(--color-text-light);
}

.cart-item {
    background-color: var(--color-surface-muted);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 14px;
    position: relative;
    transition: var(--transition-fast);
}

.cart-item:hover {
    border-color: var(--color-border-hover);
}

.cart-item-header {
    display: flex;
    justify-content: space-between;
    padding-right: 24px;
    margin-bottom: 4px;
}

.cart-item-title {
    font-weight: 700;
    font-size: 0.95rem;
}

.cart-item-price {
    font-weight: 700;
    color: var(--color-primary);
}

.cart-item-details {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    line-height: 1.4;
}

.cart-item-remove-btn {
    position: absolute;
    top: 14px;
    right: 14px;
    background: none;
    border: none;
    color: var(--color-text-light);
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-item-remove-btn:hover {
    color: var(--color-danger);
}

/* Cart Pricing Summary */
.cart-total-section {
    border-top: 2px solid var(--color-text-main);
    padding-top: 16px;
    margin-bottom: 20px;
}

.cart-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.cart-summary-row.total {
    margin-top: 10px;
}

.cart-summary-row span {
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

.cart-summary-row .total-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-text-main);
}

.cart-summary-row .total-price {
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--color-primary);
}

.cart-error-msg {
    color: var(--color-danger);
    font-size: 0.8rem;
    text-align: center;
    margin-top: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

/* --- Past Orders Overlay / View --- */
.bookings-section {
    border: 1px solid var(--color-primary-light);
    animation: fadeIn 0.3s ease;
}

.bookings-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-height: 300px;
    overflow-y: auto;
    padding-right: 6px;
}

.booking-card {
    background-color: var(--color-surface-muted);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 16px;
}

.booking-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 10px;
    margin-bottom: 10px;
}

.booking-customer-name {
    font-weight: 700;
    font-size: 1.1rem;
}

.booking-meta {
    font-size: 0.75rem;
    color: var(--color-text-light);
    margin-top: 2px;
}

.booking-price {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--color-primary);
}

.booking-tickets-list {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.booking-ticket-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* --- Success / Complete State Screen --- */
.success-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.success-card {
    background-color: var(--color-surface);
    padding: 32px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    max-width: 450px;
    width: 100%;
    text-align: center;
    border-top: 8px solid var(--color-success);
    animation: scaleUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes scaleUp {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.success-icon-wrapper {
    width: 64px;
    height: 64px;
    background-color: var(--color-success-light);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px auto;
}

.success-icon {
    color: var(--color-success);
    width: 32px;
    height: 32px;
}

.success-title {
    font-size: 1.75rem;
    margin-bottom: 8px;
}

.success-desc {
    color: var(--color-text-muted);
    margin-bottom: 24px;
    font-size: 0.95rem;
}

.success-summary {
    background-color: var(--color-surface-muted);
    padding: 16px;
    border-radius: var(--radius-md);
    text-align: left;
    margin-bottom: 24px;
}

.success-summary-label {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.success-summary-value {
    font-size: 1.75rem;
    font-weight: 900;
    color: var(--color-text-main);
    margin-top: 2px;
}

/* --- SETUP WIZARD STYLING --- */
.setup-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at top left, #fef3c7, var(--color-bg) 60%);
    padding: 20px;
}

.setup-card {
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 580px;
    padding: 32px;
    animation: fadeIn 0.4s ease;
}

@media (min-width: 768px) {
    .setup-card {
        padding: 40px;
    }
}

.setup-header {
    text-align: center;
    margin-bottom: 28px;
}

.setup-icon-circle {
    width: 56px;
    height: 56px;
    background-color: var(--color-primary-light);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px auto;
    color: var(--color-primary);
}

.setup-wizard-title {
    font-size: 1.75rem;
    font-weight: 800;
}

.setup-wizard-desc {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    margin-top: 4px;
}

.setup-error-alert {
    background-color: #fee2e2;
    border: 1px solid #fecaca;
    color: #991b1b;
    border-radius: var(--radius-md);
    padding: 14px 16px;
    font-size: 0.875rem;
    margin-bottom: 24px;
    display: flex;
    align-items: start;
    gap: 10px;
}

.setup-error-icon {
    flex-shrink: 0;
    margin-top: 2px;
}

.setup-submit-btn {
    width: 100%;
    margin-top: 12px;
}

/* Form section dividers in setup card */
.setup-section-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 24px 0 12px 0;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 6px;
}

/* Database Offline Alert Box inside shop */
.db-offline-banner {
    background-color: #fffbeb;
    border: 1px solid #fef3c7;
    border-left: 4px solid var(--color-primary);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 24px;
    display: flex;
    gap: 12px;
}

.db-offline-icon {
    color: var(--color-primary);
    flex-shrink: 0;
}

.db-offline-content h4 {
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.db-offline-content p {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.db-offline-content code {
    background-color: var(--color-primary-light);
    color: var(--color-primary-dark);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    font-family: monospace;
    font-size: 0.8rem;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-pulse {
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* Helper utilities */
.text-center { text-align: center; }
.mt-4 { margin-top: 16px; }
.mr-2 { margin-right: 8px; }
.hidden { display: none !important; }

/* --- ADMIN BACKEND STYLING --- */
.admin-header {
    background-color: var(--color-text-main);
    color: white;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-sm);
}

.admin-nav {
    display: flex;
    background-color: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    padding: 0 16px;
    overflow-x: auto;
    white-space: nowrap;
}

.admin-nav-item {
    padding: 16px 20px;
    font-weight: 600;
    color: var(--color-text-muted);
    border-bottom: 3px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
}

.admin-nav-item:hover {
    color: var(--color-primary);
}

.admin-nav-item.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stats-card {
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 16px;
}

.stats-icon-box {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.stats-info {
    flex: 1;
}

.stats-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stats-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-text-main);
    margin-top: 2px;
}

.admin-table-wrapper {
    overflow-x: auto;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background-color: var(--color-surface);
    margin-top: 16px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    text-align: left;
}

.admin-table th {
    background-color: var(--color-surface-muted);
    color: var(--color-text-main);
    font-weight: 700;
    padding: 14px 16px;
    border-bottom: 2px solid var(--color-border);
}

.admin-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--color-border);
    vertical-align: top;
}

.admin-table tr:hover {
    background-color: var(--color-surface-muted);
}

.badge {
    display: inline-block;
    padding: 2px 8px;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
}

.badge-primary { background-color: var(--color-primary-light); color: var(--color-primary-dark); }
.badge-secondary { background-color: var(--color-border); color: var(--color-text-muted); }

.color-preview-box {
    width: 32px;
    height: 32px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    display: inline-block;
    vertical-align: middle;
    margin-left: 8px;
}

.admin-logo-preview {
    max-height: 80px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 6px;
    background-color: var(--color-surface-muted);
    margin-top: 8px;
}

