:root {
    font-family:
        Inter,
        Arial,
        Helvetica,
        sans-serif;

    color: #17202a;
    background: #f3f5f7;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background: #f3f5f7;
}

a {
    color: inherit;
}

/* Topbjælke */

.topbar {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 100;

    height: 76px;
    padding: 0 24px;

    color: white;
    background: #16212c;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.14);
}

.topbar-content {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.topbar h1 {
    margin: 0;
    font-size: 26px;
}

.subtitle {
    margin: 4px 0 0;
    color: #cbd5df;
    font-size: 14px;
}

/* Applikationslayout */

.app-layout {
    display: flex;
    min-height: 100vh;
    padding-top: 76px;
}

/* Venstremenu */

.sidebar {
    position: fixed;
    top: 76px;
    bottom: 0;
    left: 0;

    width: 225px;
    padding: 22px 14px;

    color: #d8e0e7;
    background: #1d2a36;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    overflow-y: auto;
}

.navigation {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.navigation-title {
    margin: 0 12px 10px;
    color: #8fa0ae;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.navigation-link {
    display: flex;
    align-items: center;
    gap: 11px;

    min-height: 44px;
    padding: 10px 13px;

    color: #d8e0e7;
    border-radius: 7px;
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
}

.navigation-link:hover {
    color: white;
    background: #293947;
}

.navigation-link.active {
    color: white;
    background: #34495a;
}

.navigation-icon {
    width: 22px;
    text-align: center;
    font-size: 17px;
}

/* Sideindhold */

.main-content {
    width: calc(100% - 225px);
    margin-left: 225px;
    padding: 28px 28px 50px;
}

.content-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

.page-heading {
    margin-bottom: 22px;
}

.page-heading h2 {
    margin: 0 0 6px;
    font-size: 27px;
}

.page-heading p {
    margin: 0;
    color: #687581;
}

/* Kort */

.card {
    margin-bottom: 24px;
    padding: 26px;

    background: white;
    border: 1px solid #e1e6eb;
    border-radius: 12px;
    box-shadow: 0 3px 12px rgba(26, 39, 52, 0.07);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 24px;
}

.card-header h2,
.card-header h3 {
    margin: 0 0 6px;
}

.card-header h2 {
    font-size: 22px;
}

.card-header h3 {
    font-size: 19px;
}

.card-header p {
    margin: 0;
    color: #687581;
}

/* Statusfelter */

.status-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.status-item,
.summary-item {
    padding: 17px;
    border: 1px solid #e3e8ed;
    border-radius: 9px;
    background: #fafbfc;
}

.label {
    display: block;
    margin-bottom: 7px;

    color: #687581;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.value {
    display: block;
    font-size: 17px;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.summary-value {
    display: block;
    margin-bottom: 5px;
    font-size: 28px;
    font-weight: 700;
}

.summary-label {
    color: #687581;
    font-size: 14px;
}

/* Badges */

.status-badge,
.count-badge,
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    border-radius: 999px;
    font-weight: 700;
    white-space: nowrap;
}

.status-badge,
.count-badge {
    min-height: 34px;
    padding: 7px 13px;
    font-size: 14px;
}

.badge {
    padding: 4px 8px;
    font-size: 12px;
}

.status-loading {
    color: #344054;
    background: #e8edf2;
}

.status-running,
.badge-success,
.badge-yes {
    color: #166534;
    background: #dcfce7;
}

.status-error,
.badge-error,
.badge-offline {
    color: #991b1b;
    background: #fee2e2;
}

.badge-warning {
    color: #854d0e;
    background: #fef3c7;
}

.badge-info,
.count-badge {
    color: #1d4ed8;
    background: #dbeafe;
}

.badge-no,
.badge-neutral {
    color: #5b6570;
    background: #edf0f2;
}

/* Knapper */

.button {
    appearance: none;
    min-height: 40px;
    padding: 9px 15px;

    border: 0;
    border-radius: 7px;

    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.button-primary {
    color: white;
    background: #2563eb;
}

.button-primary:hover {
    background: #1d4ed8;
}

.button-secondary {
    color: #24313d;
    background: #e8edf2;
}

.button-secondary:hover {
    background: #dce3e9;
}

.button-danger {
    color: white;
    background: #b91c1c;
}

.button:disabled {
    cursor: wait;
    opacity: 0.65;
}

.button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* Tabeller */

.table-container {
    width: 100%;
    overflow-x: auto;
    border: 1px solid #e1e6eb;
    border-radius: 9px;
}

table {
    width: 100%;
    min-width: 850px;
    border-collapse: collapse;
}

th,
td {
    padding: 13px 14px;
    text-align: left;
    border-bottom: 1px solid #e8ecef;
    vertical-align: top;
}

th {
    color: #4f5d69;
    background: #f7f9fa;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

tbody tr:last-child td {
    border-bottom: 0;
}

tbody tr:hover {
    background: #fafcfd;
}

.printer-name {
    font-weight: 700;
}

.loading-cell,
.empty-cell {
    padding: 30px;
    text-align: center;
    color: #687581;
}

/* Formularer */

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    color: #3f4c58;
    font-size: 14px;
    font-weight: 700;
}

.form-control {
    width: 100%;
    min-height: 43px;
    padding: 10px 12px;

    color: #17202a;
    background: white;
    border: 1px solid #ccd5dd;
    border-radius: 7px;

    font: inherit;
}

.form-control:focus {
    outline: 2px solid #bfdbfe;
    border-color: #2563eb;
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 9px;
}

/* Beskeder */

.message {
    margin-bottom: 18px;
    padding: 13px 15px;
    border-radius: 8px;
}

.message-error {
    color: #991b1b;
    background: #fee2e2;
    border: 1px solid #fecaca;
}

.message-info {
    color: #1e40af;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
}

.hidden {
    display: none;
}

/* Tomme sider */

.placeholder {
    padding: 45px 20px;
    color: #687581;
    text-align: center;
}

.placeholder h3 {
    margin: 0 0 8px;
    color: #24313d;
}

/* Footer */

footer {
    margin-top: 25px;
    color: #71808d;
    font-size: 13px;
    text-align: center;
}

/* Mobil */

@media (max-width: 1000px) {
    .summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .status-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .topbar {
        position: static;
        height: auto;
        padding: 18px;
    }

    .topbar-content {
        align-items: flex-start;
    }

    .app-layout {
        display: block;
        padding-top: 0;
    }

    .sidebar {
        position: static;
        width: 100%;
        padding: 10px;
    }

    .navigation {
        flex-direction: row;
        overflow-x: auto;
    }

    .navigation-title {
        display: none;
    }

    .navigation-link {
        flex: 0 0 auto;
    }

    .main-content {
        width: 100%;
        margin-left: 0;
        padding: 20px 14px 40px;
    }

    .status-grid,
    .summary-grid,
    .form-grid {
        grid-template-columns: 1fr;
    }

    .card-header {
        flex-direction: column;
        align-items: stretch;
    }

    .form-group.full-width {
        grid-column: auto;
    }
    .card-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 20px;
}

.table-actions {
    display: flex;
    gap: 8px;
}

.button-danger {
    background: #dc3545;
    color: white;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 18px;
}

.form-group select,
.form-group input {
    width: 100%;
    height: 44px;
    padding: 0 14px;

    font-size: 14px;
    font-family: inherit;

    color: #1f2937;
    background: #ffffff;

    border: 1px solid #cfd7e3;
    border-radius: 6px;

    box-sizing: border-box;

    transition:
        border-color .15s ease,
        box-shadow .15s ease;
}

.form-group select {
    width: 100%;
    height: 44px;
    padding: 0 14px;

    border: 1px solid #cfd7e3;
    border-radius: 6px;

    background: #ffffff;

    font-size: 14px;
    font-family: inherit;

    color: #1f2937;

    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;

    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 20 20'%3E%3Cpath fill='%23666' d='M5 7l5 6 5-6z'/%3E%3C/svg%3E");

    background-repeat: no-repeat;
    background-position: right 14px center;

    padding-right: 40px;

    box-sizing: border-box;
}

.form-group select:focus {
    outline: none;
    border-color: #4f8df7;
    box-shadow: 0 0 0 3px rgba(79,141,247,.15);
}

.settings-card h2 {
    margin-bottom: 6px;
}

.settings-card p {
    margin-bottom: 22px;
}

.settings-actions {
    margin-top: 24px;
}

.form-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}

.modal[hidden] {
    display: none;
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
}

.modal-content {
    position: relative;
    width: min(560px, 100%);
    background: white;
    border-radius: 10px;
    padding: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.message {
    margin-bottom: 16px;
    padding: 12px 14px;
    border-radius: 6px;
}

.message-success {
    background: #dcfce7;
    color: #166534;
}

.message-error {
    background: #fee2e2;
    color: #991b1b;
}

.status-muted {
    background: #e5e7eb;
    color: #374151;
}
.settings-section-header {
    margin-bottom: 22px;
}

.settings-section-header h2 {
    margin-bottom: 6px;
}

.settings-section-header p {
    margin: 0;
    color: #607086;
}

.printer-selection-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.printer-selection {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    padding: 22px;
    border: 1px solid #d9e1eb;
    border-radius: 10px;
    background: #f8fafc;
}

.printer-selection-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 64px;
    height: 64px;
    border-radius: 10px;
    background: #e5edff;
    color: #2455c3;
    font-size: 14px;
    font-weight: 700;
}

.printer-selection-content {
    flex: 1;
    min-width: 0;
}

.printer-selection-content label {
    display: block;
    margin-bottom: 5px;
    font-size: 16px;
    font-weight: 700;
}

.printer-selection-content p {
    margin: 0 0 14px;
    color: #607086;
    line-height: 1.45;
}

.printer-selection-content select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #c9d4e2;
    border-radius: 7px;
    background: #ffffff;
    font: inherit;
}

.printer-setup-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 20px;
}

