@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800&family=Poppins:wght@400;500;600;700&display=swap');

:root {
    --tf-navy: #168388;
    --tf-navy-dark: #11696e;
    --tf-green: #168388;
    --tf-teal: #59f6db;
    --tf-ink: #2b3445;
    --tf-muted: #6c7a92;
    --tf-line: #e7ecf3;
    --tf-bg: #f4f7fb;
}

/* ==========================================================================
   Page shell
   ========================================================================== */
.tf-page {
    font-family: 'Poppins', sans-serif;
    color: var(--tf-ink);
    max-width: 1280px;
    margin-inline: auto;
}

/* Hero */
.tf-hero {
    background: linear-gradient(135deg, var(--tf-navy) 0%, var(--tf-navy-dark) 55%, #123 100%);
    color: #fff;
    border-radius: 20px;
    padding: 2.75rem 1.5rem;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 18px 40px rgba(22,131,136, 0.28);
}

.tf-hero::after {
    content: "";
    position: absolute;
    right: -60px;
    top: -60px;
    width: 240px;
    height: 240px;
    background: radial-gradient(circle, rgba(89,246,219, 0.35), transparent 70%);
    border-radius: 50%;
}

.tf-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #d8fbe9;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 0.35rem 0.9rem;
    border-radius: 50px;
    margin-bottom: 1rem;
}

.tf-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: clamp(1.9rem, 4vw, 2.8rem);
    margin: 0 0 0.6rem;
}

.tf-subtitle {
    color: #c6d2e6;
    font-size: 0.98rem;
    max-width: 720px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ==========================================================================
   Category toggle (College / Senior High School)
   ========================================================================== */
.tf-cat-toggle {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.tf-cat-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid var(--tf-line);
    background: #fff;
    color: var(--tf-muted);
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.18s ease;
}

.tf-cat-btn:hover {
    color: var(--tf-navy);
    border-color: var(--tf-teal);
}

.tf-cat-btn.active {
    background: linear-gradient(135deg, var(--tf-navy), var(--tf-navy-dark));
    border-color: transparent;
    color: #fff;
    box-shadow: 0 8px 18px rgba(22,131,136, 0.25);
}

/* ==========================================================================
   Controls (search + program pills)
   ========================================================================== */
.tf-controls {
    margin-bottom: 1.75rem;
}

.tf-search {
    position: relative;
    max-width: 420px;
    margin: 0 auto 1.25rem;
}

.tf-search i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--tf-muted);
}

.tf-search input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.6rem;
    border: 1px solid var(--tf-line);
    border-radius: 50px;
    background: #fff;
    font-size: 0.95rem;
    box-shadow: 0 4px 14px rgba(22,131,136, 0.06);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.tf-search input:focus {
    outline: none;
    border-color: var(--tf-teal);
    box-shadow: 0 0 0 4px rgba(89,246,219, 0.15);
}

.tf-pills {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6rem;
}

.tf-pill {
    border: 1px solid var(--tf-line);
    background: #fff;
    color: var(--tf-ink);
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.5rem 1.05rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.18s ease;
    white-space: nowrap;
}

.tf-pill:hover {
    border-color: var(--tf-teal);
    color: var(--tf-navy);
    transform: translateY(-1px);
}

.tf-pill.active {
    background: linear-gradient(135deg, var(--tf-navy), var(--tf-navy-dark));
    border-color: transparent;
    color: #fff;
    box-shadow: 0 8px 18px rgba(22,131,136, 0.25);
}

.tf-pill.is-hidden {
    display: none;
}

/* ==========================================================================
   Panel
   ========================================================================== */
.tf-panel {
    background: #fff;
    border: 1px solid var(--tf-line);
    border-radius: 20px;
    box-shadow: 0 16px 38px rgba(22,131,136, 0.08);
    overflow: hidden;
}

.tf-panel-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.4rem 1.6rem;
    background: var(--tf-bg);
    border-bottom: 1px solid var(--tf-line);
}

