/* ========================================
   festmansuite – Corporate Identity CSS
   Präfix: fms-
   ======================================== */

/* --- Presentango Schriftarten ------------------------------------------- */

@font-face {
    font-family: 'Presentango';
    src: url('../fonts/Presentango-SD-Regular.woff2') format('woff2'),
         url('../fonts/Presentango-SD-Regular.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Presentango';
    src: url('../fonts/Presentango-SD-Semibold.woff2') format('woff2'),
         url('../fonts/Presentango-SD-Semibold.otf') format('opentype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Presentango';
    src: url('../fonts/Presentango-SD-Bold.woff2') format('woff2'),
         url('../fonts/Presentango-SD-Bold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* --- CI-Farbpalette (Light Mode) ---------------------------------------- */

:root {
    --fms-primary:      #581e6f;  /* Royal Purple              */
    --fms-primary-dark: #3f1550;  /* Royal Purple dunkel (Hover) */
    --fms-highlight:    #f0dc8a;  /* Festival Gold             */
    --fms-accent:       #37d6c7;  /* Arcane Cyan               */
    --fms-bg:           #ede8de;  /* Warm Parchment (gedämpfter als reines Warm White) */
    --fms-surface:      #f5f1e8;  /* Karten / erhöhte Flächen  */
    --fms-text:         #3a1548;  /* Deep Purple               */
    --fms-text-muted:   #7a5c8a;  /* gedämpftes Lila           */
    --fms-border:       rgba(58, 21, 72, 0.12);
    --fms-shadow:       rgba(58, 21, 72, 0.10);
}

/* --- CI-Farbpalette (Dark Mode) ----------------------------------------- */

[data-bs-theme="dark"] {
    color-scheme: dark;
    --fms-bg:           #1a0b28;  /* Tiefes Nacht-Lila         */
    --fms-surface:      #2a1242;  /* Karten / erhöhte Flächen  */
    --fms-text:         #e8e2d6;  /* Warm Off-White            */
    --fms-text-muted:   #b09ac0;  /* gedämpftes Lila-Grau      */
    --fms-border:       rgba(240, 220, 138, 0.15);
    --fms-shadow:       rgba(0, 0, 0, 0.35);
    /* Primary/Highlight/Accent bleiben unverändert */
}

/* --- Basis -------------------------------------------------------------- */

body {
    font-family: 'Presentango', sans-serif, system-ui;
    font-size: 16px;
    font-weight: 400;
    color: var(--fms-text);
    background-color: var(--fms-bg);
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
}

/* --- Bootstrap-Überschreibungen: Buttons -------------------------------- */

.btn {
    border-radius: 4px;
}

.btn-primary {
    background-color: var(--fms-primary);
    border-color: var(--fms-primary);
    color: #fff;
}
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary:first-child:active {
    background-color: var(--fms-primary-dark);
    border-color: var(--fms-primary-dark);
    color: #fff;
}

.btn-outline-primary {
    color: var(--fms-primary);
    border-color: var(--fms-primary);
}
.btn-outline-primary:hover,
.btn-outline-primary:focus {
    background-color: var(--fms-primary);
    border-color: var(--fms-primary);
    color: #fff;
}

[data-bs-theme="dark"] .btn-outline-primary {
    color: var(--fms-highlight);
    border-color: var(--fms-highlight);
}
[data-bs-theme="dark"] .btn-outline-primary:hover,
[data-bs-theme="dark"] .btn-outline-primary:focus {
    background-color: var(--fms-primary);
    border-color: var(--fms-primary);
    color: #fff;
}

/* --- Bootstrap-Überschreibungen: Farb-Utilities ------------------------- */

.text-primary    { color: var(--fms-primary)   !important; }
.bg-primary      { background-color: var(--fms-primary) !important; }
.text-accent     { color: var(--fms-accent)    !important; }
.text-highlight  { color: var(--fms-highlight) !important; }

[data-bs-theme="dark"] .text-primary { color: var(--fms-highlight) !important; }
[data-bs-theme="dark"] .text-muted   { color: var(--fms-text-muted) !important; }

/* --- Bootstrap-Überschreibungen: Cards ---------------------------------- */

.card {
    background-color: var(--fms-surface);
    border: 1px solid var(--fms-border);
    border-radius: 5px;
    box-shadow: 0 2px 6px var(--fms-shadow);
    margin-bottom: 1.5rem;
}
.card-header {
    border-top-left-radius: 4px !important;
    border-top-right-radius: 4px !important;
    font-weight: 600;
    border-bottom: 1px solid var(--fms-border);
}

/* CI Card-Header: Royal Purple mit Festival-Gold-Text */
.fms-card-header {
    background-color: var(--fms-primary);
    color: var(--fms-highlight);
    border-bottom: none;
}
.fms-card-header h1, .fms-card-header h2, .fms-card-header h3,
.fms-card-header h4, .fms-card-header h5, .fms-card-header h6 {
    color: var(--fms-highlight);
}

/* --- Bootstrap-Überschreibungen: Dropdowns ------------------------------ */

[data-bs-theme="dark"] .dropdown-menu {
    background-color: var(--fms-surface);
    border-color: var(--fms-border);
}
[data-bs-theme="dark"] .dropdown-item {
    color: var(--fms-text);
}
[data-bs-theme="dark"] .dropdown-item:hover,
[data-bs-theme="dark"] .dropdown-item:focus {
    background-color: var(--fms-primary);
    color: #fff;
}
[data-bs-theme="dark"] .dropdown-divider {
    border-color: var(--fms-border);
}

/* --- Bootstrap-Überschreibungen: Tabellen ------------------------------- */

[data-bs-theme="dark"] .table {
    --bs-table-bg: transparent;
    --bs-table-striped-bg: rgba(240, 220, 138, 0.04);
    --bs-table-hover-bg: rgba(240, 220, 138, 0.08);
    color: var(--fms-text);
}
[data-bs-theme="dark"] .table-light th {
    background-color: var(--fms-primary);
    color: var(--fms-highlight);
}

/* --- Bootstrap-Überschreibungen: Formulare ------------------------------ */

[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select {
    background-color: #2a1242;
    border-color: var(--fms-border);
    color: var(--fms-text);
}
[data-bs-theme="dark"] .form-control:focus,
[data-bs-theme="dark"] .form-select:focus {
    background-color: #2a1242;
    border-color: var(--fms-primary);
    color: var(--fms-text);
    box-shadow: 0 0 0 0.25rem rgba(88, 30, 111, 0.35);
}

/* --- Header & Navigation ------------------------------------------------ */

.fms-header {
    background-color: var(--fms-primary);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
}

/* Header bleibt Royal Purple auch im Dark Mode */
[data-bs-theme="dark"] .fms-header {
    background-color: var(--fms-primary-dark);
}

.fms-navbar .navbar-brand,
.fms-navbar .nav-link {
    color: #fff;
}
.fms-navbar .navbar-brand {
    font-weight: 700;
    font-size: 1.15rem;
}
.fms-navbar .navbar-brand:hover,
.fms-navbar .nav-link:hover,
.fms-navbar .nav-link.active {
    color: var(--fms-highlight);
}
.fms-navbar .navbar-toggler-icon {
    filter: invert(1);
}

/* Theme-Toggle-Button */
.fms-theme-btn {
    color: rgba(255, 255, 255, 0.8);
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.25);
    padding: 0.2rem 0.55rem;
    border-radius: 6px;
    line-height: 1.4;
    transition: color 0.2s ease, border-color 0.2s ease;
}
.fms-theme-btn:hover {
    color: var(--fms-highlight);
    border-color: var(--fms-highlight);
    background: transparent;
}

/* --- Hauptinhalt -------------------------------------------------------- */

.fms-content {
    min-height: calc(100vh - 60px - 60px);
    padding: 2rem 0;
}

/* --- Footer ------------------------------------------------------------- */

.fms-footer {
    background-color: var(--fms-primary);
    color: #fff;
    padding: 1rem 0;
    margin-top: 2rem;
}
[data-bs-theme="dark"] .fms-footer {
    background-color: var(--fms-primary-dark);
}
.fms-footer a {
    color: var(--fms-highlight);
    text-decoration: none;
}
.fms-footer a:hover {
    color: #fff;
    text-decoration: underline;
}

/* --- Startseite: Hero --------------------------------------------------- */

.fms-hero {
    background: linear-gradient(135deg, var(--fms-primary) 0%, var(--fms-primary-dark) 100%);
    color: #fff;
}
.fms-hero .display-4 {
    color: var(--fms-highlight);
}
.fms-hero hr {
    border-color: rgba(255, 255, 255, 0.3);
}

/* Hover-Effekt für Schnellzugriff-Cards */
.fms-card-hover {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.fms-card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px var(--fms-shadow);
}
.fms-card-hover .bi {
    transition: transform 0.25s ease;
}
.fms-card-hover:hover .bi {
    transform: scale(1.1);
}

/* --- Druck ------------------------------------------------------------- */

@media print {
    .no-print { display: none; }
    .fms-content { padding: 0; }
    .card {
        box-shadow: none !important;
        border: 1px solid #dee2e6 !important;
        background-color: #fff !important;
    }
    .fms-card-header {
        background-color: #f8f9fa !important;
        color: #000 !important;
        border-bottom: 1px solid #dee2e6 !important;
    }
    .badge {
        border: 1px solid #dee2e6 !important;
        background-color: transparent !important;
        color: #000 !important;
    }
    .table { width: 100% !important; }
    body { background-color: #fff !important; color: #000 !important; }
}

/* --- Responsive --------------------------------------------------------- */

@media (max-width: 768px) {
    .card { margin-bottom: 1rem; }
}
