/* ==========================================================
   WITCHTOWN RATHAUS
   TERMINKALENDER
   ========================================================== */

:root {
    --bg-darkest: #070a0e;
    --bg-dark: #0d131a;
    --bg-blue: #111b26;
    --bg-blue-light: #172432;

    --gold: #c9a55d;
    --gold-light: #e3c584;
    --gold-dark: #98753c;

    --burgundy: #6e2633;
    --burgundy-light: #914052;

    --green: #65876f;
    --green-light: #9cc0a5;

    --red: #a95765;
    --orange: #c28a50;
    --blue: #6894ba;

    --text-main: #f2ede3;
    --text-soft: #c7c8c5;
    --text-muted: #8d969e;

    --border-gold: rgba(201, 165, 93, 0.24);
    --border-light: rgba(255, 255, 255, 0.07);

    --shadow: 0 20px 55px rgba(0, 0, 0, 0.38);

    --page-width: 1450px;

    --radius-small: 8px;
    --radius-medium: 15px;
    --radius-large: 22px;
}


/* ==========================================================
   RESET
   ========================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    overflow-x: hidden;

    color: var(--text-main);

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    background:
        radial-gradient(
            circle at 8% 15%,
            rgba(91, 117, 139, 0.10),
            transparent 30%
        ),
        radial-gradient(
            circle at 92% 75%,
            rgba(110, 38, 51, 0.08),
            transparent 30%
        ),
        linear-gradient(
            180deg,
            #0a0f15 0%,
            #101923 50%,
            #080c11 100%
        );
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    border: none;
}

textarea {
    resize: vertical;
}


/* ==========================================================
   HINTERGRUND
   ========================================================== */

.background-decoration {
    position: fixed;
    inset: 0;

    overflow: hidden;

    pointer-events: none;

    z-index: 0;
}

.background-decoration::before {
    content: "";

    position: absolute;
    inset: 0;

    opacity: 0.15;

    background-image:
        linear-gradient(
            rgba(255, 255, 255, 0.018) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(255, 255, 255, 0.018) 1px,
            transparent 1px
        );

    background-size: 70px 70px;
}

.background-glow {
    position: absolute;

    border-radius: 50%;

    filter: blur(120px);
}

.glow-one {
    width: 650px;
    height: 650px;

    top: -300px;
    left: -250px;

    background: rgba(58, 88, 112, 0.18);
}

.glow-two {
    width: 600px;
    height: 600px;

    right: -250px;
    bottom: -300px;

    background: rgba(107, 34, 48, 0.12);
}


/* ==========================================================
   HEADER
   ========================================================== */

.topbar {
    position: relative;

    z-index: 50;

    min-height: 100px;

    display: flex;
    justify-content: space-between;
    align-items: center;

    gap: 25px;

    padding: 18px 5%;

    background:
        linear-gradient(
            90deg,
            rgba(6, 10, 14, 0.97),
            rgba(16, 26, 36, 0.96),
            rgba(6, 10, 14, 0.97)
        );

    border-bottom: 1px solid var(--border-gold);

    box-shadow:
        0 10px 35px rgba(0, 0, 0, 0.35);
}

.brand {
    display: flex;
    align-items: center;

    gap: 17px;
}

.brand-symbol {
    width: 55px;
    height: 55px;

    display: flex;
    justify-content: center;
    align-items: center;

    border: 1px solid rgba(201, 165, 93, 0.45);
    border-radius: 50%;

    color: var(--gold-light);

    background:
        rgba(201, 165, 93, 0.06);

    font-family:
        Georgia,
        serif;

    font-size: 18px;
    font-weight: bold;
}

.brand-text span {
    display: block;

    margin-bottom: 4px;

    color: var(--gold);

    font-size: 9px;
    font-weight: 700;

    letter-spacing: 3px;
}

.brand-text h1 {
    color: #f1ece3;

    font-family:
        Georgia,
        serif;

    font-size: 27px;
    font-weight: 400;
}

.topbar-actions {
    display: flex;
    align-items: center;

    gap: 10px;
}


/* ==========================================================
   BUTTONS
   ========================================================== */

.primary-button,
.secondary-button,
.danger-button,
.text-button,
.month-button,
.close-modal-button,
.appointment-action-button,
.archive-open-button {
    cursor: pointer;

    transition:
        transform 0.2s ease,
        background 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease;
}

