/*
Theme Name: Class Pilot
Theme URI: https://class.pilot.cybernation.top
Author: Sharif Noble
Author URI: https://www.facebook.com/alexis.lio.9
Organization: CyberNation
Organization URI: https://cybernation.top
Description: A professional school management system theme inspired by Eduman. Complete solution for managing students, classes, attendance, fees, and results.
Version: 1.0.1
Text Domain: class-pilot
Domain Path: /languages
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/

/* ==============================================
   Variables & Reset
   ============================================== */

:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --accent-color: #f093fb;
    --danger-color: #dc3545;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-bg: #f5f7fa;
    --white: #ffffff;
    --dark-text: #333333;
    --light-text: #666666;
    --border-color: #e0e0e0;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 25px rgba(102, 126, 234, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--light-bg);
    color: var(--dark-text);
    line-height: 1.6;
    font-size: 14px;
}

/* ==============================================
   Typography
   ============================================== */

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.4;
}

h1 { font-size: 32px; }
h2 { font-size: 24px; }
h3 { font-size: 20px; }
h4 { font-size: 18px; }
h5 { font-size: 16px; }
h6 { font-size: 14px; }

p {
    margin-bottom: 15px;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--secondary-color);
}

/* ==============================================
   Header & Navigation
   ============================================== */

.site-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    padding: 15px 0;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    flex-wrap: wrap;
}

.site-branding {
    flex: 0 0 auto;
}

.site-branding h1 {
    font-size: 26px;
    margin: 0;
}

.site-branding a {
    color: var(--white);
    text-decoration: none;
}

.site-description {
    font-size: 12px;
    opacity: 0.9;
    margin: 3px 0 0 0;
}

.main-navigation {
    flex: 1;
    margin-left: 40px;
}

.main-navigation .nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.main-navigation a {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s;
}

.main-navigation a:hover {
    opacity: 0.8;
}

.header-right {
    display: flex;
    gap: 20px;
    align-items: center;
}

.user-name {
    color: var(--white);
    font-weight: 600;
}

.btn-login, .btn-logout {
    background: var(--white);
    color: var(--primary-color);
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.3s;
}

.btn-login:hover, .btn-logout:hover {
    background: #f0f0f0;
}

/* ==============================================
   Main Content
   ============================================== */

.site-content {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    min-height: calc(100vh - 250px);
}

/* ==============================================
   Dashboard
   ============================================== */

