/* style.css */

/* General Body and Base Styles */
body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; /* आधुनिक लुक के लिए Inter फॉन्ट */
    background: linear-gradient(to right, #e0f7fa, #b2ebf2); /* हल्का नीला-हरा ग्रेडिएंट बैकग्राउंड */
    color: #343a40; /* पढ़ने में आसान के लिए गहरा टेक्स्ट */
    line-height: 1.7; /* बेहतर पठनीयता के लिए लाइन-हाइट */
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* फुटर को नीचे रखने के लिए */
    overflow-x: hidden; /* हॉरिजॉन्टल स्क्रॉलिंग से बचें */
}

/* Header Styles */
header {
    background: linear-gradient(to right, #00796b, #004d40); /* गहरा हरा-नीला ग्रेडिएंट */
    color: white;
    padding: 30px 0; /* ज़्यादा पैडिंग */
    text-align: center;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2); /* ज़्यादा गहरा शैडो */
    border-bottom-left-radius: 25px; /* ज़्यादा गोल कोने */
    border-bottom-right-radius: 25px;
    position: relative;
    z-index: 10;
}

header h1 {
    margin: 0;
    font-size: 3em; /* बड़ा हैडिंग */
    font-weight: 800; /* बहुत गहरा */
    letter-spacing: 1.5px; /* अक्षरों के बीच जगह */
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2); /* टेक्स्ट शैडो */
}

header p {
    margin: 10px 0 0;
    font-size: 1.2em;
    font-style: italic;
    opacity: 0.95;
}

/* Main Container Styles */
.container {
    flex-grow: 1;
    max-width: 950px; /* थोड़ा चौड़ा कंटेनर */
    margin: 40px auto; /* ज़्यादा मार्जिन */
    background: #ffffff;
    border-radius: 20px; /* ज़्यादा गोल कोने */
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25); /* बहुत प्रमुख शैडो */
    padding: 40px 50px; /* ज़्यादा पैडिंग */
    box-sizing: border-box;
    position: relative;
    z-index: 1;
}

/* Headings within Container */
h2 {
    color: #00796b; /* गहरे हरे-नीले रंग का हैडिंग */
    text-align: center;
    margin-top: 0;
    margin-bottom: 40px; /* ज़्यादा मार्जिन */
    font-size: 2.5em; /* बड़ा हैडिंग */
    border-bottom: 3px solid #e0f2f7; /* हल्की बॉर्डर */
    padding-bottom: 20px; /* ज़्यादा पैडिंग */
    position: relative;
}
h2::after {
    content: '';
    position: absolute;
    bottom: -3px; /* बॉर्डर के नीचे */
    left: 50%;
    transform: translateX(-50%);
    width: 60px; /* छोटी हाईलाइट */
    height: 3px;
    background-color: #009688; /* हाईलाइट का रंग */
}

h3 {
    color: #343a40; /* गहरा टेक्स्ट रंग */
    text-align: left;
    margin-bottom: 20px;
    font-size: 1.8em;
    border-bottom: 1px dashed #e9ecef; /* हल्की डैश वाली बॉर्डर */
    padding-bottom: 10px;
}

