/* AMA V3 — Complete Styles */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --primary: #e63946;
    --primary-dark: #c1121f;
    --primary-light: #ff4d5a;
    --bg: #0a0a0a;
    --bg-card: #141414;
    --bg-input: #0d0d0d;
    --border: #2a2a2a;
    --text: #ffffff;
    --text-muted: #666666;
    --text-secondary: #b0b0b0;
    --success: #22c55e;
    --warning: #eab308;
}

body {
    font-family: 'Vazirmatn', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
}

.hidden { display: none !important; }

/* Loader */
.loader {
    position: fixed; top: 0; left: 0;
    width: 100%; height: 100%;
    background: var(--bg);
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    z-index: 99999;
    transition: opacity 0.5s;
}
.loader-spinner {
    width: 60px; height: 60px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loader-text {
    margin-top: 16px;
    font-size: 24px;
    font-weight: 900;
    color: var(--primary);
    letter-spacing: 4px;
}

/* Login Page */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    direction: rtl;
}
.login-bg {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 0;
}
.login-bg::before, .login-bg::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
}
.login-bg::before {
    width: 400px; height: 400px;
    background: var(--primary);
    top: -100px; right: -100px;
    animation: float1 8s ease-in-out infinite;
}
.login-bg::after {
    width: 300px; height: 300px;
    background: var(--primary-dark);
    bottom: -50px; left: -50px;
    animation: float2 10s ease-in-out infinite;
}
@keyframes float1 {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-50px, 50px); }
}
@keyframes float2 {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(50px, -50px); }
}

.login-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
}
.login-logo {
    text-align: center;
    margin-bottom: 32px;
}
.logo-icon {
    width: 140px;
    height: 140px;
    margin: 0 auto 16px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    box-shadow: 0 10px 48px rgba(230, 57, 70, 0.45);
    animation: pulse 3s infinite;
    overflow: hidden;
}
.logo-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}
.logo-text {
    font-size: 48px;
    font-weight: 900;
    letter-spacing: 4px;
}
.logo-accent { color: var(--primary); }
.logo-subtitle {
    color: var(--text-muted);
    font-size: 14px;
    margin-top: 4px;
}
.login-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 32px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}
.login-header {
    text-align: center;
    margin-bottom: 24px;
}
.login-header h2 { font-size: 24px; margin-bottom: 8px; }
.login-header p { color: var(--text-muted); font-size: 14px; }

/* Forms */
.form-group { margin-bottom: 16px; }
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--text-secondary);
}
.form-input {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-input);
    border: 2px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    font-family: 'Vazirmatn';
    font-size: 16px;
    transition: all 0.3s;
}
.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(230, 57, 70, 0.1);
}
.form-textarea { resize: vertical; min-height: 100px; }

/* Buttons */
.btn {
    padding: 14px 24px;
    border: none;
    border-radius: 12px;
    font-family: 'Vazirmatn';
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    width: 100%;
    box-shadow: 0 4px 20px rgba(230, 57, 70, 0.3);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(230, 57, 70, 0.4);
}
.btn-secondary {
    background: var(--bg-input);
    color: var(--text);
    border: 1px solid var(--border);
    width: 100%;
}
.btn-secondary:hover { border-color: var(--primary); }
.btn-sm { padding: 8px 16px; font-size: 14px; }
.btn-danger { background: var(--primary); color: white; }

/* OTP */
.otp-inputs {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin: 24px 0;
    direction: ltr;
}
.otp-input {
    width: 48px; height: 56px;
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    background: var(--bg-input);
    border: 2px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    transition: all 0.3s;
}
.otp-input:focus {
    outline: none;
    border-color: var(--primary);
}
.otp-input.verified {
    border-color: var(--success);
    background: rgba(34, 197, 94, 0.1);
    animation: successPulse 0.5s;
}
@keyframes successPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}
.otp-timer {
    text-align: center;
    margin-bottom: 16px;
    color: var(--text-muted);
    font-size: 14px;
}
.otp-timer span { color: var(--primary); font-weight: 700; }

/* Coach Selection */
.coach-card {
    background: var(--bg-input);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 12px;
}
.coach-card:hover { border-color: var(--primary); transform: translateX(-4px); }
.coach-card.selected {
    border-color: var(--primary);
    background: rgba(230, 57, 70, 0.1);
}
.coach-avatar {
    width: 50px; height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    display: flex; align-items: center; justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 18px;
    flex-shrink: 0;
}
.coach-info { flex: 1; }
.coach-name { font-weight: 700; margin-bottom: 4px; }
.coach-spec { font-size: 12px; color: var(--text-muted); }
.coach-stats {
    display: flex;
    gap: 12px;
    margin-top: 4px;
    font-size: 11px;
}
.coach-stat { color: var(--primary); }

