:root {
    --bg-light: #FAF8F5; /* Cream/Ivory */
    --card-bg: #FFFFFF;
    --border-color: #E6DFD5; /* Warm beige border */
    --espresso-dark: #2A1E17; /* Dark brown text */
    --terracotta: #661713; /* Primary brand accent */
    --gold-accent: #C5A059; /* Secondary accent */
    --text-muted: #7A6F68;
    --success: #4A7C59; /* Soft organic green */
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-light);
    color: var(--espresso-dark);
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
}

#dashboard-wrapper {
    zoom: 1.25; /* Zoom only the wrapper, keeping the overlay fixed at 100% */
}

/* Subtle background grain or glow overlay */
.glow-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image: radial-gradient(circle at 10% 20%, rgba(197, 160, 89, 0.05) 0%, transparent 50%),
                      radial-gradient(circle at 90% 80%, rgba(160, 92, 66, 0.05) 0%, transparent 50%);
    z-index: -1;
    pointer-events: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Navigation Header */
.app-header {
    display: flex;
    justify-content: center;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 24px;
    margin-bottom: 40px;
    position: relative;
    min-height: 56px;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 16px;
}

.brand-title {
    font-family: 'Instrument Serif', serif;
    font-size: 44px;
    font-style: italic;
    font-weight: 500;
    color: var(--espresso-dark);
    letter-spacing: -0.5px;
    margin: 0;
}

.app-badge {
    background: rgba(102, 23, 19, 0.08);
    color: #661713;
    border: 1px solid rgba(102, 23, 19, 0.2);
    padding: 4px 12px;
    font-size: 13px;
    border-radius: 50px;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.tabs-nav {
    display: flex;
    gap: 6px;
    background: rgba(42, 30, 23, 0.03);
    border: 1px solid var(--border-color);
    padding: 4px;
    border-radius: 14px;
}

.tab-btn {
    background: transparent;
    color: var(--text-muted);
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.tab-btn.active, .tab-btn:hover {
    color: var(--espresso-dark);
}

.tab-btn.active {
    background: var(--card-bg);
    border: 1px solid rgba(42, 30, 23, 0.08);
    box-shadow: 0 4px 12px rgba(42, 30, 23, 0.06);
}

/* Tab Content Areas */
.tab-content {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.tab-content.active {
    display: block;
}

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

/* Dashboard Grid Layout */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 30px;
    align-items: start;
}

/* Elegant Light Cards */
.glass {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 50px;
    box-shadow: 0 10px 40px rgba(42, 30, 23, 0.04), 0 2px 4px rgba(42, 30, 23, 0.02);
}

h2 {
    font-family: 'Instrument Serif', serif;
    font-size: 32px;
    font-style: italic;
    font-weight: 500;
    margin-top: 0;
    margin-bottom: 8px;
    color: var(--espresso-dark);
}

h3 {
    font-family: 'Instrument Serif', serif;
    font-size: 24px;
    font-style: italic;
    font-weight: 500;
    color: var(--terracotta);
    margin-top: 0;
    margin-bottom: 20px;
}

.subtitle {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 30px;
}

.section-divider {
    height: 1px;
    background: var(--border-color);
    margin: 30px 0;
}

/* Form Styling */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
    width: 100%;
}

.form-row {
    display: flex;
    gap: 20px;
}

label {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
}

input, select, textarea {
    background: #FCFAF7;
    border: 1px solid var(--border-color);
    color: var(--espresso-dark);
    padding: 12px 16px;
    border-radius: 12px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus, select:focus, textarea:focus {
    border-color: var(--terracotta);
    box-shadow: 0 0 0 3px rgba(160, 92, 66, 0.1);
}

input[type="file"] {
    background: transparent;
    border: 1px dashed var(--border-color);
    cursor: pointer;
    padding: 10px;
}

textarea {
    resize: vertical;
}

/* Buttons */
.btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 14px 28px;
    border-radius: 14px;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    border: none;
}

.btn-primary {
    background: #661713;
    color: #fff;
}

.btn-secondary {
    background: #FCFAF7;
    color: #661713;
    border: 1px solid #661713;
}

.btn:hover {
    transform: translateY(-1.5px);
}

.btn-primary:hover {
    background: #4E100D;
    box-shadow: 0 4px 15px rgba(102, 23, 19, 0.2);
}

.btn-secondary:hover {
    background: rgba(102, 23, 19, 0.05);
}

.btn-block {
    width: 100%;
}

/* Output Preview Area */
.preview-card {
    position: sticky;
    top: 40px;
    min-height: 500px;
    display: flex;
    flex-direction: column;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 35px;
    box-shadow: 0 10px 40px rgba(42, 30, 23, 0.04), 0 2px 4px rgba(42, 30, 23, 0.02);
}

.preview-placeholder {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--text-muted);
    padding: 40px;
}

