/* ==========================================================================
   FBHS School Manager - Premium Public Frontend Stylesheet
   ========================================================================== */

:root {
    --fbhs-pub-primary: #1e293b;
    --fbhs-pub-accent: #3b82f6;
    --fbhs-pub-accent-hover: #2563eb;
    --fbhs-pub-success: #10b981;
    --fbhs-pub-warning: #f59e0b;
    --fbhs-pub-danger: #ef4444;
    --fbhs-pub-bg: #f8fafc;
    --fbhs-pub-card-bg: #ffffff;
    --fbhs-pub-text: #334155;
    --fbhs-pub-text-light: #64748b;
    --fbhs-pub-border: #e2e8f0;
    --fbhs-pub-radius: 12px;
    --fbhs-pub-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
    --fbhs-pub-shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.08);
}

/* Base Title Style */
.fbhs-pub-title {
    color: var(--fbhs-pub-primary);
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 10px;
    display: inline-block;
}

.fbhs-pub-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 4px;
    background: var(--fbhs-pub-accent);
    border-radius: 2px;
}

.fbhs-no-data {
    color: var(--fbhs-pub-text-light);
    text-align: center;
    padding: 40px;
    font-size: 15px;
    background: var(--fbhs-pub-bg);
    border-radius: var(--fbhs-pub-radius);
    border: 1px dashed var(--fbhs-pub-border);
}

/* Notice Grid and Cards */
.fbhs-notices-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 15px;
}

.fbhs-notice-card {
    background: var(--fbhs-pub-card-bg);
    padding: 24px;
    border-radius: var(--fbhs-pub-radius);
    box-shadow: var(--fbhs-pub-shadow);
    border: 1px solid var(--fbhs-pub-border);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.fbhs-notice-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--fbhs-pub-shadow-lg);
}

.fbhs-notice-title {
    margin: 12px 0 8px;
    color: var(--fbhs-pub-primary);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
}

.fbhs-notice-excerpt {
    color: var(--fbhs-pub-text-light);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 12px;
}

.fbhs-notice-date {
    color: var(--fbhs-pub-text-light);
    font-size: 12px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 10px;
}

.fbhs-type-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.fbhs-pin-badge {
    position: absolute;
    top: 24px;
    right: 24px;
    color: var(--fbhs-pub-danger);
    font-size: 12px;
    font-weight: 700;
    background: rgba(239, 68, 68, 0.08);
    padding: 2px 8px;
    border-radius: 4px;
}

.fbhs-attachment-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--fbhs-pub-accent);
    font-size: 13.5px;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}

.fbhs-attachment-link:hover {
    color: var(--fbhs-pub-accent-hover);
    text-decoration: underline;
}

/* Stats Cards UI */
.fbhs-stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-top: 15px;
}

.fbhs-stat-card-pub {
    background: var(--fbhs-pub-card-bg);
    border-radius: var(--fbhs-pub-radius);
    padding: 20px;
    text-align: center;
    box-shadow: var(--fbhs-pub-shadow);
    border: 1px solid var(--fbhs-pub-border);
    transition: transform 0.2s ease;
}

.fbhs-stat-card-pub:hover {
    transform: translateY(-2px);
}

.fbhs-stat-number {
    font-size: 36px;
    font-weight: 800;
    color: var(--fbhs-pub-primary);
    line-height: 1;
}

.fbhs-stat-label-pub {
    font-size: 14px;
    font-weight: 600;
    color: var(--fbhs-pub-text);
    margin-top: 8px;
}

.fbhs-stat-sub {
    font-size: 12px;
    color: var(--fbhs-pub-text-light);
    margin-top: 6px;
}

/* Tables Styling */
.fbhs-pub-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--fbhs-pub-card-bg);
    border-radius: var(--fbhs-pub-radius);
    overflow: hidden;
    box-shadow: var(--fbhs-pub-shadow);
    border: 1px solid var(--fbhs-pub-border);
    margin: 15px 0;
}

.fbhs-pub-table thead th {
    background: var(--fbhs-pub-primary);
    color: #ffffff;
    padding: 14px 16px;
    font-weight: 600;
    font-size: 13.5px;
    text-align: left;
}

.fbhs-pub-table tbody td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--fbhs-pub-border);
    font-size: 14px;
    color: var(--fbhs-pub-text);
}

.fbhs-pub-table tbody tr:last-child td {
    border-bottom: none;
}

.fbhs-pub-table tbody tr:hover td {
    background: var(--fbhs-pub-bg);
}

/* Portal Panel Layout */
.fbhs-portal-box {
    max-width: 650px;
    margin: 20px auto;
    padding: 35px;
    background: var(--fbhs-pub-card-bg);
    border-radius: 16px;
    box-shadow: var(--fbhs-pub-shadow-lg);
    border: 1px solid var(--fbhs-pub-border);
}

/* Forms UI */
.fbhs-pub-form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.fbhs-pub-field {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.fbhs-pub-field label {
    font-weight: 600;
    color: var(--fbhs-pub-primary);
    font-size: 13.5px;
}

.fbhs-pub-field input,
.fbhs-pub-field select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--fbhs-pub-border);
    border-radius: var(--fbhs-pub-radius);
    font-size: 14.5px;
    color: var(--fbhs-pub-text);
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.fbhs-pub-field input:focus,
.fbhs-pub-field select:focus {
    border-color: var(--fbhs-pub-accent);
    outline: none;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
}

