/* Tuition Management Styles */

.admin-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

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

.page-header h1 {
    font-family: 'Stoke', serif;
    color: var(--dark-green, #213b2d);
    margin: 0;
}

.header-actions {
    display: flex;
    gap: 10px;
}

/* Stats Row */
.stats-row {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
}

.stat-card {
    background: white;
    padding: 20px 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    text-align: center;
    flex: 1;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark-green, #213b2d);
}

.stat-label {
    font-size: 0.9rem;
    color: #666;
    margin-top: 5px;
}

/* Filters */
.filters-container {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    margin-bottom: 25px;
}

.filters-form {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
}

.search-box {
    flex: 1;
    min-width: 250px;
}

.search-box input {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.95rem;
}

.filter-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-group select {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9rem;
    background: white;
    min-width: 130px;
}

.btn-primary {
    background: var(--dark-green, #213b2d);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-primary:hover {
    background: #2c5530;
}

.btn-secondary {
    background: #e0e0e0;
    color: #333;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s;
}

.btn-secondary:hover {
    background: #d0d0d0;
}

/* Families List */
.families-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.no-results {
    background: white;
    padding: 40px;
    text-align: center;
    color: #666;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

/* Family Accordion */
.family-accordion {
    background: white;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    overflow: hidden;
}

.family-header {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    cursor: pointer;
    transition: background 0.2s;
    gap: 15px;
    margin-bottom: 0;
}

.family-header:hover {
    background: #f8f9fa;
}

.family-toggle {
    width: 24px;
    text-align: center;
}

.toggle-icon {
    display: inline-block;
    transition: transform 0.2s;
    color: #888;
    font-size: 0.8rem;
}

.family-accordion.expanded .toggle-icon {
    transform: rotate(90deg);
}

.family-name {
    font-weight: 600;
    font-size: 16px;
    font-family: 'Archivo', sans-serif;
    color: var(--dark-green, #213b2d);
    flex: 1;
}

.family-meta {
    color: #888;
    font-size: 0.9rem;
    padding-top: 0;
    border-top: 0;
}

.student-count {
    background: #f0f0f0;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
}

.family-tuition {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--dark-green, #213b2d);
    min-width: 120px;
    text-align: right;
}

/* Family Content */
.family-content {
    display: none;
    padding: 0 20px 20px;
    border-top: 1px solid #eee;
}

.family-accordion.expanded .family-content {
    display: block;
}

/* Students Table */
.students-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.students-table th {
    text-align: left;
    padding: 12px 10px;
    background: #f8f9fa;
    font-size: 0.8rem;
    text-transform: uppercase;
    color: #666;
    font-weight: 600;
}

.students-table td {
    padding: 15px 10px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: top;
}

.students-table tr:last-child td {
    border-bottom: none;
}

/* Student Row */
.student-row {
    transition: background 0.2s;
}

.student-row.saving {
    opacity: 0.6;
}

.student-row.saved {
    background: rgba(46, 204, 113, 0.1);
}

.student-name {
    font-weight: 600;
    color: #333;
    font-size: 16px;
}

.sibling-info {
    font-size: 0.8rem;
    color: #888;
    margin-top: 3px;
}

.sibling-discount {
    color: var(--gold, #c9a227);
    font-weight: 500;
}

/* Program Badge */
.program-badge {
    display: inline-block;
    background: #e8f4ea;
    color: var(--dark-green, #213b2d);
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
}

.base-rate {
    font-size: 0.75rem;
    color: #888;
    margin-top: 3px;
}

/* Checkbox Styling */
.checkbox-container {
    display: inline-block;
    position: relative;
    cursor: pointer;
    width: 22px;
    height: 22px;
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 22px;
    width: 22px;
    background-color: #fff;
    border: 2px solid #ddd;
    border-radius: 4px;
    transition: all 0.2s;
}

.checkbox-container:hover .checkmark {
    border-color: var(--dark-green, #213b2d);
}

.checkbox-container input:checked ~ .checkmark {
    background-color: var(--dark-green, #213b2d);
    border-color: var(--dark-green, #213b2d);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

/* Discount Input */
.discount-input-group {
    display: flex;
    align-items: center;
    gap: 3px;
}

.discount-input {
    width: 60px;
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
    text-align: right;
}

.discount-input:focus {
    outline: none;
    border-color: var(--dark-green, #213b2d);
}

.percent-sign {
    color: #888;
    font-size: 0.9rem;
}

/* Payment Options */
.payment-options {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 0.9rem;
}

.radio-option input[type="radio"] {
    width: 16px;
    height: 16px;
    accent-color: var(--dark-green, #213b2d);
}

.annual-discount {
    font-size: 0.75rem;
    color: var(--gold, #c9a227);
    font-weight: 500;
}

/* Tuition Display */
.tuition-display {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--dark-green, #213b2d);
}

.full-scholarship {
    color: var(--gold, #c9a227);
    font-size: 0.9rem;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 1200px) {
    .students-table {
        display: block;
        overflow-x: auto;
    }
}

@media (max-width: 768px) {
    .stats-row {
        flex-direction: column;
    }

    .filters-form {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-group {
        flex-direction: column;
    }

    .filter-group select {
        width: 100%;
    }

    .page-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    .family-header {
        flex-wrap: wrap;
    }

    .family-tuition {
        width: 100%;
        text-align: left;
        margin-top: 10px;
    }
}