.dashboard-wrapper {
    background: var(--white);
    padding: 40px;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.dashboard-container h1 {
    color: var(--primary-color);
    margin-bottom: 30px;
    font-size: 32px;
}

.dashboard-section {
    margin-bottom: 40px;
}

.dashboard-section h2 {
    color: var(--secondary-color);
    font-size: 22px;
    margin-bottom: 20px;
    border-bottom: 3px solid var(--primary-color);
    padding-bottom: 10px;
}

.dashboard-section ul {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.dashboard-section li {
    background: var(--light-bg);
    padding: 20px;
    border-left: 4px solid var(--primary-color);
    border-radius: 4px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.dashboard-section li:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.dashboard-section a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.dashboard-section a:hover {
    text-decoration: underline;
}

/* ==============================================
   Search and Filter
   ============================================== */

.cp-search-filters {
    background: var(--white);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
}

.filter-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    align-items: flex-end;
}

.search-input,
.filter-select {
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
}

.search-input:focus,
.filter-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 5px rgba(102, 126, 234, 0.3);
}

.btn-search,
.btn-reset {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-search {
    background: var(--primary-color);
    color: var(--white);
}

.btn-search:hover {
    background: var(--secondary-color);
}

.btn-reset {
    background: var(--border-color);
    color: var(--dark-text);
}

.btn-reset:hover {
    background: #ccc;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
    padding: 20px;
}

.pagination a,
.pagination span {
    display: inline-block;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    text-decoration: none;
    color: var(--primary-color);
    transition: all 0.3s;
}

.pagination a:hover {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.pagination .current {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

/* ==============================================
   Archive Pages
   ============================================== */

.archive-wrapper {
    background: var(--white);
    padding: 40px;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.archive-container h1 {
    color: var(--primary-color);
    margin-bottom: 30px;
    font-size: 32px;
}

.students-grid, .classes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.student-card, .class-card {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.15);
    transition: transform 0.3s, box-shadow 0.3s;
}

.student-card:hover, .class-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.student-card h3, .class-card h3 {
    margin-bottom: 15px;
    font-size: 20px;
}

.student-card a, .class-card a {
    color: var(--white);
    text-decoration: none;
}

.student-card p, .class-card p {
    margin-bottom: 10px;
    font-size: 14px;
}

.btn-view {
    display: inline-block;
    background: var(--white);
    color: var(--primary-color);
    padding: 10px 20px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    margin-top: 15px;
    transition: background 0.3s;
}

.btn-view:hover {
    background: #f0f0f0;
}

/* ==============================================
   Detail Pages
   ============================================== */

.student-detail-wrapper, 
.class-detail-wrapper,
.attendance-detail-wrapper,
.fee-detail-wrapper,
.result-detail-wrapper {
    background: var(--white);
    padding: 40px;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.student-detail-container h1,
.class-detail-container h1,
.attendance-detail-container h1,
.fee-detail-container h1,
.result-detail-container h1 {
    color: var(--primary-color);
    margin-bottom: 30px;
    font-size: 32px;
}

.student-detail-card, 
.class-detail-card,
.attendance-detail-card,
.fee-detail-card,
.result-detail-card {
    background: var(--light-bg);
    padding: 30px;
    border-radius: 8px;
    border-left: 5px solid var(--primary-color);
}

.student-info, 
.class-info,
.attendance-info,
.fee-info,
.result-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.info-row {
    background: var(--white);
    padding: 15px;
    border-radius: 4px;
    border-bottom: 2px solid var(--primary-color);
}

.info-row strong {
    color: var(--secondary-color);
    display: block;
    margin-bottom: 5px;
}

.info-row span {
    color: var(--dark-text);
    font-size: 15px;
}

/* ==============================================
   Status Badges
   ============================================== */

.status-badge, .attendance-badge, .fee-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.status-badge.active, .attendance-badge.present, .fee-badge.paid {
    background: #d4edda;
    color: #155724;
}

.status-badge.inactive, .attendance-badge.absent, .fee-badge.unpaid {
    background: #f8d7da;
    color: #721c24;
}

.attendance-badge.leave, .fee-badge.pending {
    background: #fff3cd;
    color: #856404;
}

.marks-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 16px;
    font-weight: 700;
}

.fee-amount {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
}

.class-description {
    background: var(--white);
    padding: 20px;
    border-radius: 4px;
    margin-top: 20px;
    border-left: 4px solid var(--primary-color);
}

/* ==============================================
   Footer
   ============================================== */

.site-footer {
    background: #2c3e50;
    color: var(--white);
    padding: 40px 0;
    margin-top: 60px;
    text-align: center;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==============================================
   Timetable
   ============================================== */

.timetable-wrapper {
    background: var(--white);
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.timetable {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.timetable th,
.timetable td {
    border: 1px solid var(--border-color);
    padding: 12px;
    text-align: center;
}

.timetable th {
    background: var(--primary-color);
    color: var(--white);
    font-weight: 600;
}

.timetable tr:hover {
    background: var(--light-bg);
}

/* ==============================================
   Parent Portal
   ============================================== */

.parent-portal {
    background: var(--white);
    padding: 30px;
    border-radius: 8px;
}

.children-selector {
    margin-bottom: 30px;
    display: flex;
    gap: 15px;
    align-items: center;
}

.children-selector label {
    font-weight: 600;
}

.children-selector select {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.child-overview {
    border-top: 2px solid var(--primary-color);
    padding-top: 20px;
}

.section {
    background: var(--light-bg);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid var(--primary-color);
}

.section h4 {
    margin-top: 0;
    color: var(--primary-color);
}

.section table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.section table th,
.section table td {
    border: 1px solid var(--border-color);
    padding: 10px;
    text-align: left;
}

.section table th {
    background: var(--primary-color);
    color: var(--white);
}

.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.badge.paid {
    background: #d4edda;
    color: #155724;
}

.badge.unpaid {
    background: #f8d7da;
    color: #721c24;
}

.badge.pending {
    background: #fff3cd;
    color: #856404;
}

/* ==============================================
   Documents
   ============================================== */

.documents-container {
    background: var(--white);
    padding: 30px;
    border-radius: 8px;
}

.documents-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.documents-table th,
.documents-table td {
    border: 1px solid var(--border-color);
    padding: 12px;
    text-align: left;
}

.documents-table th {
    background: var(--primary-color);
    color: var(--white);
    font-weight: 600;
}

.documents-table tbody tr:hover {
    background: var(--light-bg);
}

.documents-table .button {
    margin: 0;
}

/* ==============================================
   Messaging
   ============================================== */

.conversation-list {
    background: var(--light-bg);
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    max-height: 500px;
    overflow-y: auto;
}

.conversation-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.conversation-list li {
    background: var(--white);
    padding: 12px;
    margin-bottom: 8px;
    border-radius: 4px;
    border-left: 3px solid var(--primary-color);
    cursor: pointer;
    transition: all 0.3s;
}

.conversation-list li:hover {
    box-shadow: var(--shadow);
}

.conversation-list a {
    text-decoration: none;
    color: inherit;
}

.messages-area {
    background: var(--light-bg);
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    max-height: 400px;
    overflow-y: auto;
    min-height: 300px;
}

.message {
    background: var(--white);
    padding: 12px;
    margin-bottom: 10px;
    border-radius: 4px;
    border-left: 3px solid var(--primary-color);
}

.message.sent {
    border-left-color: #667eea;
}

.message.received {
    border-left-color: #ccc;
}

.message-author {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.message-time {
    font-size: 12px;
    color: #999;
    margin-top: 5px;
}

/* ==============================================
   Responsive - Extended
   ============================================== */

@media (max-width: 768px) {
    .filter-group {
        grid-template-columns: 1fr;
    }
    
    .children-selector {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .section table {
        font-size: 12px;
    }
    
    .section table th,
    .section table td {
        padding: 8px 5px;
    }
    
    .timetable th,
    .timetable td {
        padding: 8px 4px;
        font-size: 12px;
    }
}

@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 15px;
    }

    .main-navigation {
        margin-left: 0;
        width: 100%;
    }

    .main-navigation .nav-menu {
        flex-wrap: wrap;
        gap: 15px;
    }

    .header-right {
        flex-direction: column;
        width: 100%;
    }

    .dashboard-wrapper,
    .archive-wrapper,
    .student-detail-wrapper,
    .class-detail-wrapper,
    .attendance-detail-wrapper,
    .fee-detail-wrapper,
    .result-detail-wrapper {
        padding: 20px;
    }

    .students-grid, .classes-grid, .dashboard-section ul {
        grid-template-columns: 1fr;
    }

    h1 { font-size: 24px; }
    h2 { font-size: 20px; }
}
