/* ===== 1. GRUNDLÆGGENDE RESET & BASE ===== */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    background-color: #0f172a; /* Mørk baggrund */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Centrerings-container til PIN-pad og Login */
.fullscreen-center {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    width: 100vw;
    padding: 15px;
    box-sizing: border-box;
}

/* ===== 2. SIDEBAR & NAVIGATION (Desktop) ===== */
.wrapper {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 300px;
    background-color: #f8f9fa;
    height: 100vh;
    padding: 20px;
    box-shadow: 2px 0 5px rgba(0,0,0,0.2);
    position: fixed;
    z-index: 1000;
}

.main-content {
    flex: 1;
    margin-left: 300px; /* Plads til sidebar på desktop */
    padding: 20px;
    transition: margin-left 0.3s ease;
}


.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

    .sidebar-menu li a {
        display: flex;
        align-items: center;
        padding: 12px 15px;
        color: #333;
        text-decoration: none;
        border-radius: 8px;
        margin-bottom: 8px;
        background-color: #fff;
        box-shadow: 0 1px 3px rgba(0,0,0,0.1);
        transition: 0.2s all;
    }

        .sidebar-menu li a:hover {
            background-color: #0ea5e9;
            color: white;
        }




/* ===== 3. PIN-PAD CSS (Mobil-fokuseret) ===== */
.Keypadpin-wrapper {
    background: #1e293b;
    width: 100%;
    max-width: 360px; /* Forhindrer den i at blive for bred på tablets */
    padding: 25px;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.5);
    box-sizing: border-box;
}

.KeyPadMyHeader {
    background: #dc2626;
    color: white !important;
    font-size: 1.4rem;
    font-weight: bold;
    text-align: center;
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 20px;
    text-decoration: none; /* Fjernet underline for renere look */
}

.Keypaddisplay {
    background: #0f172a;
    height: 70px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 12px;
    margin-bottom: 20px;
    border: 2px solid #334155;
}

.Keypadcode {
    font-size: 35px;
    letter-spacing: 12px;
    color: #ffffff;
}

.keypad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

/* Knapper i keypad */
.Keypadbtn, .btn-danger, .btn-success {
    height: 75px;
    font-size: 24px;
    font-weight: bold;
    border-radius: 15px;
    border: none;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    touch-action: manipulation;
    transition: transform 0.1s, background-color 0.2s;
}

.Keypadbtn {
    background: #334155;
    color: white;
}

    .Keypadbtn:active {
        transform: scale(0.92);
        background: #475569;
    }

.btn-danger {
    background-color: #ef4444 !important;
    color: white;
}

.btn-success {
    background-color: #22c55e !important;
    color: white;
}

.PageHeader {
    font-size: 16pt;
    font-weight: bolder;
}

.LeftMargin {
    margin-inline-start: 300px;
}

.CursorHand {
    cursor: pointer;
}


/* ===== 4. LOGIN & ANDRE FORM ELEMENTER ===== */
.login-box {
    background: #1e293b;
    padding: 40px 30px;
    border-radius: 12px;
    min-width: 320px;
    color: white;
    text-align: center;
}

.btn-login {
    width: 100%;
    padding: 12px;
    background-color: #0ea5e9;
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: bold;
}

/* ===== 5. RESPONSIV TILPASNING (MOBIL) ===== */
@media (max-width: 768px) {
    .sidebar {
        display: none; /* Skjul sidebar på mobil */
    }

    .main-content {
        margin-left: 0 !important; /* VIGTIGT: Fjerner skubbet til højre */
        padding: 0;
    }

    .fullscreen-center {
        padding: 10px;
        align-items: center; /* Centrerer lodret på mobilen */
    }

    .Keypadpin-wrapper {
        max-width: 100%; /* Bruger den plads der er til rådighed */
        border-radius: 15px;
    }

    .Keypadbtn, .btn-danger, .btn-success {
        height: 65px; /* Lidt mindre knapper på meget små skærme */
    }
}

/* Scrollbar-container til hele tabellen */
#EmplSpecKr > div {
    max-height: 400px; /* Justér efter behov */
    overflow-y: auto;
    position: relative;
}

/* Sticky header */
#dayspectable tfoot th,
#employeeGrid thead th {
    position: sticky;
    top: 0;
    z-index: 5;
    background: darkblue;
    color: white;
}

/* Sticky footer */
#dayspectable tfoot th,
#employeeGrid tfoot th {
    position: sticky;
    bottom: 0;
    z-index: 5;
    background: darkblue;
    color: white;
}

/* Sørger for, at tabelkolonner flugter */
#employeeGrid {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed; /* Gør kolonner lige brede */
}

    #employeeGrid th,
    #employeeGrid td {
        padding: 0.5rem; /* Match kolonner og footer */
    }
