/* School Event Calendar System - Main Stylesheet */
/* Made with love by the dev team */

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

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background: #f0f2f5;
    color: #333;
    font-size: 15px;
    line-height: 1.6;
}

/* ===== NAVBAR ===== */
.navbar {
    background: #1a3a5c;
    padding: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    position: sticky;
    top: 0;
    z-index: 999;
}

.navbar-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 0;
    text-decoration: none;
}

.navbar-brand .logo-icon {
    width: 40px;
    height: 40px;
    background: #f5a623;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.navbar-brand .brand-text {
    color: white;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.2;
}

.navbar-brand .brand-text small {
    display: block;
    font-size: 11px;
    font-weight: 400;
    opacity: 0.8;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 5px;
    list-style: none;
}

.nav-links a {
    color: #cdd8e8;
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 5px;
    font-size: 14px;
    transition: all 0.2s;
    display: block;
}

.nav-links a:hover,
.nav-links a.active {
    background: rgba(255,255,255,0.15);
    color: white;
}

.nav-links .btn-login {
    background: #f5a623;
    color: #1a3a5c !important;
    font-weight: 600;
    border-radius: 5px;
}

.nav-links .btn-login:hover {
    background: #e09215;
    color: #1a3a5c !important;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #cdd8e8;
    font-size: 14px;
}

.nav-user .user-badge {
    background: #f5a623;
    color: #1a3a5c;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
}

/* ===== MAIN CONTENT WRAPPER ===== */
.main-wrapper {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
}

/* ===== HERO SECTION ===== */
.hero {
    background: linear-gradient(135deg, #1a3a5c, #2c5f8f);
    color: white;
    border-radius: 12px;
    padding: 50px 40px;
    margin-bottom: 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50px; right: -50px;
    width: 200px; height: 200px;
    background: rgba(245,166,35,0.15);
    border-radius: 50%;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -60px; left: -30px;
    width: 180px; height: 180px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
}

.hero h1 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}

.hero h1 span {
    color: #f5a623;
}

.hero p {
    font-size: 1rem;
    opacity: 0.85;
    max-width: 600px;
    margin: 0 auto 25px;
    position: relative;
    z-index: 1;
}