.primary-button {
    min-height: 44px;

    padding: 11px 20px;

    border: 1px solid rgba(227, 197, 132, 0.25);
    border-radius: var(--radius-small);

    color: #111820;

    background:
        linear-gradient(
            135deg,
            #e0c17f,
            #ba914b
        );

    font-size: 12px;
    font-weight: 700;
}

.primary-button:hover {
    transform: translateY(-2px);

    background:
        linear-gradient(
            135deg,
            #ead092,
            #c89e56
        );
}

.secondary-button {
    min-height: 43px;

    padding: 10px 18px;

    border: 1px solid rgba(149, 171, 189, 0.20);
    border-radius: var(--radius-small);

    color: #d9e0e4;

    background: rgba(255, 255, 255, 0.025);

    font-size: 11px;
    font-weight: 700;
}

.secondary-button:hover {
    color: var(--gold-light);

    border-color: rgba(201, 165, 93, 0.34);
}

.danger-button {
    min-height: 43px;

    padding: 11px 20px;

    border: 1px solid rgba(166, 66, 83, 0.45);
    border-radius: var(--radius-small);

    color: #f0d8dc;

    background:
        linear-gradient(
            135deg,
            #7c2938,
            #551a25
        );

    font-size: 11px;
    font-weight: 700;
}

.text-button {
    padding: 7px 0;

    color: var(--gold);

    background: none;

    font-size: 11px;
    font-weight: 700;
}

.full-width-button {
    width: 100%;
}


/* ==========================================================
   MAIN
   ========================================================== */

.calendar-container {
    position: relative;

    z-index: 5;

    width: 90%;

    max-width: var(--page-width);

    margin: 0 auto;

    padding: 55px 0 90px;
}

.section-label {
    display: block;

    margin-bottom: 8px;

    color: var(--gold);

    font-size: 9px;
    font-weight: 700;

    letter-spacing: 3px;

    text-transform: uppercase;
}


/* ==========================================================
   INTRO
   ========================================================== */

.page-intro {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;

    gap: 30px;

    margin-bottom: 30px;
}

.page-intro h2 {
    margin-bottom: 8px;

    color: #f2ede4;

    font-family:
        Georgia,
        serif;

    font-size: clamp(34px, 4vw, 48px);
    font-weight: 400;
}

.page-intro p {
    color: var(--text-muted);

    font-size: 13px;

    line-height: 1.7;
}

.today-box {
    min-width: 180px;

    padding: 16px 20px;

    border: 1px solid var(--border-gold);
    border-radius: var(--radius-medium);

    text-align: right;

    background:
        rgba(201, 165, 93, 0.035);
}

.today-box span {
    display: block;

    margin-bottom: 5px;

    color: var(--gold);

    font-size: 9px;
    font-weight: 700;

    letter-spacing: 2px;
}

.today-box strong {
    font-family:
        Georgia,
        serif;

    font-size: 18px;
    font-weight: 400;
}


/* ==========================================================
   SUMMARY
   ========================================================== */

.summary-grid {
    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 16px;

    margin-bottom: 35px;
}

.summary-card {
    padding: 21px;

    border: 1px solid var(--border-light);
    border-radius: 14px;

    background:
        linear-gradient(
            145deg,
            rgba(24, 36, 47, 0.9),
            rgba(10, 17, 24, 0.94)
        );
}

.summary-card span {
    display: block;

    margin-bottom: 8px;

    color: var(--gold-dark);

    font-size: 8px;
    font-weight: 700;

    letter-spacing: 2px;
}

.summary-card strong {
    display: block;

    margin-bottom: 5px;

    color: var(--gold-light);

    font-family:
        Georgia,
        serif;

    font-size: 29px;
    font-weight: 400;
}

.summary-card p {
    color: var(--text-muted);

    font-size: 10px;
}


/* ==========================================================
   NÄCHSTE TERMINE
   ========================================================== */

.next-section {
    margin-bottom: 35px;
}

.section-heading-row {
    margin-bottom: 15px;
}

.section-heading-row h2,
.filter-header h2 {
    color: #eee9e0;

    font-family:
        Georgia,
        serif;

    font-size: 25px;
    font-weight: 400;
}

