/* Nulstil margin og tillad scrolling hvis indholdet er højere end skærmen */
html, body {
    min-height: 100vh;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f2f2f7; /* iPad typisk baggrundsgrå */
    user-select: none; /* Forhindrer utilsigtet tekstmarkering ved touch */
    -webkit-tap-highlight-color: transparent;
    overflow-y: auto; /* Ændret fra hidden til auto så du kan scrolle! */
}

/* Yderste container der udfylder skærmen */
.dash-container {
    height: 100vh;
    width: 100vw;
    box-sizing: border-box;
    padding: 24px;
}

/* Grid-layout: 12 kolonner x 2 rækker (giver nem opdeling af 2 og 4 knapper) */
.dash-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 20px;
    height: 100%;
}

/* Øverste række: 2 knapper fylder hver 6 kolonner (halvdelen) */
.btn-top {
    grid-column: span 6;
}

/* Nederste række: 4 knapper fylder hver 3 kolonner (en fjerdedel) */
.dash-grid .btn-yellow {
    grid-column: span 3;
}

/* Fælles styling for knapperne */
.dash-btn {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: 20px;
    text-decoration: none;
    color: #1c1c1e;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
    transition: transform 0.1s ease, box-shadow 0.1s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

    /* Touch-responsivitet (mærkes når man trykker på knappen) */
    .dash-btn:active {
        transform: scale(0.97);
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
    }

    /* Ikon-størrelse */
    .dash-btn .icon {
        font-size: 4rem;
        margin-bottom: 12px;
    }

    /* Tekst-størrelse */
    .dash-btn .label {
        font-size: 2.2rem;
        font-weight: 700;
    }

/* Farver efter dine ønsker */
.btn-green {
    background-color: #d1e7dd; /* Lysegrøn */
    border-color: #badbcc;
}

.btn-yellow {
    background-color: #fff3cd; /* Gul */
    border-color: #ffecb5;
}

/* POS Container Layout */
.pos-container {
    display: flex;
    height: 100vh;
    background-color: #f2f2f7;
    overflow: hidden;
}

/* Venstre side (Katalog) */
.pos-catalog {
    flex: 1;
    padding: 16px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.pos-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.btn-back {
    background-color: #e5e5ea;
    color: #000;
    padding: 12px 20px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.2rem;
}

/* Varekort Grid */
.item-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
}

.item-card {
    width: 100%;
    height: 110px;
    border-radius: 14px;
    border: none;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 12px;
    box-sizing: border-box;
    text-align: left;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
}

    .item-card:active {
        transform: scale(0.96);
    }

.card-service {
    background-color: #d1e7dd;
}
/* Grøn for ydelser */
.card-product {
    background-color: #fff3cd;
}
/* Gul for produkter */

.item-name {
    font-weight: bold;
    font-size: 1.1rem;
    color: #1c1c1e;
}

.item-price {
    font-size: 1.2rem;
    color: #2c3e50;
    font-weight: 800;
    align-self: flex-end;
}

/* Højre side (Bon) */
.pos-receipt {
    width: 380px;
    background-color: #ffffff;
    border-left: 2px solid #e5e5ea;
    display: flex;
    flex-direction: column;
    padding: 16px;
    box-sizing: border-box;
}

.customer-select {
    width: 100%;
    padding: 12px;
    font-size: 1.1rem;
    border-radius: 10px;
    border: 1px solid #ccc;
    margin-top: 8px;
}

.receipt-lines {
    flex: 1;
    overflow-y: auto;
    margin: 16px 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.receipt-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #f9f9f9;
}

.line-info {
    display: flex;
    flex-direction: column;
}

.line-title {
    font-weight: bold;
    font-size: 1rem;
}

.line-sub {
    font-size: 0.85rem;
    color: #666;
}

.line-amount {
    font-weight: bold;
    font-size: 1.1rem;
}

.btn-remove {
    background: #ff3b30;
    color: white;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    font-weight: bold;
    margin-left: 8px;
}

.receipt-footer {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.total-box {
    display: flex;
    justify-content: space-between;
    font-size: 1.8rem;
    font-weight: 800;
}

.btn-checkout {
    background-color: #34c759;
    color: white;
    border: none;
    padding: 18px;
    border-radius: 14px;
    font-size: 1.5rem;
    font-weight: bold;
    width: 100%;
}

    .btn-checkout:disabled {
        background-color: #c7c7cc;
    }

/* Layout til CRUD administration (Kunder) */
.crud-container {
    display: flex;
    min-height: 100vh; /* Ændret fra height: 100vh til min-height */
    background-color: #f2f2f7;
    overflow-y: auto; /* Tillader scrolling på hele containeren */
}

/* Højre side (Formular) */
.crud-form-section {
    width: 420px;
    background-color: white;
    padding: 24px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    overflow-y: auto; /* Gør formularen rullebar, når tastaturet kommer frem! */
    max-height: 100vh; /* Sikrer at formularen kan rulles indvendigt */
}

/* Venstre side (Liste) */
.crud-list-section {
    flex: 1;
    padding: 16px;
    display: flex;
    flex-direction: column;
    border-right: 2px solid #e5e5ea;
}

.crud-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.btn-new {
    background-color: #34c759;
    color: white;
    padding: 12px 20px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem;
}

.item-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.item-row {
    background-color: white;
    padding: 16px;
    border-radius: 12px;
    text-decoration: none;
    color: #1c1c1e;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}

    .item-row.active {
        border: 2px solid #007aff;
        background-color: #f0f8ff;
    }

.item-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.item-no {
    font-weight: bold;
    color: #8e8e93;
}

.item-title {
    font-weight: bold;
    font-size: 1.2rem;
}

.badge {
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: bold;
}

.badge-service {
    background-color: #d1e7dd;
    color: #0f5132;
}

.badge-product {
    background-color: #fff3cd;
    color: #664d03;
}

.item-price-tag {
    font-size: 1.2rem;
    font-weight: bold;
}

/* Højre side (Formular) */
.crud-form-section {
    width: 420px;
    background-color: white;
    padding: 24px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.form-group {
    margin-bottom: 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

    .form-group label {
        font-weight: bold;
        font-size: 1.1rem;
    }

.touch-input {
    padding: 14px;
    font-size: 1.2rem;
    border-radius: 10px;
    border: 1px solid #ccc;
    width: 100%;
    box-sizing: border-box;
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.1rem;
    cursor: pointer;
}

.touch-checkbox {
    width: 24px;
    height: 24px;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.btn-save {
    flex: 2;
    background-color: #007aff;
    color: white;
    padding: 16px;
    border-radius: 12px;
    border: none;
    font-size: 1.3rem;
    font-weight: bold;
}

.btn-delete {
    flex: 1;
    background-color: #ff3b30;
    color: white;
    padding: 16px;
    border-radius: 12px;
    border: none;
    font-size: 1.2rem;
    font-weight: bold;
}

/* Søgefelt styling */
.search-form {
    margin-bottom: 12px;
}

.search-input {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 1.1rem;
}

/* Kunde detaljer i listen */
.customer-details {
    display: flex;
    flex-direction: column;
}

.customer-sub {
    font-size: 0.9rem;
    color: #666;
}

.customer-city {
    font-size: 0.95rem;
    color: #8e8e93;
    font-weight: bold;
}

.empty-list {
    padding: 20px;
    text-align: center;
    color: #8e8e93;
    font-size: 1.1rem;
}

.alert-danger {
    background-color: #ffe5e5;
    color: #cc0000;
    padding: 12px 16px;
    border-radius: 10px;
    border: 1px solid #ffcccc;
    font-weight: bold;
    margin-bottom: 16px;
}

.text-danger {
    color: #cc0000;
    font-size: 0.9rem;
    font-weight: bold;
}

/* ==========================================
   KALENDER STYLING (wwwroot/css/site.css)
   ========================================== */

/* 7-kolonne layout til ugevisning (100% / 7 = 14.285%) */
@media (min-width: 768px) {
    .row-cols-md-7 > * {
        flex: 0 0 auto;
        width: 14.2857142857%;
    }
}

/* Ekstra lille skriftstørrelse til noter */
.fs-7 {
    font-size: 0.8rem;
}

/* Gør dagssøjlerne rullebare hvis der er mange aftaler */
.card-body.d-flex.flex-column {
    min-height: 400px;
    max-height: 70vh;
    overflow-y: auto;
}

/* Tydelig markering og touch-respons på aftalekort */
.card.border-info {
    border-left: 5px solid #0dcaf0 !important;
    transition: transform 0.1s ease, box-shadow 0.1s ease;
}

    /* Touch-feedback på iPad når man trykker på et kort */
    .card.border-info:active {
        transform: scale(0.98);
    }

/* Visuel nedtoning af gennemførte/afsluttede aftaler */
.opacity-50 {
    opacity: 0.55;
}