/* ==========================================================================
   ALBATROSS SCHOOL ERP - DASHBOARD STYLESHEET
   Deep Navy Blue (#0d2149) & Royal Blue (#0056b3) Enterprise Design System
   ========================================================================== */

:root {
    --navy-header: #0d2149;
    --navy-sidebar: #0f2952;
    --royal-blue: #0056b3;
    --vibrant-blue: #1890ff;
    --sky-blue: #e8f4ff;
    --mint-green: #e6f7ed;
    --warm-gold: #fff7e6;
    --rose-pink: #ffeef0;
    --soft-purple: #f3e8ff;
    --text-dark: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --bg-workspace: #f4f8fc;
    --bg-white: #ffffff;
    --font-heading: 'Fredoka', sans-serif;
    --font-body: 'Outfit', sans-serif;
    --shadow-card: 0 6px 20px rgba(13, 33, 73, 0.07);
    --shadow-hover: 0 12px 30px rgba(0, 86, 179, 0.15);
    --radius-card: 10px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: var(--font-body);
    background-color: var(--bg-workspace);
    color: var(--text-dark);
    line-height: 1.5;
    overflow-x: hidden;
}

/* ==========================================================================
   LOGIN AUTH MODAL OVERLAY
   ========================================================================== */
.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, rgba(13, 33, 73, 0.94) 0%, rgba(0, 86, 179, 0.88) 100%);
    backdrop-filter: blur(10px);
    z-index: 10000;
    display: flex;
    align-items: flex-start;    /* Allow card to start near top on small screens */
    justify-content: center;
    padding: 20px;
    overflow-y: auto;           /* Enable scroll if card taller than screen */
    -webkit-overflow-scrolling: touch; /* Smooth scroll on iOS */
}

.login-card {
    background: #ffffff;
    width: 100%;
    max-width: 440px;
    border-radius: 16px;
    padding: 40px 35px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
    animation: zoomIn 0.35s ease;
    position: relative;
    z-index: 2;
}

.login-back-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #f1f5f9;
    color: var(--navy-header);
    font-size: 1.1rem;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    z-index: 10;
}

.login-back-btn:hover {
    background: var(--royal-blue);
    color: white;
    transform: translateX(-4px) scale(1.08);
    box-shadow: 0 4px 12px rgba(0, 86, 179, 0.25);
}

@keyframes zoomIn {
    from { opacity: 0; transform: scale(0.92); }
    to { opacity: 1; transform: scale(1); }
}

.login-logo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 3px solid var(--royal-blue);
    margin-bottom: 10px;
    box-shadow: 0 4px 15px rgba(0, 86, 179, 0.3);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.login-logo:hover {
    transform: scale(1.06) rotate(4deg);
}

.login-header h2 {
    font-family: var(--font-heading);
    color: var(--navy-header);
    font-size: 1.6rem;
    margin-bottom: 4px;
}

/* Animated role subtitle */
.role-subtitle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--royal-blue);
    font-size: 0.88rem;
    font-weight: 600;
    margin-bottom: 16px;
    background: #e8f4ff;
    padding: 5px 14px;
    border-radius: 20px;
    border: 1px solid #bae7ff;
    animation: subtitleFadeIn 0.35s ease;
    transition: all 0.3s ease;
}

@keyframes subtitleFadeIn {
    from { opacity: 0; transform: translateY(-6px) scale(0.95); }
    to   { opacity: 1; transform: translateY(0)  scale(1); }
}

.demo-hint-badge {
    background: #f0f7ff;
    color: var(--royal-blue);
    border: 1px solid #bae7ff;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.82rem;
    margin-bottom: 22px;
    display: inline-block;
}

.login-form .form-group {
    text-align: left;
    margin-bottom: 18px;
}

