:root {
    --bg: #1D2E28;
    --card: #18392B;
    --muted: #9aa3b2;
    --text: #eaf0ff;
    --accent: #006533;
    --danger: #ff6b6b;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, 'Helvetica Neue', 'Noto Sans', sans-serif;
    line-height: 1.4;
    overflow-x: hidden;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px;
}

header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

h1 {
    font-size: 22px;
    margin: 0;
}

.card {
    background: var(--card);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, .25);
    max-width: 100%;
}
.card h2 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 18px;
}

.card h3 {
    margin-top: 16px;
    margin-bottom: 8px;
    font-size: 15px;
}

.grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 16px;
}

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

.form {
    display: grid;
    gap: 8px;
}

.form.inline {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 8px;
    align-items: end;
}

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

.form label {
    display: grid;
    gap: 6px;
    font-size: 14px;
}

input,
select {
    background: var(--bg);
    border: 1px solid var(--muted);
    color: var(--text);
    padding: 10px;
    border-radius: 10px;
}

button {
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 10px 14px;
    font-weight: 600;
    cursor: pointer;
}

button.ghost {
    background: transparent;
    border: 1px solid var(--muted);
}

button.danger {
    background: var(--danger);
}

.userbox {
    display: flex;
    gap: 10px;
    align-items: center;
}

.userbox button {
    padding: 6px 10px;
    border-radius: 8px;
}

.tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 10px;
}

.tabs button {
    background: var(--bg);
    border: 1px solid var(--muted);
}

.tabs button.active {
    background: var(--accent);
    border-color: transparent;
}

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

.small {
    font-size: 12px;
}

.stack {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 60vh;
    overflow: auto;
    padding-right: 4px;
}

.list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: var(--bg);
    border: 1px solid var(--muted);
    border-radius: 12px;
    padding: 10px;
}

.files {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}

.file {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg);
    border: 1px solid var(--muted);
    border-radius: 10px;
    padding: 8px;
}

a {
    color: var(--text);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.error {
    background: #331c1c;
    color: #ffcccc;
    padding: 10px;
    border-radius: 10px;
    border: 1px solid #663333;
    margin-bottom: 12px;
}

.toast {
    background: var(--bg);
    color: #fff;
    padding: 10px 14px;
    border-radius: 10px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .35);
}

.row-actions {
    display: flex;
    gap: 8px;
}

.brand {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.brand-left {
    display: flex;
    align-items: center;
    gap: 12px;
}
@media (max-width: 700px) {
    .brand-left {
        display: block;
        gap: 12px;
    }
}

.logo {
    width: auto;
    height: 40px;
    border-radius: 0px;
    object-fit: contain;
}

.brand-text h1 {
    font-size: 18px;
    margin: 0;
}

.file-main {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.footer {
    margin-top: 20px;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border-radius: 12px;
    background: var(--card);
    border: 1px solid var(--accent);
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    padding: 2px 8px;
    margin-left: 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    background: #ffb74d;
    color: #1b1b1b;
}
.return-date-pill {
    padding: 2px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.15);
    font-weight: 500;
}

.return-date--soon {
    color: #ffb74d;
    /* gul/orange: snart */
    border-color: #ffb74d;
}

.return-date--past {
    color: var(--danger);
    /* rød: udløbet */
    border-color: var(--danger);
}

button:hover {
    filter: brightness(1.08);
}

button:active {
    transform: translateY(1px);
}

button:focus-visible,
input:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

input::placeholder {
    color: rgba(154, 163, 178, 0.8);
}

@media (max-width: 700px) {
    .brand {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .container {
        padding: 16px;
    }
}

.customer-dashboard {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 100%;
}

/* Ny layout-wrapper for customer view */
.customer-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 16px;
    width: 100%;
}
/* Når skærmen bliver smallere → én kolonne */
@media (max-width: 800px) {
    .customer-layout {
        grid-template-columns: 1fr;
    }
}

.customer-main {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.customer-side {
    display: flex;
    flex-direction: column;
}

.customer-info {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.3fr);
    gap: 16px;
}

.customer-info-block {
    background: var(--bg);
    border-radius: 12px;
    padding: 12px 14px;
    border: 1px solid rgba(154, 163, 178, 0.35);
}

.customer-info-block h3 {
    margin: 0 0 8px;
    font-size: 15px;
}

.customer-meta-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 4px 0;
    font-size: 13px;
}
.customer-meta-row span:last-child {
    word-break: break-word;
    /* 🔹 lange e-mails / telefoner må knække linjen */
}

.customer-meta-row .label {
    color: var(--muted);
}

.customer-actions {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Responsivt: på small screens bliver det hele én kolonne i korrekt rækkefølge */
@media (max-width: 800px) {
    .customer-layout {
        grid-template-columns: 1fr;
    }
}

.customer-files h3 {
    margin: 0 0 8px;
    font-size: 15px;
}

.file-name {
    font-weight: 500;
    word-break: break-word;
}

/* På små skærme: filinfo over, knapper under */
@media (max-width: 600px) {
    .file {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .file .row-actions {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }
}

.download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid var(--muted);
    font-size: 13px;
    text-decoration: none;
}

.download-btn:hover {
    text-decoration: none;
    filter: brightness(1.08);
}

@media (max-width: 800px) {
    .customer-info {
        grid-template-columns: 1fr;
    }
}

.list-item.list-item--stack {
    flex-direction: column;
    align-items: flex-start;
}

.deletion-actions {
    margin-top: 8px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.form.small-row .inline input {
    margin-right: 10px;
}
@media (max-width: 430px) {
    .form.small-row .inline input {
            margin-bottom: 10px
        }
}