/* FenomenChess Parent Portal — Premium Dark Theme */

/* ===== DESIGN TOKENS ===== */
:root {
    /* Surfaces (layered elevation) */
    --bg-base: #0a0a14;
    --bg-surface-1: #12121f;
    --bg-surface-2: #1a1a2e;
    --bg-surface-3: #222240;
    --bg-glass: rgba(26, 26, 46, 0.65);
    --bg-glass-border: rgba(255, 255, 255, 0.06);
    --bg-glass-highlight: rgba(255, 255, 255, 0.03);

    /* Accent palette */
    --accent-1: #e94560;
    --accent-2: #ff6b81;
    --accent-gradient: linear-gradient(135deg, #e94560 0%, #ff6b81 100%);
    --accent-glow: 0 0 20px rgba(233, 69, 96, 0.25);

    /* Semantic */
    --success: #34d399;
    --success-bg: rgba(52, 211, 153, 0.12);
    --warning: #fbbf24;
    --warning-bg: rgba(251, 191, 36, 0.12);
    --info: #60a5fa;
    --info-bg: rgba(96, 165, 250, 0.12);
    --danger: #f87171;
    --danger-bg: rgba(248, 113, 113, 0.12);

    /* Text hierarchy */
    --text-primary: #f0f0f5;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;

    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;

    /* Elevation */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.35), 0 1px 4px rgba(0,0,0,0.2);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.45), 0 2px 8px rgba(0,0,0,0.25);
    --shadow-glow: 0 0 40px rgba(233, 69, 96, 0.12);

    /* Radii */
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 22px;
    --radius-full: 100px;

    /* Transitions */
    --ease-out: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --t-fast: 150ms var(--ease-out);
    --t-normal: 250ms var(--ease-out);
    --t-slow: 400ms var(--ease-out);

    /* Layout */
    --nav-height: 64px;
    --header-height: 56px;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
@keyframes progressFill {
    from { width: 0; }
}
@keyframes ringDraw {
    from { stroke-dashoffset: var(--ring-circumference); }
}
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}
@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(233, 69, 96, 0.3); }
    50% { box-shadow: 0 0 0 8px rgba(233, 69, 96, 0); }
}
@keyframes blobMove {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -40px) scale(1.1); }
    50% { transform: translate(-20px, 20px) scale(0.9); }
    75% { transform: translate(20px, 40px) scale(1.05); }
}

/* ===== RESET & BASE ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, Roboto, sans-serif;
    background: var(--bg-base);
    color: var(--text-primary);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.5;
    letter-spacing: -0.01em;
}

/* ===== ICONS ===== */
.icon { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.icon svg { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-sm { font-size: 16px; }
.icon-md { font-size: 22px; }
.icon-lg { font-size: 28px; }
.icon-xl { font-size: 40px; }
.icon-circle {
    width: 44px; height: 44px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

/* ===== SKELETON LOADING ===== */
.skeleton {
    background: linear-gradient(90deg, var(--bg-surface-2) 25%, var(--bg-surface-3) 50%, var(--bg-surface-2) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    border-radius: var(--radius-sm);
}
.skeleton-text { height: 14px; margin-bottom: 8px; border-radius: 6px; }
.skeleton-text.short { width: 40%; }
.skeleton-text.medium { width: 70%; }
.skeleton-heading { height: 20px; width: 50%; margin-bottom: 12px; border-radius: 6px; }
.skeleton-card {
    height: 120px;
    margin-bottom: 12px;
    border-radius: var(--radius-md);
}

/* ===== AUTH PAGE ===== */
.auth-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--bg-base);
    overflow: hidden;
    position: relative;
}
.auth-body::before,
.auth-body::after {
    content: '';
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    z-index: 0;
    animation: blobMove 20s ease-in-out infinite;
}
.auth-body::before {
    width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(233, 69, 96, 0.3), transparent 70%);
    top: 10%; left: -5%;
}
.auth-body::after {
    width: 250px; height: 250px;
    background: radial-gradient(circle, rgba(96, 165, 250, 0.2), transparent 70%);
    bottom: 10%; right: -5%;
    animation-delay: -10s;
}

.auth-container {
    width: 100%;
    max-width: 420px;
    padding: var(--space-lg);
    position: relative;
    z-index: 1;
    animation: fadeInUp 0.6s var(--ease-out);
}
.auth-logo {
    text-align: center;
    margin-bottom: var(--space-xl);
}
.logo-icon {
    width: 72px; height: 72px;
    margin: 0 auto 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 48px;
    background: var(--accent-gradient);
    border-radius: var(--radius-md);
    box-shadow: var(--accent-glow);
    color: #fff;
    animation: float 4s ease-in-out infinite;
}
.auth-logo h1 {
    font-size: 26px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}
.auth-subtitle {
    color: var(--text-secondary);
    font-size: 14px;
    margin-top: 4px;
}
.auth-hint {
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 16px;
    line-height: 1.5;
    text-align: center;
}
.auth-form {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--bg-glass-border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    box-shadow: var(--shadow-lg);
}
@supports not (backdrop-filter: blur(1px)) {
    .auth-form { background: var(--bg-surface-2); }
}
.auth-form h2 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    text-align: center;
    letter-spacing: -0.01em;
}

