/* Базові стилі для кабінету батьків (Elementor-friendly) */
.fah-cabinet {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f7f9fa;
    color: #333;
    padding: 20px;
    border-radius: 12px;
    max-width: 1200px;
    margin: 0 auto;
    box-sizing: border-box;
}

.fah-cabinet * {
    box-sizing: border-box;
}

.fah-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    border-bottom: 2px solid #eaeaea;
    padding-bottom: 15px;
}

.fah-header h1 {
    font-size: 1.8rem;
    margin: 0;
    color: #1a202c;
}

.fah-child-selector {
    margin-bottom: 20px;
}

.fah-child-selector select {
    padding: 10px;
    font-size: 1rem;
    border-radius: 8px;
    border: 1px solid #ccc;
    background: #fff;
    width: 100%;
    max-width: 300px;
}

/* Сітка карток */
.fah-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.fah-card {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s;
}

.fah-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
}

.fah-card h3 {
    margin-top: 0;
    font-size: 1.2rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

/* Кольорові акценти карток */
.fah-card-accent {
    border-top: 4px solid #38a169; /* Клубний зелений, наприклад */
}

.fah-card-warning {
    border-top: 4px solid #dd6b20; /* Оранжевий для уваги */
}

/* Тексти та бейджі */
.fah-date {
    font-size: 1.5rem;
    font-weight: bold;
    color: #2b6cb0;
    margin: 5px 0;
}

.fah-status-green {
    display: inline-block;
    background: #c6f6d5;
    color: #22543d;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
}

.fah-amount {
    font-size: 1.4rem;
    color: #e53e3e;
    margin: 10px 0;
}

/* Кнопки */
.fah-btn {
    background: #3182ce;
    color: #fff;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    width: 100%;
    font-weight: bold;
    transition: background 0.2s;
}

.fah-btn:hover {
    background: #2b6cb0;
}

/* Прогрес бар */
.fah-progress-container {
    width: 100%;
    background-color: #e2e8f0;
    border-radius: 8px;
    height: 12px;
    margin-bottom: 10px;
    overflow: hidden;
}

.fah-progress-bar {
    height: 100%;
    background-color: #48bb78;
    border-radius: 8px;
}

/* Списки */
.fah-list {
    padding-left: 20px;
    margin: 0;
}

.fah-list li {
    margin-bottom: 8px;
    color: #4a5568;
}

/* Мобільна навігація */
.fah-mobile-nav {
    display: flex;
    justify-content: space-around;
    background: #fff;
    padding: 15px 0;
    border-radius: 12px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.fah-mobile-nav a {
    text-decoration: none;
    color: #718096;
    font-weight: 600;
    font-size: 0.9rem;
    text-align: center;
    flex: 1;
}

.fah-mobile-nav a.active {
    color: #3182ce;
}

/* ==============================
   Блок "Важливо" / Повідомлення
   ============================== */

.fah-msg-count {
    display: inline-block;
    background: #e53e3e;
    color: #fff;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    font-size: 0.75rem;
    font-weight: 700;
    text-align: center;
    line-height: 22px;
    vertical-align: middle;
    margin-left: 6px;
}

.fah-msg-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.fah-msg-item {
    border-left: 4px solid #dd6b20;
    padding: 10px 12px;
    background: #fffbf5;
    border-radius: 0 6px 6px 0;
    transition: opacity 0.3s;
}

.fah-msg-item--done {
    opacity: 0.55;
    background: #f7fafc;
    border-left-color: #a0aec0 !important;
}

.fah-msg-header {
    display: flex;
    align-items: baseline;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}

.fah-msg-icon {
    font-size: 1rem;
}

.fah-msg-title {
    font-size: 0.95rem;
    flex: 1;
}

.fah-msg-status {
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.fah-msg-body {
    font-size: 0.88rem;
    color: #4a5568;
    margin: 4px 0 8px;
    line-height: 1.5;
}

.fah-msg-expires {
    font-size: 0.78rem;
    color: #a0aec0;
    margin: 0 0 6px;
}

.fah-msg-rejected {
    font-size: 0.85rem;
    color: #e53e3e;
    font-weight: 600;
    margin: 0 0 8px;
}

.fah-msg-pending {
    font-size: 0.85rem;
    color: #3182ce;
    margin: 0 0 6px;
}

/* Маленькі кнопки дій */
.fah-btn-sm {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 5px;
    font-size: 0.82rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 4px;
}

.fah-btn-read {
    background: #ebf8ff;
    color: #2b6cb0;
}
.fah-btn-read:hover { background: #bee3f8; }

.fah-btn-confirm {
    background: #f0fff4;
    color: #276749;
}
.fah-btn-confirm:hover { background: #c6f6d5; }

.fah-btn-upload {
    background: #dd6b20;
    color: #fff;
}
.fah-btn-upload:hover { background: #c05621; }

/* Форма завантаження документа */
.fah-upload-form {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.fah-upload-label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.8rem;
    color: #718096;
    cursor: pointer;
}

.fah-upload-label input[type=file] {
    font-size: 0.82rem;
    padding: 4px 0;
}

.fah-upload-result {
    font-size: 0.82rem;
    margin-top: 4px;
}

.fah-doc-link {
    display: inline-block;
    font-size: 0.82rem;
    color: #3182ce;
    text-decoration: none;
    margin-top: 4px;
}
.fah-doc-link:hover { text-decoration: underline; }

/* ==============================
   Розклад тренувань
   ============================== */

.fah-back-link {
    color: #3182ce;
    text-decoration: none;
    font-weight: 600;
}

.fah-back-link:hover {
    text-decoration: underline;
}

/* Навігація по тижнях */
.fah-week-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.06);
    gap: 10px;
}

.fah-btn-week {
    background: #3182ce;
    color: #fff;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    transition: background 0.2s;
}

.fah-btn-week:hover {
    background: #2b6cb0;
    color: #fff;
}

.fah-week-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1a202c;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.fah-badge-current {
    display: inline-block;
    background: #fefcbf;
    color: #744210;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.fah-week-today-link {
    color: #3182ce;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
}

.fah-week-today-link:hover {
    text-decoration: underline;
}

/* Сітка 7 днів */
.fah-schedule-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.fah-schedule-day {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    overflow: hidden;
    min-height: 110px;
}

.fah-schedule-day--past {
    opacity: 0.55;
}

.fah-schedule-day--today .fah-schedule-day__header {
    background: #3182ce;
    color: #fff;
}

.fah-schedule-day--today .fah-schedule-day__date {
    color: rgba(255,255,255,0.85);
}

.fah-schedule-day--has-training {
    border-top: 3px solid #38a169;
}

.fah-schedule-day__header {
    background: #f7fafc;
    padding: 8px 10px 6px;
    border-bottom: 1px solid #edf2f7;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.fah-schedule-day__name {
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.fah-schedule-day__date {
    font-size: 0.85rem;
    color: #718096;
}

.fah-badge-today {
    display: inline-block;
    background: rgba(255,255,255,0.25);
    color: #fff;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
}

.fah-schedule-day__body {
    padding: 10px;
}

.fah-no-training {
    color: #cbd5e0;
    font-size: 1.2rem;
    display: block;
    text-align: center;
    padding-top: 8px;
}

.fah-training-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.fah-training-time {
    font-size: 1rem;
    font-weight: 700;
    color: #2d3748;
}

.fah-training-duration {
    display: inline-block;
    background: #c6f6d5;
    color: #22543d;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    width: fit-content;
}

.fah-training-field {
    font-size: 0.8rem;
    color: #4a5568;
}

.fah-schedule-team-label {
    color: #718096;
    font-size: 0.9rem;
    margin-top: 10px;
}

/* ==============================
   Приховані повідомлення (більше 3)
   ============================== */

.fah-msg-extra {
    display: none;
}

.fah-msg-toggle {
    display: block;
    width: 100%;
    margin-top: 10px;
    padding: 8px 12px;
    background: #f0f4f8;
    border: 1px dashed #cbd5e0;
    border-radius: 6px;
    color: #4a5568;
    font-size: 0.83rem;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: background 0.15s, color 0.15s;
}

.fah-msg-toggle:hover {
    background: #e2e8f0;
    color: #1a202c;
}

/* ==============================
   Відвідуваність — місячна навігація
   ============================== */

.fah-att-month-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.fah-att-month-label {
    font-weight: 700;
    font-size: 0.95rem;
    flex: 1;
    text-align: center;
}

.fah-att-nav-btn {
    display: inline-block;
    padding: 4px 10px;
    background: #edf2f7;
    border-radius: 4px;
    color: #2d3748;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    line-height: 1;
}

.fah-att-nav-btn:hover { background: #e2e8f0; }

.fah-att-nav-disabled {
    opacity: 0.35;
    cursor: default;
}

/* Міні-стрічка присутності */
.fah-att-strip {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.fah-att-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid;
    font-size: 0.72rem;
    font-weight: 800;
    cursor: default;
}

/* ==============================
   Панель тренера
   ============================== */

.fah-coach-panel .fah-coach-sessions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.fah-coach-session-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-radius: 8px;
    border: 2px solid #e2e8f0;
    text-decoration: none;
    color: #2d3748;
    transition: border-color 0.15s, background 0.15s;
    gap: 12px;
}

.fah-coach-session-row:hover { background: #f7fafc; border-color: #cbd5e0; }
.fah-coach-session-row.is-full  { border-color: #9ae6b4; background: #f0fff4; }
.fah-coach-session-row.is-partial { border-color: #faf089; background: #fffff0; }
.fah-coach-session-row.is-new  { border-color: #e2e8f0; }

.fah-coach-session-info { flex: 1; }
.fah-coach-session-info strong { display: block; font-size: 0.95rem; }
.fah-coach-session-meta { font-size: 0.82rem; color: #718096; }
.fah-coach-session-badge { font-size: 0.85rem; white-space: nowrap; text-align: right; }
.fah-coach-arrow { margin-left: 6px; color: #a0aec0; font-size: 1.2rem; }

/* Attendance form rows */
.fah-coach-player-row {
    border-bottom: 1px solid #f0f4f8;
    padding: 12px 0;
}
.fah-coach-player-row:last-child { border-bottom: none; }

.fah-coach-player-name {
    margin-bottom: 8px;
    font-size: 1rem;
}

.fah-coach-status-btns {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.fah-att-btn {
    display: inline-block;
    padding: 6px 10px;
    border: 2px solid var(--att-color);
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 500;
    transition: background 0.1s;
    user-select: none;
}
.fah-att-btn input { display: none; }
.fah-att-btn:hover { background: var(--att-bg); }
.fah-att-btn.selected { background: var(--att-bg); font-weight: 700; }

.fah-coach-grade-row {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.fah-coach-grade-label {
    font-size: 0.85rem;
    color: #4a5568;
    display: flex;
    align-items: center;
    gap: 6px;
}

.fah-grade-select {
    padding: 4px 6px;
    border: 1px solid #cbd5e0;
    border-radius: 4px;
    font-size: 0.9rem;
}

.fah-coach-note {
    flex: 1;
    min-width: 160px;
    padding: 4px 8px;
    border: 1px solid #cbd5e0;
    border-radius: 4px;
    font-size: 0.85rem;
    color: #4a5568;
}

.fah-coach-submit-row {
    margin-top: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    padding-top: 12px;
    border-top: 1px solid #e2e8f0;
}

.fah-coach-save-btn {
    padding: 10px 24px;
    background: #2b6cb0;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}
.fah-coach-save-btn:hover { background: #2c5282; }
.fah-coach-save-btn:disabled { background: #a0aec0; cursor: default; }

/* ==============================
   Фінансовий блок
   ============================== */

.fah-invoice-overdue {
    background: #fff5f5;
    border-top-color: #e53e3e !important;
}

.fah-subscription-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.fah-subscription-badge--active  { background: #c6f6d5; color: #22543d; }
.fah-subscription-badge--paused  { background: #fefcbf; color: #744210; }
.fah-subscription-badge--cancelled { background: #fed7d7; color: #742a2a; }

/* Адаптивність */
@media (max-width: 768px) {
    .fah-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .fah-header h1 {
        margin-bottom: 10px;
    }

    .fah-schedule-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .fah-week-nav {
        flex-wrap: wrap;
        justify-content: center;
    }

    .fah-week-title {
        order: -1;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .fah-schedule-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   Grades block — Оцінки тренера
   ============================================================ */

/* Average badge at top of grades card */
.fah-grade-avg-badge {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f0fff4;
    border: 1px solid #9ae6b4;
    border-radius: 10px;
    padding: 10px 14px;
    margin-bottom: 14px;
}

.fah-grade-avg-num {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    color: #276749;
}

.fah-grade-avg-label {
    display: flex;
    flex-direction: column;
    font-size: 0.78rem;
    color: #276749;
    line-height: 1.4;
}

.fah-grade-avg-label strong {
    font-size: 0.95rem;
}

/* Grade list */
.fah-grade-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.fah-grade-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    border-bottom: 1px solid #f0f0f0;
}

.fah-grade-row:last-child {
    border-bottom: none;
}

.fah-grade-date {
    font-size: 0.78rem;
    color: #718096;
    min-width: 68px;
    flex-shrink: 0;
}

/* Circular grade number */
.fah-grade-circle {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 700;
    flex-shrink: 0;
    line-height: 1;
}

/* Grade info (level + note) */
.fah-grade-info {
    display: flex;
    flex-direction: column;
    font-size: 0.82rem;
    line-height: 1.4;
    min-width: 0;
}

.fah-grade-info strong {
    font-size: 0.85rem;
    color: #2d3748;
}

.fah-grade-note {
    color: #718096;
    font-style: italic;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Empty state */
.fah-grade-empty {
    color: #a0aec0;
    font-size: 0.88rem;
    text-align: center;
    padding: 10px 0;
}

/* =========================================================
   ⭐ Зірки та Магазин
   ========================================================= */

.fah-stars-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.fah-stars-balance {
    display: flex;
    align-items: center;
    gap: 12px;
}

.fah-stars-big-icon {
    font-size: 3rem;
    line-height: 1;
}

.fah-stars-count {
    font-size: 2.2rem;
    font-weight: 800;
    color: #d69e2e;
    line-height: 1;
}

.fah-stars-sublabel {
    font-size: 0.82rem;
    color: #718096;
    margin-top: 2px;
}

.fah-stars-monthly {
    text-align: right;
}

/* Список останньої активності */
.fah-stars-history h4,
.fah-shop-grid + h4,
.fah-orders-table + h4 {
    font-size: 0.95rem;
    margin: 0 0 8px;
    color: #2d3748;
}

.fah-stars-history h4 {
    font-size: 0.95rem;
    margin: 0 0 8px;
    color: #2d3748;
}

.fah-stars-list {
    list-style: none;
    margin: 0;
    padding: 0;
    border-top: 1px solid #edf2f7;
}

.fah-stars-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid #edf2f7;
    font-size: 0.88rem;
}

.fah-stars-reason {
    color: #4a5568;
}

.fah-stars-amount {
    font-weight: 700;
    white-space: nowrap;
    margin-left: 12px;
}

/* Магазин — картки */
.fah-shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 14px;
}

.fah-shop-card {
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 14px 12px;
    text-align: center;
    transition: border-color .2s, box-shadow .2s;
}

.fah-shop-card:hover {
    border-color: #d69e2e;
    box-shadow: 0 2px 8px rgba(214,158,46,.15);
}

.fah-shop-card--locked {
    opacity: .65;
    filter: grayscale(.3);
}

.fah-shop-cost {
    font-size: 1.3rem;
    font-weight: 800;
    color: #d69e2e;
    margin-bottom: 6px;
}

.fah-shop-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 4px;
}

.fah-shop-desc {
    font-size: 0.78rem;
    color: #718096;
    margin-bottom: 6px;
}

.fah-shop-stock {
    font-size: 0.75rem;
    color: #a0aec0;
    margin-bottom: 6px;
}

.fah-shop-need {
    font-size: 0.78rem;
    color: #a0aec0;
    display: block;
    margin-top: 4px;
}

/* Таблиця замовлень */
.fah-orders-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.fah-orders-table th,
.fah-orders-table td {
    padding: 7px 10px;
    border-bottom: 1px solid #edf2f7;
    text-align: left;
}

.fah-orders-table th {
    color: #718096;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
}

@media (max-width: 480px) {
    .fah-shop-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .fah-stars-count {
        font-size: 1.8rem;
    }
}
