/*
 * Design language extracted from
 * ReparaturCafe_Bedienoberflaeche_Demo_mit_Slotverwaltung_07-11-2026.html
 *
 * All rules are class based (no raw element selectors), so they can be
 * applied like Bootstrap classes without styling elements implicitly.
 * Note: `.btn` intentionally overrides the Bootstrap button look from the
 * demo; it must be loaded after the Bootstrap stylesheet.
 */

/* ---------------------------------------------------------------------------
 * Design tokens
 * ------------------------------------------------------------------------- */

:root {
    --navy: #183653;
    --blue: #2d6382;
    --teal: #19758a;
    --ink: #263746;
    --muted: #647586;
    --line: #d7e0e7;
    --bg: #f2f5f8;
    --pale: #eaf2f6;
    --white: #fff;
    --green: #e8f4ec;
    --amber: #fff3d9;
    --red: #b3474d;
}

/* ---------------------------------------------------------------------------
 * Page scaffold
 * ------------------------------------------------------------------------- */

.app-body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font: 14px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif;
}

.app-header {
    background: var(--navy);
    color: #fff;
    padding: 21px clamp(16px, 4vw, 42px);
}

.app-header .eyebrow {
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    opacity: 0.8;
}

.app-header h1 {
    font-size: 27px;
    margin: 3px 0;
}

.app-header p {
    margin: 0;
    color: #d8e5ec;
}

.layout {
    max-width: 1550px;
    margin: 18px auto;
    padding: 0 15px 35px;
    display: grid;
    grid-template-columns: 225px minmax(0, 1fr);
    gap: 16px;
}

.sidebar,
.main {
    background: white;
    border: 1px solid var(--line);
    border-radius: 13px;
    box-shadow: 0 3px 14px #18384b08;
}

.sidebar {
    padding: 12px;
    height: max-content;
    position: sticky;
    top: 12px;
}

.sidebar nav {
    display: grid;
    gap: 5px;
}

.aside-note {
    border-top: 1px solid var(--line);
    margin-top: 13px;
    padding: 12px 5px 2px;
    color: var(--muted);
    font-size: 11px;
}

.main {
    padding: clamp(15px, 2.7vw, 27px);
    min-width: 0;
}

/* ---------------------------------------------------------------------------
 * Navigation buttons and views
 * ------------------------------------------------------------------------- */

.navbtn {
    border: 0;
    border-radius: 8px;
    padding: 11px;
    text-align: left;
    background: transparent;
    color: var(--ink);
    font: inherit;
    cursor: pointer;
}

.navbtn small {
    display: block;
    color: var(--muted);
    font-size: 11px;
}

.navbtn.active,
.navbtn:hover {
    background: var(--pale);
    color: var(--teal);
    font-weight: 650;
}

.view {
    display: none;
}

.view.active {
    display: block;
}

.viewhead {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.viewhead h2 {
    margin: 0;
    font-size: 23px;
}

.viewhead p {
    margin: 4px 0 0;
    color: var(--muted);
}

/* ---------------------------------------------------------------------------
 * Metrics
 * ------------------------------------------------------------------------- */

.metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin: 14px 0 20px;
}

.metric {
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 13px;
}

.metric strong {
    display: block;
    font-size: 25px;
    color: var(--navy);
}

.metric span {
    font-size: 12px;
    color: var(--muted);
}

/* ---------------------------------------------------------------------------
 * Forms
 * ------------------------------------------------------------------------- */

.notice {
    padding: 11px 13px;
    border: 1px solid #ead7a6;
    background: #fff8e8;
    border-radius: 8px;
    font-size: 12px;
    margin: 0 0 16px;
}

.toolbar {
    display: flex;
    gap: 8px;
    align-items: end;
    flex-wrap: wrap;
    margin: 12px 0;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 150px;
    flex: 1;
}

.field label {
    font-size: 11px;
    font-weight: 700;
    color: #526476;
}