.login-footer {
    text-align: center;
    margin-top: 32px;
    color: var(--text-muted);
    font-size: 12px;
}

/* Dashboard Layout */
.dashboard {
    display: flex;
    min-height: 100vh;
}
.sidebar {
    width: 260px;
    background: var(--bg-card);
    border-left: 1px solid var(--border);
    padding: 20px;
    position: fixed;
    top: 0; right: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
}
.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 20px;
}
.sidebar-logo-icon {
    width: 40px; height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
}
.sidebar-logo-text {
    font-size: 20px;
    font-weight: 900;
    letter-spacing: 2px;
}
.sidebar-logo-text span { color: var(--primary); }
.nav-menu { list-style: none; }
.nav-section-title {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 16px 0 8px;
    font-weight: 600;
}
.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 10px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s;
    cursor: pointer;
    margin-bottom: 4px;
}
.nav-link:hover {
    background: var(--bg-input);
    color: var(--text);
}
.nav-link.active {
    background: rgba(230, 57, 70, 0.1);
    color: var(--primary);
}
.nav-icon { font-size: 20px; width: 24px; text-align: center; }

.main-content {
    flex: 1;
    min-width: 0; /* جلوگیری از بیرون‌زدن صفحه وقتی محتوای داخلی پهن است */
    margin-right: 260px;
    padding: 24px;
}
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}
.search-input {
    padding: 10px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-family: 'Vazirmatn';
    width: 240px;
}
.search-input:focus {
    outline: none;
    border-color: var(--primary);
}
.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}
.user-avatar {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    display: flex; align-items: center; justify-content: center;
    color: white;
    font-weight: 700;
}
.user-name { font-weight: 600; }
.user-role { font-size: 12px; color: var(--text-muted); }
.notification-btn {
    position: relative;
    width: 40px; height: 40px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
}
.notification-badge {
    position: absolute;
    top: -4px; right: -4px;
    width: 18px; height: 18px;
    background: var(--primary);
    color: white;
    font-size: 10px;
    font-weight: 700;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}
.page-title { font-size: 28px; font-weight: 900; }
.page-subtitle { color: var(--text-muted); font-size: 14px; margin-top: 4px; }

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.3s;
}
.stat-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}
.stat-icon {
    width: 50px; height: 50px;
    border-radius: 12px;
    background: rgba(230, 57, 70, 0.1);
    display: flex; align-items: center; justify-content: center;
    font-size: 24px;
}
.stat-value { font-size: 24px; font-weight: 900; }
.stat-label { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 16px;
}
.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}
.card-title { font-size: 18px; font-weight: 700; }

/* Exercises */
.category-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    overflow-x: auto;
    padding: 12px 0;
    margin-bottom: 16px;
}
.category-tab {
    padding: 8px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 20px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s;
}
.category-tab.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}
.exercise-card {
    background: var(--bg-input);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.3s;
}
.exercise-card:hover { border-color: var(--primary); }
.exercise-card.selected {
    border-color: var(--primary);
    background: rgba(230, 57, 70, 0.1);
}
.exercise-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.exercise-name { font-weight: 700; }
.exercise-equipment { font-size: 12px; color: var(--text-muted); }
.exercise-config {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 12px;
}
.exercise-config input {
    padding: 8px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-family: 'Vazirmatn';
    font-size: 14px;
}

/* Workout Day */
.workout-day {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
}
.day-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}
.exercise-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    background: var(--bg-input);
    border-radius: 8px;
    margin-bottom: 8px;
}
.exercise-info { flex: 1; }
.exercise-details { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.check-btn {
    width: 32px; height: 32px;
    border-radius: 50%;
    border: 2px solid var(--border);
    background: transparent;
    cursor: pointer;
    transition: all 0.3s;
    display: flex; align-items: center; justify-content: center;
    color: white;
    font-size: 16px;
}
.check-btn.checked {
    background: var(--primary);
    border-color: var(--primary);
}

/* Chat */
.chat-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 16px;
}
.chat-list {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px;
    max-height: 600px;
    overflow-y: auto;
}
.chat-container {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    height: 600px;
}
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    background: var(--bg-input);
    border-radius: 12px;
    margin-bottom: 16px;
}
.chat-message {
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 8px;
    max-width: 70%;
}
.chat-message.sent {
    background: var(--primary);
    margin-right: auto;
}
.chat-message.received {
    background: var(--bg-card);
    margin-left: auto;
}
.chat-input-wrap {
    display: flex;
    gap: 8px;
}
.chat-input {
    flex: 1;
    padding: 12px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-family: 'Vazirmatn';
}
.chat-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 8px;
}
.chat-user:hover { background: var(--bg-input); }
.chat-user.active { background: rgba(230, 57, 70, 0.1); }

