:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --bg-dark: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border: rgba(255, 255, 255, 0.1);
    --glass-blur: blur(12px);
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-image: 
        radial-gradient(at 0% 0%, hsla(253,16%,7%,1) 0, transparent 50%), 
        radial-gradient(at 50% 0%, hsla(225,39%,30%,1) 0, transparent 50%), 
        radial-gradient(at 100% 0%, hsla(339,49%,30%,1) 0, transparent 50%);
}

.container {
    max-width: 1000px;
    width: 100%;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.title-section h1 {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
    background: linear-gradient(to right, #818cf8, #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-info {
    display: flex;
    gap: 0.5rem;
    margin: 0.5rem 0;
    flex-wrap: wrap;
    align-items: center;
}

.header-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: var(--text-main);
    background: transparent;
    padding: 0;
    border: none;
    white-space: nowrap;
}

.digital-clock-wrapper {
    margin-right: 1rem;
}

.digital-clock {
    font-family: 'Share Tech Mono', monospace;
    font-size: 2.8rem;
    color: #ff007f;
    text-shadow: 0 0 10px rgba(255, 0, 127, 0.8), 0 0 20px rgba(255, 0, 127, 0.5);
    line-height: 1;
    letter-spacing: 2px;
}

.date-item {
    font-size: 1rem;
    font-weight: 500;
}

.weather-item {
    font-size: 1.1rem;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.4rem 1rem;
    border-radius: 50px;
    border: 1px solid var(--border);
    backdrop-filter: blur(5px);
    margin-left: 0.5rem;
}

.header-item i { width: 16px; height: 16px; opacity: 0.9; }

.header-item i[data-lucide="clock"] { display: none; }
.header-item i[data-lucide="calendar"] { color: var(--text-muted); }
.header-item i[data-lucide="sun"], .header-item #weather-icon { color: #fbbf24; font-style: normal;}

.user-badge {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.card {
    background: var(--card-bg);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border);
    border-radius: 1.5rem;
    padding: 2rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: rgba(255, 255, 255, 0.03);
    padding: 1.5rem;
    border-radius: 1rem;
    border: 1px solid var(--border);
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
}

.entry-form {
    margin-top: 2rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

input, select {
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 0.75rem;
    color: white;
    font-size: 1rem;
    transition: border-color 0.2s;
}

input:not([type="checkbox"]), select {
    appearance: none;
}

select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem;
    padding-right: 2.5rem;
}

input:focus, select:focus {
    outline: none;
    border-color: var(--primary);
}

button {
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 600;
}

.btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: scale(1.02);
}

.btn-outline {
    background: transparent;
    color: var(--text-main);
    border: 1px solid var(--border);
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

th {
    text-align: left;
    color: var(--text-muted);
    font-size: 0.8rem;
    padding: 1rem;
    border-bottom: 1px solid var(--border);
}

td {
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.positive { color: var(--success); }
.negative { color: var(--danger); }

/* Tabs */
.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.tab-btn.active {
    background: var(--primary);
    color: white;
}

.tab-btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.05);
}

/* Calendar */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
}

.calendar-day {
    min-height: 80px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 0.4rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    transition: all 0.2s;
    cursor: pointer;
}

.calendar-day:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--primary);
}

.calendar-day.empty {
    border: none;
    background: transparent;
    cursor: default;
}

.calendar-day.today {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
}

.calendar-day.holiday .day-num {
    color: #f87171;
    font-weight: bold;
}

.day-num {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
}

.day-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
    align-items: flex-end;
    width: 100%;
    max-height: 75px;
    overflow-y: auto;
    padding-right: 2px;
}

.day-content::-webkit-scrollbar {
    width: 4px;
}

.day-content::-webkit-scrollbar-track {
    background: transparent;
}

.day-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.day-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.4);
}

.day-badge {
    padding: 2px 4px;
    border-radius: 4px;
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-block;
    width: fit-content;
}

.badge-work { background: rgba(99, 102, 241, 0.2); color: #818cf8; border: 1px solid rgba(99, 102, 241, 0.3); }
.badge-ferie { background: rgba(16, 185, 129, 0.2); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }
.badge-104 { background: rgba(245, 158, 11, 0.2); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }
.badge-pr { background: rgba(239, 68, 68, 0.2); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.3); }
.badge-mutua { background: rgba(168, 85, 247, 0.2); color: #c084fc; border: 1px solid rgba(168, 85, 247, 0.3); }

/* Simulator Table */
.sim-table input {
    padding: 0.4rem;
    font-size: 0.85rem;
    width: 100%;
}

@media (max-width: 768px) {
    body { padding: 1rem 1rem 5rem 1rem; }
    .card { padding: 1.5rem; }
    .calendar-grid { gap: 2px; }
    .calendar-day { padding: 2px; border-radius: 4px; }
}

/* Bottom Nav */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-around;
    padding: 0.75rem 0;
    z-index: 1000;
}

.nav-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.7rem;
    font-weight: 500;
    transition: all 0.2s;
    width: 25%;
}

.nav-btn i {
    width: 20px;
    height: 20px;
}

.nav-btn.active {
    color: var(--primary);
}

.nav-btn:hover {
    color: var(--text-main);
}
/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.modal-content {
    width: 95%;
    max-width: 650px;
    max-height: 90vh;
    overflow-y: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.modal-content::-webkit-scrollbar {
    display: none;
}

.modal-entry-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem;
    border-radius: 0.75rem;
    margin-bottom: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid var(--border);
}

.badge-ferie_ap { background: rgba(34, 197, 94, 0.2); color: #4ade80; border: 1px solid rgba(34, 197, 94, 0.3); }
.badge-ferie_ac { background: rgba(245, 158, 11, 0.2); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }

/* Admin UI */
.tabs-nav {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 1rem;
}

.admin-tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    cursor: pointer;
    border-radius: 0.5rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.admin-tab-btn.active {
    background: var(--primary);
    color: white;
}

.admin-tab-btn:hover:not(.active) {
    background: rgba(255,255,255,0.05);
}

.status-badge {
    padding: 4px 8px;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-active { background: rgba(16, 185, 129, 0.2); color: #10b981; }
.status-suspended { background: rgba(239, 68, 68, 0.2); color: #ef4444; }

.user-table th { background: rgba(255,255,255,0.02); }
.user-table tr:hover { background: rgba(255,255,255,0.01); }

.action-btns {
    display: flex;
    gap: 0.5rem;
}

.password-toggle-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-toggle-wrapper input {
    padding-right: 2.5rem;
    width: 100%;
}

.password-toggle-btn {
    position: absolute;
    right: 0.75rem;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.password-toggle-btn:hover {
    color: var(--primary);
}