@media (max-width: 900px) {
    .printer-selection-grid {
        grid-template-columns: 1fr;
    }
}
#printerSetupForm .form-group select {
    display: block;
    width: 100%;
    height: 44px;
    padding: 0 40px 0 14px;

    font-family: inherit;
    font-size: 14px;
    color: #1f2937;

    background-color: #ffffff;
    border: 1px solid #cfd7e3;
    border-radius: 6px;

    box-sizing: border-box;

    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;

    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 20 20'%3E%3Cpath fill='%23666' d='M5 7l5 6 5-6z'/%3E%3C/svg%3E");

    background-repeat: no-repeat;
    background-position: right 14px center;
}

#printerSetupForm .form-group select:focus {
    outline: none;
    border-color: #4f8df7;
    box-shadow: 0 0 0 3px rgba(79, 141, 247, 0.15);
}
.settings-select {
    display: block !important;
    width: 100% !important;
    height: 44px !important;

    padding: 0 42px 0 14px !important;

    font-family: inherit !important;
    font-size: 14px !important;
    line-height: 44px !important;
    color: #1f2937 !important;

    background-color: #ffffff !important;

    border: 1px solid #cfd7e3 !important;
    border-radius: 6px !important;

    box-sizing: border-box !important;

    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;

    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 20 20'%3E%3Cpath fill='%23607086' d='M5 7l5 6 5-6z'/%3E%3C/svg%3E") !important;

    background-repeat: no-repeat !important;
    background-position: right 14px center !important;
}

.settings-select:focus {
    outline: none !important;
    border-color: #4f8df7 !important;
    box-shadow: 0 0 0 3px rgba(79, 141, 247, 0.15) !important;
}
}