/* =========================================================
   ESAR EDUCATION ERP
   Complete Professional Theme
   ========================================================= */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: linear-gradient(
        135deg,
        #eef7ff 0%,
        #f0fbf7 50%,
        #eef5ff 100%
    );
    color: #172033;
    min-height: 100vh;
}

/* =========================================================
   HEADER
   ========================================================= */

header {
    background: rgba(255, 255, 255, 0.96);
    padding: 16px 6%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #dbe5ef;
    box-shadow: 0 2px 10px rgba(30, 70, 100, 0.08);
    position: sticky;
    top: 0;
    z-index: 100;
}

header strong {
    font-size: 20px;
    color: #123b68;
    letter-spacing: 0.2px;
}

header a {
    color: #2563eb;
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
}

header a:hover {
    color: #1748b5;
}

/* =========================================================
   MAIN AREA
   ========================================================= */

main {
    width: 100%;
    max-width: 1150px;
    margin: 35px auto;
    padding: 0 20px;
}

main > h1 {
    color: #123b68;
    font-size: 38px;
    margin: 0 0 25px;
    font-weight: 700;
}

/* =========================================================
   CARDS
   ========================================================= */

.card {
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid #e1eaf2;
    border-radius: 18px;
    padding: 28px;
    margin: 20px auto;
    box-shadow:
        0 8px 25px rgba(30, 80, 110, 0.09),
        0 2px 6px rgba(30, 80, 110, 0.04);
}

.card h2 {
    margin-top: 0;
    margin-bottom: 25px;
    color: #123b68;
    font-size: 28px;
}

/* =========================================================
   FORM GRID
   ========================================================= */

.grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

form.grid {
    align-items: start;
}

/* =========================================================
   SECTION HEADINGS
   Personal / Contact / Parent / Academic / Fees / Documents
   ========================================================= */

form.grid .section-title,
.section-title {
    grid-column: 1 / -1 !important;

    width: 100% !important;

    display: block !important;

    margin: 25px 0 5px !important;

    padding: 13px 18px !important;

    background: linear-gradient(
        90deg,
        #2563eb 0%,
        #3b82f6 60%,
        #60a5fa 100%
    ) !important;

    color: #ffffff !important;

    border-radius: 10px !important;

    font-size: 19px !important;

    font-weight: 700 !important;

    letter-spacing: 0.2px;

    box-shadow:
        0 4px 12px rgba(37, 99, 235, 0.20) !important;
}

/* First section heading */

form.grid .section-title:first-child {
    margin-top: 5px !important;
}

/* =========================================================
   LABELS
   ========================================================= */

label {
    display: block;
    color: #1e3550;
    font-weight: 700;
    font-size: 15px;
    margin: 0 0 8px;
}

/* =========================================================
   INPUTS
   ========================================================= */

input,
select,
textarea {
    width: 100%;
    padding: 12px 14px;

    border: 1px solid #cbd8e6;
    border-radius: 9px;

    background: #ffffff;
    color: #172033;

    font-family: inherit;
    font-size: 15px;

    outline: none;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}

input:hover,
select:hover,
textarea:hover {
    border-color: #93b4d8;
}

input:focus,
select:focus,
textarea:focus {
    border-color: #2563eb;

    box-shadow:
        0 0 0 3px rgba(37, 99, 235, 0.12);

    background: #fbfdff;
}

textarea {
    min-height: 95px;
    resize: vertical;
}

/* =========================================================
   FILE INPUT
   ========================================================= */

input[type="file"] {
    padding: 9px;
    background: #f8fbff;
}

input[type="file"]::file-selector-button {
    background: #e8f0ff;
    color: #1d4ed8;
    border: 1px solid #b8cef2;
    border-radius: 7px;
    padding: 8px 12px;
    margin-right: 10px;
    cursor: pointer;
    font-weight: 600;
}

/* =========================================================
   DATE INPUT
   ========================================================= */

input[type="date"] {
    color: #172033;
}

/* =========================================================
   BUTTONS
   ========================================================= */

.btn,
button {
    display: inline-block;

    background: linear-gradient(
        135deg,
        #2563eb,
        #4f46e5
    );

    color: #ffffff;

    border: none;
    border-radius: 9px;

    padding: 12px 20px;

    font-size: 15px;
    font-weight: 700;

    text-decoration: none;

    cursor: pointer;

    box-shadow:
        0 4px 10px rgba(37, 99, 235, 0.20);

    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease,
        opacity 0.15s ease;
}

