/* ============================================================
   Bashgahmoshtarian Shared Theme
   ============================================================ */

:root {
    --primary-color: #312e81;
    --primary-dark: #1e1b4b;
    --secondary-color: #06b6d4;
    --accent-color: #f59e0b;
    --success-color: #10b981;
    --error-color: #ef4444;
    --warning-color: #f59e0b;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f9fafb;
    --white: #ffffff;
    --gradient-primary: linear-gradient(135deg, #0f0c29 0%, #1e1b4b 40%, #312e81 70%, #4f46e5 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-accent: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

@media (prefers-color-scheme: dark) {
    *, html { color-scheme: light !important; }
    body { background-color: #ffffff !important; color: #1f2937 !important; }
    .hero-section { background-color: transparent !important; }
    .main-content, .plans-section { background-color: #f9fafb !important; }
    .modern-card, .plan-card { background-color: #ffffff !important; color: #1f2937 !important; }
    .club-name, .detail-label { color: #1f2937 !important; }
}

*, *::before, *::after { box-sizing: border-box; }
body { font-family: 'Vazir', 'Tahoma', sans-serif; line-height: 1.6; color: var(--text-dark); }

/* Hero Section */
.hero-section {
    position: relative; min-height: 28vh; display: flex;
    align-items: center; overflow: hidden; background: var(--gradient-primary);
}
.hero-background { position: absolute; inset: 0; background: var(--gradient-primary); z-index: -2; }
.gradient-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(15,12,41,0.85) 0%, rgba(30,27,75,0.85) 40%, rgba(49,46,129,0.85) 70%, rgba(79,70,229,0.85) 100%);
    z-index: -1;
}
.floating-shapes { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.shape { position: absolute; border-radius: 50%; background: rgba(255,255,255,0.1); animation: bm-float 6s ease-in-out infinite; }
.shape-1 { width: 60px; height: 60px; top: 20%; left: 10%; }
.shape-2 { width: 80px; height: 80px; top: 60%; right: 15%; animation-delay: 2s; }
.shape-3 { width: 40px; height: 40px; bottom: 20%; left: 20%; animation-delay: 4s; }
@keyframes bm-float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-16px) rotate(180deg); }
}
.hero-content { position: relative; z-index: 1; color: var(--white); width: 100%; padding-top: 1rem; padding-bottom: 1rem; }
.hero-title { font-size: 1.75rem; font-weight: 700; margin-bottom: 0.4rem; color: var(--white); }
.hero-subtitle { font-size: 1rem; opacity: 0.9; margin: 0; color: var(--white); }

/* Hero Buttons */
.btn-hero {
    display: inline-flex; align-items: center; gap: 0.4rem;
    padding: 0.6rem 1.25rem; font-size: 0.95rem; font-weight: 600;
    border-radius: 999px; text-decoration: none; transition: all 0.3s ease;
    border: 2px solid var(--white); color: var(--white); background: transparent;
}
.btn-hero:hover { background: var(--white); color: var(--primary-color); transform: translateY(-2px); }

/* Main Content */
.main-content { padding: 2.5rem 0; background: var(--bg-light); min-height: 50vh; }

/* Modern Card */
.modern-card {
    background: var(--white); border-radius: 20px; box-shadow: var(--shadow-md);
    border: 1px solid rgba(0,0,0,0.06); transition: transform 0.25s ease, box-shadow 0.25s ease; overflow: hidden;
}
.modern-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.modern-card .card-header {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
    padding: 1.1rem 1.5rem; border-bottom: none;
}
.modern-card .card-header .btn { border-color: rgba(255,255,255,0.5); color: #fff; }
.modern-card .card-header .btn:hover { background: rgba(255,255,255,0.15); border-color: #fff; color: #fff; }
.modern-card .card-body { padding: 1.5rem; }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
    padding: 0.75rem 1.5rem; font-size: 0.95rem; font-weight: 600; border-radius: 12px;
    text-decoration: none; transition: all 0.3s ease; border: 2px solid transparent; cursor: pointer;
}
.btn-lg { padding: 1rem 2rem; font-size: 1.05rem; }
.btn-sm { padding: 0.45rem 0.9rem; font-size: 0.8rem; border-radius: 8px; }
.btn-primary { background: var(--gradient-primary); color: var(--white); border: none; box-shadow: var(--shadow-md); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); color: var(--white); filter: brightness(1.05); }
.btn-success { background: var(--success-color); color: var(--white); box-shadow: var(--shadow-md); }
.btn-success:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); color: var(--white); }
.btn-danger { background: var(--error-color); color: var(--white); border-color: var(--error-color); }
.btn-danger:hover { background: #dc2626; border-color: #dc2626; transform: translateY(-2px); box-shadow: var(--shadow-md); color: var(--white); }
.btn-warning { background: var(--accent-color); color: var(--white); box-shadow: var(--shadow-md); }
.btn-warning:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); color: var(--white); }
.btn-outline-primary { background: transparent; color: var(--primary-color); border-color: var(--primary-color); }
.btn-outline-primary:hover { background: var(--primary-color); color: var(--white); transform: translateY(-2px); }
.btn-outline-secondary { background: transparent; color: var(--text-light); border-color: #d1d5db; }
.btn-outline-secondary:hover { background: #f9fafb; color: var(--text-dark); transform: translateY(-2px); }
.btn-outline-danger { background: transparent; color: var(--error-color); border-color: var(--error-color); }
.btn-outline-danger:hover { background: var(--error-color); color: var(--white); transform: translateY(-2px); }
.btn-outline-light { background: transparent; color: var(--white); border-color: var(--white); }
.btn-outline-light:hover { background: var(--white); color: var(--primary-color); transform: translateY(-2px); }

/* Form Controls */
.modern-input, .modern-textarea {
    width: 100%; padding: 0.9rem 1.1rem; border: 2px solid #e5e7eb; border-radius: 12px;
    font-size: 0.95rem; font-family: inherit; transition: border-color 0.2s ease, box-shadow 0.2s ease; background: var(--white);
}
.modern-input:focus, .modern-textarea:focus {
    border-color: var(--primary-color); box-shadow: 0 0 0 3px rgba(79,70,229,0.12); outline: none;
}
.modern-textarea { resize: vertical; min-height: 110px; }
.form-label { display: block; font-size: 0.95rem; font-weight: 600; color: var(--text-dark); margin-bottom: 0.5rem; }
.form-help { display: flex; align-items: flex-start; gap: 0.3rem; margin-top: 0.4rem; font-size: 0.88rem; color: var(--text-light); }
.form-group { display: flex; flex-direction: column; gap: 0.45rem; margin-bottom: 1rem; }
.form-actions {
    display: flex; gap: 0.75rem; justify-content: flex-end;
    margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid rgba(0,0,0,0.05);
}
.required { color: var(--error-color); margin-right: 0.2rem; }

/* Stat Items */
.stat-item {
    display: flex; align-items: center; gap: 1rem; padding: 1.25rem;
    background: var(--bg-light); border-radius: 14px;
    transition: transform 0.2s ease, box-shadow 0.2s ease; border: 1px solid rgba(0,0,0,0.05);
}
.stat-item:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.stat-icon {
    width: 46px; height: 46px; background: var(--gradient-accent); border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.15rem; color: var(--white); flex-shrink: 0;
}
.stat-content { flex: 1; min-width: 0; }
.stat-value { font-size: 1.2rem; font-weight: 700; margin-bottom: 0.2rem; color: var(--text-dark); }
.stat-label { font-size: 0.88rem; color: var(--text-light); margin: 0; }

/* Status Badges */
.status-badge { display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.3rem 0.8rem; border-radius: 999px; font-size: 0.8rem; font-weight: 600; }
.status-sent     { background: rgba(16,185,129,0.1); color: var(--success-color); border: 1px solid rgba(16,185,129,0.2); }
.status-approved { background: rgba(79,70,229,0.1);  color: var(--primary-color); border: 1px solid rgba(79,70,229,0.2); }
.status-rejected { background: rgba(239,68,68,0.1);  color: var(--error-color);   border: 1px solid rgba(239,68,68,0.2); }
.status-pending, .status-pending_review { background: rgba(245,158,11,0.1); color: var(--accent-color); border: 1px solid rgba(245,158,11,0.2); }
.status-failed   { background: rgba(239,68,68,0.1);  color: var(--error-color); }
.status-default  { background: rgba(107,114,128,0.1); color: var(--text-light); }

/* Empty State */
.empty-state { text-align: center; padding: 3rem 1rem; }
.empty-icon { font-size: 3.5rem; color: var(--text-light); margin-bottom: 1rem; }
.empty-state h4, .empty-state h5 { font-weight: 600; color: var(--text-dark); margin-bottom: 0.5rem; }
.empty-state p { color: var(--text-light); margin: 0 0 1rem; }

/* Info Items */
.info-item { display: flex; justify-content: space-between; align-items: center; padding: 0.6rem 0; border-bottom: 1px solid rgba(0,0,0,0.05); }
.info-item:last-child { border-bottom: none; }
.info-label { font-weight: 600; color: var(--text-light); }
.info-value { font-weight: 600; color: var(--text-dark); }

/* Modern Table */
.modern-table-container { overflow-x: auto; border-radius: 12px; }
.modern-table { width: 100%; border-collapse: collapse; background: var(--white); }
.modern-table thead { background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%); }
.modern-table th { padding: 1rem 0.85rem; text-align: right; font-weight: 600; color: var(--text-dark); border: none; font-size: 0.88rem; }
.modern-table td { padding: 1rem 0.85rem; border-top: 1px solid rgba(0,0,0,0.05); vertical-align: middle; }
.modern-table tr:hover { background: rgba(79,70,229,0.025); }

/* Messages / Alerts */
.messages-container { margin-bottom: 1.25rem; }
.messages-container .alert { border-radius: 12px; border: none; padding: 0.9rem 1.1rem; display: flex; align-items: center; font-size: 0.93rem; }
.messages-container .alert-danger  { background: #fee2e2; color: #991b1b; border-left: 4px solid #ef4444; }
.messages-container .alert-success { background: #d1fae5; color: #065f46; border-left: 4px solid #10b981; }
.messages-container .alert-warning { background: #fef3c7; color: #92400e; border-left: 4px solid #f59e0b; }
.messages-container .alert-info    { background: #dbeafe; color: #1e40af; border-left: 4px solid #3b82f6; }

/* Info Alert */
.info-alert {
    display: flex; align-items: flex-start; gap: 0.9rem; padding: 1.25rem;
    background: linear-gradient(135deg, rgba(59,130,246,0.08) 0%, rgba(147,197,253,0.08) 100%);
    border: 1px solid rgba(59,130,246,0.2); border-radius: 14px; margin: 1.5rem 0;
}
.alert-icon { font-size: 1.2rem; color: #3b82f6; flex-shrink: 0; margin-top: 0.2rem; }
.alert-content h6 { font-size: 0.95rem; font-weight: 600; color: var(--text-dark); margin-bottom: 0.3rem; }
.alert-content p  { font-size: 0.88rem; color: var(--text-light); margin: 0; line-height: 1.5; }

/* Section Header Icon (colored badge in card headers) */
.section-header-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    font-size: 0.95rem;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.card-title {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    margin: 0;
}

/* Misc */
.btn-xs { padding: 0.2rem 0.45rem; font-size: 0.75rem; line-height: 1.2; border-radius: 6px; }
.club-post-title-link { color: var(--text-dark); text-decoration: none; }
.club-post-title-link:hover { color: var(--primary-color); }

/* Responsive */
@media (max-width: 768px) {
    .hero-title { font-size: 1.45rem; }
    .hero-subtitle { font-size: 0.93rem; }
    .hero-content .d-flex { flex-direction: column; gap: 0.75rem; text-align: center; }
    .modern-card .card-body { padding: 1.1rem; }
    .form-actions { flex-direction: column; }
    .form-actions .btn { width: 100%; justify-content: center; }
    .stat-item { flex-direction: column; text-align: center; }
}
@media (max-width: 576px) {
    .hero-title { font-size: 1.25rem; }
    .btn { font-size: 0.88rem; padding: 0.65rem 1.1rem; }
}