/* Form controls */
.form-group {
    margin-bottom: var(--space-md);
}
.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
}
.form-group input, .form-group textarea {
    width: 100%;
    padding: 13px 16px;
    background: var(--bg-surface-1);
    border: 1.5px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 16px;
    font-family: inherit;
    outline: none;
    transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.form-group input:focus, .form-group textarea:focus {
    border-color: var(--accent-1);
    box-shadow: 0 0 0 3px rgba(233, 69, 96, 0.15);
}
.form-group input::placeholder, .form-group textarea::placeholder {
    color: var(--text-muted);
}

/* Buttons */
.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 20px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: transform var(--t-fast), box-shadow var(--t-fast), opacity var(--t-fast);
    -webkit-tap-highlight-color: transparent;
}
.btn:active:not(:disabled) { transform: scale(0.97); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary {
    background: var(--accent-gradient);
    color: #fff;
    box-shadow: 0 2px 12px rgba(233, 69, 96, 0.3);
}
.btn-primary:hover:not(:disabled) {
    box-shadow: 0 4px 20px rgba(233, 69, 96, 0.4);
    transform: translateY(-1px);
}
.btn-secondary {
    background: var(--bg-surface-3);
    color: var(--text-primary);
    border: 1px solid var(--bg-glass-border);
}

.auth-switch {
    text-align: center;
    margin-top: var(--space-md);
    font-size: 14px;
    color: var(--text-secondary);
}
.auth-switch a {
    color: var(--accent-2);
    text-decoration: none;
    font-weight: 500;
}

/* Messages */
.error-msg {
    background: var(--danger-bg);
    color: var(--danger);
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    margin-bottom: 16px;
    border: 1px solid rgba(248, 113, 113, 0.15);
    animation: fadeIn 0.3s var(--ease-out);
}
.success-msg {
    background: var(--success-bg);
    color: var(--success);
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    margin-bottom: 16px;
    border: 1px solid rgba(52, 211, 153, 0.15);
    animation: fadeIn 0.3s var(--ease-out);
}

/* ===== APP LAYOUT ===== */
.app-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--header-height);
    background: rgba(18, 18, 31, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--bg-glass-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--space-md);
    z-index: 100;
}
@supports not (backdrop-filter: blur(1px)) {
    .app-header { background: var(--bg-surface-1); }
}
.header-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.02em;
}
.header-logo {
    width: 32px; height: 32px;
    background: var(--accent-gradient);
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; color: #fff;
    box-shadow: 0 2px 8px rgba(233, 69, 96, 0.25);
}
.header-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 22px;
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-sm);
    transition: color var(--t-fast), background var(--t-fast);
    display: flex; align-items: center; justify-content: center;
}
.header-btn:hover { color: var(--text-primary); background: var(--bg-glass-highlight); }