/* Form Element Styles */
label {
    display: block;
    margin-bottom: 12px; /* ज़्यादा मार्जिन */
    font-weight: 700; /* गहरा लेबल */
    color: #495057; /* मध्यम गहरा टेक्स्ट */
    font-size: 1.05em;
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="file"],
select,
textarea {
    width: calc(100% - 28px); /* पैडिंग और बॉर्डर के लिए समायोजित */
    padding: 14px; /* ज़्यादा पैडिंग */
    margin-bottom: 25px; /* ज़्यादा मार्जिन */
    border: 2px solid #b2dfdb; /* थोड़ा मोटा, हल्का हरा-नीला बॉर्डर */
    border-radius: 10px; /* ज़्यादा गोल कोने */
    font-size: 1.05rem; /* थोड़ा बड़ा फॉन्ट */
    box-sizing: border-box;
    transition: border-color 0.4s ease, box-shadow 0.4s ease;
    background-color: #f0fdfc; /* हल्का बैकग्राउंड रंग */
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
input[type="file"]:focus,
select:focus,
textarea:focus {
    border-color: #00796b; /* गहरा हरा-नीला फ़ोकस बॉर्डर */
    box-shadow: 0 0 0 0.3rem rgba(0, 121, 107, 0.3); /* गहरा हरा-नीला चमक */
    outline: none;
    background-color: #ffffff; /* फ़ोकस पर सफेद बैकग्राउंड */
}

/* Buttons */
button,
.button-link {
    background-color: #4caf50; /* हरा बटन */
    color: white;
    padding: 14px 30px; /* ज़्यादा पैडिंग */
    border: none;
    border-radius: 10px; /* ज़्यादा गोल कोने */
    font-weight: 700; /* गहरा टेक्स्ट */
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    font-size: 1.1em; /* थोड़ा बड़ा फॉन्ट */
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.3); /* गहरा शैडो */
    min-width: 150px; /* न्यूनतम चौड़ाई */
}

button:hover,
.button-link:hover {
    background-color: #388e3c; /* होवर पर गहरा हरा */
    transform: translateY(-3px); /* थोड़ा ऊपर उठा हुआ प्रभाव */
    box-shadow: 0 8px 20px rgba(76, 175, 80, 0.4); /* होवर पर गहरा शैडो */
}

/* Specific button styles for actions */
/* Fix for action buttons overflow */
.action-links {
    display: flex; /* Flexbox का उपयोग करें */
    flex-wrap: wrap; /* आवश्यकतानुसार नई लाइन पर रैप करें */
    gap: 4px; /* बटनों के बीच और कम गैप */
    justify-content: flex-start; /* बटनों को बाईं ओर संरेखित करें */
    align-items: center; /* वर्टिकल सेंटर */
}

.action-links a {
    margin: 0; /* a टैग का डिफ़ॉल्ट मार्जिन हटा दें */
    display: inline-block; /* सुनिश्चित करें कि वे सही से डिस्प्ले हों */
}

.action-links a button {
    background-color: #00bcd4; /* हल्का नीला एक्शन बटन */
    padding: 5px 8px; /* एक्शन बटनों के लिए और कम पैडिंग */
    font-size: 0.75em; /* और छोटा फॉन्ट साइज़ */
    box-shadow: 0 2px 5px rgba(0, 188, 212, 0.25);
    min-width: auto; /* न्यूनतम चौड़ाई हटा दें */
    white-space: nowrap; /* टेक्स्ट को नई लाइन में आने से रोकें */
    border-radius: 6px; /* थोड़े कम गोल कोने */
}

.action-links a button:hover {
    background-color: #0097a7; /* होवर पर गहरा हल्का नीला */
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 188, 212, 0.35);
}


/* Table Styles */
table {
    width: 100%;
    border-collapse: separate; /* गोल कोनों के लिए */
    border-spacing: 0;
    margin: 30px 0; /* ज़्यादा मार्जिन */
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1); /* गहरा टेबल शैडो */
    border-radius: 15px; /* ज़्यादा गोल कोने */
    overflow: hidden;
    background-color: #ffffff;
}

th, td {
    padding: 18px; /* ज़्यादा पैडिंग */
    border-bottom: 1px solid #e0f2f7; /* हल्की बॉर्डर */
    text-align: left;
}

th {
    background-color: #4db6ac; /* मध्यम हरा-नीला हेडर बैकग्राउंड */
    color: white;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.95em;
    letter-spacing: 0.5px;
}

/* पहले और आखिरी कॉलम के लिए गोल कोने */
th:first-child { border-top-left-radius: 15px; }
th:last-child { border-top-right-radius: 15px; }

tr:last-child td {
    border-bottom: none; /* आखिरी रो में बॉर्डर नहीं */
}

tr:nth-child(even) {
    background-color: #f0fdfc; /* हल्का वैकल्पिक रो बैकग्राउंड */
}

tr:hover {
    background-color: #e0f7fa; /* बहुत हल्का नीला-हरा होवर */
    cursor: pointer;
}

