*{
    margin:0;
    padding:0;
    box-sizing:border-box;
    font-family:Arial, Helvetica, sans-serif;
}

body{
    background:linear-gradient(
        135deg,
        #f5f5dc 0%,
        #e3d5b8 100%
    );
    min-height:100vh;
}

.hidden{
    display:none !important;
}

/* LOGIN */

#loginPage{
    width:100%;
    min-height:100vh;
    display:flex;
    justify-content:center;
    align-items:center;
    padding:30px;
}

.login-container{
    width:100%;
    max-width:500px;
    background:#fff;
    border-radius:12px;
    padding:30px;
    box-shadow:0 10px 30px rgba(0,0,0,.15);
}

.login-header{
    text-align:center;
    margin-bottom:25px;
}

.login-header h1{
    color:#002147;
    margin-bottom:10px;
}

.login-header h2{
    color:#444;
    margin-bottom:10px;
}

.login-form{
    display:flex;
    flex-direction:column;
    gap:12px;
}

/* INPUTS */

input,
select,
textarea{
    width:100%;
    padding:12px;
    border:1px solid #ccc;
    border-radius:6px;
    outline:none;
    font-size:15px;
}

input:focus,
select:focus,
textarea:focus{
    border-color:#002147;
}

textarea{
    resize:vertical;
    min-height:90px;
}

/* BUTTONS */

button{
    background:#002147;
    color:#fff;
    border:2px solid #d4af37;
    border-radius:6px;
    padding:12px;
    cursor:pointer;
    font-weight:bold;
    transition:.2s;
}

button:hover{
    opacity:.9;
    transform:translateY(-1px);
}

/* HEADER */

header{
    background:#002147;
    color:white;
    padding:15px 20px;
    display:flex;
    justify-content:space-between;
    align-items:center;
    font-size:18px;
}

/* DASHBOARD */

#appContainer{
    width:100%;
}

.tabs{
    display:flex;
    gap:10px;
    padding:20px;
    flex-wrap:wrap;
}

.tab-content{
    padding:20px;
}

.filters{
    display:grid;
    grid-template-columns:
        repeat(auto-fit,minmax(220px,1fr));
    gap:12px;
    margin-bottom:20px;
}

/* CARDS */

#metricCards{
    display:grid;
    grid-template-columns:
        repeat(auto-fit,minmax(180px,1fr));
    gap:15px;
    margin-bottom:20px;
}

.metric-card{
    background:white;
    border-left:6px solid #002147;
    border-radius:8px;
    padding:15px;
    box-shadow:0 2px 6px rgba(0,0,0,.1);
}

.metric-title{
    font-size:14px;
    color:#666;
}

.metric-value{
    font-size:28px;
    font-weight:bold;
    color:#002147;
    margin-top:8px;
}

/* TABLE */

.table-wrapper{
    background:white;
    border-radius:10px;
    overflow:auto;
    box-shadow:0 3px 8px rgba(0,0,0,.12);
}

table{
    width:100%;
    border-collapse:collapse;
}

table thead{
    background:#002147;
    color:white;
}

table th,
table td{
    border:1px solid #ddd;
    padding:10px;
    text-align:left;
    white-space:nowrap;
}

table tbody tr:nth-child(even){
    background:#f7f7f7;
}

table tbody tr:hover{
    background:#eef4ff;
}

/* THANA */

#selectedStaff{
    background:#fff;
    border-left:4px solid #002147;
    padding:10px;
    margin:10px 0;
    border-radius:6px;
}

#submitResult,
#randomStatus,
#loginError{
    margin-top:12px;
    font-weight:bold;
}

/* ALERTS */

.success{
    color:#0f7b0f;
}

.error{
    color:#d40000;
}

.warning{
    color:#d27a00;
}

/* LOADER */

#loader{
    position:fixed;
    inset:0;
    background:rgba(255,255,255,.8);
    display:flex;
    justify-content:center;
    align-items:center;
    z-index:9999;
}

.spinner{
    width:60px;
    height:60px;
    border:6px solid #ddd;
    border-top:6px solid #002147;
    border-radius:50%;
    animation:spin 1s linear infinite;
}

@keyframes spin{
    from{
        transform:rotate(0deg);
    }
    to{
        transform:rotate(360deg);
    }
}

/* MOBILE */

@media(max-width:768px){

    header{
        flex-direction:column;
        gap:10px;
        text-align:center;
    }

    .tabs{
        flex-direction:column;
    }

    .filters{
        grid-template-columns:1fr;
    }

    #metricCards{
        grid-template-columns:1fr;
    }
}