.app-content {
    padding-top: var(--header-height);
    padding-bottom: calc(var(--nav-height) + 12px);
    min-height: 100vh;
}

/* ===== BOTTOM NAV ===== */
.bottom-nav {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: var(--nav-height);
    background: rgba(18, 18, 31, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--bg-glass-border);
    display: flex;
    z-index: 100;
    padding-bottom: env(safe-area-inset-bottom, 0);
}
@supports not (backdrop-filter: blur(1px)) {
    .bottom-nav { background: var(--bg-surface-1); }
}
.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: color var(--t-fast);
    -webkit-tap-highlight-color: transparent;
    position: relative;
    gap: 3px;
    letter-spacing: 0.02em;
}
.nav-item::before {
    content: '';
    position: absolute;
    top: 0;
    width: 0;
    height: 2px;
    background: var(--accent-gradient);
    border-radius: 0 0 2px 2px;
    transition: width var(--t-normal);
}
.nav-item.active {
    color: var(--accent-1);
}
.nav-item.active::before {
    width: 32px;
}
.nav-icon {
    font-size: 22px;
    transition: transform var(--t-fast);
}
.nav-item:active .nav-icon { transform: scale(0.9); }

/* ===== CHILD SELECTOR ===== */
.child-selector {
    position: fixed;
    top: var(--header-height);
    left: 0; right: 0;
    background: rgba(18, 18, 31, 0.9);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--bg-glass-border);
    z-index: 99;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.child-selector::-webkit-scrollbar { display: none; }
.child-tabs {
    display: flex;
    padding: 10px 16px;
    gap: 8px;
}
.child-tab {
    flex-shrink: 0;
    padding: 7px 18px;
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 500;
    background: var(--bg-surface-2);
    color: var(--text-secondary);
    cursor: pointer;
    border: 1px solid var(--bg-glass-border);
    transition: all var(--t-fast);
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
}
.child-tab:active { transform: scale(0.95); }
.child-tab.active {
    background: var(--accent-gradient);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 2px 10px rgba(233, 69, 96, 0.3);
}

/* ===== CONTENT AREAS ===== */
.page-section {
    padding: var(--space-md);
    animation: fadeInUp 0.35s var(--ease-out) both;
}
.page-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: var(--space-md);
    letter-spacing: -0.02em;
}
.page-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: -8px;
    margin-bottom: var(--space-md);
}
.section-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: var(--space-sm);
}
.loading {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
    font-size: 15px;
}

/* ===== GLASS CARDS ===== */
.card {
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--bg-glass-border);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    margin-bottom: 12px;
    box-shadow: var(--shadow-sm);
    transition: transform var(--t-fast), box-shadow var(--t-fast);
}
@supports not (backdrop-filter: blur(1px)) {
    .card { background: var(--bg-surface-2); }
}
.card-interactive:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.card-interactive:active { transform: scale(0.98); }
.card-accent {
    border-left: 4px solid transparent;
    border-image: var(--accent-gradient) 1;
    border-image-slice: 1;
}
.card-gradient-top {
    position: relative;
    overflow: hidden;
}
.card-gradient-top::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--accent-gradient);
}
.card-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}
.card-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

/* ===== BADGES & CHIPS ===== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 500;
    padding: 3px 10px;
    border-radius: var(--radius-full);
}
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-info { background: var(--info-bg); color: var(--info); }
.badge-neutral {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
}
.chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    background: var(--bg-surface-3);
    color: var(--text-secondary);
}

/* ===== STATUS DOT ===== */
.status-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}
.status-dot.green { background: var(--success); box-shadow: 0 0 6px rgba(52, 211, 153, 0.4); }
.status-dot.red { background: var(--danger); box-shadow: 0 0 6px rgba(248, 113, 113, 0.4); }
.status-dot.yellow { background: var(--warning); box-shadow: 0 0 6px rgba(251, 191, 36, 0.4); }
.status-dot.gray { background: var(--text-muted); }

