/* =========================================
   GLOBAL STYLES (Clean & HD Look)
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; /* HD/Modern Font */
}

body {
    background-color: #f4f6f9; 
    min-height: 100vh; /* 'height' ko 'min-height' kar diya */
    display: flex;
    justify-content: center;
    align-items: flex-start; /* 'center' ki jagah 'flex-start' taaki page top se start ho */
    padding: 40px 0; /* Upar aur neeche scroll karne ke liye thodi jagah chhod di */
}

/* =========================================
   GENERIC BUTTON STYLES (HD Upgrade)
   ========================================= */
.btn {
    text-decoration: none;
    color: #333;
    font-size: 15px;
    font-weight: 500;
    padding: 10px 20px;
    background: linear-gradient(135deg, #ffffff, #eef1f5);
    border: 1px solid #cfd4db;
    border-radius: 6px; /* Smooth rounded corners */
    box-shadow: 0 4px 6px rgba(0,0,0,0.05); /* Soft HD shadow */
    cursor: pointer;
    text-align: center;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease; /* Smooth hover animation */
}

.btn:hover {
    transform: translateY(-2px); /* Hover karne par button thoda upar uthega */
    box-shadow: 0 6px 12px rgba(0,0,0,0.1);
    background: linear-gradient(135deg, #ffffff, #e2e6eb);
    color: #000;
}

.btn:active {
    transform: translateY(1px);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

/* =========================================
   1. HOMEPAGE SPECIFIC STYLES
   ========================================= */
.homepage-container {
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: white;
}

.image-section {
    flex: 1;
    overflow: hidden;
}

.image-section img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.action-bar {
    height: 90px;
    background-color: #e9ecef; 
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 150px; 
    border-top: 1px solid #dee2e6;
    box-shadow: 0 -4px 10px rgba(0,0,0,0.05);
}

/* =========================================
   2. SEARCH RESULT PAGE STYLES
   ========================================= */
.search-result-body {
    background-color: #e9ecef; 
}

.search-result-container {
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.class-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px; 
    margin-bottom: 70px; 
}

.btn-wide {
    width: 320px; 
    padding: 12px 15px;
    font-size: 16px;
}

.btn-small {
    width: 100px;
}

/* =========================================
   3. 9TH & 11TH SEARCH RESULT PAGE STYLES
   ========================================= */
.ninth-search-body, .eleventh-search-body {
    background-color: #ffcdd2; /* Softer HD pink */
}

.ninth-search-container {
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.search-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255, 255, 255, 0.4); /* Glassmorphism light effect */
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.red-input-box {
    width: 300px;
    height: 45px;
    background-color: #e53935; /* Premium red */
    border: 2px solid #ffffff; 
    border-radius: 6px;
    color: white;
    font-size: 18px;
    padding: 0 15px;
    margin-bottom: 30px;
    outline: none;
    transition: border 0.3s ease;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
}

.red-input-box:focus {
    border-color: #1e88e5; /* HD Blue border on focus */
}

.search-action-buttons {
    display: flex;
    gap: 20px;
}

/* =========================================
   4. COLLEGE LOGIN PAGE STYLES
   ========================================= */
.login-body {
    background-color: #e9ecef; 
}

.login-container {
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-form {
    background: #ffffff;
    padding: 50px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08); /* Clean card shadow */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 35px; 
}

.input-section {
    display: flex;
    flex-direction: column;
    gap: 20px; 
}

.input-group {
    display: flex;
    align-items: center;
}

.input-group label {
    width: 90px; 
    font-size: 15px;
    font-weight: 600;
    color: #495057;
}

.input-group input {
    width: 250px;
    height: 35px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    padding: 0 10px;
    font-size: 15px;
    outline: none;
    transition: all 0.3s ease;
}

.input-group input:focus {
    border-color: #4dabf7; 
    box-shadow: 0 0 0 3px rgba(77, 171, 247, 0.2);
}

.login-button-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; 
    gap: 20px 25px; 
}

.login-button-grid .btn {
    width: 160px; 
}

/* =========================================
   5. COLLEGE DASHBOARD STYLES
   ========================================= */
.dashboard-body {
    background-color: #e9ecef;
}

.dashboard-container {
    width: 90%;
    max-width: 900px;
    background: #ffffff;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
}

.dashboard-title {
    color: #343a40;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 1px;
    border-bottom: 2px solid #007bff;
    padding-bottom: 10px;
}

.dashboard-main-grid {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    justify-content: center;
}

.dashboard-secondary-grid {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    justify-content: center;
}

.btn-dashboard {
    width: 180px;
    height: 60px;
    font-size: 16px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
}

.btn-dashboard-wide {
    width: 280px;
    height: 60px;
    font-size: 16px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
}

.logout-section {
    margin-top: 20px;
    width: 100%;
    display: flex;
    justify-content: flex-end; /* Logout button right side me */
}

.btn-logout {
    background: linear-gradient(135deg, #ffe3e3, #ffc9c9);
    border-color: #ffa8a8;
    color: #c92a2a;
}

.btn-logout:hover {
    background: linear-gradient(135deg, #ffc9c9, #ffa8a8);
    color: #e03131;
}

/* =========================================
   6. SELECT CLASS (ADD STUDENT) STYLES
   ========================================= */

.class-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* 2 Columns banayega */
    gap: 40px 100px; /* Upar-niche 40px aur aaju-baaju 100px ka gap */
    justify-items: center;
    align-items: center;
    margin-top: 20px;
}

.btn-class {
    width: 140px;
    height: 50px;
    font-size: 18px;
    font-weight: 600;
}

/* =========================================
   7. ADD STUDENT / DATA ENTRY FORM STYLES
   ========================================= */

/* Main form container ka size aur shadow */
.form-container {
    width: 90%;
    max-width: 850px;
    background: #ffffff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

.student-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 30px;
}

/* 2 Columns grid layout */
.form-grid-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px 50px; /* Left-Right ke beech 50px gap */
}

/* Label aur Input ko aamne-saamne rakhne ke liye */
.input-group-hz {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.input-group-hz label {
    font-size: 14px;
    font-weight: 600;
    color: #495057;
    flex: 0 0 160px; /* Label ki chaudaayi fix kar di hai */
}

/* Input boxes ka HD look */
.input-group-hz input {
    flex: 1;
    height: 38px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    padding: 0 10px;
    font-size: 15px;
    outline: none;
    transition: all 0.3s ease;
}

.input-group-hz input:focus, .input-group-select select:focus {
    border-color: #4dabf7;
    box-shadow: 0 0 0 3px rgba(77, 171, 247, 0.2);
}

/* Address ke liye full width row */
.full-width {
    margin-top: 10px;
}
.full-width input {
    width: 100%;
}

/* Dropdown section styles */
.dropdown-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 15px;
    padding-top: 25px;
    border-top: 1px solid #e9ecef; /* Upar ek light line */
}

.input-group-select {
    display: flex;
    align-items: center;
}

.input-group-select label {
    font-size: 14px;
    font-weight: 600;
    color: #495057;
    width: 160px;
}

.input-group-select select {
    height: 38px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    padding: 0 15px;
    font-size: 15px;
    outline: none;
    cursor: pointer;
    background-color: white;
    min-width: 150px;
}

.dob-group select {
    min-width: 80px;
    margin-right: 10px;
}

/* Buttons Container */
.form-action-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
}

/* Save Button ka special Green HD Look */
.btn-save {
    width: 160px;
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    border-color: #c3e6cb;
    color: #155724;
}

.btn-save:hover {
    background: linear-gradient(135deg, #c3e6cb, #b1dfbb);
    color: #0b2e13;
}

.btn-back {
    width: 160px;
}

/* Styling for dependent dropdowns from 8.JPG */
.dependent-dropdowns select {
    height: 35px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    padding: 0 10px;
    outline: none;
    font-size: 14px;
}
/* =========================================
   COMPACT DATA ENTRY OVERRIDES
   ========================================= */
.data-entry-form {
    padding: 20px 30px !important; /* Box ko thoda patla kiya */
}

.data-entry-form .student-form {
    gap: 8px; /* Rows ke beech ka gap kam kiya */
    margin-top: 10px;
}

.data-entry-form .form-grid-2col {
    gap: 8px 30px; /* Grid ka gap kam kiya */
}

/* Input aur Dropdowns ki height 38px se 28px kardi */
.data-entry-form .input-group-hz input, 
.data-entry-form .input-group-select select,
.dependent-dropdowns select {
    height: 28px;
    font-size: 14px;
    padding: 0 5px;
}

.data-entry-form .input-group-hz label,
.data-entry-form .input-group-select label {
    font-size: 13px; /* Label thode chote kiye */
}

/* =========================================
   MARKS ENTRY SECTION STYLES (Fixed Size & Responsive)
   ========================================= */
.subject-box {
    border: 1px solid #ff4d4f; 
    border-radius: 6px;
    padding: 8px 12px; /* Padding thodi kam ki */
    background-color: #fffafb;
    transition: box-shadow 0.3s ease;
}

.subject-box:hover {
    box-shadow: 0 4px 10px rgba(255, 77, 79, 0.15); 
}

.sub-title {
    color: #e53935;
    font-weight: bold;
    font-size: 14px; /* Title thoda chota kiya */
    margin-bottom: 5px;
    text-transform: uppercase;
}

.marks-grid {
    display: flex;
    align-items: center;
    gap: 8px 10px; /* Horizontal aur vertical gap set kiya */
    flex-wrap: wrap; /* YEH SABSE ZAROORI HAI: Taki screen choti hone par line niche aa jaye aur bahar na nikle */
}

.marks-grid label {
    font-size: 12px; /* Font chota kiya taaki fit ho jaye */
    font-weight: 600;
    color: #495057;
    margin-right: 2px;
}

/* Number boxes ka size aur chota kiya taaki sab ek screen par aa jayein */
.marks-grid input[type="number"] {
    width: 55px; /* 65px se ghata kar 55px kar diya */
    height: 26px; /* Height bhi thodi kam kar di */
    border: 1px solid #ced4da;
    border-radius: 4px;
    padding: 0 4px;
    font-size: 13px;
    outline: none;
    text-align: center;
}

.marks-grid input[type="number"]:focus {
    border-color: #ff4d4f;
    box-shadow: 0 0 0 2px rgba(255, 77, 79, 0.2);
}

.marks-grid input::-webkit-outer-spin-button,
.marks-grid input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.total-label {
    color: #000;
    margin-left: 10px;
}

.total-box {
    background-color: #d4edda !important; 
    border-color: #c3e6cb !important;
    font-weight: bold;
    color: #155724;
    width: 60px !important; /* Total box thoda sa bada rakha hai normal box se */
}

.total-box {
    background-color: #d4edda !important; /* Total box green color ka taaki alag se dikhe */
    border-color: #c3e6cb !important;
    font-weight: bold;
    color: #155724;
}


/* =========================================
   COLORFUL ROW-BASED COMPACT MARKS ENTRY
   ========================================= */
.subject-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 3px 8px;
    border-radius: 4px;
    margin-bottom: 2px;
}

.sub-label-main {
    font-weight: bold;
    font-size: 12px;
    width: 65px; /* Alignment ke liye fixed width */
    color: #333;
}

/* Har subject ke liye alag light pastel color */
.sub-row-1 { background-color: #ffebee; border-left: 3px solid #f44336; } /* Red */
.sub-row-2 { background-color: #e3f2fd; border-left: 3px solid #2196f3; } /* Blue */
.sub-row-3 { background-color: #e8f5e9; border-left: 3px solid #4caf50; } /* Green */
.sub-row-4 { background-color: #fffde7; border-left: 3px solid #ffeb3b; } /* Yellow */
.sub-row-5 { background-color: #f3e5f5; border-left: 3px solid #9c27b0; } /* Purple */
.sub-row-6 { background-color: #fff3e0; border-left: 3px solid #ff9800; } /* Orange */

.subject-row input[type="number"] {
    width: 50px;
    height: 22px; 
    font-size: 12px;
    text-align: center;
    border: 1px solid #ced4da;
    border-radius: 3px;
    outline: none;
}

.subject-row input[type="number"]:focus {
    border-color: #495057;
}

.subject-row label {
    font-size: 11px;
    font-weight: 600;
    color: #495057;
}

.total-box {
    background-color: #fff !important; 
    border: 1px solid #6c757d !important;
    font-weight: bold;
    color: #000;
}
/* =========================================
   CLASS 11th EXTRA COMPACT ROW
   ========================================= */
.subject-row input[type="number"] {
    width: 35px; /* Size aur chota kiya taaki practical wale 7 dabbe ek line me aayein */
    height: 20px; 
    font-size: 11px;
    padding: 0 2px;
}

.subject-row label {
    font-size: 10px;
    margin-right: 2px;
    margin-left: 2px;
}