/* Role Tabs */
.role-tabs {
    display: flex;
    background: var(--bg-workspace);
    border-radius: 10px;
    padding: 5px;
    margin-bottom: 20px;
    gap: 3px;
}
.role-tab {
    flex: 1;
    text-align: center;
}
.role-tab input[type="radio"] {
    display: none;
}
.role-tab label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 9px 4px 7px;
    cursor: pointer;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    border-radius: 7px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 0;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    user-select: none;
}
.role-tab label i {
    font-size: 1.1rem;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.role-tab input[type="radio"]:checked + label {
    background: #ffffff;
    color: var(--royal-blue);
    box-shadow: 0 3px 10px rgba(0, 86, 179, 0.18);
    transform: translateY(-1px);
}
.role-tab input[type="radio"]:checked + label i {
    transform: scale(1.25) rotate(-8deg);
    color: var(--royal-blue);
}
.role-tab label:hover {
    background: rgba(255,255,255,0.6);
    color: var(--navy-header);
}

.login-form label {
    display: block;
    font-weight: 600;
    font-size: 0.88rem;
    margin-bottom: 6px;
    color: var(--navy-header);
}

.login-form input[type="text"],
.login-form input[type="email"],
.login-form input[type="password"] {
    width: 100%;
    padding: 12px 15px;
    border: 1.5px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
    transition: var(--transition);
}

.login-form input[type="text"]:focus,
.login-form input[type="email"]:focus,
.login-form input[type="password"]:focus {
    border-color: var(--royal-blue);
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 86, 179, 0.15);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    margin-bottom: 20px;
}

/* Custom Checkbox */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: var(--text-muted);
    user-select: none;
}
.checkbox-label input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    position: relative;
    transition: var(--transition);
}
.checkbox-label input[type="checkbox"]:checked {
    background: var(--royal-blue);
    border-color: var(--royal-blue);
}
.checkbox-label input[type="checkbox"]:checked::after {
    content: '\f00c';
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    color: white;
    font-size: 12px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Floating Shapes Background */
.floating-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}
.shape {
    position: absolute;
    color: rgba(255,255,255,0.15);
    animation: floatShape 10s infinite ease-in-out;
}
@keyframes floatShape {
    0% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-30px) rotate(15deg); }
    100% { transform: translateY(0) rotate(0deg); }
}
.shape-1 { top: 15%; left: 10%; animation-duration: 8s; font-size: 3rem; }
.shape-2 { top: 25%; right: 15%; animation-duration: 12s; font-size: 4rem; }
.shape-3 { bottom: 20%; left: 15%; animation-duration: 10s; font-size: 3.5rem; }
.shape-4 { bottom: 15%; right: 10%; animation-duration: 14s; font-size: 2.5rem; }
.shape-5 { top: 40%; left: 5%; animation-duration: 11s; font-size: 2rem; }
.shape-6 { top: 60%; right: 5%; animation-duration: 9s; font-size: 3rem; }

.forgot-link {
    color: var(--royal-blue);
    text-decoration: none;
    font-weight: 600;
}

.login-error-msg {
    color: #dc2626;
    background: #fef2f2;
    border: 1px solid #fecaca;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    margin-bottom: 16px;
}

.btn-login {
    width: 100%;
    background: linear-gradient(135deg, var(--royal-blue), var(--vibrant-blue));
    color: #ffffff;
    border: none;
    padding: 15px;
    border-radius: 8px;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(0, 86, 179, 0.35);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    letter-spacing: 0.5px;
}

/* Shimmer sweep animation */
.btn-login-shimmer {
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.22), transparent);
    transform: skewX(-20deg);
    animation: shimmerSweep 2.8s infinite;
}

@keyframes shimmerSweep {
    0%   { left: -80%; }
    60%  { left: 140%; }
    100% { left: 140%; }
}