/* ===== DASHBOARD ===== */
.greeting {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}
.greeting-name {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.balance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 8px;
    margin-top: 12px;
}
.balance-item {
    background: var(--bg-surface-1);
    border: 1px solid var(--bg-glass-border);
    border-radius: var(--radius-sm);
    padding: 12px 10px;
    text-align: center;
    transition: transform var(--t-fast);
}
.balance-item:active { transform: scale(0.97); }
.balance-icon {
    font-size: 18px;
    margin-bottom: 4px;
    color: var(--text-muted);
}
.balance-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--accent-1);
    line-height: 1.1;
}
.balance-value.normal { color: var(--success); }
.balance-value.low { color: var(--warning); }
.balance-value.zero { color: var(--danger); }
.balance-label {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
    font-weight: 500;
}

.child-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
}

.info-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 8px;
}

/* Payment card */
.payment-card {
    background: var(--bg-surface-1);
    border: 1px solid var(--bg-glass-border);
    border-left: 3px solid var(--accent-1);
    border-radius: var(--radius-sm);
    padding: 14px;
    margin-top: 12px;
}
.payment-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}
.payment-row:last-child { margin-bottom: 0; }
.payment-row strong { color: var(--text-primary); font-weight: 500; }

/* Notification banner */
.notif-banner {
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(233, 69, 96, 0.2);
    border-radius: var(--radius-md);
    padding: 14px var(--space-md);
    margin: var(--space-md);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: pulseGlow 2s ease-in-out infinite;
}
.notif-banner-icon { font-size: 24px; color: var(--accent-1); flex-shrink: 0; }
.notif-banner-text { flex: 1; font-size: 14px; line-height: 1.4; }
.notif-banner-btn {
    background: var(--accent-gradient);
    color: #fff;
    border: none;
    border-radius: var(--radius-full);
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: transform var(--t-fast);
    font-family: inherit;
}
.notif-banner-btn:active { transform: scale(0.95); }

/* ===== HOMEWORK ===== */
.hw-card {
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--bg-glass-border);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    margin-bottom: 12px;
    animation: fadeInUp 0.4s var(--ease-out) both;
}
@supports not (backdrop-filter: blur(1px)) {
    .hw-card { background: var(--bg-surface-2); }
}
.hw-card.present { border-left: 3px solid var(--success); }
.hw-card.absent { border-left: 3px solid var(--danger); }

.hw-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}
.hw-date-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: var(--text-secondary);
    background: var(--bg-surface-1);
    padding: 4px 10px;
    border-radius: var(--radius-full);
}
.hw-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 500;
}
.hw-topic {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}
.hw-text {
    font-size: 14px;
    color: var(--text-secondary);
    white-space: pre-wrap;
    line-height: 1.6;
    padding: 10px 14px;
    background: var(--bg-surface-1);
    border-left: 2px solid var(--accent-1);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin-bottom: 10px;
}
.hw-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* Stagger delay for cards */
.hw-card:nth-child(1) { animation-delay: 0ms; }
.hw-card:nth-child(2) { animation-delay: 60ms; }
.hw-card:nth-child(3) { animation-delay: 120ms; }
.hw-card:nth-child(4) { animation-delay: 180ms; }
.hw-card:nth-child(5) { animation-delay: 240ms; }

/* ===== SCHEDULE ===== */
.schedule-day {
    margin-bottom: var(--space-md);
}
.schedule-day-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: var(--space-sm);
    padding-left: 4px;
}
.schedule-entry {
    background: var(--bg-glass);
    backdrop-filter: blur(8px);
    border: 1px solid var(--bg-glass-border);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 12px;
}
@supports not (backdrop-filter: blur(1px)) {
    .schedule-entry { background: var(--bg-surface-2); }
}
.schedule-time {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    min-width: 56px;
    font-variant-numeric: tabular-nums;
}
.schedule-details { flex: 1; }
.schedule-type {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
}
.schedule-trainer {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}
.trainer-avatar {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: var(--bg-surface-3);
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 600;
    color: var(--text-secondary);
    flex-shrink: 0;
}