.hero-btns {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-block;
    padding: 10px 22px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.btn-primary {
    background: #f5a623;
    color: #1a3a5c;
}

.btn-primary:hover { background: #e09215; }

.btn-outline {
    background: transparent;
    color: white;
    border: 2px solid rgba(255,255,255,0.5);
}

.btn-outline:hover { background: rgba(255,255,255,0.1); border-color: white; }

.btn-danger {
    background: #e74c3c;
    color: white;
}

.btn-danger:hover { background: #c0392b; }

.btn-success {
    background: #27ae60;
    color: white;
}

.btn-success:hover { background: #229954; }

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover { background: #5a6268; }

.btn-sm {
    padding: 5px 12px;
    font-size: 12px;
}

/* ===== CARDS ===== */
.card {
    background: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.07);
    margin-bottom: 20px;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a3a5c;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f2f5;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ===== STATS GRID ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.stat-box {
    background: white;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    border-left: 4px solid #1a3a5c;
}

.stat-box.yellow { border-left-color: #f5a623; }
.stat-box.green { border-left-color: #27ae60; }
.stat-box.red { border-left-color: #e74c3c; }
.stat-box.blue { border-left-color: #3498db; }

.stat-box .stat-num {
    font-size: 2rem;
    font-weight: 800;
    color: #1a3a5c;
    line-height: 1;
}

.stat-box .stat-label {
    font-size: 12px;
    color: #777;
    margin-top: 5px;
}

/* ===== EVENT CARDS ===== */
.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.event-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    transition: transform 0.2s, box-shadow 0.2s;
}

.event-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

.event-card-header {
    background: #1a3a5c;
    color: white;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.event-card-date {
    background: #f5a623;
    color: #1a3a5c;
    border-radius: 8px;
    padding: 5px 10px;
    text-align: center;
    min-width: 55px;
}

.event-card-date .day {
    font-size: 1.4rem;
    font-weight: 800;
    line-height: 1;
}

.event-card-date .month {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.event-card-title {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
}

.event-card-body {
    padding: 15px 20px;
}

.event-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
}

.event-meta span {
    font-size: 13px;
    color: #666;
    display: flex;
    align-items: center;
    gap: 6px;
}

.event-meta span i {
    width: 16px;
    text-align: center;
}

.event-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.badge-dept { background: #e8f4fd; color: #2c5f8f; }
.badge-class { background: #e8f8f0; color: #1e7e34; }
.badge-all { background: #fff3cd; color: #856404; }

/* ===== FORMS ===== */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #444;
    margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d0d7de;
    border-radius: 6px;
    font-size: 14px;
    color: #333;
    background: #fafbfc;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #1a3a5c;
    background: white;
}

.form-group textarea {
    height: 100px;
    resize: vertical;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    cursor: pointer;
    margin-bottom: 8px;
}

.form-check input {
    width: auto;
    cursor: pointer;
}

/* ===== TABLES ===== */
.table-wrapper {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

table th {
    background: #1a3a5c;
    color: white;
    padding: 12px 15px;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
}

table td {
    padding: 11px 15px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

table tr:nth-child(even) td { background: #f8f9fa; }
table tr:hover td { background: #e8f4fd; }

/* ===== PAGE HEADER ===== */
.page-header {
    background: white;
    border-radius: 10px;
    padding: 20px 25px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.page-header h2 {
    color: #1a3a5c;
    font-size: 1.3rem;
}

.page-header .breadcrumb {
    font-size: 12px;
    color: #999;
    margin-top: 3px;
}

/* ===== ALERTS ===== */
.alert {
    padding: 12px 18px;
    border-radius: 7px;
    margin-bottom: 18px;
    font-size: 14px;
    border: 1px solid transparent;
}

.alert-success { background: #d4edda; color: #155724; border-color: #c3e6cb; }
.alert-error, .alert-danger { background: #f8d7da; color: #721c24; border-color: #f5c6cb; }
.alert-warning { background: #fff3cd; color: #856404; border-color: #ffeeba; }
.alert-info { background: #d1ecf1; color: #0c5460; border-color: #bee5eb; }

/* ===== SIDEBAR LAYOUT ===== */
.layout-with-sidebar {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 20px;
    align-items: start;
}

.sidebar {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    position: sticky;
    top: 80px;
}

.sidebar-header {
    background: #1a3a5c;
    color: white;
    padding: 15px 18px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

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

.sidebar-menu li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    color: #555;
    text-decoration: none;
    font-size: 14px;
    border-bottom: 1px solid #f0f2f5;
    transition: all 0.2s;
}

.sidebar-menu li a:hover,
.sidebar-menu li a.active {
    background: #e8f4fd;
    color: #1a3a5c;
    font-weight: 600;
    padding-left: 22px;
}

.sidebar-menu li a .icon {
    width: 20px;
    text-align: center;
    font-size: 15px;
}

/* ===== AUTH PAGES ===== */
.auth-wrapper {
    min-height: 100vh;
    background: linear-gradient(135deg, #1a3a5c, #2c5f8f);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 20px;
}

.auth-box {
    background: white;
    border-radius: 12px;
    padding: 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.auth-logo {
    text-align: center;
    margin-bottom: 25px;
}

.auth-logo .logo-circle {
    width: 65px;
    height: 65px;
    background: #1a3a5c;
    border-radius: 50%;
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.auth-logo h2 {
    color: #1a3a5c;
    font-size: 1.3rem;
    font-weight: 800;
}

.auth-logo p {
    color: #888;
    font-size: 13px;
    margin-top: 4px;
}

.auth-footer {
    text-align: center;
    margin-top: 18px;
    font-size: 13px;
    color: #666;
}

.auth-footer a {
    color: #1a3a5c;
    font-weight: 600;
    text-decoration: none;
}

/* ===== CALENDAR ===== */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    background: #ddd;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
}

.cal-header {
    background: #1a3a5c;
    color: white;
    text-align: center;
    padding: 10px 5px;
    font-size: 12px;
    font-weight: 700;
}

.cal-day {
    background: white;
    min-height: 80px;
    padding: 6px;
    position: relative;
}

.cal-day.today { background: #fff8e1; }
.cal-day.other-month { background: #f8f9fa; }
.cal-day.has-event { border-top: 3px solid #f5a623; }

.cal-day-num {
    font-size: 13px;
    font-weight: 700;
    color: #1a3a5c;
}

.cal-day.other-month .cal-day-num { color: #bbb; }
.cal-day.today .cal-day-num {
    background: #f5a623;
    color: #1a3a5c;
    width: 22px; height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.cal-event-dot {
    font-size: 11px;
    background: #1a3a5c;
    color: white;
    padding: 1px 5px;
    border-radius: 3px;
    margin-top: 3px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    display: block;
}

/* ===== ANNOUNCEMENT BANNER ===== */
.announcement-banner {
    background: linear-gradient(90deg, #f5a623, #e09215);
    color: #1a3a5c;
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.announcement-banner .ann-icon {
    font-size: 1.4rem;
}

.announcement-banner .ann-title {
    font-weight: 700;
    font-size: 14px;
}

.announcement-banner .ann-msg {
    font-size: 13px;
    margin-top: 2px;
}

/* ===== FOOTER ===== */
.site-footer {
    background: #1a3a5c;
    color: #cdd8e8;
    text-align: center;
    padding: 25px 20px;
    margin-top: 50px;
}

.site-footer p {
    font-size: 13px;
}

.site-footer a {
    color: #f5a623;
    text-decoration: none;
}

/* ===== SECTION TITLE ===== */
.section-title {
    font-size: 1.2rem;
    font-weight: 800;
    color: #1a3a5c;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title::after {
    content: '';
    flex: 1;
    height: 2px;
    background: linear-gradient(to right, #f5a623, transparent);
}

/* ===== MISC ===== */
.text-center { text-align: center; }
.text-muted { color: #888; font-size: 13px; }
.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }
.d-flex { display: flex; }
.gap-10 { gap: 10px; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }

.no-data {
    text-align: center;
    padding: 40px 20px;
    color: #aaa;
    font-size: 14px;
}

.no-data i { font-size: 2.5rem; display: block; margin-bottom: 10px; }

.pill {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.pill-published { background: #d4edda; color: #155724; }
.pill-draft { background: #e2e3e5; color: #383d41; }
.pill-active { background: #d4edda; color: #155724; }
.pill-inactive { background: #f8d7da; color: #721c24; }
.pill-admin { background: #d1ecf1; color: #0c5460; }
.pill-student { background: #e8f4fd; color: #0c4a7b; }

@media (max-width: 768px) {
    .layout-with-sidebar { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .hero h1 { font-size: 1.5rem; }
    .events-grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