.field input,
.field select,
.field textarea {
    font: inherit;
    color: var(--ink);
    width: 100%;
    padding: 8px 9px;
    border: 1px solid #cbd6df;
    border-radius: 7px;
    background: #fff;
}

.field textarea {
    min-height: 70px;
}

.formpanel {
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 14px;
    margin: 15px 0;
    background: #fbfcfd;
}

.formpanel h3 {
    margin: 0 0 10px;
}

.formgrid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.sectiontitle {
    font-size: 16px;
    margin: 20px 0 8px;
}

/* ---------------------------------------------------------------------------
 * Buttons
 * ------------------------------------------------------------------------- */

.btn {
    border: 1px solid var(--line);
    border-radius: 7px;
    padding: 8px 11px;
    background: #fff;
    color: var(--ink);
    font: inherit;
    cursor: pointer;
    white-space: nowrap;
}

.btn.primary {
    background: var(--teal);
    border-color: var(--teal);
    color: #fff;
}

.btn:hover {
    filter: brightness(0.97);
}

.btn.err {
    background: var(--red);
    border-color: var(--red);
    color: #fff;
}

/* ---------------------------------------------------------------------------
 * Tables
 * ------------------------------------------------------------------------- */

.tablewrap {
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 9px;
    margin-top: 9px;
}

.tablewrap table {
    border-collapse: collapse;
    width: 100%;
    min-width: 850px;
}

.tablewrap th,
.tablewrap td {
    padding: 8px 9px;
    text-align: left;
    border-bottom: 1px solid #e5ebf0;
    vertical-align: middle;
    font-size: 12px;
}

.tablewrap th {
    background: #f0f4f7;
    color: #526476;
    font-size: 11px;
    white-space: nowrap;
    position: sticky;
    top: 0;
}

.tablewrap th button {
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    font-weight: 750;
    cursor: pointer;
    padding: 0;
}

.tablewrap tbody tr:hover {
    background: #f7fafb;
}

.tablewrap td select {
    max-width: 180px;
    padding: 5px;
    border: 1px solid #d2dce4;
    border-radius: 5px;
    background: #fff;
    font-size: 11px;
}

/* ---------------------------------------------------------------------------
 * Pills / status badges
 * ------------------------------------------------------------------------- */

.pill {
    display: inline-block;
    padding: 3px 7px;
    border-radius: 20px;
    background: #edf2f6;
    font-size: 10px;
    white-space: nowrap;
}

.pill.done {
    background: var(--green);
}

.pill.warn {
    background: var(--amber);
}

.pill.info {
    background: var(--pale);
    color: var(--teal);
}

.pill.err {
    background: #fdeaea;
    color: var(--red);
}

/* ---------------------------------------------------------------------------
 * Helper cards and slot board
 * ------------------------------------------------------------------------- */

.helpercards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.helper {
    border: 1px solid var(--line);
    border-radius: 9px;
    padding: 11px;
}

.helper strong {
    display: block;
}

.helper small {
    color: var(--muted);
}

.slotgrid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px;
}

.slotcard {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px;
    background: #fbfcfd;
}

.slotcard b {
    display: block;
}

.slotcard small {
    color: var(--muted);
}

.slot-free {
    background: var(--green);
}

.slot-work {
    background: var(--amber);
}

/* ---------------------------------------------------------------------------
 * Notices (the base notice is the warning style; this is the info variant)
 * ------------------------------------------------------------------------- */

.notice-info {
    background: var(--pale);
    border-color: #bcd6e2;
}

/* ---------------------------------------------------------------------------
 * Sidebar navigation (navbtn works for links as well as buttons)
 * ------------------------------------------------------------------------- */

a.navbtn {
    display: block;
    text-decoration: none;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 4px 12px;
}

.sidebar-brand span {
    font-size: 18px;
    color: var(--ink);
}