/* Links */
a {
    text-decoration: none;
    color: #00796b; /* गहरा हरा-नीला लिंक */
    font-weight: 600;
    transition: color 0.2s ease, text-decoration 0.2s ease;
}

a:hover {
    text-decoration: underline;
    color: #004d40;
}

/* Login box specific styles */
.login-box {
    background: white;
    padding: 50px; /* ज़्यादा पैडिंग */
    border-radius: 20px; /* ज़्यादा गोल कोने */
    box-shadow: 0 10px 25px rgba(0,0,0,0.2); /* गहरा शैडो */
    width: 380px; /* थोड़ा चौड़ा */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin: auto;
    border: 1px solid #e0e0e0;
}
.login-box h2 {
    color: #00796b; /* गहरा हरा-नीला */
    margin-bottom: 30px;
    font-size: 2.2em;
    border-bottom: none;
    padding-bottom: 0;
}
.login-box input[type="text"],
.login-box input[type="password"] {
    width: 100%;
    padding: 14px;
    margin: 12px 0;
    border: 2px solid #b2dfdb;
    border-radius: 10px;
    outline: none;
    box-sizing: border-box;
    background-color: #f0fdfc;
}
.login-box input[type="text"]:focus,
.login-box input[type="password"]:focus {
    border-color: #00796b;
    box-shadow: 0 0 0 0.3rem rgba(0, 121, 107, 0.3);
    background-color: #ffffff;
}

.login-box .password-container {
    position: relative;
    width: 100%;
}
.login-box .password-container input {
    width: 100%;
    padding-right: 45px; /* आइकन के लिए जगह */
}
.login-box .toggle-password {
    position: absolute;
    top: 50%;
    right: 15px; /* थोड़ा अंदर */
    transform: translateY(-50%);
    cursor: pointer;
    color: #6c757d; /* गहरा ग्रे */
    font-size: 1.3em;
}
.login-box button {
    width: 100%;
    padding: 14px;
    background: #00796b; /* गहरा हरा-नीला लॉगिन बटन */
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 121, 107, 0.3);
}
.login-box button:hover {
    background: #004d40;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 121, 107, 0.4);
}
.school-title {
    text-align: center;
    font-size: 24px; /* और बड़ा टाइटल */
    margin-bottom: 40px; /* ज़्यादा मार्जिन */
    font-style: italic;
    color: #495057; /* मध्यम गहरा */
    font-weight: 600;
}
.school-title small {
    display: block;
    font-size: 0.85em;
    color: #6c757d;
    margin-top: 8px;
}


/* Messages (Error/Success) */
.error {
    color: #d32f2f; /* गहरा लाल */
    background-color: #ffebee; /* हल्का लाल बैकग्राउंड */
    border: 1px solid #ef9a9a;
    padding: 15px 20px; /* ज़्यादा पैडिंग */
    border-radius: 10px; /* गोल कोने */
    margin-bottom: 25px; /* ज़्यादा मार्gin */
    text-align: center;
    font-weight: 700;
    box-shadow: 0 2px 5px rgba(211, 47, 47, 0.1);
}

.success {
    color: #388e3c; /* गहरा हरा */
    background-color: #e8f5e9; /* हल्का हरा बैकग्राउंड */
    border: 1px solid #a5d6a7;
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 25px;
    text-align: center;
    font-weight: 700;
    box-shadow: 0 2px 5px rgba(56, 142, 60, 0.1);
}

/* Footer Styles */
.footer {
    text-align: center;
    margin-top: 40px; /* ज़्यादा मार्जिन */
    padding: 25px 0; /* ज़्यादा पैडिंग */
    border-top: 1px solid #e0f2f7; /* हल्की बॉर्डर */
    font-size: 0.95em;
    color: #6c757d;
    background-color: #f0fdfc; /* फुटर के लिए हल्का बैकग्राउंड */
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
}

.logout {
    font-weight: bold;
}

