/* ==========================================================================
   STYLE SYSTEM: kabakok.calendar (Premium Dark Theme with Gold-Orange Accents)
   ========================================================================== */

:root {
    --bg: #09090a;
    --card-bg: #141416;
    --border: #222224;
    --border-hover: #333336;
    
    --text-white: #f4f4f5;
    --text-muted: #a1a1aa;
    --text-dim: #71717a;
    
    --accent: #f59e0b; /* Orange Accent */
    --accent-glow: rgba(245, 158, 11, 0.2);
    --accent-dark: #3a1c07; /* Dark Orange active day highlight */
    
    /* Event types color codes */
    --color-shift: #ffffff;
    --color-sick: #ef4444;
    --color-off: #3b82f6;
    --color-vacation: #10b981;
    --color-request: #ec4899;
    --color-other: #f59e0b;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg);
    color: var(--text-white);
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    line-height: 1.4;
}

/* ==========================================================================
   HEADER
   ========================================================================== */

.app-header {
    background: rgba(20, 20, 22, 0.4);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--border);
    padding: 16px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    user-select: none;
}

.cat-logo {
    width: 38px;
    height: 38px;
    filter: drop-shadow(0 0 6px rgba(251, 191, 36, 0.3));
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.header-logo:hover .cat-logo {
    transform: scale(1.1) rotate(5deg);
}

.logo-text {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    font-family: 'Outfit', sans-serif;
}

.logo-subtext {
    color: var(--accent);
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Dropdowns & buttons in header */
.lang-selector {
    position: relative;
}

.lang-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 8px 16px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.lang-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--border-hover);
    color: var(--text-white);
}

.lang-dropdown {
    position: absolute;
    top: 110%;
    right: 0;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    display: none;
    flex-direction: column;
    min-width: 130px;
    overflow: hidden;
    z-index: 10;
}

.lang-dropdown.show {
    display: flex;
}

.lang-option {
    padding: 10px 14px;
    font-size: 0.82rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    color: var(--text-muted);
    cursor: pointer;
    transition: 0.2s;
}

.lang-option:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-white);
}

.theme-toggle-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    width: 38px;
    height: 38px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.theme-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--border-hover);
    transform: scale(1.03);
}

.text-yellow {
    color: #fbbf24;
}

.login-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    color: var(--text-white);
    font-family: 'Inter', sans-serif;
    font-size: 0.88rem;
    font-weight: 700;
    padding: 8px 18px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.login-btn:hover {
    background: var(--accent);
    color: #000;
    border-color: var(--accent);
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

/* ==========================================================================
   APP MAIN WRAPPER
   ========================================================================== */

.app-container {
    max-width: 1080px;
    width: 95vw;
    margin: 40px auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
    flex: 1;
}

/* Nav Bar */
.calendar-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.nav-title-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-month-title {
    font-size: 2.2rem;
    font-weight: 900;
    letter-spacing: -0.5px;
}

.nav-month-subtitle {
    color: var(--text-dim);
    font-size: 0.95rem;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
}

.nav-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    color: var(--text-muted);
    width: 38px;
    height: 38px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--border-hover);
    color: var(--text-white);
}

.today-btn {
    width: auto;
    padding: 0 16px;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
}

/* Admin panel bar style */
.admin-panel-bar {
    background: rgba(245, 158, 11, 0.06);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: 14px;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    animation: slideIn 0.3s ease;
}

.admin-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
}

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

.admin-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: var(--text-white);
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: 0.2s;
}

.admin-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.logout-btn {
    border-color: rgba(239, 68, 68, 0.3);
    color: #f87171;
}

.logout-btn:hover {
    background: rgba(239, 68, 68, 0.1);
}

/* ==========================================================================
   CALENDAR CARD & GRID
   ========================================================================== */

.calendar-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 24px;
    width: 100%;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
}

.calendar-grid-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    margin-bottom: 16px;
}

.header-day {
    color: var(--text-dim);
    font-size: 0.82rem;
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
    letter-spacing: 1px;
}

.calendar-grid-body {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

/* Days elements styling */
.calendar-day {
    aspect-ratio: 1.15;
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    user-select: none;
}

.calendar-day:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--border-hover);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
}

/* Numbers styles */
.day-num {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-white);
    font-family: 'Outfit', sans-serif;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.day-other-month {
    opacity: 0.2;
}

.day-other-month:hover {
    opacity: 0.4;
}