/* ===== STATS ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: var(--space-md);
}
.stat-card {
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    border: 1px solid var(--bg-glass-border);
    border-radius: var(--radius-md);
    padding: 16px 12px;
    text-align: center;
}
@supports not (backdrop-filter: blur(1px)) {
    .stat-card { background: var(--bg-surface-2); }
}
.stat-icon {
    font-size: 20px;
    margin-bottom: 6px;
}
.stat-value {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.1;
    color: var(--accent-1);
}
.stat-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
    font-weight: 500;
}
.stat-value.green { color: var(--success); }
.stat-value.blue { color: var(--info); }
.stat-value.red { color: var(--danger); }

/* Progress ring */
.progress-ring-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: var(--space-lg) 0;
}
.progress-ring-circle {
    transition: stroke-dashoffset 1s var(--ease-out);
}
.progress-ring-text {
    font-size: 24px;
    font-weight: 700;
    fill: var(--text-primary);
    font-family: inherit;
}
.progress-ring-label {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 8px;
}

/* Progress bar */
.progress-bar {
    height: 8px;
    background: var(--bg-surface-1);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin: 8px 0;
}
.progress-fill {
    height: 100%;
    background: var(--accent-gradient);
    border-radius: var(--radius-full);
    animation: progressFill 0.8s var(--ease-out);
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 24px;
}
.timeline::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 4px;
    bottom: 4px;
    width: 2px;
    background: var(--bg-surface-3);
    border-radius: 1px;
}
.timeline-item {
    position: relative;
    padding-bottom: 14px;
}
.timeline-item::before {
    content: '';
    position: absolute;
    left: -20px;
    top: 6px;
    width: 10px; height: 10px;
    border-radius: 50%;
    background: var(--accent-1);
    border: 2px solid var(--bg-base);
}
.timeline-date {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 2px;
}
.timeline-text {
    font-size: 14px;
    color: var(--text-primary);
}

/* ===== RATINGS ===== */
.rating-platform {
    margin-bottom: var(--space-md);
}
.platform-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}
.platform-name {
    font-size: 16px;
    font-weight: 600;
}
.platform-user {
    font-size: 13px;
    color: var(--accent-2);
}
.rating-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}
.rating-card {
    background: var(--bg-surface-1);
    border: 1px solid var(--bg-glass-border);
    border-radius: var(--radius-sm);
    padding: 14px 10px;
    text-align: center;
    transition: transform var(--t-fast);
}
.rating-card:active { transform: scale(0.97); }
.rating-icon {
    font-size: 20px;
    margin-bottom: 6px;
    color: var(--text-muted);
}
.rating-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--info);
    line-height: 1.1;
}
.rating-label {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 500;
}
.rating-updated {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ===== GOALS ===== */
.goal-card {
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    border: 1px solid var(--bg-glass-border);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    margin-bottom: 10px;
    display: flex;
    gap: 14px;
    align-items: flex-start;
    transition: transform var(--t-fast);
}
@supports not (backdrop-filter: blur(1px)) {
    .goal-card { background: var(--bg-surface-2); }
}
.goal-card.completed {
    border-color: rgba(52, 211, 153, 0.2);
}
.goal-card:active { transform: scale(0.98); }
.goal-icon-circle {
    width: 44px; height: 44px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}
.goal-icon-circle.pending {
    background: var(--warning-bg);
    color: var(--warning);
}
.goal-icon-circle.completed {
    background: var(--success-bg);
    color: var(--success);
}
.goal-content { flex: 1; min-width: 0; }
.goal-title {
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 4px;
    letter-spacing: -0.01em;
}
.goal-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 6px;
    line-height: 1.4;
}
.goal-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 6px;
}
.goal-progress {
    margin-top: 8px;
}
.goal-progress-text {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

/* ===== LEADERBOARD ===== */
.podium {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 8px;
    margin-bottom: var(--space-lg);
    padding: 0 var(--space-md);
}
.podium-item {
    flex: 1;
    max-width: 120px;
    text-align: center;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    padding: 16px 8px 14px;
    position: relative;
}
.podium-item.first {
    background: linear-gradient(180deg, rgba(251, 191, 36, 0.15) 0%, rgba(251, 191, 36, 0.05) 100%);
    border: 1px solid rgba(251, 191, 36, 0.2);
    border-bottom: none;
    min-height: 140px;
}
.podium-item.second {
    background: linear-gradient(180deg, rgba(192, 192, 192, 0.1) 0%, rgba(192, 192, 192, 0.03) 100%);
    border: 1px solid rgba(192, 192, 192, 0.15);
    border-bottom: none;
    min-height: 110px;
}
.podium-item.third {
    background: linear-gradient(180deg, rgba(205, 127, 50, 0.1) 0%, rgba(205, 127, 50, 0.03) 100%);
    border: 1px solid rgba(205, 127, 50, 0.15);
    border-bottom: none;
    min-height: 90px;
}
.podium-medal {
    font-size: 28px;
    margin-bottom: 8px;
}
.podium-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.podium-rating {
    font-size: 18px;
    font-weight: 700;
    color: var(--info);
}

.lb-row {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--bg-glass-border);
    transition: background var(--t-fast);
}
.lb-row.own {
    background: rgba(233, 69, 96, 0.08);
    border-left: 3px solid var(--accent-1);
    border-radius: var(--radius-sm);
    margin: 2px 0;
}
.lb-rank {
    width: 36px;
    font-size: 15px;
    font-weight: 700;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}
