/* =========================
   RESET
========================= */

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
    font-family:'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root{
    --primary:#2563eb;
    --primary-hover:#1d4ed8;
    --success:#16a34a;

    --bg:#f5f7fb;
    --card:#ffffff;
    --text:#1e293b;
    --text-light:#64748b;
    --border:#e2e8f0;
    --input:#f8fafc;

    --shadow:0 10px 30px rgba(0,0,0,.08);
}

body.dark{
    --bg:#0f172a;
    --card:#1e293b;
    --text:#f8fafc;
    --text-light:#94a3b8;
    --border:#334155;
    --input:#0f172a;
    --shadow:0 10px 30px rgba(0,0,0,.35);
}

/* =========================
   BODY
========================= */

.login-page{
    min-height:100vh;
    background:linear-gradient(
        135deg,
        #2563eb,
        #4f46e5
    );
    display:flex;
    justify-content:center;
    align-items:center;
    padding:20px;
}

/* =========================
   CARD
========================= */

.card{
    width:100%;
    max-width:420px;
    background:var(--card);
    padding:35px 25px;
    border-radius:24px;
    box-shadow:var(--shadow);
    animation:fadeIn .5s ease;
}

/* =========================
   LOGO
========================= */

.logo{
    display:flex;
    justify-content:center;
    margin-bottom:20px;
}

.logo-circle{
    width:75px;
    height:75px;
    border-radius:50%;
    background:var(--primary);
    color:#fff;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:24px;
    font-weight:700;
    letter-spacing:1px;
}

/* =========================
   TEXT
========================= */

h2{
    text-align:center;
    color:var(--text);
    margin-bottom:8px;
}

.subtitle{
    text-align:center;
    color:var(--text-light);
    margin-bottom:25px;
    font-size:14px;
}

/* =========================
   FORM
========================= */

form{
    width:100%;
}

.input-box{
    margin-bottom:16px;
}

.input-box input,
.input-box select{
    width:100%;
    padding:14px 16px;
    border:1px solid var(--border);
    border-radius:12px;
    background:var(--input);
    outline:none;
    font-size:15px;
    transition:.3s;
}

.input-box input:focus,
.input-box select:focus{
    border-color:var(--primary);
    box-shadow:0 0 0 4px rgba(37,99,235,.15);
}

/* =========================
   BUTTON
========================= */

button{
    width:100%;
    border:none;
    background:var(--primary);
    color:white;
    padding:14px;
    border-radius:12px;
    font-size:16px;
    font-weight:600;
    cursor:pointer;
    transition:.3s;
}

button:hover{
    background:var(--primary-hover);
    transform:translateY(-2px);
}

/* =========================
   LINKS
========================= */

.auth-links{
    text-align:center;
    margin-top:18px;
}

.auth-links p{
    color:var(--text-light);
    font-size:14px;
    margin-bottom:5px;
}

.auth-links a{
    color:var(--primary);
    text-decoration:none;
    font-weight:600;
}

.auth-links a:hover{
    text-decoration:underline;
}

/* =========================
   MESSAGE
========================= */

#regMsg{
    margin-top:15px;
    text-align:center;
    font-weight:600;
}

/* =========================
   ANIMATION
========================= */

@keyframes fadeIn{
    from{
        opacity:0;
        transform:translateY(20px);
    }
    to{
        opacity:1;
        transform:translateY(0);
    }
}

/* =========================
   MOBILE
========================= */

@media(max-width:480px){

    .card{
        padding:28px 20px;
        border-radius:20px;
    }

    .logo-circle{
        width:65px;
        height:65px;
        font-size:20px;
    }

    h2{
        font-size:24px;
    }

    button{
        padding:13px;
    }
}
.logo-container{
    width:100%;
    margin:15px 0 20px;
}

.logo-container img{
    width:100%;
    height:180px;
    object-fit:cover;
    border-radius:16px;
    display:block;
}

.password-box{
    position:relative;
}

.password-box input{
    padding-right:50px;
}

.toggle-password{
    position:absolute;
    right:15px;
    top:50%;
    transform:translateY(-50%);
    cursor:pointer;
    font-size:18px;
    user-select:none;
    color:#64748b;
}

.error-message{
    text-align:center;
    margin-top:15px;
    font-weight:600;
}