.icon-placeholder {
    font-size: 48px;
    margin-bottom: 16px;
    color: var(--gold-accent);
}

/* Loading overlay */
.loading-state {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(250, 248, 245, 0.95);
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

.spinner {
    width: 45px;
    height: 45px;
    border: 3px solid rgba(42, 30, 23, 0.05);
    border-top: 3px solid var(--terracotta);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.hidden {
    display: none !important;
}

/* Preview Results Box */
.preview-results {
    display: flex;
    flex-direction: column;
    gap: 20px;
    height: 100%;
    flex-grow: 1;
}

.result-box {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.result-box label {
    font-size: 11px;
    color: var(--text-muted);
}

.result-box img {
    width: 100%;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 24px rgba(42, 30, 23, 0.06);
}

.result-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Lists and Cards */
.events-grid, .speakers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

.event-card, .speaker-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    overflow: hidden;
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 15px rgba(42, 30, 23, 0.02);
}

.event-card:hover, .speaker-card:hover {
    transform: translateY(-3px);
    border-color: var(--terracotta);
    box-shadow: 0 10px 30px rgba(42, 30, 23, 0.05);
}

.event-card img, .speaker-card img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    border-bottom: 1px solid var(--border-color);
}

.card-content {
    padding: 24px;
}

.card-title {
    font-family: 'Instrument Serif', serif;
    font-size: 22px;
    font-style: italic;
    font-weight: 500;
    margin: 0 0 8px 0;
    color: var(--espresso-dark);
}

.card-meta {
    font-size: 13px;
    color: var(--terracotta);
    margin-bottom: 14px;
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
    letter-spacing: 0.3px;
}

.card-description {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 24px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Responsive adjustments */
@media (max-width: 900px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    .preview-card {
        position: static;
        min-height: auto;
    }
}

.dashboard-grid:has(.preview-card.hidden) {
    display: flex;
    justify-content: center;
}

.dashboard-grid:has(.preview-card.hidden) .form-card {
    max-width: 960px;
    width: 100%;
}

.header-logo {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 48px;
    width: auto;
    object-fit: contain;
    border-radius: 4px;
}

@media (max-width: 600px) {
    .form-row {
        flex-direction: column;
        gap: 0;
    }
}

/* Login Lock Screen Overlay */
.login-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--bg-light);
    z-index: 10000;
}

.login-card {
    max-width: 420px;
    width: 90%;
    padding: 45px;
    box-shadow: 0 20px 50px rgba(42, 30, 23, 0.08);
}

/* Feedback Analytics Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(42, 30, 23, 0.4);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 20000;
    animation: modalFadeIn 0.25s ease-out;
}

.modal-card {
    max-width: 650px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    padding: 40px;
    box-shadow: 0 24px 64px rgba(42, 30, 23, 0.12);
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

@media (max-width: 680px) {
    .app-header {
        justify-content: space-between;
        min-height: auto;
    }
    .header-logo {
        position: static;
        transform: none;
        height: 32px;
    }
    .brand-title {
        font-size: 26px;
    }
    .app-badge {
        font-size: 10px;
        padding: 2px 6px;
    }
    .logo-area {
        gap: 8px;
    }
}