/* Specific styles for elements like file-list if still used */
.file-list {
    margin-top: 30px;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px; /* ज़्यादा पैडिंग */
    border-bottom: 1px solid #e0f2f7;
    background-color: #ffffff;
    border-radius: 10px; /* गोल कोने */
    margin-bottom: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05); /* हल्का शैडो */
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.file-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.file-item:last-child {
    border-bottom: none;
}

.file-actions a {
    margin-left: 15px; /* ज़्यादा मार्जिन */
    text-decoration: none;
    font-weight: bold;
}

/* Dashboard specific styles */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* थोड़े बड़े कार्ड */
    gap: 30px; /* ज़्यादा गैप */
    margin-top: 40px;
}
.dashboard-card {
    background-color: #fff;
    padding: 35px; /* ज़्यादा पैडिंग */
    border-radius: 18px; /* ज़्यादा गोल कोने */
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15); /* गहरा शैडो */
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
    border: 1px solid #e0f2f7;
}
.dashboard-card:hover {
    transform: translateY(-7px); /* ज़्यादा ऊपर उठा हुआ प्रभाव */
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    background-color: #e0f7fa; /* होवर पर हल्का नीला-हरा */
}
.dashboard-card h3 {
    color: #00796b; /* गहरा हरा-नीला */
    margin-bottom: 18px;
    font-size: 1.8em;
    font-weight: 700;
}
.dashboard-card p {
    font-size: 1.05em;
    color: #6c757d;
    margin-bottom: 25px;
}
.dashboard-card .count {
    font-size: 4em; /* बहुत बड़ा काउंट नंबर */
    color: #4caf50; /* हरा */
    font-weight: 800;
    margin-bottom: 20px;
    display: block;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}
.dashboard-card .button-link {
    background-color: #009688; /* नीला-हरा */
    box-shadow: 0 4px 12px rgba(0, 150, 136, 0.25);
    min-width: 180px; /* थोड़ी ज़्यादा न्यूनतम चौड़ाई */
}
.dashboard-card .button-link:hover {
    background-color: #00796b;
    box-shadow: 0 6px 15px rgba(0, 150, 136, 0.35);
}