.btn-login-icon {
    font-size: 1.1rem;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn-login:hover .btn-login-icon {
    transform: translateX(4px) rotate(-8deg);
}

.btn-login:hover {
    background: linear-gradient(135deg, var(--navy-header), var(--royal-blue));
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(13, 33, 73, 0.45);
}

.btn-login:active {
    transform: translateY(0px);
    box-shadow: 0 4px 12px rgba(0, 86, 179, 0.3);
}

.login-footer {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.login-footer a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 20px;
    background: var(--navy-header);
    color: #ffffff !important;
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    border-radius: 8px;
    border: 2px solid rgba(255, 255, 255, 0.15);
    transition: var(--transition);
    letter-spacing: 0.3px;
    box-shadow: 0 4px 14px rgba(13, 33, 73, 0.35);
}

.login-footer a i {
    font-size: 0.9rem;
    opacity: 0.9;
}

.login-footer a:hover {
    background: #0c1d3f;
    border-color: rgba(255, 215, 0, 0.5);
    color: #ffd700 !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(13, 33, 73, 0.45);
}


/* ==========================================================================
   MAIN ERP WRAPPER & HEADER
   ========================================================================== */
.erp-app-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.erp-header {
    background: linear-gradient(90deg, var(--navy-header) 0%, #003366 100%);
    color: #ffffff;
    height: 80px;
    padding: 0 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border-bottom: 2px solid rgba(255, 215, 0, 0.3);
}

.header-brand-group {
    display: flex;
    align-items: center;
    gap: 15px;
}

.erp-logo {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 2px solid #ffd700;
    box-shadow: 0 2px 10px rgba(255, 215, 0, 0.4);
}

.erp-title {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    color: #ffffff;
    letter-spacing: 0.5px;
}

.erp-motto {
    font-size: 0.65rem;
    color: #ffe066;
    letter-spacing: 2px;
    font-weight: 600;
    text-transform: uppercase;
}

.header-center-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.session-pill {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 8px 20px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    gap: 12px;
    backdrop-filter: blur(4px);
}

.session-pill i {
    font-size: 1.2rem;
    color: #60a5fa;
}

.session-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.session-text span {
    font-weight: 600;
    font-size: 0.9rem;
}

.session-text small {
    color: #93c5fd;
    font-size: 0.75rem;
}

.cloud-status-pill {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.25);
    padding: 7px 16px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    backdrop-filter: blur(4px);
    transition: var(--transition);
}

.cloud-status-pill.status-live {
    background: rgba(22, 163, 74, 0.2);
    border-color: rgba(34, 197, 94, 0.5);
    color: #86efac;
}

.cloud-status-pill.status-demo {
    background: rgba(234, 179, 8, 0.15);
    border-color: rgba(234, 179, 8, 0.4);
    color: #fef08a;
}

.header-user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
}

.user-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #ffffff;
}

.user-info {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.user-name {
    font-weight: 700;
    font-size: 0.95rem;
}

.user-role {
    font-size: 0.75rem;
    color: #93c5fd;
}

.user-menu-btn {
    background: transparent;
    border: none;
    color: #ffffff;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 4px;
    transition: var(--transition);
}

.user-menu-btn:hover {
    color: #ffd700;
}

.user-dropdown-menu {
    position: absolute;
    top: 55px;
    right: 0;
    background: #ffffff;
    color: var(--text-dark);
    min-width: 200px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-color);
    padding: 10px 0;
    display: none;
    z-index: 1001;
}

.user-dropdown-menu.show {
    display: block;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

.user-dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    color: var(--text-dark);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    transition: var(--transition);
}

.user-dropdown-menu a:hover {
    background: #f0f7ff;
    color: var(--royal-blue);
}

.user-dropdown-menu hr {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 6px 0;
}


/* ==========================================================================
   MAIN BODY & SIDEBAR NAVIGATION (15 MODULES)
   ========================================================================== */
.erp-body {
    display: flex;
    flex: 1;
}

.erp-sidebar {
    width: 250px;
    background: var(--navy-sidebar);
    color: #ffffff;
    padding: 15px 0;
    box-shadow: 4px 0 15px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.sidebar-menu {
    list-style: none;
}

.menu-item a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 25px;
    color: rgba(255, 255, 255, 0.78);
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 500;
    transition: var(--transition);
    border-left: 4px solid transparent;
}

.menu-item a i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
    color: #93c5fd;
    transition: var(--transition);
}

.menu-item:hover a {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
}

.menu-item.active a {
    background: linear-gradient(90deg, var(--royal-blue) 0%, var(--vibrant-blue) 100%);
    color: #ffffff;
    border-left-color: #ffd700;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.2);
    border-radius: 0 25px 25px 0;
    margin-right: 10px;
}

.menu-item.active a i {
    color: #ffd700;
}

.exit-item a {
    color: #fca5a5 !important;
}

.exit-item a i {
    color: #f87171 !important;
}


/* ==========================================================================
   WORKSPACE MAIN CONTENT AREA
   ========================================================================== */