.next-appointments {
    display: grid;

    grid-template-columns:
        repeat(5, minmax(0, 1fr));

    gap: 12px;
}

.next-card {
    --officer-color: var(--gold);

    position: relative;

    min-height: 145px;

    padding: 17px 16px 16px 19px;

    overflow: hidden;

    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;

    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.025),
            rgba(255, 255, 255, 0.008)
        );
}

.next-card::before {
    content: "";

    position: absolute;

    left: 0;
    top: 0;

    width: 3px;
    height: 100%;

    background: var(--officer-color);
}

.next-date {
    margin-bottom: 8px;

    color: var(--gold-light);

    font-size: 11px;
    font-weight: 700;
}

.next-officer {
    margin-bottom: 6px;

    color: var(--officer-color);

    font-family:
        Georgia,
        serif;

    font-size: 15px;
    font-weight: 700;
}

.next-citizen {
    margin-bottom: 6px;

    color: #d3d7d8;

    font-size: 10px;
}

.next-type {
    color: var(--text-muted);

    font-size: 9px;
}

.next-empty {
    grid-column: 1 / -1;

    padding: 22px;

    border: 1px solid var(--border-light);
    border-radius: 12px;

    color: var(--text-muted);

    text-align: center;

    font-size: 11px;
}


/* ==========================================================
   FILTER
   ========================================================== */

.filter-section {
    margin-bottom: 22px;

    padding: 24px;

    border: 1px solid var(--border-light);
    border-radius: 15px;

    background:
        rgba(255, 255, 255, 0.015);
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;

    gap: 20px;

    margin-bottom: 19px;
}

.filter-grid {
    display: grid;

    grid-template-columns:
        1fr
        1fr
        1fr
        1.4fr;

    gap: 14px;
}

.filter-group label {
    display: block;

    margin-bottom: 7px;

    color: #bfc6c9;

    font-size: 10px;
    font-weight: 700;
}

.filter-group input,
.filter-group select {
    width: 100%;

    min-height: 42px;

    padding: 10px 12px;

    outline: none;

    border: 1px solid rgba(139, 162, 180, 0.14);
    border-radius: 8px;

    color: #e7e9e8;

    background: rgba(3, 9, 14, 0.50);

    font-size: 11px;
}

.filter-group input:focus,
.filter-group select:focus {
    border-color: rgba(201, 165, 93, 0.48);
}


/* ==========================================================
   BEAMTENLEGENDE
   ========================================================== */

.officer-legend-section {
    margin-bottom: 22px;
}

.officer-legend {
    display: flex;
    flex-wrap: wrap;

    gap: 8px;
}

.officer-legend-item {
    --officer-color: var(--gold);

    display: flex;
    align-items: center;

    gap: 7px;

    padding: 7px 10px;

    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 20px;

    color: #c8ced0;

    background: rgba(255, 255, 255, 0.018);

    font-size: 9px;
}

.officer-color-dot {
    width: 8px;
    height: 8px;

    border-radius: 50%;

    background: var(--officer-color);

    box-shadow:
        0 0 8px var(--officer-color);
}


/* ==========================================================
   KALENDER
   ========================================================== */

.calendar-layout {
    display: grid;

    grid-template-columns:
        minmax(0, 1.8fr)
        minmax(330px, 0.8fr);

    gap: 26px;

    align-items: start;
}

.calendar-card,
.day-panel,
.archive-section {
    border: 1px solid var(--border-light);
    border-radius: var(--radius-large);

    background:
        linear-gradient(
            145deg,
            rgba(17, 28, 38, 0.96),
            rgba(8, 16, 23, 0.98)
        );

    box-shadow: var(--shadow);
}

.calendar-card {
    overflow: hidden;
}

.calendar-header {
    min-height: 90px;

    display: flex;
    justify-content: space-between;
    align-items: center;

    gap: 20px;

    padding: 22px 26px;

    border-bottom:
        1px solid rgba(201, 165, 93, 0.12);
}

.month-title {
    text-align: center;
}

.month-title span {
    display: block;

    margin-bottom: 5px;

    color: var(--gold-dark);

    font-size: 8px;
    font-weight: 700;

    letter-spacing: 3px;
}

.month-title h3 {
    color: #eee9e0;

    font-family:
        Georgia,
        serif;

    font-size: 26px;
    font-weight: 400;
}

