/**
 * One Football Academy - Premium Portal Theme
 * Version 3.2.0 - SaaS Edition
 */

/* ===================================
   CSS VARIABLES
   =================================== */
:root {
    /* Dark Theme */
    --bg-primary: #0a0a0a;
    --bg-secondary: #111111;
    --bg-elevated: #1a1a1a;
    --bg-hover: #222222;
    
    /* Glass Effects */
    --glass-bg: rgba(17, 17, 17, 0.8);
    --glass-bg-light: rgba(26, 26, 26, 0.9);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-border-light: rgba(255, 255, 255, 0.12);
    
    /* Text */
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.4);
    
    /* Accent */
    --accent: #39FF14;
    --accent-dim: rgba(57, 255, 20, 0.15);
    --accent-glow: rgba(57, 255, 20, 0.3);
    
    /* Status */
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    
    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    
    /* Spacing */
    --radius: 12px;
    --radius-lg: 16px;
    --radius-sm: 8px;
}

/* ===================================
   BASE
   =================================== */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
}

body.oft-portal-page {
    background: var(--bg-primary);
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
}

/* ===================================
   LAYOUT
   =================================== */
.oft-app {
    min-height: 100vh;
    padding-bottom: 100px;
}

.oft-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 20px;
}

.oft-container-wide {
    max-width: 1000px;
}

/* ===================================
   HEADER
   =================================== */
.oft-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    padding: 0 24px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.oft-logo {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
}

.oft-logo-icon {
    width: 44px;
    height: 44px;
    background: var(--accent);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.oft-logo span:not(.oft-logo-icon) {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.oft-header-nav {
    display: flex;
    align-items: center;
    gap: 16px;
}

.oft-header-link {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color 0.2s;
}

.oft-header-link:hover {
    color: var(--text-primary);
}

.oft-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-elevated);
    border: 2px solid var(--glass-border);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.2s;
}

.oft-avatar:hover {
    border-color: var(--accent);
}

.oft-avatar-lg {
    width: 80px;
    height: 80px;
    font-size: 28px;
}

.oft-avatar-accent {
    background: var(--accent);
    color: var(--bg-primary);
    border-color: var(--accent);
}

/* ===================================
   BOTTOM NAVIGATION
   =================================== */
.oft-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-around;
    padding: 12px 0;
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
}

.oft-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 16px;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
    border-radius: var(--radius-sm);
}

.oft-nav-item:hover {
    color: var(--text-secondary);
}

.oft-nav-item.active {
    color: var(--accent);
}

.oft-nav-icon {
    font-size: 22px;
}

/* ===================================
   PAGE TITLES
   =================================== */
.oft-page-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 32px 0 24px;
    letter-spacing: -0.5px;
}

.oft-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 32px 0 16px;
}

.oft-section-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.oft-section-link {
    font-size: 14px;
    font-weight: 500;
    color: var(--accent);
}

/* ===================================
   PROFILE HEADER
   =================================== */
.oft-profile-header {
    text-align: center;
    padding: 40px 20px;
}

.oft-profile-name {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 20px 0 8px;
    letter-spacing: -0.5px;
}

.oft-level-badge {
    display: inline-block;
    padding: 8px 16px;
    background: var(--accent-dim);
    color: var(--accent);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

/* ===================================
   CHILDREN TABS
   =================================== */
.oft-children-tabs {
    display: flex;
    gap: 12px;
    padding: 0 20px;
    margin-bottom: 24px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.oft-child-tab {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: var(--bg-elevated);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.2s;
}

.oft-child-tab:hover {
    border-color: var(--glass-border-light);
}

.oft-child-tab.active {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--bg-primary);
}

.oft-child-avatar {
    width: 28px;
    height: 28px;
    background: var(--bg-hover);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
}

.oft-child-tab.active .oft-child-avatar {
    background: rgba(0,0,0,0.2);
}

/* ===================================
   STATS
   =================================== */
.oft-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding: 0 20px;
    margin-bottom: 24px;
}

.oft-stat {
    background: var(--bg-elevated);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
}

.oft-stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
    letter-spacing: -1px;
}

.oft-stat-value.accent {
    color: var(--accent);
}

.oft-stat-label {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-muted);
    margin-top: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ===================================
   TOKEN CARD
   =================================== */
