@charset "UTF-8";
/* ============ Schrift: Open Sans (lokal eingebunden, SIL Open Font License – fonts/OFL-OpenSans.txt) ============ */
/* Variable Schrift: eine Datei deckt die Stärken 400–700 ab */
@font-face {
    font-family: "Open Sans"; font-style: normal; font-weight: 400 700; font-stretch: 100%; font-display: swap;
    src: url("../fonts/open-sans-latin-ext.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: "Open Sans"; font-style: normal; font-weight: 400 700; font-stretch: 100%; font-display: swap;
    src: url("../fonts/open-sans-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "Open Sans"; font-style: italic; font-weight: 400; font-stretch: 100%; font-display: swap;
    src: url("../fonts/open-sans-italic-latin-ext.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: "Open Sans"; font-style: italic; font-weight: 400; font-stretch: 100%; font-display: swap;
    src: url("../fonts/open-sans-italic-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ============ Reset & Basis ============ */
*, *::before, *::after { box-sizing: border-box; }
html { font-family: var(--htw-font); line-height: 1.6; color: var(--htw-text); }
body { margin: 0; background: var(--htw-grey-lightv2); min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--htw-orange-dark); }
a:hover { color: var(--htw-orange-darker); }
/* Formularelemente übernehmen die Schrift sonst nicht (Browser-Standard) */
input, select, textarea, button { font-family: inherit; }

/* ============ HTW-Dresden-CI (Farben von htw-dresden.de) ============ */
:root {
    --htw-orange:        #EC660C; /* Akzent: Linien, Rahmen, Hover (als Textfarbe auf Weiß zu schwach: 3.2:1) */
    --htw-orange-dark:   #B84E07; /* Flächen mit weißer Schrift, orange Texte (5.1:1) */
    --htw-orange-darker: #9A4106;
    --htw-grey-light:    #EBECF0;
	--htw-grey-lightv2:  #F3F3F3;
    --htw-grey-blue:     #BDC1D0;
    --htw-orange-light:  #FDF0E7; /* helle Hinterlegung (Hover) */
    --htw-text:          #1a1a1a;
    --htw-focus:         rgba(236, 102, 12, 0.25);
    --htw-font:          "Open Sans", Arial, sans-serif;
}

/* ============ Topbar (angelehnt an den Kopfbereich von htw-dresden.de) ============ */
.topbar {
    background: #fff;
    color: #000;
    border-bottom: 1px solid var(--htw-grey-light);
    padding: 1.5rem 1.5rem 1.6rem;
    font-family: var(--htw-font);
}
.topbar-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem 2rem;
}
.brand { display: flex; align-items: center; gap: 1rem; color: #000; text-decoration: none; }
.brand-logo { display: block; height: 25px; width: auto; } /* htw-logo.png ist auf den Schriftzug zugeschnitten */
.brand-logo-text { height: auto; font-size: 1.5rem; font-weight: 800; letter-spacing: 0.02em; }
.brand-divider { width: 1px; align-self: stretch; min-height: 2.2rem; background: var(--htw-grey-blue); }
.brand-name { font-size: 1.15rem; font-weight: 600; }

/* Navigation und Benutzermenü in einer Zeile, mittig zum Schriftzug */
.topbar-right { display: flex; align-items: center; flex-wrap: wrap; gap: 0.75rem 1.75rem; }

/* Hauptnavigation */
.topbar-nav { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; margin-top: 6px;}
.topbar-nav a {
    color: #000;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.2rem 0;
    border-bottom: 1px solid transparent;
}
.topbar-nav a:hover { color: var(--htw-orange-dark); }
.topbar-nav a.is-active { border-bottom-color: var(--htw-orange); }
.topbar-nav a.nav-cta {
    padding: 0.3rem 1rem;
    border-bottom: none;
    border-radius: 4px;
    background: var(--htw-orange-dark);
    color: #fff;
}
.topbar-nav a.nav-cta:hover { background: var(--htw-orange-darker); color: #fff; }
.topbar-nav a.nav-cta.is-active { box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--htw-orange); }
.topbar a:focus-visible,
.topbar summary:focus-visible { outline: 2px solid var(--htw-orange-dark); outline-offset: 2px; }

/* Benutzermenü (rechts): Initialen + Name, Klick öffnet Rolle und "Abmelden" */
.user-menu { position: relative; }
.user-menu summary {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.5rem 0.25rem 0.25rem;
    border-radius: 999px;
    font-size: 0.9rem;
    color: #000;
    cursor: pointer;
    list-style: none;
    user-select: none;
}
.user-menu summary::-webkit-details-marker { display: none; }
.user-menu summary:hover,
.user-menu[open] summary { background: var(--htw-grey-light); }
.user-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: var(--htw-grey-blue);
    color: #000;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.03em;
}
.user-caret { font-size: 1.1rem; color: #666; }
.user-menu-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 0.4rem);
    z-index: 100;
    min-width: 11rem;
    padding: 0.4rem 0;
    background: #fff;
    border: 1px solid var(--htw-grey-light);
    border-radius: 6px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}
.user-menu-info {
    display: flex;
    flex-direction: column;
    padding: 0.5rem 1rem 0.7rem;
    font-size: 0.88rem;
    border-bottom: 1px solid var(--htw-grey-light);
}

.user-menu-label { font-size: 0.75rem; color: #555; }
.user-menu-item {
    display: block;
    padding: 0.55rem 1rem;
    color: #000;
    font-size: 0.9rem;
    text-decoration: none;
	text-align: right;
}

.user-menu-info > strong, .user-menu-label, .user-menu-info span { align-self: flex-end; }

.user-menu-item:hover,
.user-menu-item:focus-visible { background: var(--htw-orange-light); color: var(--htw-orange-darker); }

/* ============ Container ============ */
/*.container { max-width: 1100px; margin: 1.5rem auto; padding: 1.5rem; background: #fff; border-radius: 8px; box-shadow: 0 2px 12px rgba(0,0,0,0.08); flex: 1; width: 100%; }*/
.container { max-width: 1400px; margin: 1.5rem auto; padding: 1.5rem; background: #fff; border-radius: 8px; box-shadow: 0 2px 12px rgba(0,0,0,0.08); flex: 1; width: 100%; }

/* ============ Footer ============ */
.footer { text-align: center; padding: 1rem; color: #888; font-size: 0.85rem; }

/* ============ Formulare ============ */
fieldset { border: 1px solid #e0e0e0; border-radius: 6px; padding: 1rem 1.2rem; margin: 1rem 0; }
legend { font-weight: 700; font-size: 1rem; padding: 0 0.5rem; color: var(--htw-text); }
.form-row { display: flex; gap: 1rem; flex-wrap: wrap; }
.form-group { flex: 1; min-width: 200px; margin-bottom: 0.8rem; }
.form-group label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 0.25rem; }
.req { color: #e74c3c; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%; padding: 0.3rem 0.7rem; border: 1px solid #ccc; border-radius: 4px; font-size: 0.95rem;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none; /*border-color: var(--htw-orange-dark); box-shadow: 0 0 0 3px var(--htw-focus);*/
	border-color: #ec660c5e;
    box-shadow: 0 0 0 1px #ec660c29;
}
.hint { font-size: 0.82rem; color: #777; margin-top: 0.3rem; }
.form-actions { margin-top: 1.5rem; display: flex; gap: 0.8rem; }

/* ============ Buttons ============ */
.btn { display: inline-block; padding: 0.55rem 1.2rem; border: none; border-radius: 4px; font-size: 0.85rem; cursor: pointer; text-decoration: none; text-align: center; }
.btn { font-family: inherit; }
.btn-primary { background: var(--htw-orange-dark); color: #fff; }
.btn-primary:hover { background: var(--htw-orange-darker); color: #fff; }
.btn-secondary { background: #ecf0f1; color: #333; }
.btn-secondary:hover { background: #d5dbdb; color: #333; }
.btn-sm { padding: 0.3rem 0.7rem; font-size: 0.85rem; }
.btn-outline { background: #fff; color: var(--htw-orange-dark); border: 2px solid var(--htw-orange-dark); font-weight: 600; }
.btn-outline:hover { background: var(--htw-orange-light); color: var(--htw-orange-darker); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
/* Gesperrter Outline-Knopf: voll deckend in Grau statt ausgeblendet – auch auf
   schwachen Bildschirmen gut erkennbar (Kontrast Text 8.3:1, Rahmen 4.6:1) */
.btn-outline:disabled,
.btn-outline:disabled:hover { opacity: 1; background: #e5e7eb; color: #374151; border-color: #6b7280; }
.link-danger, .link-danger:hover { color: #c0392b; }
/* Knopf, der wie ein Link aussieht (z. B. "Löschen" als POST-Formular statt GET-Link) */
.btn-link {
    padding: 0;
    border: none;
    background: none;
    font: inherit;
    text-decoration: underline;
    cursor: pointer;
}
.btn-link:focus-visible { outline: 2px solid var(--htw-orange-dark); outline-offset: 2px; }

/* ============ Alerts ============ */
.alert { padding: 0.8rem 1rem; border-radius: 4px; margin: 0rem 0rem 1rem 0rem; }
.alert-error { background: #fdecea; color: #c0392b; border: 1px solid #f5c6cb; }

/* ============ Tabellen ============ */
.data-table { width: 100%; border-collapse: collapse; margin: 0.8rem 0 1rem 0; font-size: 0.9rem; }
.data-table th, .data-table td { padding: 0.55rem 0.7rem; border: 1px solid #e0e0e0; text-align: left; }
.data-table th { background: #f8f9fa; font-weight: 600; }
.data-table tr:hover { background: var(--htw-orange-light); }
.empty { text-align: center; color: #999; padding: 2rem; }

/* ============ Badges ============ */
/*.badge { display: inline-block; padding: 0.2rem 0.6rem; border-radius: 12px; font-size: 0.8rem; font-weight: 600; }
.badge-1 { background: #ecf0f1; color: #555; }
.badge-2 { background: #d4efdf; color: #1e8449; }
.badge-3 { background: #d6eaf8; color: #2471a3; }
.badge-4 { background: #fdebd0; color: #b9770e; }
.badge-5 { background: #d5f5e3; color: #196f3d; }
.badge-6 { background: #fadbd8; color: #922b21; }*/

/* ============ Detail ============ */
.detail-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.8rem; }
.detail-header .header-hint { margin: 0; }
/* CSV-Exportdialog (aufklappbar unter dem Knopf „CSV-Export“) */
.export-menu { position: relative; margin-left: auto; }
.export-menu > summary { list-style: none; gap: 0.2rem; }
.export-menu > summary::-webkit-details-marker { display: none; }
.export-panel {
    position: absolute; right: 0; top: calc(100% + 0.4rem); z-index: 100;
    width: min(46rem, calc(100vw - 2rem)); max-height: 75vh; overflow: auto;
    padding: 1rem; background: #fff; border: 1px solid var(--htw-grey-light);
    border-radius: 6px; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}
.export-hint { margin: 0 0 0.75rem; font-size: 0.85rem; color: #555; }
.export-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: 0.75rem 1rem; }
.export-groups fieldset { margin: 0; padding: 0; border: none; }
.export-groups legend { padding: 0; margin-bottom: 0.3rem; font-size: 0.85rem; }
.export-groups label { display: flex; align-items: flex-start; gap: 0.4rem; font-size: 0.88rem; font-weight: 400; padding: 0.12rem 0; cursor: pointer; }
.export-groups input { margin-top: 0.2rem; }
.export-actions { display: flex; align-items: center; justify-content: flex-end; gap: 0.5rem; margin-top: 1rem; padding-top: 0.75rem; border-top: 1px solid var(--htw-grey-light); }
.export-actions .btn-primary { margin-left: 0.5rem; }

/* Konfiguration: Feldliste CSV-Export mit Reihenfolge */
.csv-field-tools { display: flex; gap: 0.5rem; margin-top: 0.5rem; }
.csv-field-list { list-style: none; margin: 0.5rem 0 0; padding: 0; columns: 2 22rem; column-gap: 2rem; }
.csv-field-list li { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; padding: 0.15rem 0.3rem; border-bottom: 1px solid #eee; break-inside: avoid; }
.csv-field-list label { display: flex; align-items: center; gap: 0.4rem; font-weight: 400; margin: 0; cursor: pointer; }
.csv-field-group { font-size: 0.75rem; color: #666; }
.csv-field-move { display: inline-flex; gap: 0.1rem; }
.csv-field-move .icon-btn { font-size: 0.7rem; padding: 0.15rem 0.35rem; border: none; background: none; cursor: pointer; color: #555; }
.csv-field-move .icon-btn:hover { color: var(--htw-orange-dark); }

/* Kopfzeile Übersicht: Überschrift links, Aktionen (CSV-Export) rechts – wie in der Antragsansicht */
.list-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.75rem 1.5rem; margin-bottom: 1rem; }
.list-header > .btn, .export-menu > summary.btn { box-sizing: border-box; height: 2rem; display: inline-flex; align-items: center; padding-top: 0; padding-bottom: 0; }
.list-header > .btn { margin-left: auto; }
.detail-table { width: 100%; border-collapse: collapse; margin: 1rem 0; }
.detail-table th { width: 220px; text-align: left; padding: 0.4rem 0.6rem; background: #f8f9fa; border: 1px solid #e0e0e0; font-weight: 600; }
.detail-table td { padding: 0.4rem 0.6rem; border: 1px solid #e0e0e0; }

/* ============ Tabs (Konfiguration) ============ */
.tab-bar { display: flex; flex-wrap: wrap; gap: 0.25rem; margin: 1rem 0 1.8rem; border-bottom: 1px solid var(--htw-grey-light); }
.tab {
    font: inherit; font-size: 0.95rem; padding: 0.55rem 1.1rem; margin-bottom: -2px;
    background: none; border: none; border-bottom: 1px solid transparent; color: #444; cursor: pointer;
}
.tab:hover { color: var(--htw-orange-dark); }
.tab[aria-selected="true"] { color: #000; font-weight: 600; border-bottom-color: var(--htw-orange); }
.tab:focus-visible { outline: 2px solid var(--htw-orange-dark); outline-offset: -2px; }
.tabs-ready > [data-tab] > .detail-fieldset:first-of-type { margin-top: 1rem; }
.config-form > .btn-primary { margin-top: 0.5rem; }

/* ============ Sprungleiste Antragsformular ============ */
.jump-nav {
    position: sticky; top: 0; z-index: 50;
    display: flex; flex-wrap: wrap; gap: 0.25rem;
    margin: -0.6rem -1.9rem 2rem -1.9rem; padding: 0.0rem;
    background: rgba(255, 255, 255, 0.96); border: 0px solid #e0e0e0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
	border-radius: 6px;	
}
/* Mit Fehlerübersicht darüber: Leiste nicht an die Meldung kleben lassen */
#form-errors + .req-form .jump-nav { margin-top: 1.6rem; }
.jump-nav a {
    padding: 0.3rem 0.75rem; border-radius: 6px; font-size: 0.88rem;
    color: #777; text-decoration: none; border: 1px solid transparent;
}
.jump-nav a:hover { background: var(--htw-grey-light); color: #000; }
.jump-nav a.is-current { background: var(--htw-focus); color: #111; }
/* Fehler: nur rote Schrift + „!“, aktiv mit zart rotem Hintergrund (passend zur hellen Markierung) */
.jump-nav a.has-error { color: #c0392b; }
.jump-nav a.has-error::after { content: " !"; font-weight: 500; }
.jump-nav a.has-error:hover { background: #f9e3e0; color: #a93226; }
.jump-nav a.has-error.is-current { background: #f6d5d091; color: #a93226; }
.jump-target { scroll-margin-top: 4rem; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* ============ Filter ============ */
.filter-bar { display: flex; gap: 1rem; align-items: flex-end; flex-wrap: wrap; margin: 1rem 0; padding: 0.8rem; background: #f8f9fa; border-radius: 6px; }
.filter-bar label { font-size: 0.85rem; font-weight: 600; display: flex; flex-direction: column; gap: 0.2rem; }
.filter-bar input, .filter-bar select { padding: 0.2rem 0.6rem; border: 1px solid #ccc; border-radius: 4px; }
.filter-bar .btn {  padding: 0.25rem 1.2rem; }
.filter-bar input, .filter-bar select, .filter-bar button, .filter-bar .btn { height: 2rem; }

/* ============ Seitennavigation Übersicht ============ */
.pagination { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.75rem; margin: 1rem 0; font-size: 0.9rem; }
.pagination-info { color: #666; }
.pagination-pages { display: flex; align-items: center; gap: 0.3rem; margin-left: auto; }
.page-link { min-width: 2rem; height: 2rem; box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; padding: 0 0.5rem; border: 1px solid #ccc; border-radius: 4px; text-decoration: none; color: inherit; background: #fff; }
a.page-link:hover { border-color: var(--htw-orange); color: var(--htw-orange-dark); }
.page-link.is-current { background: var(--htw-orange-dark); border-color: var(--htw-orange-dark); color: #fff; font-weight: 600; }
.page-link.is-disabled { color: #bbb; background: #f5f5f5; }
.page-gap { padding: 0 0.2rem; color: #999; }

/* ============ Login ============ */
.login-form { max-width: 400px; margin: 2rem auto; }

/* ============ Upload ============ */
.upload-form { margin: 0.5rem 0; display: flex; gap: 0.8rem; align-items: center; flex-wrap: wrap; }
.attach-list { list-style: none; padding: 0; }
.attach-list li { padding: 0.4rem 0; border-bottom: 1px solid #eee; }

/* ============ Honeypot ============ */
.hp-wrap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Sortierbare Spalten */
.data-table th a {
    color: inherit;
    text-decoration: none;
    white-space: nowrap;
}
.data-table th a:hover {
    color: var(--htw-orange-dark);
}
.actions-cell {
    white-space: nowrap;
}
.actions-cell .btn {
    margin-right: 0.3rem;
}

/* Icon-Buttons in der Tabelle */
.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 4px;
    color: #555;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}
.icon-btn:hover {
    background: var(--htw-orange-light);
    color: var(--htw-orange-dark);
}
.icon-btn svg {
    pointer-events: none;
}

.alert-success {
    background: #d4efdf;
    color: #1e8449;
    border: 1px solid #a9dfbf;
}

/* ============ Detailansicht in Gruppen ============ */
.detail-fieldset {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 1rem 1.2rem;
    margin: 1rem 0;
}
.detail-fieldset legend {
    font-weight: 700;
    font-size: 1rem;
    padding: 0 0.5rem;
    color: var(--htw-text);
}
.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.8rem 1.5rem;
}
.detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}
.detail-item-full {
    grid-column: 1 / -1;
	margin-top: 20px;
}
.detail-label {
    font-size: 0.8rem;
    font-weight: 600; /* 600; */
    color: #000;/*#777;*/
    text-transform: uppercase;
    letter-spacing: 0.02em;
}
.detail-value {
    font-size: 0.95rem;
    color: var(--htw-text);
    word-break: break-word;
}
.detail-value a {
    color: var(--htw-orange-dark);
}
.lock-icon {
    font-size: 1.2rem;
}
.muted {
    color: #888;
    font-size: 0.9rem;
}

/* ============ Item-Zeilen im Formular ============ */
.item-row {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 0.8rem 1rem;
    margin-bottom: 0.8rem;
    background: #fafbfc;
}
.item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}
.item-grid {
    display: grid;
    grid-template-columns: 80px 100px 1fr 1fr 120px 80px 120px;
    gap: 0.5rem;
    align-items: end;
}
.item-desc-group {
    min-width: 150px;
}
.btn-danger {
    background: #e74c3c;
    color: #fff;
    padding: 0.2rem 0.5rem;
}
.btn-danger:hover {
    background: #c0392b;
}
.totals-row {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 2px solid #e0e0e0;
}
.totals-row .form-group {
    flex: 1;
}
.totals-row input[readonly] {
    background: #f0f0f0;
    font-weight: 700;
}
input.item-qty, input.item-unit { 
	width: 60px; 
}

input.item-total, input.item-price { 
	width: 120px; 
}


/* ============ Items-Tabelle in Detailansicht ============ */
.items-table tfoot .totals-row td {
    background: #f8f9fa;
    font-weight: 700;
}
.items-table .text-right {
    text-align: right;
}

/* Responsive */
@media (max-width: 700px) {
    .item-grid {
        grid-template-columns: 1fr 1fr;
    }
    .item-desc-group {
        grid-column: 1 / -1;
    }
}

/* neu */
/* ============ Waren-Tabelle: Spaltenbreiten ============ */
.items-table {
    table-layout: fixed;
    width: 100%;
}
.items-table colgroup col:nth-child(1) { width: 40px; }    /* # */
.items-table colgroup col:nth-child(2) { width: 80px; }    /* Menge */
.items-table colgroup col:nth-child(3) { width: 80px; }    /* Einheit */
.items-table colgroup col:nth-child(4) { width: auto; }    /* Bezeichnung */
.items-table colgroup col:nth-child(5) { width: 60px; }    /* URL */
.items-table colgroup col:nth-child(6) { width: 130px; }   /* Einzelpreis netto */
.items-table colgroup col:nth-child(7) { width: 60px; }    /* USt */
.items-table colgroup col:nth-child(8) { width: 140px; }   /* Gesamtpreis brutto */

.items-table th,
.items-table td {
    overflow: hidden;
}
.items-table td:nth-child(4) {
    white-space: normal;
    word-break: break-word;
}

/* Totals-Zeile: volle Breite, kein Ellipsis */
.items-table tfoot td {
    white-space: nowrap;
    overflow: visible;
    text-overflow: clip;
    background: #f8f9fa;
    font-weight: 700;
}
.items-table tfoot .text-right {
    text-align: right;
    padding-right: 1rem;
}

/* ============ Kopfzeile Antragsansicht: ID, Status (+ Änderung) | Aktionen ============ */
.request-header {
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem 1.5rem;
    padding-bottom: 1rem;
    margin-bottom: 1.25rem;
    /*border-bottom: 1px solid #e0e0e0;*/
}


.request-header h2, .detail-header h2, .list-header h2 { margin: 0; }
.request-header-main,
.request-header-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.6rem;
}
.request-header-actions { margin-left: auto; }

/* Knöpfe in der Kopfzeile einheitlich hoch
   (<button> übernimmt Schrift/Zeilenhöhe sonst nicht wie <a class="btn">) */
.request-header .btn {
    box-sizing: border-box;
    height: 2.0rem;/*2.6rem;*/
    display: inline-flex;
    align-items: center;
    padding-top: 0;
    padding-bottom: 0;
    font-family: inherit;
    font-size: 0.95rem;
    line-height: 1.2;
}
.status-change {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    white-space: nowrap;
}
.status-arrow {
    font-size: 1.2rem;
    color: #6b7280;
    margin: 0 0.1rem;
}

.request-header .badge { margin-left: 80px; } /* nur Status-Plakette in der Kopfzeile der Antragsansicht */

/* Status-Änderung: Auswahl + Knopf als ein Bedienelement mit gemeinsamem Rahmen */
.status-control {
    display: flex;
    align-items: stretch;
    margin: 0;
    box-sizing: border-box;
    height: 2.0rem;/*2.6rem;*/
    border: 2px solid #6b7280;
    border-radius: 4px;
    overflow: hidden;
    background: #fff;
}
.status-control.is-ready { border-color: var(--htw-orange-dark); }
.status-control:focus-within { box-shadow: 0 0 0 3px var(--htw-focus); }
.status-control select {
    height: 100%;
    border: none;
    border-radius: 0;
    background: #fff;
    padding: 0 0.6rem;
    font-family: inherit;
    font-size: 0.95rem;
}
.status-control select:focus { outline: none; }
.request-header .status-control .btn {
    height: 100%;
    border: none;
    border-left: 2px solid #6b7280;
    border-radius: 0;
}
.request-header .status-control.is-ready .btn { border-left-color: var(--htw-orange-dark); }

/* Nur für Screenreader sichtbar */
.visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Waren-Spalte in der Übersicht */
.items-cell {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.85rem;
    color: #555;
}

/* ============ Status-Punkte im Dashboard ============ */
.status-dot-cell {
    text-align: center;
    width: 40px;
}
.status-col {
    width: 40px;
    text-align: center;
}
.status-dot {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    cursor: default;
}

/* Inaktiver Benutzer */
.row-inactive {
    opacity: 0.5;
}
.inline-form {
    display: inline;
    margin: 0;
}
.inline-form select {
    padding: 0.25rem 0.4rem;
    font-size: 0.85rem;
	border-radius: 4px;
	border-color: lightgrey;
}

/* ============ DSGVO-Löschung in Anhangsliste ============ */
.attach-item {
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
}
.gdpr-form {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-left: 0.8rem;
    padding: 0.2rem 0.5rem;
    background: #fdf2f2;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
}
.gdpr-input {
    padding: 0.3rem 0.5rem;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 0.8rem;
    width: 200px;
}
.gdpr-input:focus {
    outline: none;
    border-color: #e74c3c;
}

/* Checkbox-Gruppe im Formular */
.checkbox-group {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    padding: 0.3rem 0;
}
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 400;
    cursor: pointer;
}
.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* ============ Feld-Fehler ============ */
.input-error {
    border-color: #e74c3c !important;
    /*background-color: #fdf2f2 !important;
    box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.15) !important;*/
	background-color: #fdf2f280 !important;
}
.field-error {
    display: block;
    color: #c0392b;
    font-size: 0.8rem;
    margin-top: 0.25rem;
    font-weight: 600;
}

/* Beschaffungsnummer: nur so breit wie der Inhalt */
.proc-num-cell {
    white-space: nowrap;
    width: 1%;
}

/* ============ Historie: Lösch-Einträge ============ */
.history-delete {
    color: #c0392b;
    font-weight: 600;
}

.head-history { padding: 1.2rem 0rem 0rem 0rem; margin: 0rem; }
.history-table { font-size: 0.8rem !important; }

/* Änderungsprotokoll aufklappbar: Dreieck vor der Überschrift, gedreht wenn offen */
.history > summary { list-style: none; cursor: pointer; }
.history > summary::-webkit-details-marker { display: none; }
.history > summary .head-history { display: inline-flex; align-items: center; gap: 0.4rem; }
.history > summary .head-history::before {
    content: "\25B8"; display: inline-block; /* ▸ als Escape – unabhängig von der Zeichenkodierung */ font-size: 0.9em; color: #666;
    transition: transform 0.15s ease;
}
.history[open] > summary .head-history::before { transform: rotate(90deg); }
.history > summary:hover .head-history { color: var(--htw-orange-dark); }
.history > summary:focus-visible { outline: 2px solid var(--htw-orange-dark); outline-offset: 2px; }
.history-count { font-weight: 400; color: #777; font-size: 0.85em; }
@media (prefers-reduced-motion: reduce) { .history > summary .head-history::before { transition: none; } }

select.item-vat { width: 80px }

/* ============ Responsive ============ */
@media (max-width: 700px) {
    .container { margin: 0.5rem; padding: 1rem; }
    .form-row { flex-direction: column; gap: 0; }
    .form-group { min-width: 100%; }
    /* Zeile 1: Logo + Benutzer-Initialen, Zeile 2: Menü */
    .topbar { padding: 0.5rem 1rem 0.6rem; }
    .topbar-inner { flex-direction: row; align-items: center; gap: 0.5rem 0.75rem; }
    .topbar-right { display: contents; }
    .brand { order: 1; gap: 0.5rem; min-width: 0; }
    .brand-name { font-size: 0.95rem; }
    .user-menu { order: 2; margin-left: auto; } /* bleibt rechts, Aufklappfeld ragt nicht aus dem Bildschirm */
    .user-menu .user-name, .user-menu .user-caret { display: none; }
    .user-menu summary { padding: 0.15rem; }
    .topbar-nav { order: 3; width: 100%; gap: 0.5rem 1.25rem; }
    .brand-logo { height: 30px; }
}