.month-button {
    width: 43px;
    height: 43px;

    display: flex;
    justify-content: center;
    align-items: center;

    border: 1px solid rgba(201, 165, 93, 0.18);
    border-radius: 50%;

    color: var(--gold);

    background:
        rgba(255, 255, 255, 0.02);

    font-size: 26px;
}

.month-button:hover {
    border-color:
        rgba(201, 165, 93, 0.42);

    background:
        rgba(201, 165, 93, 0.055);
}

.weekday-row {
    display: grid;

    grid-template-columns:
        repeat(7, 1fr);

    border-bottom: 1px solid var(--border-light);
}

.weekday-row div {
    padding: 14px 8px;

    text-align: center;

    color: #8f9ca5;

    font-size: 10px;
    font-weight: 700;
}

.calendar-grid {
    display: grid;

    grid-template-columns:
        repeat(7, 1fr);

    min-height: 610px;
}

.calendar-day {
    position: relative;

    min-height: 115px;

    padding: 13px;

    border-right:
        1px solid rgba(255, 255, 255, 0.045);

    border-bottom:
        1px solid rgba(255, 255, 255, 0.045);

    background:
        rgba(255, 255, 255, 0.008);

    cursor: pointer;
}

.calendar-day:hover {
    background:
        rgba(201, 165, 93, 0.035);
}

.calendar-day:nth-child(7n) {
    border-right: none;
}

.calendar-day-number {
    width: 31px;
    height: 31px;

    display: flex;
    justify-content: center;
    align-items: center;

    border-radius: 50%;

    color: #c9d0d4;

    font-size: 12px;
    font-weight: 700;
}

.calendar-day.other-month {
    opacity: 0.32;
}

.calendar-day.today .calendar-day-number {
    color: #111820;

    background: var(--gold);
}

.calendar-day.selected {
    background:
        rgba(201, 165, 93, 0.07);

    box-shadow:
        inset 0 0 0 1px
        rgba(201, 165, 93, 0.28);
}

.calendar-day.has-appointments::after {
    content: "";

    position: absolute;

    right: 13px;
    top: 14px;

    width: 6px;
    height: 6px;

    border-radius: 50%;

    background: var(--burgundy-light);
}

.calendar-day-count {
    position: absolute;

    left: 13px;
    bottom: 11px;

    padding: 4px 7px;

    border: 1px solid rgba(201, 165, 93, 0.16);
    border-radius: 20px;

    color: var(--gold);

    background:
        rgba(201, 165, 93, 0.045);

    font-size: 8px;
    font-weight: 700;
}


/* ==========================================================
   TAGESPANEL
   ========================================================== */

.day-panel {
    position: sticky;

    top: 20px;

    min-height: 550px;

    padding: 27px;
}

.day-panel-header {
    padding-bottom: 20px;

    margin-bottom: 15px;

    border-bottom:
        1px solid rgba(201, 165, 93, 0.12);
}

.day-panel-header h3 {
    margin-bottom: 7px;

    font-family:
        Georgia,
        serif;

    font-size: 25px;
    font-weight: 400;
}

.day-panel-header p {
    color: var(--text-muted);

    font-size: 10px;
}

.day-statistics {
    display: flex;
    flex-wrap: wrap;

    gap: 7px;

    margin-bottom: 17px;
}

.day-stat {
    padding: 5px 8px;

    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 20px;

    color: #adb5b8;

    background:
        rgba(255, 255, 255, 0.018);

    font-size: 8px;
}

.appointment-list {
    display: flex;
    flex-direction: column;

    gap: 13px;

    min-height: 300px;

    margin-bottom: 20px;
}

.empty-state {
    min-height: 260px;

    display: flex;
    flex-direction: column;

    justify-content: center;
    align-items: center;

    text-align: center;

    color: var(--text-muted);
}

.empty-state-symbol {
    width: 45px;
    height: 45px;

    display: flex;
    justify-content: center;
    align-items: center;

    margin-bottom: 14px;

    border: 1px solid var(--border-gold);
    border-radius: 50%;

    color: var(--gold);

    font-size: 22px;
}

.empty-state h4 {
    margin-bottom: 6px;

    color: #ddd9d1;

    font-family:
        Georgia,
        serif;

    font-size: 18px;
    font-weight: 400;
}

.empty-state p {
    max-width: 240px;

    font-size: 10px;

    line-height: 1.6;
}