.fbhs-btn-primary {
    display: block;
    width: 100%;
    padding: 14px;
    background: var(--fbhs-pub-accent);
    color: #ffffff;
    border: none;
    border-radius: var(--fbhs-pub-radius);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.fbhs-btn-primary:hover {
    background: var(--fbhs-pub-accent-hover);
}

.fbhs-btn-primary:disabled {
    background: var(--fbhs-pub-text-light);
    opacity: 0.6;
    cursor: not-allowed;
}

/* Result Sheet Display Card */
.fbhs-result-card {
    background: var(--fbhs-pub-card-bg);
    border-radius: var(--fbhs-pub-radius);
    padding: 25px;
    box-shadow: var(--fbhs-pub-shadow-lg);
    border: 1px solid var(--fbhs-pub-border);
    margin-top: 25px;
}

.fbhs-result-header {
    border-bottom: 2px solid var(--fbhs-pub-border);
    padding-bottom: 18px;
    margin-bottom: 18px;
}

.fbhs-result-header h3 {
    margin: 0;
    color: var(--fbhs-pub-primary);
    font-size: 20px;
    font-weight: 700;
}

.fbhs-result-summary {
    display: flex;
    justify-content: space-around;
    gap: 15px;
    padding: 18px;
    border: 3px solid var(--fbhs-pub-accent);
    border-radius: var(--fbhs-pub-radius);
    margin-top: 20px;
    background: rgba(59, 130, 246, 0.03);
    text-align: center;
}

.fbhs-result-summary div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.fbhs-result-summary span {
    font-size: 11px;
    color: var(--fbhs-pub-text-light);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.fbhs-result-summary strong {
    font-size: 20px;
    color: var(--fbhs-pub-primary);
}

.fbhs-error-box {
    padding: 20px;
    background: #fef2f2;
    border: 2px solid var(--fbhs-pub-danger);
    border-radius: var(--fbhs-pub-radius);
    color: var(--fbhs-pub-danger);
    text-align: center;
    font-weight: 600;
}

/* Teachers Grid list */
.fbhs-teacher-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.fbhs-teacher-card-pub {
    background: var(--fbhs-pub-card-bg);
    border-radius: var(--fbhs-pub-radius);
    padding: 24px;
    text-align: center;
    box-shadow: var(--fbhs-pub-shadow);
    border: 1px solid var(--fbhs-pub-border);
    transition: all 0.3s ease;
}

.fbhs-teacher-card-pub:hover {
    transform: translateY(-4px);
    box-shadow: var(--fbhs-pub-shadow-lg);
}

.fbhs-teacher-photo {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--fbhs-pub-accent);
    margin: 0 auto 12px;
}

.fbhs-teacher-photo-placeholder {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: var(--fbhs-pub-bg);
    border: 2px dashed var(--fbhs-pub-text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    margin: 0 auto 12px;
}

.fbhs-teacher-card-pub h4 {
    margin: 5px 0;
    color: var(--fbhs-pub-primary);
    font-size: 16px;
    font-weight: 700;
}

.fbhs-teacher-eng {
    color: var(--fbhs-pub-text-light);
    font-size: 12.5px;
    margin: 0;
}

.fbhs-teacher-desig {
    color: var(--fbhs-pub-accent);
    font-weight: 600;
    font-size: 13.5px;
    margin: 8px 0;
}

.fbhs-teacher-phone {
    color: var(--fbhs-pub-text);
    font-size: 13px;
    margin: 4px 0;
}

/* Frontend Class Routine Styles */
.fbhs-routine-day-list {
    display: flex;
    gap: 8px;
    border-bottom: 2px solid var(--fbhs-pub-border);
    padding-bottom: 8px;
    overflow-x: auto;
}

.fbhs-routine-day-tab {
    background: #fff;
    border: 1px solid var(--fbhs-pub-border);
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    color: var(--fbhs-pub-text-light);
    white-space: nowrap;
    transition: all 0.2s ease;
}

.fbhs-routine-day-tab:hover {
    border-color: var(--fbhs-pub-accent);
    color: var(--fbhs-pub-accent);
}

.fbhs-routine-day-tab.active {
    background: var(--fbhs-pub-accent);
    border-color: var(--fbhs-pub-accent);
    color: #fff;
}

.fbhs-badge-dot {
    width: 6px;
    height: 6px;
    background-color: var(--fbhs-pub-success);
    border-radius: 50%;
    display: inline-block;
    margin-left: 5px;
}

.fbhs-routine-slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.fbhs-routine-slot-card {
    background: #fff;
    border: 1px solid var(--fbhs-pub-border);
    border-radius: var(--fbhs-pub-radius);
    padding: 18px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
    border-left: 4px solid var(--fbhs-pub-accent);
    transition: all 0.3s ease;
}

.fbhs-routine-slot-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--fbhs-pub-shadow);
}

.fbhs-slot-time {
    font-size: 12px;
    font-weight: 600;
    color: var(--fbhs-pub-accent);
    margin-bottom: 8px;
}

.fbhs-slot-subject {
    font-size: 16px;
    font-weight: 700;
    color: var(--fbhs-pub-primary);
    margin-bottom: 6px;
}

.fbhs-slot-teacher {
    font-size: 13px;
    color: var(--fbhs-pub-text-light);
    margin-bottom: 4px;
}

.fbhs-slot-room {
    font-size: 12px;
    background: #f1f5f9;
    padding: 2px 8px;
    border-radius: 4px;
    display: inline-block;
    color: #475569;
}

@media (max-width: 768px) {
    .fbhs-stats-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    .fbhs-teacher-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .fbhs-pub-form-row {
        flex-direction: column;
        gap: 0;
    }
}

@media (max-width: 480px) {
    .fbhs-stats-cards {
        grid-template-columns: 1fr;
    }
    .fbhs-teacher-grid {
        grid-template-columns: 1fr;
    }
}