/* Today highlight */
.day-today .day-num {
    background: rgba(255, 255, 255, 0.15);
}

/* Selected/Active Date in screenshot style */
.calendar-day.day-active {
    background: var(--accent-dark) !important;
    border: 1px solid var(--accent) !important;
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.15);
}

.calendar-day.day-active .day-num {
    background: var(--accent) !important;
    color: #000 !important;
    font-weight: 900;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
}

/* Dot markers inside calendar day */
.day-dots {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 6px;
    min-height: 8px;
}

.day-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 3px rgba(0,0,0,0.5);
}

/* ==========================================================================
   LEGEND PANEL
   ========================================================================== */

.legend-panel {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.legend-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    font-family: 'Inter', sans-serif;
}

/* Dots color bindings */
.dot-shift, .day-dot.type-shift { background-color: var(--color-shift); box-shadow: 0 0 6px rgba(255,255,255,0.4); }
.dot-sick, .day-dot.type-sick { background-color: var(--color-sick); box-shadow: 0 0 6px rgba(239,68,68,0.4); }
.dot-off, .day-dot.type-off { background-color: var(--color-off); box-shadow: 0 0 6px rgba(59,130,246,0.4); }
.dot-vacation, .day-dot.type-vacation { background-color: var(--color-vacation); box-shadow: 0 0 6px rgba(16,185,129,0.4); }
.dot-request, .day-dot.type-request { background-color: var(--color-request); box-shadow: 0 0 6px rgba(236,72,153,0.4); }
.dot-other, .day-dot.type-other { background-color: var(--color-other); box-shadow: 0 0 6px rgba(245,158,11,0.4); }

/* ==========================================================================
   MODALS
   ========================================================================== */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(15px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-box {
    background: #111112;
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 35px;
    position: relative;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8);
    transform: scale(0.9) translateY(20px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    max-height: 90vh;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

.modal-overlay.active .modal-box {
    transform: scale(1) translateY(0);
}

.day-modal-box {
    width: 460px;
    max-width: 95vw;
}

.login-modal-box {
    width: 380px;
    max-width: 95vw;
}

.requests-modal-box {
    width: 580px;
    max-width: 95vw;
}

.close-icon {
    position: absolute;
    top: 25px;
    right: 25px;
    font-size: 1.25rem;
    color: var(--text-dim);
    cursor: pointer;
    transition: all 0.2s;
    padding: 6px;
}

.close-icon:hover {
    color: var(--text-white);
    transform: scale(1.1);
}

.modal-title {
    font-size: 1.55rem;
    font-weight: 800;
    margin-bottom: 4px;
}

.modal-subtitle {
    font-size: 0.88rem;
    color: var(--text-dim);
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    margin-bottom: 20px;
}

.modal-divider {
    border: 0;
    height: 1px;
    background: var(--border);
    margin: 24px 0;
}

/* Time entries lists inside modal */
.events-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.event-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.event-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background-color: var(--accent);
}

/* Event color indicators in list */
.event-item.type-shift::before { background-color: var(--color-shift); }
.event-item.type-sick::before { background-color: var(--color-sick); }
.event-item.type-off::before { background-color: var(--color-off); }
.event-item.type-vacation::before { background-color: var(--color-vacation); }
.event-item.type-request::before { background-color: var(--color-request); }
.event-item.type-other::before { background-color: var(--color-other); }

.event-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.event-item-title {
    font-weight: 700;
    font-size: 0.95rem;
}

.event-item-time {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-family: monospace;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.event-item-desc {
    font-size: 0.8rem;
    color: var(--text-dim);
    margin-top: 2px;
}

.event-delete-btn {
    background: none;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    font-size: 1rem;
    padding: 6px;
    transition: 0.2s;
}

.event-delete-btn:hover {
    color: #ef4444;
    transform: scale(1.1);
}

/* No events clipboard */
.no-events {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px 10px;
    color: var(--text-dim);
    text-align: center;
    gap: 12px;
}

.no-events i {
    font-size: 2.8rem;
    color: #d1a884;
    opacity: 0.45;
}

.no-events-text {
    font-size: 0.88rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
}

/* ==========================================================================
   FORMS & INPUTS
   ========================================================================== */

.section-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 14px;
}

.form-row {
    display: flex;
    gap: 12px;
}

.form-row .form-group {
    flex: 1;
}

.flex-2 { flex: 2 !important; }
.flex-1 { flex: 1 !important; }

.form-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    font-family: 'Inter', sans-serif;
}