/* ==========================================================
   TERMIN-KARTE
   ========================================================== */

.appointment-card {
    --officer-color: #c9a55d;
    --officer-soft: rgba(201, 165, 93, 0.08);
    --officer-border: rgba(201, 165, 93, 0.28);

    position: relative;

    overflow: hidden;

    padding: 17px 17px 16px 20px;

    border: 1px solid var(--officer-border);
    border-radius: 12px;

    background:
        linear-gradient(
            135deg,
            var(--officer-soft),
            rgba(255, 255, 255, 0.01)
        );
}

.appointment-card::before {
    content: "";

    position: absolute;

    left: 0;
    top: 0;

    width: 4px;
    height: 100%;

    background: var(--officer-color);
}

.appointment-card.past {
    opacity: 0.72;
}

.appointment-card.status-Erledigt {
    opacity: 0.62;
}

.appointment-card.status-Abgesagt {
    opacity: 0.55;
}

.appointment-time {
    margin-bottom: 6px;

    color: var(--gold-light);

    font-size: 14px;
    font-weight: 700;
}

.appointment-officer {
    margin-bottom: 5px;

    color: var(--officer-color);

    font-family:
        Georgia,
        serif;

    font-size: 17px;
    font-weight: 700;
}

.appointment-citizen {
    margin-bottom: 7px;

    color: #e0ded9;

    font-size: 10px;
}

.appointment-type {
    color: var(--text-muted);

    font-size: 10px;
}

.appointment-notes {
    margin-top: 11px;

    padding: 9px 10px;

    border-left:
        2px solid rgba(201, 165, 93, 0.26);

    color: #a8b1b4;

    background:
        rgba(0, 0, 0, 0.12);

    font-size: 9px;

    line-height: 1.6;
}

.appointment-meta {
    display: flex;
    flex-wrap: wrap;

    gap: 6px;

    margin-top: 10px;
}

.appointment-number,
.appointment-status {
    display: inline-flex;
    align-items: center;

    min-height: 23px;

    padding: 4px 8px;

    border-radius: 20px;

    font-size: 8px;
    font-weight: 700;
}

.appointment-number {
    border: 1px solid rgba(201, 165, 93, 0.15);

    color: var(--gold);

    background:
        rgba(201, 165, 93, 0.04);
}

.appointment-status {
    border: 1px solid rgba(255, 255, 255, 0.09);

    color: #bfc6c9;

    background:
        rgba(255, 255, 255, 0.025);
}

.status-Geplant {
    color: #b7c6d1;
}

.status-Bestätigt {
    color: #91b9d8;
}

.status-Wartet {
    color: #dbb576;
}

.status-Erledigt {
    color: var(--green-light);
}

.status-Abgesagt,
.status-Nicht-erschienen {
    color: #dc8997;
}

.appointment-actions {
    display: flex;
    flex-wrap: wrap;

    gap: 6px;

    margin-top: 13px;

    padding-top: 11px;

    border-top:
        1px solid rgba(255, 255, 255, 0.05);
}

.appointment-action-button {
    padding: 6px 8px;

    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;

    color: #9fa9ae;

    background:
        rgba(255, 255, 255, 0.018);

    font-size: 8px;
    font-weight: 700;
}

.appointment-action-button:hover {
    color: var(--gold-light);

    border-color:
        rgba(201, 165, 93, 0.28);
}

.appointment-action-button.success {
    color: var(--green-light);
}

.appointment-action-button.danger:hover {
    color: #dc8997;

    border-color:
        rgba(169, 87, 101, 0.4);
}


/* ==========================================================
   KALENDER LEGENDE
   ========================================================== */

.calendar-legend {
    display: flex;
    justify-content: space-between;
    align-items: center;

    gap: 20px;

    margin-top: 20px;

    padding: 14px 18px;

    border: 1px solid var(--border-light);
    border-radius: 12px;

    background:
        rgba(255, 255, 255, 0.015);
}

.legend-information {
    display: flex;
    align-items: center;

    gap: 9px;
}

.legend-information p {
    color: var(--text-muted);

    font-size: 9px;
}

.legend-dot {
    width: 7px;
    height: 7px;

    border-radius: 50%;

    background: var(--burgundy-light);
}


/* ==========================================================
   ARCHIV
   ========================================================== */

