/* LOGIN */
.login-page {
    background: #F7F4F1;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

.login-card {
    background: #FFFFFF;
    padding: 30px;
    border-radius: 16px;
    width: 90%;
    max-width: 380px;
    text-align: center;
    box-shadow: 0 4px 14px rgba(0,0,0,0.08);
}

.login-card input {
    width: 100%;
    padding: 14px;
    font-size: 26px;
    text-align: center;
    border-radius: 12px;
    border: 1px solid #DDD;
    margin-bottom: 20px;
    letter-spacing: 8px;
}

/* FULLSKÄRM */
#calendar {
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* HEADER */
.calendar-header {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    padding: 10px;
    background: #F7F4F1;
    border-bottom: 1px solid #ddd;
}

/* DAG-RAD */
#calendar-days {
    display: grid;
    grid-template-columns: 80px repeat(7, 1fr);
    background: #fff;
    border-bottom: 1px solid #ddd;
    text-align: center;
    font-weight: 600;
    padding: 10px 0;
}

#calendar-days div {
    padding: 5px 0;
}

/* GRID – DAGKOLUMN-LAYOUT */
#calendar-grid {
    flex: 1;
    display: flex;
    overflow-y: auto;
    background: #fff;
    font-size: 11px;
}

/* TIDKOLUMN */
.time-column {
    width: 80px;
    border-right: 1px solid #ddd;
    background: #fafafa;
}

.time-slot {
    height: auto; /* JS styr höjden */
    
  
    opacity: 0.4;
    display: flex;
    align-items: center;
}

.time-slot:nth-child(4n+1) {
    opacity: 1;
    font-weight: 600;
}

/* DAGKOLUMN */
.day-column {
    flex: 1;
    position: relative;
    border-right: 1px solid #f0f0f0;

    /* Rutnätet måste matcha exakt 15 min = 20px */
    background-image: linear-gradient(to bottom, #f5f5f5 1px, transparent 1px);
    background-size: 100% 20px;
}

.day-column:last-child {
    border-right: none;
}

/* INRE KOLUMN – JS styr höjden */
.day-column-inner {
    position: relative;
    height: auto; /* JS sätter exakt höjd */
    padding: 0;
    margin: 0;
}

/* BOKNINGSBLOCK */
.booking-block {
    position: absolute;
    box-sizing: border-box;

    padding: 6px 8px;
    border-radius: 10px;
    color: white;
    font-size: 12px;
    line-height: 1.2;

    z-index: 10;
    cursor: grab;

    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
    border: 1px solid rgba(255,255,255,0.25);

    transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.booking-block:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.35);
}

.booking-block:active {
    cursor: grabbing;
}


/* POPUP */
.popup {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(3px);
    z-index: 9999;
}

.popup.hidden {
    display: none;
}

.popup-content {
    background: #ffffff;
    width: 360px;
    padding: 25px;
    border-radius: 14px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.25);
    animation: popupFade 0.15s ease-out;
}

@keyframes popupFade {
    from { transform: scale(0.95); opacity: 0; }
    to   { transform: scale(1); opacity: 1; }
}

.popup-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 15px;
}

.popup-row {
    margin-bottom: 12px;
}

.popup-row label {
    font-weight: 600;
    margin-bottom: 4px;
    display: block;
}

.popup-row input,
.popup-row select {
    width: 100%;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-size: 14px;
}

.popup-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

.btn {
    padding: 10px 14px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 600;
}

.btn-save {
    background: #6ab04c;
    color: white;
}

.btn-cancel {
    background: #b2bec3;
}

.btn-delete {
    background: #d63031;
    color: white;
}
/* NUMPAD – modern och snygg */
.numpad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-top: 20px;
}

.numpad button {
    background: #F0E6DD;
    border: none;
    border-radius: 14px;
    padding: 18px;
    font-size: 26px;
    font-weight: 700;
    color: #3A2F28;
    cursor: pointer;
    box-shadow: 0 3px 8px rgba(0,0,0,0.15);
    transition: all 0.12s ease;
}

.numpad button:hover {
    background: #F7EFE8;
    transform: translateY(-2px);
    box-shadow: 0 5px 12px rgba(0,0,0,0.22);
}

.numpad button:active {
    transform: scale(0.95);
}

.numpad .del {
    background: #FFB3B3;
    color: #7A0000;
}

.numpad .del:hover {
    background: #FFC7C7;
}
.day-header {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.workload-bar {
    display: flex;
    height: 6px;
    width: 90%;
    margin-top: 4px;
    border-radius: 3px;
    overflow: hidden;
    background: #e0e0e0;
}

.workload-segment {
    height: 100%;
}