.oft-token-card {
    margin: 0 20px 24px;
    background: linear-gradient(135deg, var(--accent-dim) 0%, var(--bg-elevated) 100%);
    border: 1px solid var(--accent-glow);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.oft-token-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.oft-token-count {
    font-size: 36px;
    font-weight: 700;
    color: var(--accent);
    line-height: 1;
}

.oft-token-label {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* ===================================
   CARDS
   =================================== */
.oft-card {
    background: var(--bg-elevated);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    margin: 0 20px 16px;
    overflow: hidden;
}

.oft-card-header {
    padding: 20px;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.oft-card-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

.oft-card-body {
    padding: 20px;
}

/* ===================================
   LIST ITEMS
   =================================== */
.oft-list {
    margin: 0 20px;
}

.oft-list-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
    background: var(--bg-elevated);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    margin-bottom: 10px;
    text-decoration: none;
    transition: all 0.2s;
}

.oft-list-item:hover {
    border-color: var(--glass-border-light);
    transform: translateX(4px);
}

/* ===================================
   SESSION ITEM
   =================================== */
.oft-session-date {
    width: 56px;
    height: 56px;
    background: var(--bg-hover);
    border-radius: var(--radius-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.oft-session-day {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.oft-session-month {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-top: 2px;
}

.oft-session-info {
    flex: 1;
    min-width: 0;
}

.oft-session-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 4px;
}

.oft-session-time {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0;
}

/* ===================================
   BUTTONS
   =================================== */
.oft-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font-sans);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.25s;
    text-decoration: none;
}

.oft-btn-primary {
    background: var(--accent);
    color: var(--bg-primary);
}

.oft-btn-primary:hover {
    box-shadow: 0 8px 32px var(--accent-glow);
    transform: translateY(-2px);
}

.oft-btn-secondary {
    background: var(--bg-elevated);
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
}

.oft-btn-secondary:hover {
    border-color: var(--glass-border-light);
}

.oft-btn-dark {
    background: var(--bg-primary);
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
}

.oft-btn-sm {
    padding: 10px 18px;
    font-size: 13px;
}

.oft-btn-lg {
    padding: 18px 36px;
    font-size: 15px;
}

/* ===================================
   BADGES
   =================================== */
.oft-badge {
    display: inline-flex;
    padding: 6px 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 16px;
}

.oft-badge-success {
    background: rgba(34, 197, 94, 0.15);
    color: var(--success);
}

.oft-badge-warning {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
}

.oft-badge-danger {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

.oft-badge-accent {
    background: var(--accent-dim);
    color: var(--accent);
}

/* ===================================
   ALERTS
   =================================== */
.oft-alert {
    padding: 16px 20px;
    border-radius: var(--radius);
    margin: 16px 20px;
    font-size: 14px;
}

.oft-alert-info {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

.oft-alert-success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.2);
    color: var(--success);
}

/* ===================================
   EMPTY STATE
   =================================== */
.oft-empty {
    text-align: center;
    padding: 48px 24px;
}

.oft-empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.oft-empty-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 8px;
}

.oft-empty-text {
    color: var(--text-muted);
    margin: 0;
    font-size: 14px;
}

/* ===================================
   FORMS
   =================================== */
.oft-form-group {
    margin-bottom: 20px;
}

.oft-form-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.oft-form-input {
    width: 100%;
    padding: 14px 18px;
    font-size: 15px;
    font-family: var(--font-sans);
    background: var(--bg-hover);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    transition: all 0.2s;
}

.oft-form-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-dim);
}

/* ===================================
   INVOICE STYLES
   =================================== */
.oft-invoice-amount {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

/* ===================================
   CALENDAR
   =================================== */
.oft-calendar {
    width: 100%;
}

.oft-calendar-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--glass-border);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
}

.oft-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

.oft-calendar-cell {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    border-bottom: 1px solid var(--glass-border);
    border-right: 1px solid var(--glass-border);
}

.oft-calendar-cell:nth-child(7n) {
    border-right: none;
}

.oft-calendar-cell.empty {
    background: rgba(255,255,255,0.02);
}

.oft-calendar-cell.today .oft-calendar-day {
    background: var(--accent);
    color: var(--bg-primary);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.oft-calendar-cell.has-event {
    background: var(--accent-dim);
}

.oft-calendar-day {
    font-size: 14px;
    font-weight: 500;
}

.oft-calendar-dot {
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
    margin-top: 4px;
}

/* ===================================
   LANDING / NO ACCESS
   =================================== */
.oft-landing {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.oft-landing-content {
    text-align: center;
    max-width: 400px;
}

.oft-landing-logo {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    margin: 0 auto 24px;
}

.oft-landing-subtitle {
    color: var(--text-secondary);
    margin-bottom: 32px;
    font-size: 16px;
    line-height: 1.6;
}

/* ===================================
   RESPONSIVE
   =================================== */
@media (max-width: 600px) {
    .oft-header {
        padding: 0 16px;
        height: 64px;
    }
    
    .oft-logo span:not(.oft-logo-icon) {
        display: none;
    }
    
    .oft-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
        padding: 0 16px;
    }
    
    .oft-stat {
        padding: 16px 12px;
    }
    
    .oft-stat-value {
        font-size: 24px;
    }
    
    .oft-list,
    .oft-card,
    .oft-token-card {
        margin-left: 16px;
        margin-right: 16px;
    }
    
    .oft-container {
        padding: 0 16px;
    }
    
    .oft-page-title {
        font-size: 24px;
        margin: 24px 0 20px;
    }
}