.tf-program-name {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: clamp(1.15rem, 2.2vw, 1.5rem);
    color: var(--tf-navy);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.tf-program-name i {
    color: var(--tf-green);
}

/* "Whole Year" badge (Senior High School — no semester toggle) */
.tf-period-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: var(--tf-aqua, #59f6db);
    color: #0d3a40;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 0.5rem 1.1rem;
    border-radius: 50px;
}

/* Semester toggle */
.tf-sem-toggle {
    display: inline-flex;
    background: #fff;
    border: 1px solid var(--tf-line);
    border-radius: 50px;
    padding: 0.25rem;
}

.tf-sem-btn {
    border: none;
    background: transparent;
    color: var(--tf-muted);
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.45rem 1.1rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.18s ease;
    white-space: nowrap;
}

.tf-sem-btn.active {
    background: var(--tf-green);
    color: #fff;
    box-shadow: 0 4px 10px rgba(22,131,136, 0.3);
}

/* Year summary cards */
.tf-summary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    padding: 1.5rem 1.6rem 0.5rem;
}

/* Senior High School shows two levels (Grade 11 / Grade 12) */
.tf-summary-2 {
    grid-template-columns: repeat(2, 1fr);
}

/* Elementary has a variable number of grade levels — wrap responsively */
.tf-summary-auto {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.tf-sum-card {
    background: linear-gradient(160deg, #ffffff, var(--tf-bg));
    border: 1px solid var(--tf-line);
    border-radius: 14px;
    padding: 1rem 1.1rem;
    text-align: left;
    position: relative;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.tf-sum-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 22px rgba(22,131,136, 0.1);
}

.tf-sum-card .yr {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--tf-teal);
    margin-bottom: 0.35rem;
}

.tf-sum-card .amt {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--tf-navy);
}

.tf-sum-card .lbl {
    font-size: 0.72rem;
    color: var(--tf-muted);
}

/* ==========================================================================
   Fee table
   ========================================================================== */
.tf-table-wrap {
    padding: 1.25rem 1.6rem 1.75rem;
    overflow-x: auto;
}

.tf-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 560px;
}

.tf-table thead th {
    background: var(--tf-navy);
    color: #fff;
    font-size: 0.82rem;
    font-weight: 600;
    text-align: right;
    padding: 0.85rem 1rem;
    white-space: nowrap;
}

.tf-table thead th:first-child {
    text-align: left;
    border-top-left-radius: 12px;
}

.tf-table thead th:last-child {
    border-top-right-radius: 12px;
}

.tf-table tbody td,
.tf-table tbody th {
    padding: 0.8rem 1rem;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--tf-line);
    text-align: right;
}

.tf-table tbody th {
    text-align: left;
    font-weight: 600;
    color: var(--tf-ink);
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.tf-table tbody th i {
    width: 1.1rem;
    color: var(--tf-muted);
    text-align: center;
}

.tf-table tbody tr:nth-child(odd) td,
.tf-table tbody tr:nth-child(odd) th {
    background: #fafcfe;
}

.tf-table tbody tr:hover td,
.tf-table tbody tr:hover th {
    background: rgba(89,246,219, 0.07);
}

/* Total row */
.tf-table tbody tr.tf-total-row td,
.tf-table tbody tr.tf-total-row th {
    background: rgba(22,131,136, 0.1) !important;
    border-top: 2px solid var(--tf-green);
    border-bottom: none;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    color: var(--tf-navy);
    font-size: 0.98rem;
}

.tf-muted-cell {
    color: #b7c0d0;
}

/* Footnote */
.tf-note {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    margin-top: 1.5rem;
    padding: 1rem 1.25rem;
    background: #fff8e6;
    border: 1px solid #ffe6a3;
    border-radius: 12px;
    color: #8a6d1f;
    font-size: 0.85rem;
    line-height: 1.55;
}

.tf-note i {
    color: #e0a91b;
    margin-top: 0.15rem;
}

.tf-empty {
    text-align: center;
    color: var(--tf-muted);
    padding: 3rem 1rem;
    font-size: 0.95rem;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 768px) {
    .tf-summary {
        grid-template-columns: repeat(2, 1fr);
    }
    .tf-panel-head {
        padding: 1.1rem 1.1rem;
    }
    .tf-table-wrap {
        padding: 1rem 1.1rem 1.5rem;
    }
}

@media (max-width: 480px) {
    .tf-summary {
        grid-template-columns: 1fr;
    }
    .tf-hero {
        padding: 2rem 1.1rem;
    }
}