.developer{
    text-align:center;
    margin-top:15px;
    color:#94a3b8;
    font-size:13px;
    letter-spacing:.5px;
}

@media(max-width:480px){

    .logo-container img{
        height:150px;
    }

    .card{
        max-width:100%;
    }
}
body{
    background:#f5f7fb;
    color:#1e293b;
}

.dashboard-app{
    display:flex;
    min-height:100vh;
}

.sidebar{
    width:280px;
    background:#0f172a;
    color:white;
    padding:20px;
    display:flex;
    flex-direction:column;
    position:fixed;
    left:0;
    top:0;
    bottom:0;
    overflow-y:auto;
}

.logo-area{
    display:flex;
    align-items:center;
    gap:12px;
    margin-bottom:25px;
}

.logo-area h2{
    color:white;
    font-size:20px;
}

.logo-circle{
    width:45px;
    height:45px;
    border-radius:50%;
    background:#2563eb;
    display:flex;
    align-items:center;
    justify-content:center;
    font-weight:700;
}

.menu-title{
    color:#94a3b8;
    font-size:12px;
    margin:18px 0 10px;
    letter-spacing:1px;
}

.menu{
    list-style:none;
}

.menu li{
    padding:14px;
    border-radius:12px;
    cursor:pointer;
    margin-bottom:8px;
    transition:.3s;
    display:flex;
    justify-content:space-between;
    align-items:center;
}

.menu li:hover{
    background:#1e293b;
}

.menu li.active{
    background:#2563eb;
}

.count{
    background:white;
    color:#2563eb;
    padding:2px 8px;
    border-radius:20px;
    font-size:12px;
    font-weight:600;
}

.sidebar-profile{
    display:flex;
    align-items:center;
    gap:12px;
    margin-top:auto;
    margin-bottom:15px;
    padding:12px;
    background:#1e293b;
    border-radius:12px;
}

.sidebar-profile img{
    width:50px;
    height:50px;
    border-radius:50%;
    object-fit:cover;
}

.profile-name{
    color:white;
}

.profile-role{
    color:#94a3b8;
}

.logout-btn{
    border:none;
    background:#ef4444;
    color:white;
    padding:12px;
    border-radius:12px;
    cursor:pointer;
    width:100%;
}

.main-content{
    flex:1;
    margin-left:280px;
    padding:20px;
}

.topbar{
    background:white;
    padding:20px;
    border-radius:18px;
    margin-bottom:20px;
    box-shadow:0 5px 15px rgba(0,0,0,.05);
}

.dashboard-icons{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(140px,1fr));
    gap:15px;
}

.icon-item{
    background:white;
    border-radius:16px;
    padding:15px;
    text-align:center;
    box-shadow:0 5px 15px rgba(0,0,0,.05);
}

.icon-box img{
    width:60px;
    height:60px;
    object-fit:cover;
    border-radius:12px;
}

.icon-label{
    margin-top:10px;
    font-size:13px;
    color:#64748b;
}

.icon-count{
    font-size:24px;
    font-weight:700;
    color:#2563eb;
}

#welcomeText{
    margin-top:20px;
    font-size:20px;
    font-weight:600;
}

.welcome-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(250px,1fr));
    gap:20px;
    margin-top:20px;
}

.welcome-card{
    height:200px;
    border-radius:20px;
    overflow:hidden;
    position:relative;
    background-size:cover;
    background-position:center;
}

.card-overlay{
    position:absolute;
    inset:0;
    background:rgba(0,0,0,.45);
    display:flex;
    align-items:flex-end;
    padding:20px;
}

.card-overlay h3{
    color:white;
}

.card1{
    background-image:url("../IMAGES/children2.jpeg");
}

.card2{
    background-image:url("../IMAGES/subjects.jpeg");
}

.card3{
    background-image:url("../IMAGES/attendance.jpeg");
}

.card4{
    background-image:url("../IMAGES/3D.jpeg");
}