.archive-section {
    margin-top: 65px;

    padding: 34px;
}

.archive-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;

    gap: 25px;

    padding-bottom: 25px;

    margin-bottom: 20px;

    border-bottom:
        1px solid rgba(201, 165, 93, 0.12);
}

.archive-header h2 {
    margin-bottom: 8px;

    font-family:
        Georgia,
        serif;

    font-size: 32px;
    font-weight: 400;
}

.archive-header p {
    color: var(--text-muted);

    font-size: 11px;

    line-height: 1.6;
}

.archive-counter {
    min-width: 190px;

    padding: 14px 18px;

    border: 1px solid rgba(201, 165, 93, 0.15);
    border-radius: 12px;

    text-align: right;
}

.archive-counter span {
    display: block;

    margin-bottom: 5px;

    color: var(--gold-dark);

    font-size: 8px;
    font-weight: 700;
}

.archive-counter strong {
    font-family:
        Georgia,
        serif;

    font-size: 15px;
    font-weight: 400;
}

.archive-filters {
    display: flex;
    align-items: flex-end;

    gap: 12px;

    margin-bottom: 22px;
}

.archive-filters .filter-group {
    min-width: 180px;
}

.archive-statistics {
    display: grid;

    grid-template-columns:
        repeat(auto-fit, minmax(180px, 1fr));

    gap: 10px;

    margin-bottom: 25px;
}

.archive-stat-card {
    padding: 14px 15px;

    border: 1px solid rgba(255, 255, 255, 0.055);
    border-radius: 10px;

    background:
        rgba(255, 255, 255, 0.014);
}

.archive-stat-card span {
    display: block;

    margin-bottom: 5px;

    color: var(--text-muted);

    font-size: 8px;
}

.archive-stat-card strong {
    color: var(--gold-light);

    font-family:
        Georgia,
        serif;

    font-size: 17px;
    font-weight: 400;
}

.past-appointments-list {
    display: flex;
    flex-direction: column;

    gap: 20px;
}

.archive-group {
    overflow: hidden;

    border: 1px solid rgba(255, 255, 255, 0.055);
    border-radius: 14px;

    background:
        rgba(255, 255, 255, 0.01);
}

.archive-group-header {
    width: 100%;

    display: flex;
    justify-content: space-between;
    align-items: center;

    gap: 20px;

    padding: 16px 19px;

    border-bottom:
        1px solid rgba(201, 165, 93, 0.10);

    color: inherit;

    background:
        rgba(201, 165, 93, 0.035);

    cursor: pointer;

    text-align: left;
}

.archive-group-header h3 {
    color: var(--gold-light);

    font-family:
        Georgia,
        serif;

    font-size: 19px;
    font-weight: 400;
}

.archive-group-header-right {
    display: flex;
    align-items: center;

    gap: 12px;
}

.archive-group-count {
    color: var(--gold);

    font-size: 8px;
    font-weight: 700;
}

.archive-chevron {
    color: var(--gold);

    font-size: 17px;
}

.archive-items.collapsed {
    display: none;
}

.archive-item {
    --officer-color: var(--gold);

    position: relative;

    display: grid;

    grid-template-columns:
        150px
        minmax(170px, 1fr)
        minmax(150px, 0.8fr)
        auto;

    align-items: center;

    gap: 18px;

    padding: 16px 18px 16px 22px;

    border-bottom:
        1px solid rgba(255, 255, 255, 0.04);
}

.archive-item:last-child {
    border-bottom: none;
}

.archive-item::before {
    content: "";

    position: absolute;

    left: 0;
    top: 15%;

    width: 3px;
    height: 70%;

    background: var(--officer-color);
}

.archive-date strong {
    display: block;

    margin-bottom: 3px;

    color: #dedbd5;

    font-size: 11px;
}

.archive-date span {
    color: var(--text-muted);

    font-size: 9px;
}

.archive-officer {
    margin-bottom: 4px;

    color: var(--officer-color);

    font-family:
        Georgia,
        serif;

    font-size: 15px;
    font-weight: 700;
}

.archive-citizen {
    color: #afb6b8;

    font-size: 9px;
}

.archive-number {
    color: var(--gold);

    font-size: 9px;
    font-weight: 700;
}