.lb-name {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
}
.lb-rating {
    font-size: 16px;
    font-weight: 700;
    color: var(--info);
    font-variant-numeric: tabular-nums;
}

/* ===== LESSON HISTORY ===== */
.package-card {
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    border: 1px solid var(--bg-glass-border);
    border-radius: var(--radius-md);
    margin-bottom: 12px;
    overflow: hidden;
}
@supports not (backdrop-filter: blur(1px)) {
    .package-card { background: var(--bg-surface-2); }
}
.package-header {
    padding: 14px var(--space-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background var(--t-fast);
    -webkit-tap-highlight-color: transparent;
}
.package-header:active { background: var(--bg-glass-highlight); }
.package-status-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}
.package-info { flex: 1; min-width: 0; }
.package-type {
    font-weight: 600;
    font-size: 15px;
    letter-spacing: -0.01em;
}
.package-counter {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}
.package-chevron {
    color: var(--text-muted);
    transition: transform var(--t-normal);
    font-size: 18px;
}
.package-chevron.open {
    transform: rotate(180deg);
}
.package-progress {
    height: 4px;
    background: var(--bg-surface-1);
    border-radius: 2px;
    margin-top: 6px;
    overflow: hidden;
}
.package-progress-fill {
    height: 100%;
    background: var(--accent-gradient);
    border-radius: 2px;
}
.package-lessons {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s var(--ease-out);
}
.package-lessons.open {
    max-height: 2000px;
}
.package-lessons-inner {
    padding: 0 var(--space-md) var(--space-md);
}
.lesson-row {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--bg-glass-border);
    font-size: 13px;
    gap: 10px;
}
.lesson-row:last-child { border-bottom: none; }
.lesson-date {
    min-width: 76px;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
    font-size: 12px;
}
.lesson-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.lesson-status {
    font-size: 18px;
    flex-shrink: 0;
}

/* ===== SETTINGS ===== */
.setting-row {
    display: flex;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid var(--bg-glass-border);
    gap: 12px;
}
.setting-row:last-child { border-bottom: none; }
.setting-icon {
    width: 40px; height: 40px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}