.form-input, .form-textarea {
    background: #09090a;
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-white);
    padding: 12px 14px;
    font-family: 'Inter', sans-serif;
    font-size: 0.88rem;
    transition: all 0.2s;
    outline: none;
    width: 100%;
}

.form-input:focus, .form-textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 8px var(--accent-glow);
}

.select-styled {
    cursor: pointer;
    appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\' width=\'12\' height=\'12\' fill=\'%23a1a1aa\' viewBox=\'0 0 16 16\'><path fill-rule=\'evenodd\' d=\'M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z\'/></svg>');
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 32px;
}

.time-range-inputs {
    display: flex;
    align-items: center;
    gap: 10px;
}

.time-input {
    flex: 1;
    text-align: center;
}

.time-separator {
    color: var(--text-dim);
    font-weight: 700;
}

/* Submit Actions */
.submit-btn {
    width: 100%;
    padding: 14px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.95rem;
    font-family: 'Outfit', sans-serif;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    text-align: center;
}

.orange-btn {
    background-color: var(--accent);
    color: #000;
}

.orange-btn:hover {
    background-color: #fbbf24;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
    transform: translateY(-1px);
}

.green-btn {
    background-color: var(--color-vacation);
    color: #000;
}

.green-btn:hover {
    background-color: #34d399;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
    transform: translateY(-1px);
}

/* Alerts */
.alert {
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 0.82rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    text-align: center;
    margin-bottom: 14px;
    width: 100%;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.25);
    color: #a7f3d0;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #fca5a5;
}

/* ==========================================================================
   ADMIN REQUESTS LOG
   ========================================================================== */

.requests-list-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 10px;
}

.request-log-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
}

.request-log-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.request-log-name {
    font-weight: 700;
    font-size: 1rem;
}

.request-log-status {
    font-size: 0.72rem;
    font-weight: 800;
    font-family: 'Inter', sans-serif;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 30px;
    letter-spacing: 0.5px;
}

.status-pending { background: rgba(245, 158, 11, 0.15); color: var(--accent); }
.status-approved { background: rgba(16, 185, 129, 0.15); color: var(--color-vacation); }
.status-rejected { background: rgba(239, 68, 68, 0.15); color: var(--color-sick); }

.request-log-date-time {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
}

.request-log-message {
    font-size: 0.85rem;
    color: var(--text-dim);
    line-height: 1.5;
    background: #09090a;
    padding: 10px 14px;
    border-radius: 8px;
    border-left: 2px solid var(--border);
}

.request-log-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 6px;
}

.request-action-btn {
    border: none;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 0.75rem;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: 0.2s;
}

.req-btn-approve { background: var(--color-vacation); color: #000; }
.req-btn-approve:hover { background: #34d399; }

.req-btn-reject { background: var(--color-sick); color: #fff; }
.req-btn-reject:hover { background: #f87171; }

.no-requests {
    text-align: center;
    padding: 40px 10px;
    color: var(--text-dim);
    font-family: 'Inter', sans-serif;
    font-size: 0.88rem;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.app-footer {
    border-top: 1px solid var(--border);
    padding: 24px;
    text-align: center;
    margin-top: auto;
}

#footerText {
    color: var(--text-dim);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    font-family: 'Inter', sans-serif;
}

/* ==========================================================================
   RESPONSIVENESS & ANIMATIONS
   ========================================================================== */

@keyframes slideIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
    .app-header {
        padding: 16px 20px;
    }
    
    .logo-text {
        font-size: 1.15rem;
    }
    
    .nav-month-title {
        font-size: 1.8rem;
    }
    
    .calendar-card {
        padding: 16px;
    }
    
    .calendar-day {
        padding: 8px;
    }
    
    .day-num {
        font-size: 0.95rem;
    }
    
    .legend-panel {
        gap: 16px;
        padding: 12px 16px;
    }
}

@media (max-width: 480px) {
    .app-container {
        margin: 20px auto;
    }
    
    .calendar-day {
        aspect-ratio: 1;
        padding: 4px;
    }
    
    .day-dots {
        gap: 2px;
        margin-top: 2px;
    }
    
    .day-dot {
        width: 5px;
        height: 5px;
    }
    
    .legend-panel {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
        text-align: left;
    }
}