/* Plans */
.plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}
.plan-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    position: relative;
    transition: all 0.3s;
}
.plan-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
}
.plan-card.featured {
    border-color: var(--primary);
    box-shadow: 0 8px 30px rgba(230, 57, 70, 0.3);
}
.plan-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: white;
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}
.plan-name { font-size: 20px; font-weight: 700; margin-bottom: 12px; }
.plan-price {
    font-size: 32px;
    font-weight: 900;
    color: var(--primary);
    margin-bottom: 8px;
}
.plan-discount { font-size: 14px; color: var(--success); margin-bottom: 16px; }
.plan-features { list-style: none; margin-bottom: 20px; }
.plan-features li {
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}
.plan-features li::before {
    content: '✓ ';
    color: var(--primary);
    font-weight: 700;
}

/* Student Card */
.student-card {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s;
}
.student-card:hover { border-color: var(--primary); }

/* Coach Profile */
.coach-profile-card {
    background: linear-gradient(135deg, var(--bg-card), var(--bg-input));
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
}
.coach-profile-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}
.coach-profile-avatar {
    width: 80px; height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    display: flex; align-items: center; justify-content: center;
    color: white;
    font-size: 32px;
    font-weight: 700;
}
.coach-profile-name { font-size: 24px; font-weight: 700; margin-bottom: 4px; }
.coach-profile-spec { color: var(--text-muted); margin-bottom: 8px; }
.coach-profile-stats { display: flex; gap: 16px; }
.coach-stat-item { text-align: center; }
.coach-stat-value { font-size: 20px; font-weight: 700; color: var(--primary); }
.coach-stat-label { font-size: 12px; color: var(--text-muted); }

/* BMI */
.bmi-display { text-align: center; padding: 20px; }
.bmi-value { font-size: 64px; font-weight: 900; color: var(--primary); }
.bmi-category { font-size: 18px; margin-top: 8px; }
.bmi-scale {
    display: flex;
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 16px;
}
.bmi-scale div { flex: 1; }
.bmi-scale .underweight { background: #3b82f6; }
.bmi-scale .normal { background: var(--success); }
.bmi-scale .overweight { background: var(--warning); }
.bmi-scale .obese { background: var(--primary); }

/* Progress */
.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--bg-input);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 8px;
}
.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-dark));
    border-radius: 4px;
    transition: width 0.5s;
}

/* Settings */
.settings-section { margin-bottom: 16px; }
.settings-section-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}
.setting-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}
.setting-info h4 { font-size: 16px; margin-bottom: 4px; }
.setting-info p { font-size: 12px; color: var(--text-muted); }

/* Toggle */
.toggle {
    position: relative;
    width: 48px; height: 24px;
}
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--bg-input);
    border-radius: 24px;
    transition: 0.3s;
}
.toggle-slider::before {
    content: '';
    position: absolute;
    height: 18px; width: 18px;
    left: 3px; bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: 0.3s;
}
.toggle input:checked + .toggle-slider { background: var(--primary); }
.toggle input:checked + .toggle-slider::before { transform: translateX(24px); }

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}
.badge-red { background: rgba(230, 57, 70, 0.15); color: var(--primary); }
.badge-green { background: rgba(34, 197, 94, 0.15); color: var(--success); }
.badge-yellow { background: rgba(234, 179, 8, 0.15); color: var(--warning); }