.menu-toggle{
    display:none;
}
@media(max-width:768px){

    .sidebar{
        left:-100%;
        width:280px;
        z-index:1000;
        transition:.3s;
    }

    .sidebar.show{
        left:0;
    }

    .main-content{
        margin-left:0;
        padding:15px;
    }

    .menu-toggle{
        display:block;
        border:none;
        background:#2563eb;
        color:white;
        width:45px;
        height:45px;
        border-radius:10px;
        margin-bottom:15px;
        cursor:pointer;
    }

    .dashboard-icons{
        grid-template-columns:repeat(2,1fr);
    }

    .welcome-grid{
        grid-template-columns:1fr;
    }

    .welcome-card{
        height:180px;
    }

    #welcomeText{
        text-align:center;
    }
}
.students-container{
    display:grid;
    grid-template-columns:380px 1fr;
    gap:25px;
    margin-top:25px;
}

.form-container{
    display:flex;
    flex-direction:column;
}

.form-card{
    background:#fff;
    padding:25px;
    border-radius:20px;
    box-shadow:0 5px 20px rgba(0,0,0,.05);
}

.form-card h3{
    margin-bottom:20px;
    color:#1e293b;
}

.form-row{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:15px;
    margin-bottom:15px;
}

.input-group{
    position:relative;
}

.input-group input,
.input-group select{
    width:100%;
    padding:14px;
    border:1px solid #dbe2ea;
    border-radius:12px;
    outline:none;
    background:#fff;
}

.input-group label{
    display:block;
    margin-top:6px;
    font-size:13px;
    color:#64748b;
}

.btn-primary{
    width:100%;
    border:none;
    background:#2563eb;
    color:#fff;
    padding:14px;
    border-radius:12px;
    cursor:pointer;
    font-weight:600;
}

.table-card{
    background:#fff;
    border-radius:20px;
    padding:20px;
    box-shadow:0 5px 20px rgba(0,0,0,.05);
}

.table-card h3{
    margin-bottom:15px;
}

.search-box{
    margin-bottom:20px;
}

.search-box input{
    width:100%;
    padding:14px 18px;
    border:none;
    background:#fff;
    border-radius:14px;
    box-shadow:0 5px 20px rgba(0,0,0,.05);
}

.table-wrapper{
    overflow-x:auto;
    width:100%;
}

table{
    width:100%;
    border-collapse:collapse;
    min-width:900px;
}

thead{
    background:#2563eb;
    color:#fff;
}

th,
td{
    padding:14px;
    text-align:left;
    border-bottom:1px solid #e5e7eb;
}

tbody tr:hover{
    background:#f8fafc;
}

.students-header{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:15px;
}

.header-logo{
    width:70px;
    height:70px;
    border-radius:50%;
    object-fit:cover;
}

.header-text{
    text-align:center;
    flex:1;
}

.header-text h1{
    font-size:28px;
    margin-bottom:5px;
}

.header-text p{
    color:#64748b;
}
@media(max-width:991px){

    .students-container{
        grid-template-columns:1fr;
    }

    .form-container{
        order:1;
    }

    .table-section{
        order:2;
    }
}

@media(max-width:768px){

    .students-header{
        flex-direction:column;
        text-align:center;
    }

    .header-logo{
        width:60px;
        height:60px;
    }

    .header-text h1{
        font-size:22px;
    }

    .form-row{
        grid-template-columns:1fr;
    }

    .form-card{
        padding:20px;
    }

    .table-card{
        padding:15px;
    }

    th,
    td{
        padding:10px;
        font-size:14px;
    }
}

@media(max-width:480px){

    .header-text h1{
        font-size:18px;
    }

    .btn-primary{
        padding:12px;
    }

    .form-card{
        border-radius:16px;
    }

    .table-card{
        border-radius:16px;
    }
}
.back-btn{
    position:absolute;
    left:20px;
    top:20px;
    text-decoration:none;
    background:#2563eb;
    color:white;
    padding:10px 14px;
    border-radius:10px;
    font-weight:600;
    font-size:14px;
    transition:.3s;
}

.back-btn:hover{
    background:#1d4ed8;
    transform:translateY(-2px);
}
@media(max-width:768px){
    .back-btn{
        position:relative;
        left:0;
        top:0;
        margin-bottom:10px;
        display:inline-block;
    }
}
@media(max-width:768px){

  .sidebar{
    position:fixed;
    left:-100%;
    top:0;
    transition:0.3s;
    z-index:1000;
  }

  .sidebar.show{
    left:0;
  }
}