.archive-open-button {
    padding: 7px 10px;

    border: 1px solid rgba(201, 165, 93, 0.16);
    border-radius: 7px;

    color: var(--gold-light);

    background:
        rgba(201, 165, 93, 0.035);

    font-size: 8px;
    font-weight: 700;
}

.archive-empty {
    padding: 50px 20px;

    color: var(--text-muted);

    text-align: center;

    font-size: 11px;
}


/* ==========================================================
   MODALS
   ========================================================== */

.modal-overlay {
    position: fixed;

    inset: 0;

    z-index: 2000;

    display: none;
    justify-content: center;
    align-items: center;

    padding: 25px;

    background:
        rgba(2, 5, 8, 0.80);

    backdrop-filter: blur(10px);
}

.modal-overlay.active {
    display: flex;
}

.modal {
    width: 100%;

    max-width: 700px;
    max-height: 90vh;

    overflow-y: auto;

    padding: 31px;

    border: 1px solid rgba(201, 165, 93, 0.22);
    border-radius: 20px;

    background:
        linear-gradient(
            145deg,
            #18232d,
            #0d151d
        );

    box-shadow:
        0 30px 90px rgba(0, 0, 0, 0.65);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;

    gap: 25px;

    padding-bottom: 21px;

    margin-bottom: 23px;

    border-bottom:
        1px solid rgba(201, 165, 93, 0.13);
}

.modal-header h2,
.confirmation-modal h2 {
    color: #f0ebe2;

    font-family:
        Georgia,
        serif;

    font-size: 28px;
    font-weight: 400;
}

.close-modal-button {
    width: 38px;
    height: 38px;

    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50%;

    color: #a8b0b5;

    background:
        rgba(255, 255, 255, 0.018);

    font-size: 21px;
}

.modal-description {
    margin-bottom: 20px;

    color: var(--text-muted);

    font-size: 10px;

    line-height: 1.7;
}


/* ==========================================================
   TERMIN FORMULAR
   ========================================================== */

.form-grid {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 19px;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    display: block;

    margin-bottom: 7px;

    color: #d9d7d1;

    font-size: 10px;
    font-weight: 700;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;

    min-height: 44px;

    padding: 10px 12px;

    outline: none;

    border: 1px solid rgba(139, 162, 180, 0.14);
    border-radius: 8px;

    color: #e7e9e8;

    background:
        rgba(3, 9, 14, 0.48);

    font-size: 11px;
}

.form-group textarea {
    min-height: 100px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color:
        rgba(201, 165, 93, 0.48);
}

.form-group input[readonly] {
    color: var(--gold);
}

.form-group input:disabled,
.form-group select:disabled,
.form-group textarea:disabled {
    opacity: 0.52;

    cursor: not-allowed;
}

input[type="date"],
input[type="time"],
select {
    color-scheme: dark;
}

.conflict-warning {
    margin-top: 18px;

    padding: 13px 14px;

    border: 1px solid rgba(194, 138, 80, 0.35);
    border-radius: 9px;

    color: #e1bc8d;

    background:
        rgba(194, 138, 80, 0.07);

    font-size: 10px;

    line-height: 1.6;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;

    gap: 10px;

    margin-top: 27px;

    padding-top: 20px;

    border-top:
        1px solid rgba(255, 255, 255, 0.055);
}


/* ==========================================================
   BEAMTENVERWALTUNG
   ========================================================== */

.officer-modal {
    max-width: 620px;
}

.officer-add-form {
    display: grid;

    grid-template-columns:
        1fr auto;

    gap: 10px;

    margin-bottom: 22px;
}

.officer-add-form input {
    min-height: 44px;

    padding: 10px 12px;

    outline: none;

    border: 1px solid rgba(139, 162, 180, 0.14);
    border-radius: 8px;

    color: #e7e9e8;

    background:
        rgba(3, 9, 14, 0.48);
}

.officer-management-list {
    display: flex;
    flex-direction: column;

    gap: 8px;
}

.officer-management-item {
    --officer-color: var(--gold);

    display: flex;
    justify-content: space-between;
    align-items: center;

    gap: 15px;

    padding: 11px 13px;

    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 9px;

    background:
        rgba(255, 255, 255, 0.015);
}

.officer-management-name {
    display: flex;
    align-items: center;

    gap: 9px;

    color: #d9dedf;

    font-size: 11px;
}