.erp-main-content {
    flex: 1;
    padding: 25px;
    overflow-y: auto;
}

.welcome-banner {
    background: #ffffff;
    padding: 20px 25px;
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-color);
    margin-bottom: 22px;
}

.welcome-banner h2 {
    font-family: var(--font-heading);
    color: var(--navy-header);
    font-size: 1.5rem;
}

.welcome-banner p {
    color: var(--text-muted);
    font-size: 0.9rem;
}


/* ==========================================================================
   TOP 5 KPI SCORECARDS
   ========================================================================== */
.scorecards-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 18px;
    margin-bottom: 25px;
}

.scorecard {
    background: #ffffff;
    border-radius: var(--radius-card);
    padding: 20px 16px;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 14px;
    transition: var(--transition);
}

.scorecard:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.sc-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.card-blue .sc-icon { background: var(--sky-blue); color: var(--royal-blue); }
.card-green .sc-icon { background: var(--mint-green); color: #16a34a; }
.card-amber .sc-icon { background: var(--warm-gold); color: #d97706; }
.card-red .sc-icon { background: var(--rose-pink); color: #dc2626; }
.card-purple .sc-icon { background: var(--soft-purple); color: #9333ea; }

.sc-content {
    display: flex;
    flex-direction: column;
}

.sc-title {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.sc-value {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--navy-header);
    margin: 2px 0;
}

.sc-sub {
    font-size: 0.76rem;
    color: var(--text-muted);
}


/* ==========================================================================
   MIDDLE ROW - CHARTS & VISUALIZATION
   ========================================================================== */
.charts-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
    margin-bottom: 25px;
}

.chart-panel {
    background: #ffffff;
    border-radius: var(--radius-card);
    padding: 22px;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-color);
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.panel-header h3 {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    color: var(--navy-header);
    display: flex;
    align-items: center;
    gap: 8px;
}

.panel-header h3 i {
    color: var(--royal-blue);
}

.panel-badge {
    background: #f0f7ff;
    color: var(--royal-blue);
    border: 1px solid #bae7ff;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
}

.chart-container {
    position: relative;
    height: 260px;
    width: 100%;
}


/* ==========================================================================
   BOTTOM ROW - DATA TABLES, ACTIVITIES & QUICK ACTIONS
   ========================================================================== */
.bottom-panels-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 0.9fr;
    gap: 22px;
}

.panel-card {
    background: #ffffff;
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.panel-header.dark-header {
    background: var(--navy-header);
    color: #ffffff;
    padding: 14px 20px;
    margin-bottom: 0;
}

.panel-header.dark-header h3 {
    color: #ffffff;
}

.panel-header.dark-header h3 i {
    color: #ffd700;
}

/* Data Table */
.table-responsive {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.data-table th,
.data-table td {
    padding: 12px 18px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.data-table th {
    background: #f8fafc;
    color: var(--text-muted);
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
}

.data-table tbody tr:hover {
    background: #f0f7ff;
}

.table-total-row {
    background: #f8fafc;
}

.text-danger {
    color: #dc2626;
}

/* Activity Feed Timeline */
.activity-list {
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.act-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.icon-green { background: #e6f7ed; color: #16a34a; }
.icon-blue { background: #e6f7ff; color: #1890ff; }
.icon-amber { background: #fff7e6; color: #d97706; }
.icon-purple { background: #f3e8ff; color: #9333ea; }
.icon-yellow { background: #fef9c3; color: #ca8a04; }

.act-details p {
    font-size: 0.86rem;
    font-weight: 500;
    color: var(--text-dark);
}

.act-details small {
    color: var(--text-muted);
    font-size: 0.75rem;
}

/* Right Stack Panel: Quick Actions & Reminders */
.right-stack-panel {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.quick-actions-panel {
    background: #ffffff;
}

.qa-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding: 15px;
}

.qa-btn {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 14px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: var(--transition);
}

.qa-btn i {
    font-size: 1.3rem;
    color: var(--royal-blue);
}

.qa-btn span {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--navy-header);
    text-align: center;
}

.qa-btn:hover {
    background: var(--royal-blue);
    border-color: var(--royal-blue);
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 86, 179, 0.3);
}

.qa-btn:hover i,
.qa-btn:hover span {
    color: #ffffff;
}

/* Reminders Panel */
.reminders-panel {
    padding: 18px;
}

.reminders-list {
    padding-left: 20px;
    font-size: 0.86rem;
}

.reminders-list li {
    margin-bottom: 8px;
    color: var(--text-dark);
    font-weight: 500;
}


/* ==========================================================================
   FOOTER SYSTEM STATUS BAR
   ========================================================================== */
.erp-footer-bar {
    background: var(--navy-header);
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8rem;
    padding: 10px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.erp-footer-bar strong {
    color: #ffffff;
}


/* ==========================================================================
   ACTION MODALS
   ========================================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(13, 33, 73, 0.85);
    backdrop-filter: blur(6px);
    z-index: 9000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
}

.modal-overlay.active {
    display: flex !important;
    opacity: 1;
    visibility: visible;
}

.modal-box {
    background: #ffffff;
    width: 100%;
    max-width: 540px;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    animation: modalSlide 0.3s ease;
    margin: auto;
}

@keyframes modalSlide {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-header {
    background: var(--navy-header);
    color: #ffffff;
    padding: 16px 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-header h3 i {
    color: #ffd700;
}

.modal-close {
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 1.6rem;
    cursor: pointer;
    line-height: 1;
}

.form-grid {
    padding: 22px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-grid .form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-grid label {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--navy-header);
}

.form-grid input,
.form-grid select {
    padding: 10px 12px;
    border: 1.5px solid var(--border-color);
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.9rem;
}

.modal-footer {
    padding: 15px 22px;
    background: #f8fafc;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.btn-cancel {
    background: #e2e8f0;
    color: var(--text-dark);
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
}

.btn-submit {
    background: linear-gradient(135deg, var(--royal-blue), var(--vibrant-blue));
    color: #ffffff;
    border: none;
    padding: 10px 22px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 86, 179, 0.3);
}

/* Printable Receipt Template */
.receipt-box {
    max-width: 640px;
}

.printable-receipt {
    padding: 30px;
    background: #ffffff;
    color: #000000;
    font-family: 'Outfit', sans-serif;
}

.receipt-header {
    display: flex;
    align-items: center;
    gap: 15px;
    padding-bottom: 15px;
    border-bottom: 2px solid #0d2149;
}

.receipt-logo {
    width: 60px;
    height: 60px;
    max-width: 60px;
    max-height: 60px;
    border-radius: 50%;
    border: 2px solid #0d2149;
    object-fit: cover;
}

.receipt-school-info h2 {
    font-family: var(--font-heading);
    color: #0d2149;
    font-size: 1.3rem;
}

.receipt-school-info p {
    font-size: 0.82rem;
    color: #444;
}

.receipt-banner {
    background: #0d2149;
    color: #ffffff;
    text-align: center;
    font-weight: 700;
    font-size: 0.9rem;
    padding: 6px;
    letter-spacing: 1px;
    margin: 15px 0;
}

.receipt-meta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 20px;
    font-size: 0.88rem;
    margin-bottom: 20px;
}

.receipt-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 25px;
    font-size: 0.9rem;
}

.receipt-table th,
.receipt-table td {
    border: 1px solid #ddd;
    padding: 10px 12px;
}

.receipt-table th {
    background: #f0f4f8;
}

.receipt-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding-top: 20px;
    border-top: 1px solid #ddd;
}

.rcpt-stamp {
    text-align: center;
    border-top: 1px dashed #000;
    padding-top: 5px;
}

.rcpt-stamp small {
    font-size: 0.75rem;
}


/* ==========================================================================
   STUDENT MANAGEMENT MODULE SPECIFIC STYLES
   ========================================================================== */

/* Module Header */
.module-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #ffffff;
    padding: 20px 25px;
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-color);
    margin-bottom: 22px;
}
.module-title-group h2 {
    font-family: var(--font-heading);
    color: var(--navy-header);
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 12px;
}
.module-title-group h2 i {
    color: var(--royal-blue);
}
.module-title-group p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 4px;
}
.btn-module-primary {
    background: linear-gradient(135deg, var(--royal-blue), var(--vibrant-blue));
    color: #ffffff;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(0, 86, 179, 0.3);
}
.btn-module-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 86, 179, 0.4);
}

/* Stats Mini Cards */
.module-stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-bottom: 22px;
}
.mini-stat-card {
    background: #ffffff;
    padding: 16px 20px;
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
}
.mini-stat-value {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    color: var(--navy-header);
    line-height: 1.1;
}
.mini-stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-top: 4px;
}