.btn:hover,
button:hover {
    transform: translateY(-1px);

    box-shadow:
        0 6px 15px rgba(37, 99, 235, 0.28);

    opacity: 0.96;
}

.btn:active,
button:active {
    transform: translateY(0);
}

/* =========================================================
   FORM SUBMIT AREA
   ========================================================= */

form.grid button,
form.grid .btn {
    align-self: end;
}

/* =========================================================
   ALERTS
   ========================================================= */

.alert {
    padding: 13px 16px;
    border-radius: 9px;
    margin: 15px 0;
    font-weight: 600;
}

.success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* =========================================================
   DASHBOARD STAT BOXES
   ========================================================= */

.grid3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.stat {
    background: #ffffff;

    padding: 22px;

    border-radius: 16px;

    border: 1px solid #e0eaf3;

    box-shadow:
        0 6px 18px rgba(30, 80, 110, 0.08);
}

.stat span {
    display: block;

    color: #60758b;

    font-size: 16px;

    margin-bottom: 8px;
}

.stat b {
    display: block;

    color: #123b68;

    font-size: 32px;
}

/* =========================================================
   DASHBOARD CARD
   ========================================================= */

.card p {
    line-height: 1.6;
}

.card h3 {
    color: #123b68;
}

/* =========================================================
   TABLE
   ========================================================= */

table {
    width: 100%;

    border-collapse: separate;
    border-spacing: 0;

    overflow: hidden;

    border: 1px solid #dce6ef;

    border-radius: 12px;

    background: #ffffff;
}

th {
    background: linear-gradient(
        90deg,
        #2563eb,
        #3b82f6
    );

    color: #ffffff;

    font-weight: 700;

    padding: 13px;

    text-align: left;

    border-bottom: none;
}

td {
    padding: 12px 13px;

    border-bottom: 1px solid #e5edf4;

    color: #26384d;
}

tr:last-child td {
    border-bottom: none;
}

tbody tr:hover {
    background: #f5f9ff;
}

/* =========================================================
   LOGIN PAGE
   ========================================================= */

.login {
    max-width: 440px;

    margin: 10vh auto;

    background: #ffffff;

    padding: 32px;

    border-radius: 18px;

    box-shadow:
        0 10px 35px rgba(30, 80, 110, 0.12);

    border: 1px solid #e1eaf2;
}

.login h1 {
    color: #123b68;

    margin-top: 0;

    margin-bottom: 25px;
}

.login input {
    margin-bottom: 15px;
}

/* =========================================================
   LINKS
   ========================================================= */

a {
    color: #2563eb;
}

a:hover {
    color: #1d4ed8;
}

/* =========================================================
   SMALL / MUTED TEXT
   ========================================================= */

.muted {
    color: #687b8f;
}

/* =========================================================
   MOBILE RESPONSIVE
   ========================================================= */

@media (max-width: 800px) {

    header {
        padding: 14px 20px;
    }

    header strong {
        font-size: 17px;
    }

    main {
        margin: 25px auto;
        padding: 0 14px;
    }

    main > h1 {
        font-size: 30px;
    }

    .card {
        padding: 20px;
        border-radius: 14px;
    }

    .grid,
    .grid3 {
        grid-template-columns: 1fr;
    }

    form.grid .section-title,
    .section-title {
        grid-column: 1 !important;
    }

    .stat b {
        font-size: 28px;
    }

    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

/* =========================================================
   VERY SMALL MOBILE
   ========================================================= */

@media (max-width: 500px) {

    header {
        padding: 13px 15px;
    }

    header strong {
        font-size: 15px;
    }

    header a {
        font-size: 14px;
    }

    main > h1 {
        font-size: 26px;
    }

    .card {
        padding: 16px;
    }

    .card h2 {
        font-size: 23px;
    }

    form.grid .section-title,
    .section-title {
        font-size: 17px !important;
        padding: 11px 14px !important;
    }

    input,
    select,
    textarea {
        font-size: 14px;
        padding: 11px 12px;
    }

    .btn,
    button {
        width: 100%;
        text-align: center;
    }
}