/* ---------------------------------------------------------------------------
 * Misc components
 * ------------------------------------------------------------------------- */

.empty {
    padding: 22px;
    text-align: center;
    color: var(--muted);
}

.countline {
    font-size: 12px;
    color: var(--muted);
    margin: 7px 0;
}

/* ---------------------------------------------------------------------------
 * Modals (markup compatible with the Bootstrap 5 JavaScript bundle)
 * ------------------------------------------------------------------------- */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1055;
    display: none;
    width: 100%;
    height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    outline: 0;
}

.modal.fade .modal-dialog {
    transition: transform 0.3s ease-out;
    transform: translate(0, -50px);
}

.modal.show .modal-dialog {
    transform: none;
}

.modal-dialog {
    position: relative;
    width: auto;
    margin: 1.75rem auto;
    max-width: 500px;
}

.modal-dialog.modal-lg {
    max-width: 800px;
}

.modal-content {
    position: relative;
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 13px;
    box-shadow: 0 3px 14px #18384b33;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
}

.modal-title {
    margin: 0;
    font-size: 18px;
}

.modal-body {
    flex: 1 1 auto;
    padding: 16px;
}

.modal-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
    padding: 12px 16px;
    border-top: 1px solid var(--line);
}

.btn-close {
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
}

.btn-close::before {
    content: "\d7";
}

.modal-scroll {
    height: 500px;
    overflow: auto;
}

.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1050;
    width: 100vw;
    height: 100vh;
    background-color: #000;
}

.modal-backdrop.show {
    opacity: 0.5;
}

body.modal-open {
    overflow: hidden;
}

/* ---------------------------------------------------------------------------
 * Popovers (minimal styling for the Bootstrap 5 popover JS)
 * ------------------------------------------------------------------------- */

.popover {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1080;
    max-width: 276px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 9px;
    box-shadow: 0 3px 14px #18384b33;
    font-size: 12px;
}

.popover-header {
    padding: 8px 12px;
    margin: 0;
    font-size: 12px;
    font-weight: 700;
    color: var(--ink);
    background: #f0f4f7;
    border-bottom: 1px solid var(--line);
    border-radius: 9px 9px 0 0;
}

.popover-body {
    padding: 8px 12px;
    color: var(--ink);
}

/* ---------------------------------------------------------------------------
 * Utilities
 * ------------------------------------------------------------------------- */

.muted {
    color: var(--muted);
}

.text-sm {
    font-size: 12px;
}

.full {
    grid-column: 1 / -1;
}

.right {
    margin-left: auto;
}

.hidden {
    display: none !important;
}

.mt-0 {
    margin-top: 0;
}

.field-grow {
    min-width: 230px;
    flex: 2;
}

.field-row {
    display: flex;
    gap: 5px;
}

.text-end {
    text-align: right;
}

.me-1 {
    margin-right: 0.25rem;
}

.me-2 {
    margin-right: 0.5rem;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-3 {
    margin-top: 1rem;
}

.mt-5 {
    margin-top: 3rem;
}

.mb-0 {
    margin-bottom: 0;
}

.mb-1 {
    margin-bottom: 0.25rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-3 {
    margin-bottom: 1rem;
}

.my-2 {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.p-2 {
    padding: 0.5rem;
}

.p-3 {
    padding: 1rem;
}

.pt-2 {
    padding-top: 0.5rem;
}

.pt-4 {
    padding-top: 1.5rem;
}

.pb-2 {
    padding-bottom: 0.5rem;
}

.pb-3 {
    padding-bottom: 1rem;
}

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

@media (max-width: 900px) {
    .layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
    }

    .metrics {
        grid-template-columns: repeat(2, 1fr);
    }

    .helpercards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .formgrid {
        grid-template-columns: 1fr;
    }

    .full {
        grid-column: auto;
    }

    .metrics,
    .helpercards {
        grid-template-columns: 1fr;
    }

    .main {
        padding: 14px;
    }
}