.officer-remove-button {
    padding: 6px 9px;

    border: 1px solid rgba(169, 87, 101, 0.25);
    border-radius: 6px;

    color: #d78f9a;

    background:
        rgba(169, 87, 101, 0.04);

    cursor: pointer;

    font-size: 8px;
    font-weight: 700;
}

.officer-hint {
    margin-top: 18px;

    color: #707c82;

    font-size: 9px;

    line-height: 1.6;
}


/* ==========================================================
   LÖSCHMODAL
   ========================================================== */

.confirmation-modal {
    max-width: 480px;

    text-align: center;
}

.confirmation-symbol {
    width: 55px;
    height: 55px;

    display: flex;
    justify-content: center;
    align-items: center;

    margin: 0 auto 18px;

    border: 1px solid rgba(145, 64, 82, 0.42);
    border-radius: 50%;

    color: #dc94a1;

    background:
        rgba(110, 38, 51, 0.07);

    font-size: 24px;
}

.confirmation-modal p {
    max-width: 350px;

    margin: 13px auto 0;

    color: var(--text-muted);

    font-size: 10px;

    line-height: 1.7;
}

.centered-actions {
    justify-content: center;
}


/* ==========================================================
   FOOTER
   ========================================================== */

.footer {
    position: relative;

    z-index: 5;

    padding: 35px 20px;

    border-top:
        1px solid rgba(201, 165, 93, 0.10);

    text-align: center;

    background:
        rgba(5, 9, 13, 0.92);
}

.footer p {
    margin-bottom: 5px;

    color: #c2beb5;

    font-family:
        Georgia,
        serif;

    font-size: 13px;
}

.footer span {
    color: #68737a;

    font-size: 8px;
    font-weight: 700;

    letter-spacing: 2px;
}


/* ==========================================================
   SCROLLBAR
   ========================================================== */

::-webkit-scrollbar {
    width: 9px;
}

::-webkit-scrollbar-track {
    background: #070b0f;
}

::-webkit-scrollbar-thumb {
    border-radius: 20px;

    background:
        linear-gradient(
            180deg,
            #596e7d,
            #97743d
        );
}


/* ==========================================================
   RESPONSIVE
   ========================================================== */

@media (max-width: 1200px) {

    .next-appointments {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));
    }

}


@media (max-width: 1050px) {

    .calendar-layout {
        grid-template-columns: 1fr;
    }

    .day-panel {
        position: relative;
        top: auto;
    }

    .summary-grid {
        grid-template-columns:
            repeat(2, 1fr);
    }

    .filter-grid {
        grid-template-columns:
            repeat(2, 1fr);
    }

}


@media (max-width: 800px) {

    .topbar {
        flex-direction: column;

        align-items: stretch;
    }

    .brand {
        justify-content: center;
    }

    .topbar-actions {
        justify-content: center;
    }

    .page-intro,
    .archive-header {
        flex-direction: column;

        align-items: flex-start;
    }

    .today-box,
    .archive-counter {
        width: 100%;

        text-align: left;
    }

    .next-appointments {
        grid-template-columns:
            repeat(2, 1fr);
    }

    .archive-item {
        grid-template-columns:
            1fr
            1fr;
    }

    .archive-filters {
        flex-wrap: wrap;
    }

}


@media (max-width: 600px) {

    .calendar-container {
        width: 94%;
    }

    .summary-grid,
    .filter-grid,
    .next-appointments {
        grid-template-columns: 1fr;
    }

    .topbar-actions {
        flex-direction: column;
    }

    .topbar-actions button {
        width: 100%;
    }

    .calendar-day {
        min-height: 72px;

        padding: 6px;
    }

    .calendar-day-count {
        display: none;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-group.full-width {
        grid-column: auto;
    }

    .appointment-actions {
        flex-direction: column;
    }

    .appointment-action-button {
        width: 100%;
    }

    .archive-section {
        padding: 25px 18px;
    }

    .archive-item {
        display: flex;
        flex-direction: column;

        align-items: flex-start;
    }

    .archive-open-button {
        width: 100%;
    }

    .officer-add-form {
        grid-template-columns: 1fr;
    }

    .modal {
        padding: 23px 19px;
    }

    .modal-actions {
        flex-direction: column-reverse;
    }

    .modal-actions button {
        width: 100%;
    }

}