/* Controls Bar (Search, Filters, Export) */
.module-controls-bar {
    display: flex;
    gap: 16px;
    margin-bottom: 22px;
    align-items: center;
}
.search-box-wrap {
    flex: 1;
    position: relative;
}
.search-box-wrap i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}
.search-box-wrap input {
    width: 100%;
    padding: 12px 16px 12px 42px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}
.search-box-wrap input:focus {
    border-color: var(--royal-blue);
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 86, 179, 0.15);
}
.module-select {
    padding: 12px 35px 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: #fff;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-dark);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}
.btn-module-secondary {
    background: #ffffff;
    color: var(--navy-header);
    border: 1px solid var(--border-color);
    padding: 12px 18px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}
.btn-module-secondary:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

/* Action Buttons in Table */
.action-btns {
    display: flex;
    gap: 8px;
}
.act-btn {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    color: #fff;
}
.act-view { background: #0ea5e9; }
.act-view:hover { background: #0284c7; }
.act-edit { background: #f59e0b; }
.act-edit:hover { background: #d97706; }
.act-delete { background: #ef4444; }
.act-delete:hover { background: #dc2626; }

/* Wide Modals for Complex Forms */
.modal-box-wide {
    max-width: 800px;
}
.form-grid-3 {
    grid-template-columns: repeat(3, 1fr);
    padding: 15px 22px;
    gap: 15px;
}
.modal-section-label {
    background: #f8fafc;
    padding: 10px 22px;
    font-weight: 700;
    color: var(--navy-header);
    border-bottom: 1px solid var(--border-color);
    border-top: 1px solid var(--border-color);
    font-size: 0.9rem;
}

/* ==========================================================================
   ACADEMIC MODULE SPECIFIC STYLES
   ========================================================================== */
.timetable-grid th, .timetable-grid td {
    text-align: center;
    padding: 10px;
}
.syllabus-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.syllabus-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8fafc;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}
.syllabus-info {
    flex: 1;
}
.syllabus-info h4 {
    margin: 0 0 5px 0;
    color: var(--navy-header);
}
.progress-bar-container {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 5px;
}
.progress-bar-fill {
    height: 100%;
    background: linear-gradient(135deg, var(--royal-blue), var(--vibrant-blue));
}
.syllabus-percent {
    font-weight: 700;
    color: var(--text-dark);
    margin-left: 15px;
    font-size: 1.1rem;
}

/* ==========================================================================
   PRINT STYLESHEET (WINDOW.PRINT NATIVE PDF VIEW)
   ========================================================================== */
@media print {
    body * {
        visibility: hidden;
    }
    #printableReceiptArea,
    #printableReceiptArea * {
        visibility: visible;
    }
    #printableReceiptArea {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        padding: 0;
        margin: 0;
    }
    .no-print {
        display: none !important;
    }
}


/* Responsive Layout Breaks */
@media (max-width: 1200px) {
    .scorecards-grid { grid-template-columns: repeat(3, 1fr); }
    .bottom-panels-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
    .scorecards-grid { grid-template-columns: repeat(2, 1fr); }
    .charts-row { grid-template-columns: 1fr; }
    .erp-sidebar { width: 70px; }
    .sidebar-menu span { display: none; }
}

@media (max-width: 768px) {
    /* Transform Sidebar into Bottom Navigation */
    .erp-body { flex-direction: column; }
    .erp-sidebar { 
        width: 100%; 
        height: 65px; 
        padding: 0; 
        position: fixed; 
        bottom: 0; 
        left: 0;
        z-index: 1000; 
        box-shadow: 0 -4px 15px rgba(0,0,0,0.15); 
    }
    .sidebar-menu { 
        display: flex; 
        justify-content: space-around; 
        height: 100%; 
        align-items: center; 
    }
    .menu-item { flex: 1; text-align: center; }
    .menu-item a { 
        padding: 10px; 
        justify-content: center; 
        border-left: none; 
        border-top: 4px solid transparent; 
        border-radius: 0;
    }
    .menu-item.active a { 
        border-radius: 10px 10px 0 0; 
        margin-right: 0; 
        border-left: none; 
        border-top-color: #ffd700; 
        background: linear-gradient(0deg, var(--royal-blue) 0%, var(--vibrant-blue) 100%);
        box-shadow: none;
    }
    .menu-item a i { font-size: 1.4rem; margin: 0; }
    
    /* Header Adjustments */
    .erp-header { 
        padding: 15px 10px; 
        height: auto; 
        flex-direction: column; 
        gap: 15px;
    }
    .header-brand-group { width: 100%; justify-content: center; }
    .erp-logo { width: 45px; height: 45px; }
    .erp-title { font-size: 1.2rem; }
    .erp-motto { font-size: 0.6rem; }
    .header-center-info { display: none; } /* Hide session/cloud pill on mobile to save space */
    .header-user-profile { width: 100%; justify-content: center; }
    
    /* Main Content Adjustments */
    .erp-main-content { padding: 15px; padding-bottom: 80px; /* Space for bottom nav */ }
    .scorecards-grid { grid-template-columns: 1fr; gap: 15px; }
    .welcome-banner { padding: 15px; text-align: center; }
    .welcome-banner h2 { font-size: 1.2rem; }
    
    /* Modals & Login Screen */
    .modal-box, .login-card { padding: 25px 20px; width: 95%; max-height: 90vh; overflow-y: auto; }
    .login-header h2 { font-size: 1.3rem; }
    
    /* Quick Actions & Charts */
    .qa-grid { grid-template-columns: repeat(2, 1fr); }
    .chart-container { height: 220px; }
    
    /* Tables */
    .data-table th, .data-table td { padding: 10px; font-size: 0.75rem; }
}


/* ==========================================================================
   LOGIN PAGE - MOBILE RESPONSIVE (iPhone 15 Plus, Android, all phones)
   ========================================================================== */

@media (max-width: 768px) {
    .login-overlay { align-items: flex-start; padding: 16px 14px; min-height: 100vh; }
    .login-card { padding: 28px 22px; max-width: 100%; width: 100%; margin: auto; border-radius: 14px; }
    .login-back-btn { top: 16px; left: 16px; width: 36px; height: 36px; font-size: 1rem; }
    .login-logo { width: 90px; height: 90px; margin-bottom: 8px; }
    .login-header h2 { font-size: 1.25rem; }
    .login-header p { font-size: 0.82rem; margin-bottom: 12px; }
    .role-tabs { gap: 2px; padding: 3px; margin-bottom: 16px; }
    .role-tab label { padding: 7px 2px; font-size: 0.78rem; }
    .login-form .form-group { margin-bottom: 14px; }
    .login-form input[type="text"], .login-form input[type="email"], .login-form input[type="password"] { padding: 11px 13px; font-size: 16px; }
    .form-options { font-size: 0.8rem; margin-bottom: 16px; }
    .btn-login { padding: 13px; font-size: 0.95rem; }
    .login-footer { margin-top: 16px; padding-top: 14px; }
    .login-footer a { font-size: 0.88rem; padding: 13px 18px; }
    .floating-shapes { display: none; }
}

@media (max-width: 430px) {
    .login-overlay { padding: 12px 10px; }
    .login-card { padding: 24px 18px; border-radius: 12px; }
    .login-back-btn { top: 12px; left: 12px; width: 34px; height: 34px; font-size: 0.9rem; }
    .login-logo { width: 76px; height: 76px; }
    .login-header h2 { font-size: 1.15rem; }
    .role-tab label { font-size: 0.74rem; padding: 7px 0; }
    .login-form input[type="text"], .login-form input[type="email"], .login-form input[type="password"] { font-size: 16px; }
    .login-footer a { font-size: 0.85rem; padding: 12px 14px; }
}

@media (max-width: 380px) {
    .login-card { padding: 20px 14px; }
    .login-back-btn { top: 10px; left: 10px; }
    .login-header h2 { font-size: 1.05rem; }
    .role-tab label { font-size: 0.7rem; }
}