*{box-sizing:border-box;margin:0;padding:0;font-family:Arial,sans-serif}
body{background:#eef2f7;color:#0f172a}a{text-decoration:none}
.layout{display:flex;min-height:100vh}.sidebar{width:280px;background:linear-gradient(180deg,#0b1736,#16284a);color:#fff;padding:18px 14px;display:flex;flex-direction:column;gap:14px}.logo{font-size:21px;font-weight:700;margin-bottom:8px}.user-card{background:rgba(255,255,255,.08);border-radius:16px;padding:14px}.user-name{font-size:16px;font-weight:700}.user-role{font-size:14px;opacity:.9;margin-top:6px}.menu{display:flex;flex-direction:column;gap:10px}.menu a,.logout-btn{display:block;color:#fff;padding:12px 14px;border-radius:12px;background:rgba(255,255,255,.08);transition:.2s}.menu a:hover,.menu a.active,.logout-btn:hover{background:rgba(255,255,255,.18)}.logout-btn{margin-top:auto;background:#e61d1d}
.content{flex:1;padding:24px}.topbar,.panel,.card,.big-card,.stat{background:#fff;border-radius:20px;box-shadow:0 10px 26px rgba(15,23,42,.06)}.topbar{padding:22px;display:flex;flex-direction:column;gap:16px;margin-bottom:22px}.topbar-title{text-align:center}.topbar h1{font-size:28px;margin-bottom:6px}.subtitle{color:#64748b}.centered-controls{display:flex;justify-content:center;align-items:end;gap:16px;flex-wrap:wrap;width:100%}.control-group{display:flex;flex-direction:column;gap:8px;min-width:190px}.year-form label{font-size:14px;color:#334155;font-weight:700}.year-form select,select,input[type=text],input[type=password],input[type=time],input[type=number],input[type=file],textarea{width:100%;padding:11px 12px;border:1px solid #cbd5e1;border-radius:12px;outline:none;background:#fff}textarea{min-height:110px;resize:vertical}.year-form select:focus,select:focus,input:focus,textarea:focus{border-color:#2563eb;box-shadow:0 0 0 3px rgba(37,99,235,.12)}
.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:18px}.card{padding:22px}.card h3,.big-card h3,.panel h2{margin-bottom:10px}.card p,.big-card p,.muted{color:#64748b;line-height:1.55}.badge{display:inline-block;margin-top:12px;padding:6px 12px;border-radius:999px;background:#dbeafe;color:#1d4ed8;font-size:12px;font-weight:700}.big-card{padding:24px;margin-top:20px}.stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:16px;margin-bottom:20px}.stat{padding:18px}.stat-number{font-size:28px;font-weight:700;margin-top:8px}.panel{padding:22px;margin-bottom:18px}.flex-between{display:flex;justify-content:space-between;align-items:center;gap:14px;flex-wrap:wrap}.form-row,.form-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:14px;margin-top:14px}.form-group{display:flex;flex-direction:column;gap:7px;margin-bottom:14px}
.btn{border:none;cursor:pointer;border-radius:12px;padding:11px 16px;font-weight:700;display:inline-block}.btn-primary{background:#2563eb;color:#fff}.btn-primary:hover{background:#1d4ed8}.btn-success{background:#16a34a;color:#fff}.btn-danger{background:#dc2626;color:#fff}.btn-secondary{background:#e2e8f0;color:#0f172a}.btn-small{padding:8px 12px;border-radius:10px;font-size:13px}.btn-block{width:100%}.table-wrap{overflow-x:auto;margin-top:14px}table{width:100%;border-collapse:collapse}th,td{text-align:left;padding:14px 12px;border-bottom:1px solid #e2e8f0;vertical-align:middle}th{background:#f8fafc;font-size:14px}.actions{display:flex;gap:8px;flex-wrap:wrap}.flash{padding:14px 16px;border-radius:14px;margin-bottom:18px;font-weight:700}.flash-success{background:#dcfce7;color:#166534}.flash-error{background:#fee2e2;color:#991b1b}.flash-info{background:#dbeafe;color:#1d4ed8}.helper-box{margin-top:18px;padding:14px;border-radius:12px;background:#eff6ff;color:#1e3a8a;line-height:1.6}.status-good{color:#16a34a;font-weight:700}.status-warn{color:#dc2626;font-weight:700}.inline-form{display:inline}.note{font-size:14px;color:#64748b;margin-top:8px}.cards-2{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:18px}.checklist label,.radio-list label{display:block;margin:6px 0}.small{font-size:13px;color:#64748b}.link-btn{color:#2563eb;text-decoration:none;font-weight:700}.weekday-checks{display:flex;flex-wrap:wrap;gap:10px 18px}.weekday-checks label{display:flex;align-items:center;gap:6px;background:#f8fafc;padding:10px 12px;border-radius:12px}.month-tabs{display:flex;gap:10px;flex-wrap:wrap;margin:0 0 16px 0}.month-tab{display:inline-block;padding:10px 14px;border-radius:14px;background:#fff;color:#0f172a;text-decoration:none;box-shadow:0 8px 18px rgba(15,23,42,.06)}.month-tab.active{background:#1e293b;color:#fff}.attendance-grid select{min-width:120px}.mini-form{display:flex;flex-direction:column;gap:8px}.small-link{font-size:12px;padding:6px 8px}.filter-center{display:flex;justify-content:center;align-items:end;gap:14px;flex-wrap:wrap}.clickable-name{font-weight:700;color:#1d4ed8}.lock-panel{display:flex;justify-content:space-between;align-items:center;gap:16px;flex-wrap:wrap}
.login-page{min-height:100vh;display:flex;align-items:center;justify-content:center;background:#dfe8f3}.login-stage{width:100vw;height:100vh;display:flex;align-items:center;justify-content:center;background:url("assets/login_bg.png") no-repeat center -120px;background-size:cover;position:relative}.login-box{width:420px;max-width:90vw;padding:35px;border-radius:28px;background:rgba(180,220,255,.78);backdrop-filter:blur(6px);box-shadow:0 18px 40px rgba(0,0,0,.18);text-align:center;position:absolute;left:50%;top:58%;transform:translate(-50%,-50%)}.login-title{font-size:17px;margin-bottom:22px;color:#4d5b6a}
@media (max-width:980px){.layout{flex-direction:column}.sidebar{width:100%}.content{padding:16px}.topbar h1{font-size:22px}.control-group{min-width:150px}.login-stage{background-position:center center}}


.stat-note{font-size:12px;color:#64748b;margin-top:6px;}

.report-filter{align-items:end}.report-filter-button{justify-content:end}.report-filter-button .btn{width:100%}
html,
body {
    width: 100%;
    min-height: 100%;
}

body.login-page {
    margin: 0;
    min-height: 100vh;
    overflow: hidden;
    background: #dfeaf7;
}

.login-stage {
    position: relative;
    width: 100vw;
    height: 100vh;

    display: flex;
    align-items: center;
    justify-content: center;

    background-image: url("login_bg.png");
    background-repeat: no-repeat;
    background-position: center -10px;
    background-size: cover;
}

.login-box {
    position: absolute;
    left: 50%;
    top: 58%;
    transform: translate(-50%, -50%);

    width: 420px;
    max-width: calc(100vw - 32px);
    padding: 34px;

    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.55);

    background: rgba(184, 222, 250, 0.84);

    box-shadow:
        0 20px 50px rgba(29, 65, 105, 0.24),
        inset 0 1px 0 rgba(255, 255, 255, 0.55);

    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);

    text-align: center;
}

.login-title {
    margin-bottom: 22px;
    color: #405c78;
    font-size: 17px;
    font-weight: 600;
}

.login-box .form-group {
    margin-bottom: 14px;
}

.login-box input {
    width: 100%;
    padding: 15px 16px;

    border: 1px solid #b4c7dc;
    border-radius: 14px;

    background: rgba(239, 246, 255, 0.96);
    color: #172a3d;

    font-size: 16px;
    outline: none;
}

.login-box input:focus {
    border-color: #5598d1;
    box-shadow: 0 0 0 4px rgba(85, 152, 209, 0.17);
    background: #ffffff;
}

.login-box .btn-block {
    width: 100%;
}

@media (max-width: 700px) {
    .login-stage {
        background-position: center center;
    }

    .login-box {
        width: calc(100vw - 28px);
        padding: 26px 20px;
        top: 58%;
    }
}
