* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: #f3f6fb;
    color: #1f2937;
    overflow-x: hidden;
}

a {
    text-decoration: none;
}

/* overlay */
.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
    z-index: 999;
}

    .sidebar-overlay.show {
        opacity: 1;
        visibility: visible;
    }

/* sidebar */
.sidebar {
    position: fixed;
    top: 0;
    left: -260px;
    width: 250px;
    height: 100vh;
    background: linear-gradient(180deg, #1d4ed8, #1e40af);
    color: white;
    z-index: 1000;
    transition: left 0.3s ease;
    overflow-y: auto;
    overflow-x: hidden;
}

    .sidebar.show {
        left: 0;
    }

.sidebar-header {
    text-align: center;
    padding: 20px 15px 18px 15px;
    background: rgba(255, 255, 255, 0.06);
    border-bottom: 1px solid rgba(255,255,255,0.12);
    overflow: hidden;
}

.sidebar-logo {
    width: 90px;
    height: 90px;
    object-fit: contain;
    background: white;
    border-radius: 50%;
    padding: 8px;
    margin: 0 auto 12px auto;
    display: block;
}

.sidebar-header h2 {
    font-size: 20px;
    margin: 0 0 6px 0;
    font-weight: 700;
    color: white;
    line-height: 1.2;
}

.sidebar-header p {
    font-size: 14px;
    color: #dbeafe;
    margin: 0;
    line-height: 1.2;
}

.sidebar-menu {
    padding-top: 8px;
}

.sidebar-link {
    display: block;
    color: white;
    padding: 16px 20px;
    font-size: 16px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    transition: 0.3s;
}

    .sidebar-link:hover {
        background: rgba(255, 255, 255, 0.12);
    }

/* content */
.content-wrapper {
    min-height: 100vh;
    margin-top: 88px;
}

.topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    background: linear-gradient(to right, #f7f4df, #eef1f6);
    border-bottom: 1px solid #d9dde5;
    padding: 14px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 998;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.menu-btn {
    background: none;
    border: none;
    font-size: 28px;
    color: #1d4ed8;
    cursor: pointer;
    padding: 4px 8px;
}

.topbar-logo {
    width: 52px;
    height: 52px;
    object-fit: contain;
    border-radius: 8px;
}

.topbar-brand h1 {
    font-size: 18px;
    color: #1e3a8a;
    font-weight: 700;
    margin-bottom: 2px;
}

.topbar-brand p {
    font-size: 13px;
    color: #6b7280;
}

.topbar-right span {
    color: #6b7280;
    font-size: 15px;
}

.page-body {
    padding: 25px;
}

/* ✅ COMMON RED BORDER BOX - FULL FIT */
.main-content-box {
    width: 100%;
    max-width: 1350px;
    margin: 20px auto;
    padding: 0;
    background: #fff;
    border: 2px solid black;
    border-radius: 18px;
    overflow: hidden;
}

/* ✅ COMMON PAGE HEADER */
.page-header {
    padding: 4px 12px !important;
    margin-bottom: 3px !important;
    border-radius: 8px;
    min-height: 42px;
}

    .page-header h2 {
        font-size: 18px !important;
        margin: 0;
        line-height: 1.2;
    }

/* red bordered section */
.red-bordered-section {
    max-width: 1350px;
    margin: 20px auto;
    background: #fff;
    padding: 0px;
    border: 2px solid red;
    border-radius: 18px;
}

/* blue header inside red bordered section */
.section-banner {
    background: linear-gradient(90deg, #0d6efd, #17c1ff);
    color: white;
    text-align: center;
    padding: 12px 20px;
    border-radius: 12px;
    margin-bottom: 18px;
}

    .section-banner h1,
    .section-banner h2 {
        margin: 0;
        font-size: 28px;
        font-weight: 700;
    }

    .section-banner p {
        margin-top: 6px;
        font-size: 16px;
    }

/* common action icon */
.action-icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    cursor: pointer;
}

.icon-btn {
    border: none;
    background: none;
    padding: 0;
    cursor: pointer;
}

/* home page */
.home-box {
    background: white;
    border-radius: 14px;
    padding: 30px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

    .home-box h1 {
        text-align: center;
        font-size: 34px;
        color: #4b5563;
        font-weight: 300;
        margin-bottom: 10px;
    }

    .home-box > p {
        text-align: center;
        color: #6b7280;
        margin-bottom: 30px;
        font-size: 18px;
    }

.home-section-title {
    text-align: center;
    font-size: 24px;
    margin: 30px 0 25px;
    color: #374151;
    font-weight: 700;
}

.home-card-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 22px;
    margin-bottom: 20px;
}

.home-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 28px 20px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.home-icon {
    font-size: 42px;
    margin-bottom: 12px;
}

.home-card h3 {
    font-size: 20px;
    color: #374151;
    margin-bottom: 10px;
}

.home-card p {
    color: #6b7280;
    font-size: 16px;
    line-height: 1.5;
}

/* form pages */
.form-container {
    background: white;
    border-radius: 14px;
    padding: 25px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.form-header {
    text-align: center;
    margin-bottom: 20px;
    padding: 10px;
    border-radius: 12px;
    background: linear-gradient(90deg, #2563eb, #06b6d4);
    color: white;
}

    .form-header h1 {
        font-size: 30px;
        margin-bottom: 6px;
    }

.card-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

    .card-grid div {
        display: flex;
        flex-direction: column;
    }

    .card-grid label {
        font-weight: 600;
        margin-bottom: 6px;
    }

    .card-grid input,
    .card-grid select,
    .card-grid textarea {
        width: 100%;
        padding: 12px;
        border: 1px solid #9ca3af;
        border-radius: 10px;
        font-size: 14px;
        background: white;
    }

    .card-grid textarea {
        min-height: 100px;
        resize: vertical;
    }

.full-span {
    grid-column: span 2;
}

.section-title {
    margin-top: 28px;
    margin-bottom: 12px;
    padding-bottom: 6px;
    color: #2563eb;
    font-size: 22px;
}

.button-row {
    margin-top: 12px;
    margin-bottom: 10px;
}

.submit-row {
    margin-top: 24px;
}

.btn-submit {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 10px;
    background: #2563eb;
    color: white;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
}

.btn-secondary {
    padding: 10px 16px;
    border: none;
    border-radius: 10px;
    background: #0f766e;
    color: white;
    font-weight: 600;
    cursor: pointer;
}
/* =========================
   COMMON ERP TABLE STYLE
========================= */

table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    overflow: hidden;
}

    table thead tr {
        background: #2643b5;
    }

    table th {
        color: white;
        padding: 7px 6px;
        font-size: 12px;
        font-weight: 700;
        text-align: center;
        border-right: 1px solid rgba(255,255,255,0.08);
    }

    table td {
        padding: 5px 6px;
        font-size: 12px;
        text-align: center;
        border-bottom: 1px solid #dfe3ea;
        color: #1f2937;
        background: white;
    }

    table tbody tr:hover {
        background: #f8fafc;
    }

/* =========================
   COMMON PAGE FORM
========================= */

.page-form-row {
    margin-bottom: 8px;
    padding: 0 5px;
}

    .page-form-row label {
        font-size: 13px;
        font-weight: 600;
        margin-right: 6px;
        color: #2c3e50;
    }

    .page-form-row input[type="text"],
    .page-form-row input[type="number"],
    .page-form-row input[type="date"],
    .page-form-row select {
        padding: 6px 10px;
        border: 1px solid #dbe3ea;
        border-radius: 6px;
        margin-right: 6px;
        min-width: 160px;
        font-size: 13px;
        height: 34px;
    }

    .page-form-row button {
        border: none;
        background: #2563eb;
        color: white;
        padding: 6px 14px;
        border-radius: 6px;
        font-size: 13px;
        font-weight: 600;
        cursor: pointer;
    }

        .page-form-row button:hover {
            background: #1d4ed8;
        }

/* =========================
   STUDENT EXPENSE PAGE
========================= */

.expense-form-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    padding: 10px 12px;
    align-items: end;
}

.expense-form-group {
    display: flex;
    flex-direction: column;
}

    .expense-form-group label {
        font-size: 13px;
        font-weight: 600;
        margin-bottom: 3px;
        color: #2c3e50;
    }

    .expense-form-group input,
    .expense-form-group select {
        height: 34px;
        border: 1px solid #dbe3ea;
        border-radius: 6px;
        padding: 0 8px;
        font-size: 13px;
        width: 100%;
    }

.expense-submit-btn {
    border: none;
    background: #2563eb;
    color: white;
    padding: 6px 18px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

    .expense-submit-btn:hover {
        background: #1d4ed8;
    }

/* compact title */

.expense-small-title {
    text-align: center;
    margin: 4px 0 10px 0;
    font-size: 18px;
    font-weight: 700;
    color: #111827;
}

/* edit inputs */

.edit-input {
    width: 100%;
    height: 30px;
    padding: 3px 6px;
    border: 1px solid #cbd5e1;
    border-radius: 5px;
    font-size: 12px;
}

/* icons */

.action-icon {
    width: 22px;
    height: 22px;
    cursor: pointer;
}

/* compact page header */

.page-header {
    padding: 8px 12px !important;
    margin-bottom: 6px !important;
}

    .page-header h2 {
        font-size: 18px !important;
    }

/* compact main box */

.main-content-box {
    margin-top: 3px !important;
}

/* responsive */

@media (max-width: 1200px) {

    .expense-form-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {

    .expense-form-grid {
        grid-template-columns: 1fr;
    }

    .expense-small-title {
        font-size: 18px;
    }

    .topbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 12px 16px;
    }

    .content-wrapper {
        margin-top: 110px;
    }

    .card-grid {
        grid-template-columns: 1fr;
    }

    .full-span {
        grid-column: span 1;
    }

    .page-body {
        padding: 12px;
    }

    .page-header h2 {
        font-size: 16px !important;
    }

    .section-banner h1,
    .section-banner h2 {
        font-size: 18px;
    }

    .red-bordered-section {
        margin: 10px 0;
        padding: 0;
    }

    .main-content-box {
        margin: 10px 0;
    }

    .sidebar-header {
        padding: 18px 12px 16px 12px;
    }

    .sidebar-logo {
        width: 75px;
        height: 75px;
    }

    .sidebar-header h2 {
        font-size: 18px;
    }

    .sidebar-header p {
        font-size: 13px;
    }
}
/* ==========================
   COMMON ERP HEADER
========================== */

.erp-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 12px;
    min-height: 48px;
    border-radius: 8px;
    background: linear-gradient(90deg,#0b5ed7,#1ec8ff);
    margin-bottom: 6px;
}

    .erp-header h2 {
        margin: 0;
        color: #fff;
        font-size: 16px;
        font-weight: 700;
    }

.erp-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.erp-btn {
    color: #ffffff !important;
    text-decoration: none !important;
    font-size: 15px;
    font-weight: 600;
    padding: 0;
    border: none;
    background: transparent;
}

    .erp-btn:hover {
        color: #ffffff !important;
    }