.setting-content { flex: 1; min-width: 0; }
.setting-label {
    font-size: 15px;
    font-weight: 500;
}
.setting-desc {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}
.toggle {
    position: relative;
    width: 52px;
    height: 30px;
    cursor: pointer;
    flex-shrink: 0;
}
.toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle-slider {
    position: absolute;
    inset: 0;
    background: var(--bg-surface-1);
    border-radius: 15px;
    transition: background 0.3s var(--ease-spring);
    border: 1px solid var(--bg-glass-border);
}
.toggle-slider::before {
    content: '';
    position: absolute;
    width: 24px; height: 24px;
    left: 3px; top: 2px;
    background: var(--text-muted);
    border-radius: 50%;
    transition: all 0.3s var(--ease-spring);
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}
.toggle input:checked + .toggle-slider {
    background: var(--accent-gradient);
    border-color: transparent;
}
.toggle input:checked + .toggle-slider::before {
    transform: translateX(22px);
    background: #fff;
}

/* ===== CONTACT ===== */
.contact-textarea {
    width: 100%;
    min-height: 140px;
    background: var(--bg-surface-1);
    border: 1.5px solid var(--bg-glass-border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    padding: 14px;
    font-size: 15px;
    font-family: inherit;
    resize: vertical;
    outline: none;
    transition: border-color var(--t-fast), box-shadow var(--t-fast);
    line-height: 1.5;
}
.contact-textarea:focus {
    border-color: var(--accent-1);
    box-shadow: 0 0 0 3px rgba(233, 69, 96, 0.15);
}
.char-counter {
    text-align: right;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ===== MORE MENU ===== */
.more-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 4px;
}
.more-item {
    background: var(--bg-glass);
    backdrop-filter: blur(8px);
    border: 1px solid var(--bg-glass-border);
    border-radius: var(--radius-md);
    padding: 20px 12px;
    text-align: center;
    cursor: pointer;
    transition: transform var(--t-fast), box-shadow var(--t-fast);
    -webkit-tap-highlight-color: transparent;
    animation: fadeInUp 0.35s var(--ease-out) both;
}
@supports not (backdrop-filter: blur(1px)) {
    .more-item { background: var(--bg-surface-2); }
}
.more-item:active { transform: scale(0.95); }
.more-item:nth-child(1) { animation-delay: 0ms; }
.more-item:nth-child(2) { animation-delay: 40ms; }
.more-item:nth-child(3) { animation-delay: 80ms; }
.more-item:nth-child(4) { animation-delay: 120ms; }
.more-item:nth-child(5) { animation-delay: 160ms; }
.more-item:nth-child(6) { animation-delay: 200ms; }
.more-item:nth-child(7) { animation-delay: 240ms; }

.more-icon {
    width: 48px; height: 48px;
    margin: 0 auto 10px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px;
}
.more-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
}

/* More icon colors */
.more-icon.blue { background: var(--info-bg); color: var(--info); }
.more-icon.green { background: var(--success-bg); color: var(--success); }
.more-icon.yellow { background: var(--warning-bg); color: var(--warning); }
.more-icon.red { background: var(--danger-bg); color: var(--danger); }
.more-icon.purple { background: rgba(168, 85, 247, 0.12); color: #a855f7; }

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-muted);
    animation: fadeIn 0.5s var(--ease-out);
}
.empty-icon {
    font-size: 56px;
    margin-bottom: 16px;
    opacity: 0.5;
    animation: float 3s ease-in-out infinite;
}
.empty-text {
    font-size: 15px;
    line-height: 1.5;
}

/* Platform badge */
.platform-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 500;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    background: var(--bg-surface-1);
    color: var(--text-secondary);
}

/* ===== CHILD SELECTOR OFFSET ===== */
body.has-child-selector .app-content {
    padding-top: calc(var(--header-height) + 52px);
}

/* ===== RESPONSIVE ===== */
@media (min-width: 600px) {
    .app-content { max-width: 640px; margin: 0 auto; }
    .auth-container { padding: 40px; }
    .stats-grid { grid-template-columns: repeat(4, 1fr); }
    .more-grid { grid-template-columns: repeat(3, 1fr); }
    .balance-grid { grid-template-columns: repeat(4, 1fr); }
}
