:root {
    --festival-dark-green: #1B5E20;
    --festival-green: #2E7D32;
    --festival-gold: #FFD54F;
    --festival-light-green: #E6F4EA;
}

html, body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', sans-serif;
    height: 100%;
    overflow: hidden;
}

.fv-app {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

/* Top Bar */
.fv-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--festival-dark-green);
    color: white;
    padding: 6px 16px;
    min-height: 48px;
    flex-shrink: 0;
}

.fv-topbar-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.fv-logo {
    width: 36px;
    height: 36px;
}

.fv-title {
    font-size: 1.3rem;
    font-weight: 600;
    letter-spacing: 1px;
}

.fv-topbar-center {
    display: flex;
    align-items: center;
    gap: 8px;
}

.fv-year-label {
    font-weight: 500;
}

.fv-year-select {
    width: 90px;
    padding: 4px 8px;
    font-size: 0.9rem;
    border: 1px solid rgba(255,255,255,0.4);
    border-radius: 4px;
    background: var(--festival-green);
    color: white;
    cursor: pointer;
}

.fv-year-select option {
    background: white;
    color: #333;
}

.fv-topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Theme Switcher */
.fv-theme-switcher {
    display: flex;
    align-items: center;
    gap: 6px;
}

.fv-theme-label {
    font-size: 0.8rem;
    font-weight: 500;
}

.fv-theme-select {
    padding: 3px 6px;
    font-size: 0.8rem;
    border: 1px solid rgba(255,255,255,0.4);
    border-radius: 4px;
    background: var(--festival-green);
    color: white;
    cursor: pointer;
}

.fv-theme-select option,
.fv-theme-select optgroup {
    background: white;
    color: #333;
}

.fv-mode-toggle {
    padding: 3px 8px;
    font-size: 0.75rem;
    border: 1px solid rgba(255,255,255,0.4);
    border-radius: 4px;
    background: var(--festival-green);
    color: white;
    cursor: pointer;
    white-space: nowrap;
}

.fv-mode-toggle:hover {
    background: var(--festival-dark-green);
}

/* Content */
.fv-content {
    flex: 1;
    overflow: hidden;
    padding: 0;
}

/* Status Bar */
.fv-statusbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--festival-dark-green);
    color: white;
    padding: 4px 16px;
    font-size: 0.8rem;
    min-height: 28px;
    flex-shrink: 0;
}

/* Splitter fills content area */
.fv-splitter {
    height: 100% !important;
}

/* Pane content wrapper */
.fv-pane {
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Tabs fill their splitter pane */
.fv-tabs-full {
    height: 100%;
}

.fv-tabs-full > div {
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Tab content panel fills remaining height */
.fv-tabs-full .dxbl-tabs-content {
    flex: 1;
    overflow: hidden;
    min-height: 0;
}

.fv-tabs-full .dxbl-tabs-content > .dxbl-tab-content-item {
    height: 100%;
}

/* Panel header (e.g. Schicht-Übersicht) */
.fv-panel-header {
    background: var(--festival-green);
    color: white;
    padding: 4px 10px;
    font-size: 0.85rem;
    font-weight: 600;
    flex-shrink: 0;
}

/* DxGrid fills its container */
.fv-grid-full {
    height: 100%;
    min-height: 0;
    overflow: hidden;
}


/* Change detection banner */
.fv-change-banner {
    background: var(--festival-gold);
    color: #333;
    padding: 4px 12px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.fv-change-banner button {
    padding: 2px 10px;
    cursor: pointer;
}

/* Button bar */
.fv-button-bar {
    display: flex;
    gap: 4px;
    padding: 4px;
    flex-shrink: 0;
}

/* Auth Layout */
.fv-auth-layout {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: #f0f4f0;
}

.fv-login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.fv-login-card {
    background: #fff;
    border-radius: 8px;
    padding: 32px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.12);
    max-width: 420px;
    width: 100%;
}

.fv-login-card h3 {
    text-align: center;
    color: var(--festival-dark-green);
    margin-bottom: 20px;
}

.fv-login-card,
.fv-login-card label,
.fv-login-card .fv-form-group label {
    color: #333;
}

.fv-login-logo {
    display: block;
    margin: 0 auto 16px;
    height: 64px;
}

.fv-login-error {
    color: #d32f2f;
    background: #fdecea;
    padding: 8px 12px;
    border-radius: 4px;
    margin-bottom: 12px;
    font-size: 0.9rem;
}

.fv-login-success {
    color: #2e7d32;
    background: #e8f5e9;
    padding: 8px 12px;
    border-radius: 4px;
    margin-bottom: 12px;
    font-size: 0.9rem;
}

.fv-form-group {
    margin-bottom: 14px;
}

.fv-form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 4px;
    font-size: 0.9rem;
}

.fv-input {
    width: 100%;
    padding: 8px 10px;
    font-size: 0.95rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

.fv-input:focus {
    border-color: var(--festival-green);
    outline: none;
    box-shadow: 0 0 0 2px rgba(46, 125, 50, 0.2);
}

.fv-btn {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 4px;
    font-size: 0.95rem;
    text-decoration: none;
    cursor: pointer;
    border: none;
    text-align: center;
}

.fv-btn-primary {
    background: var(--festival-green);
    color: white;
}

.fv-btn-primary:hover {
    background: var(--festival-dark-green);
}

.fv-btn-secondary {
    background: transparent;
    color: var(--festival-green);
    border: 1px solid var(--festival-green);
}

.fv-btn-secondary:hover {
    background: var(--festival-light-green);
}

/* User display in topbar */
.fv-user-display {
    font-weight: 500;
    font-size: 0.85rem;
}

.fv-logout-btn {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.5);
    border-radius: 4px;
    padding: 3px 10px;
    cursor: pointer;
    color: white;
    font-size: 0.8rem;
}

.fv-logout-btn:hover {
    background: rgba(255,255,255,0.15);
}

.fv-admin-link {
    color: var(--festival-gold);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
}

.fv-admin-link:hover {
    text-decoration: underline;
}