/* Ticket Status */
.ticket-status {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}
.ticket-status.open { background: rgba(34, 197, 94, 0.15); color: var(--success); }
.ticket-status.pending { background: rgba(234, 179, 8, 0.15); color: var(--warning); }
.ticket-status.closed { background: rgba(107, 114, 128, 0.15); color: #6b7280; }

/* Blog Card */
.blog-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    transition: all 0.3s;
}
.blog-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
}
.blog-card-title { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.blog-card-excerpt { color: var(--text-muted); font-size: 14px; margin-bottom: 12px; }
.blog-card-meta {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: var(--text-muted);
}

/* Table */
.table-container { overflow-x: auto; border-radius: 12px; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td {
    padding: 12px 16px;
    text-align: right;
    border-bottom: 1px solid var(--border);
}
.table th {
    background: var(--bg-input);
    font-weight: 600;
    font-size: 14px;
    color: var(--text-secondary);
}
.table tr:hover td { background: var(--bg-input); }

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
}
.empty-state-icon { font-size: 64px; margin-bottom: 16px; }
.empty-state h3 { margin-bottom: 8px; color: var(--text-secondary); }

/* Toast */
.toast-container {
    position: fixed;
    top: 20px; left: 20px;
    z-index: 99999;
}
.toast {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 8px;
    min-width: 300px;
    animation: slideIn 0.3s;
    display: flex;
    align-items: center;
    gap: 12px;
}
.toast.success { border-right: 4px solid var(--success); }
.toast.error { border-right: 4px solid var(--primary); }
.toast.warning { border-right: 4px solid var(--warning); }
@keyframes slideIn {
    from { transform: translateX(-100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 24px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: transform 0.3s;
}
.modal-overlay.active .modal { transform: scale(1); }
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}
.modal-title { font-size: 20px; font-weight: 700; }
.modal-close {
    width: 32px; height: 32px;
    border: none;
    background: var(--bg-input);
    border-radius: 8px;
    color: var(--text);
    cursor: pointer;
}
.modal-footer {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 20px;
}

/* Revenue Card */
.revenue-card {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 16px;
    padding: 24px;
    color: white;
    position: relative;
    overflow: hidden;
}
.revenue-label { font-size: 14px; opacity: 0.9; margin-bottom: 8px; }
.revenue-amount { font-size: 32px; font-weight: 900; margin-bottom: 8px; }
.revenue-change { font-size: 14px; opacity: 0.9; }

/* Activity List */
.activity-list { list-style: none; }
.activity-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}
.activity-item:last-child { border-bottom: none; }
.activity-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    background: var(--primary);
    margin-top: 6px;
}
.activity-text { font-size: 14px; margin-bottom: 4px; }
.activity-time { font-size: 12px; color: var(--text-muted); }

/* Notification Item */
.notification-item {
    display: flex;
    gap: 12px;
    padding: 16px;
    border-bottom: 1px solid var(--border);
    transition: background 0.3s;
}
.notification-item:hover { background: var(--bg-input); }
.notification-item.unread {
    background: rgba(230, 57, 70, 0.05);
    border-right: 3px solid var(--primary);
}
.notification-icon {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: rgba(230, 57, 70, 0.1);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.notification-content { flex: 1; }
.notification-title { font-weight: 600; margin-bottom: 4px; }
.notification-text { font-size: 14px; color: var(--text-muted); }
.notification-time { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* Animations */
.animate-fade { animation: fadeIn 0.5s; }
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(100%);
        transition: transform 0.3s;
    }
    .sidebar.open { transform: translateX(0); }
    .main-content { margin-right: 0; }
    .chat-layout { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: 1fr; }
    .plans-grid { grid-template-columns: 1fr; }
    .logo-text { font-size: 36px; }
    .page-title { font-size: 22px; }
}
/* Live gym occupancy */
.occupancy-widget {
  background: var(--bg-card, #151515);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 14px 16px;
  margin: 12px 0;
}
.occupancy-row { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.occupancy-count { font-size:28px; font-weight:900; }
.occupancy-track { height:8px; background:rgba(255,255,255,.08); border-radius:99px; overflow:hidden; margin-top:10px; }
.occupancy-bar { display:block; height:100%; width:0; border-radius:99px; transition:width .5s ease, background-color .5s ease; }
.occupancy-offline { opacity:.55; }

/* Exercise GIF / video */
.exercise-media {
    display: block;
    width: 100%;
    max-height: 220px;
    object-fit: contain;
    background: #000;
    border-radius: 10px;
    margin: 10px 0 4px;
}
.exercise-media-large { max-height: 60vh; }
.exercise-media-thumb {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 8px;
    background: #000;
    display: block;
}
.exercise-media-empty {
    width: 64px;
    height: 64px;
    border-radius: 8px;
    border: 1px dashed var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 11px;
}
.media-actions { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