.welcome-message {
    text-align: center;
    color: #00796b; /* गहरा हरा-नीला */
    margin-bottom: 35px;
    font-size: 2.8em;
    font-weight: 800;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.05);
}
.assigned-class-info {
    text-align: center;
    color: #555;
    font-size: 1.15em;
    margin-bottom: 30px;
    background-color: #e0f7fa; /* हल्का नीला-हरा बैकग्राउंड */
    padding: 12px 25px; /* ज़्यादा पैडिंग */
    border-radius: 10px; /* गोल कोने */
    border: 1px solid #b2ebf2; /* हल्की बॉर्डर */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}
.assigned-class-info strong {
    color: #004d40;
}

/* Disabled Input for Teacher Upload */
.disabled-input {
    background-color: #e9ecef;
    cursor: not-allowed;
    color: #6c757d;
}

/* Status Badges */
.status-pending {
    color: #ff9800; /* नारंगी */
    background-color: #fff3e0; /* हल्का नारंगी बैकग्राउंड */
    padding: 5px 10px;
    border-radius: 5px;
    font-weight: bold;
    display: inline-block;
    min-width: 80px;
    text-align: center;
}
.status-approved {
    color: #4caf50; /* गहरा हरा */
    background-color: #e8f5e9; /* हल्का हरा बैकग्राउंड */
    padding: 5px 10px;
    border-radius: 5px;
    font-weight: bold;
    display: inline-block;
    min-width: 80px;
    text-align: center;
}
.status-rejected {
    color: #d32f2f; /* गहरा लाल */
    background-color: #ffebee; /* हल्का लाल बैकग्राउंड */
    padding: 5px 10px;
    border-radius: 5px;
    font-weight: bold;
    display: inline-block;
    min-width: 80px;
    text-align: center;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .container {
        margin: 30px auto;
        padding: 30px;
    }
    header h1 {
        font-size: 2.5em;
    }
    h2 {
        font-size: 2.2em;
        margin-bottom: 30px;
    }
    .welcome-message {
        font-size: 2em;
    }
    .dashboard-grid {
        gap: 20px;
    }
    .dashboard-card {
        padding: 25px;
    }
    .dashboard-card .count {
        font-size: 3.5em;
    }
}

@media (max-width: 768px) {
    header {
        padding: 20px 0;
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
    }
    header h1 {
        font-size: 2em;
    }
    header p {
        font-size: 1em;
    }
    .container {
        width: 95%;
        padding: 25px;
        margin: 20px auto;
        border-radius: 10px;
        box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
    }
    h2 {
        font-size: 1.8em;
        margin-bottom: 25px;
        padding-bottom: 10px;
    }
    h2::after {
        width: 40px;
    }
    label {
        font-size: 0.9em;
    }
    input[type="text"],
    input[type="password"],
    input[type="email"],
    input[type="file"],
    select,
    textarea {
        width: 100%; /* calc हटा दिया */
        padding: 10px;
        margin-bottom: 15px;
        font-size: 0.95rem;
        border-radius: 8px;
    }
    button, .button-link {
        padding: 10px 20px;
        font-size: 0.9em;
        border-radius: 8px;
        min-width: 120px;
    }
    .action-links a button {
        padding: 5px 8px; /* और कम पैडिंग */
        font-size: 0.75em; /* और छोटा फॉन्ट साइज़ */
        min-width: auto;
    }

    table, thead, tbody, th, td, tr {
        display: block;
    }
    thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }
    tr {
        border: 1px solid #ddd;
        margin-bottom: 15px;
        border-radius: 10px;
        overflow: hidden;
    }
    td {
        border: none;
        border-bottom: 1px solid #eee;
        position: relative;
        /* Adjusted padding-left for more content space */
        padding-left: 140px; /* Fixed padding for label */
        text-align: right;
        padding: 8px 10px; /* Reduced overall padding */
    }
    td:before {
        position: absolute;
        top: 8px; /* Adjusted top to align with new padding */
        left: 10px; /* Adjusted left */
        width: 120px; /* Fixed width for label */
        padding-right: 10px;
        white-space: nowrap;
        text-align: left;
        font-weight: bold;
        color: #555;
        font-size: 0.9em;
    }
    /* Label the data - Ensure these match your table columns in HTML */
    td:nth-of-type(1):before { content: "कक्षा:"; }
    td:nth-of-type(2):before { content: "विषय:"; }
    td:nth-of-type(3):before { content: "परीक्षा प्रकार:"; }
    td:nth-of-type(4):before { content: "सत्र:"; }
    td:nth-of-type(5):before { content: "फ़ाइल नाम:"; }
    td:nth-of-type(6):before { content: "अपलोडर:"; }
    td:nth-of-type(7):before { content: "अपलोड की तारीख:"; }
    td:nth-of-type(8):before { content: "स्थिति:"; }
    td:nth-of-type(9):before { content: "अनुमोदन/अस्वीकृतिकर्ता:"; } /* Admin view only */
    td:last-of-type:before { content: "कार्य:"; }

    .action-links {
        text-align: center;
        padding-top: 10px;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 4px; /* और कम गैप */
    }
    .action-links a {
        margin: 0;
    }
    .dashboard-grid {
        grid-template-columns: 1fr; /* सिंगल कॉलम लेआउट */
        gap: 20px;
    }
    .dashboard-card {
        padding: 20px;
        border-radius: 15px;
    }
    .dashboard-card .count {
        font-size: 3em;
    }
    .welcome-message {
        font-size: 1.8em;
    }
    .assigned-class-info {
        font-size: 1em;
        padding: 10px 15px;
    }
}

@media (max-width: 480px) {
    .login-box {
        width: 95%;
        padding: 30px;
        border-radius: 15px;
    }
    .login-box h2 {
        font-size: 1.8em;
    }
    .school-title {
        font-size: 20px;
    }
    .login-box input[type="text"],
    .login-box input[type="password"] {
        padding: 10px;
    }
    .login-box button {
        padding: 10px;
        font-size: 0.9em;
    }
    td:before {
        width: auto;
        padding-right: 5px;
        left: 10px;
    }
}
