/* style.css (Professional Redesign) */

/* 1. Import Font & CSS Variables */
@import url('https://fonts.googleapis.com/css2?family=Sarabun:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #206bc4;
    --primary-hover: #1760b8;
    --secondary-color: #626976;
    --body-bg: #f5f7fb;
    --card-bg: #ffffff;
    --text-color: #354052;
    --border-color: #e6e7e9;
    --success: #2fb344;
    --warning: #f7a400;
    --danger: #d63939;
    --shadow: rgba(40, 54, 73, 0.08);
}

/* 2. Base & Typography */
body {
    font-family: 'Sarabun', sans-serif;
    background-color: var(--body-bg);
    color: var(--text-color);
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.wrapper {
    display: flex;
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
}

/* 3. Login Page */
.login-page {
    background: linear-gradient(135deg, #f5f7fb 0%, #eef1f6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    min-height: 100vh;
}
.login-logo {
    margin-bottom: 1.5rem;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
}
.login-box {
    width: 100%;
    max-width: 400px;
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 8px;
    box-shadow: 0 10px 25px var(--shadow);
}
.login-box h2 {
    text-align: center;
    margin-bottom: 0.5rem;
}
.login-box .text-muted {
    text-align: center;
    margin-bottom: 2rem;
}

/* 4. Sidebar Navigation */
.sidebar {
    width: 260px;
    background-color: #232e3c;
    color: #aeb2b7;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}
.sidebar-header {
    padding: 1.5rem;
    text-align: center;
    border-bottom: 1px solid #37414e;
}
.sidebar-header .app-icon {
    font-size: 2rem;
    color: var(--primary-color);
    background-color: rgba(255,255,255,0.1);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
}
.sidebar-header h5 {
    color: white;
    font-size: 1rem;
    margin: 0;
}
.sidebar-nav {
    flex-grow: 1;
    list-style: none;
    padding: 1rem 0;
    margin: 0;
}
.sidebar-nav-item a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.8rem 1.5rem;
    color: #aeb2b7;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}
.sidebar-nav-item a:hover {
    color: white;
    background-color: #37414e;
}
.sidebar-nav-item a.active {
    color: white;
    background-color: var(--primary-color);
    border-left: 4px solid var(--warning-color);
    padding-left: calc(1.5rem - 4px);
}
.sidebar-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #37414e;
}
.sidebar-footer a {
    color: #aeb2b7;
    text-decoration: none;
}
.sidebar-footer a:hover {
    color: white;
}


/* 5. Main Content Area */
.main-wrapper {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}
.top-navbar {
    background: var(--card-bg);
    padding: 0 2rem;
    height: 70px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: flex-end;
}
.main-content {
    padding: 2rem;
    flex-grow: 1;
}
.page-header {
    margin-bottom: 2rem;
}

/* 6. Styled Components */
.card-custom {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 12px var(--shadow);
    margin-bottom: 2rem;
}
.card-custom-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.card-custom-header h4 { margin: 0; font-size: 1.1rem; }
.card-custom-body { padding: 1.5rem; }

.btn { border-radius: 5px; font-weight: 600; padding: 0.6rem 1.2rem; }
.btn-primary { background-color: var(--primary-color); border-color: var(--primary-color); }
.btn-primary:hover { background-color: var(--primary-hover); border-color: var(--primary-hover); }

/* Stat Cards */
.stat-card-new {
    display: flex; align-items: center; gap: 1rem;
}
.stat-card-new .icon-circle {
    width: 48px; height: 48px; border-radius: 50%; display: inline-flex;
    align-items: center; justify-content: center; font-size: 1.5rem;
}
.stat-card-new .icon-circle.bg-success-soft { background-color: rgba(47, 179, 68, 0.1); color: var(--success); }
.stat-card-new .icon-circle.bg-warning-soft { background-color: rgba(247, 164, 0, 0.1); color: var(--warning); }
.stat-card-new .icon-circle.bg-danger-soft { background-color: rgba(214, 57, 57, 0.1); color: var(--danger); }
.stat-card-new .icon-circle.bg-secondary-soft { background-color: rgba(98, 105, 118, 0.1); color: var(--secondary-color); }

.stat-card-new .stat-info h3 { font-size: 1.75rem; margin:0; }
.stat-card-new .stat-info p { color: var(--secondary-color); margin:0; font-weight: 500; }

/* Table */
.table-custom thead th {
    background: var(--body-bg); border-bottom-width: 1px;
    font-weight: 600; text-transform: uppercase; font-size: 0.8rem;
}
.table-custom td, .table-custom th {
    vertical-align: middle; padding: 1rem;
}
.action-btn-group .btn { margin-right: 0.5rem; }

/* School Dashboard Upload */
.upload-box {
    border: 2px dashed var(--border-color); border-radius: 8px;
    padding: 2.5rem; text-align: center; cursor: pointer;
    transition: all 0.2s ease;
}
.upload-box:hover {
    border-color: var(--primary-color); background-color: #fcfdff;
}
.upload-box input[type="file"] { display: none; }
.upload-box .upload-icon { font-size: 3rem; color: var(--primary-color); }
.upload-box .upload-text { font-weight: 600; font-size: 1.1rem; }
.upload-box .upload-hint { color: var(--secondary-color); }

.status-display { text-align: center; padding: 3rem; }
.status-display .status-icon { font-size: 4rem; }