/* استایل کامل - نسخه حرفه‌ای و مدرن */
:root {
    --primary-blue: #1e40af;
    --light-blue: #3b82f6;
    --dark-blue: #1e3a8a;
    --gold: #fbbf24;
    --dark-gold: #d97706;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #06b6d4;
    --purple: #8b5cf6;
    --pink: #ec4899;
    --white: #ffffff;
    --light-gray: #f8fafc;
    --medium-gray: #e2e8f0;
    --dark-gray: #64748b;
    --text-dark: #1e293b;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 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);
    --radius-sm: 0.375rem;
    --radius: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Vazirmatn, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

body {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
    direction: rtl;
    font-weight: 400;
}

/* صفحه اصلی */
.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 1.5rem;
}

/* هدر صفحه اصلی */
.header {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--dark-blue) 100%);
    color: white;
    padding: 2.5rem 3rem;
    border-radius: var(--radius-xl);
    margin-bottom: 2.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-xl);
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(150px, -150px);
}

.header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 200px;
    height: 200px;
    background: rgba(251, 191, 36, 0.1);
    border-radius: 50%;
    transform: translate(-100px, 100px);
}

.logo {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    position: relative;
    z-index: 1;
}

.logo-icon {
    font-size: 4rem;
    color: var(--gold);
    background: rgba(255, 255, 255, 0.1);
    padding: 1.25rem;
    border-radius: 50%;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.logo-text h1 {
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 0.5rem;
    background: linear-gradient(45deg, var(--gold), #fef3c7, #fde68a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.tagline {
    font-size: 1.1rem;
    opacity: 0.9;
    font-weight: 300;
    letter-spacing: 0.5px;
}

.date-time {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: relative;
    z-index: 1;
}

.persian-date,
.current-time {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.15);
    padding: 1rem 1.75rem;
    border-radius: var(--radius-lg);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: var(--transition);
}

.persian-date:hover,
.current-time:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

.persian-date i,
.current-time i {
    font-size: 1.5rem;
    color: var(--gold);
}

#persian-date,
#current-time {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: Vazirmatn, sans-serif;
}

/* نماینده کلاس */
.class-representative {
    background: rgba(255, 255, 255, 0.15);
    padding: 1rem 1.75rem;
    border-radius: var(--radius-lg);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
    min-width: 250px;
}

.class-representative h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: var(--gold);
    font-weight: 600;
}

.class-representative p {
    font-size: 1.25rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* آمار کلی */
.stats-section {
    margin-bottom: 2.5rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.75rem;
}

.stat-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    border: 1px solid var(--medium-gray);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--gold), var(--light-blue));
}

.stat-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--light-blue);
}

.stat-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    flex-shrink: 0;
}

.stat-card:nth-child(1) .stat-icon {
    background: linear-gradient(135deg, #fef3c7 0%, var(--gold) 100%);
    color: var(--dark-gold);
}

.stat-card:nth-child(2) .stat-icon {
    background: linear-gradient(135deg, #dbeafe 0%, var(--light-blue) 100%);
    color: var(--primary-blue);
}

.stat-card:nth-child(3) .stat-icon {
    background: linear-gradient(135deg, #dcfce7 0%, var(--success) 100%);
    color: #059669;
}

.stat-card:nth-child(4) .stat-icon {
    background: linear-gradient(135deg, #fce7f3 0%, var(--pink) 100%);
    color: #be185d;
}

.stat-card:nth-child(5) .stat-icon {
    background: linear-gradient(135deg, #ede9fe 0%, var(--purple) 100%);
    color: #7c3aed;
}

.stat-info h3 {
    font-size: 1rem;
    color: var(--dark-gray);
    margin-bottom: 0.75rem;
    font-weight: 500;
}

.stat-number {
    font-size: 2.25rem;
    font-weight: 900;
    color: var(--text-dark);
    font-family: Vazirmatn, sans-serif;
    line-height: 1;
}

/* تب‌های رتبه‌بندی */
.rankings-tabs-container {
    background: white;
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    margin-bottom: 2.5rem;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.tabs-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--light-gray);
    flex-wrap: wrap;
    gap: 1.5rem;
}

.tabs-header h2 {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.75rem;
    color: var(--primary-blue);
    font-weight: 800;
    margin: 0;
    line-height: 1.3;
}

.tabs-header h2 i {
    color: var(--gold);
    flex-shrink: 0;
}

.tabs-navigation {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 0.875rem 2rem;
    background: var(--light-gray);
    border: 2px solid var(--medium-gray);
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: Vazirmatn, sans-serif;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tab-btn:hover {
    background: white;
    border-color: var(--light-blue);
    transform: translateY(-2px);
}

.tab-btn.active {
    background: var(--primary-blue);
    color: white;
    border-color: var(--primary-blue);
    box-shadow: var(--shadow);
}

.tab-content {
    display: none;
    animation: fadeIn 0.5s ease;
}

.tab-content.active {
    display: block;
}

/* کارت رتبه */
.rankings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.75rem;
}

.rank-card {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    transition: var(--transition);
    border: 2px solid transparent;
    position: relative;
    overflow: visible;
    min-height: 140px;
    box-sizing: border-box;
    direction: rtl;
}

.rank-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--gold), var(--light-blue));
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.rank-card:hover {
    transform: translateY(-8px);
    border-color: var(--light-blue);
    box-shadow: var(--shadow-xl);
}

.rank-badge {
    width: 45px;
    height: 45px;
    min-width: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 1.25rem;
    color: white;
    flex-shrink: 0;
    font-family: Vazirmatn, sans-serif;
    position: absolute;
    top: -12px;
    right: -12px;
    z-index: 2;
    border: 3px solid white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.rank-1 {
    background: linear-gradient(135deg, #fbbf24 0%, #d97706 100%);
}

.rank-2 {
    background: linear-gradient(135deg, #9ca3af 0%, #6b7280 100%);
}

.rank-3 {
    background: linear-gradient(135deg, #92400e 0%, #78350f 100%);
}

.rank-other {
    background: linear-gradient(135deg, var(--light-blue) 0%, var(--primary-blue) 100%);
}

.rank-avatar {
    width: 80px;
    height: 80px;
    min-width: 80px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 3px solid white;
    box-shadow: var(--shadow);
    order: 1;
}

.rank-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: var(--transition);
}

.rank-card:hover .rank-avatar img {
    transform: scale(1.1);
}

.rank-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    order: 2;
    text-align: right;
    margin-right: 0.75rem;
}

.rank-info h3 {
    color: var(--text-dark);
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    font-weight: 800;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.rank-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.rank-type {
    color: var(--dark-gray);
    font-size: 0.9rem;
    line-height: 1.4;
    background: var(--light-gray);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    display: inline-block;
    font-weight: 600;
}

.rank-class {
    color: var(--primary-blue);
    font-size: 0.9rem;
    background: #dbeafe;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-weight: 600;
}

.rank-stats {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--dark-gold);
    font-weight: 800;
    font-family: Vazirmatn, sans-serif;
    font-size: 1.1rem;
    direction: ltr;
    justify-content: flex-end;
}

.rank-stats i {
    color: var(--gold);
    flex-shrink: 0;
}

/* بینمکی‌های اخیر */
.recent-section {
    background: white;
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    margin-bottom: 2.5rem;
    box-shadow: var(--shadow);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--light-gray);
    flex-wrap: wrap;
    gap: 1.5rem;
}

.section-header h2 {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.75rem;
    color: var(--primary-blue);
    font-weight: 800;
    margin: 0;
    line-height: 1.3;
}

.section-header h2 i {
    color: var(--gold);
    flex-shrink: 0;
}

.view-all {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--light-blue);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    background: var(--light-gray);
    white-space: nowrap;
    flex-shrink: 0;
}

.view-all:hover {
    color: var(--primary-blue);
    gap: 1rem;
    background: var(--medium-gray);
    transform: translateX(-5px);
}

.recent-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.recent-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: var(--light-gray);
    border-radius: var(--radius-lg);
    transition: var(--transition);
    border-right: 5px solid transparent;
    animation: slideIn 0.5s ease;
    position: relative;
    overflow: hidden;
}

.recent-item::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 5px;
    height: 100%;
    background: linear-gradient(to bottom, var(--gold), var(--light-blue));
    opacity: 0;
    transition: var(--transition);
}

.recent-item:hover {
    background: white;
    border-right-color: var(--gold);
    transform: translateX(-8px);
    box-shadow: var(--shadow-lg);
}

.recent-item:hover::before {
    opacity: 1;
}

.recent-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 3px solid white;
    box-shadow: var(--shadow);
    position: relative;
    z-index: 1;
}

.recent-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.recent-item:hover .recent-avatar img {
    transform: scale(1.1);
}

.recent-info {
    flex: 1;
    position: relative;
    z-index: 1;
}

.recent-info h3 {
    color: var(--text-dark);
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
    font-weight: 700;
}

.recent-meta {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.recent-type,
.recent-time,
.recent-date,
.recent-class {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--dark-gray);
    font-size: 0.9rem;
    background: white;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-weight: 500;
    transition: var(--transition);
}

.recent-item:hover .recent-type,
.recent-item:hover .recent-time,
.recent-item:hover .recent-date,
.recent-item:hover .recent-class {
    background: var(--light-gray);
}

.recent-desc {
    color: var(--text-dark);
    font-size: 1rem;
    line-height: 1.6;
    padding-top: 0.75rem;
    border-top: 1px solid var(--medium-gray);
    margin-top: 0.75rem;
}

.recent-badge {
    color: var(--gold);
    font-size: 2rem;
    position: relative;
    z-index: 1;
    transition: var(--transition);
}

.recent-item:hover .recent-badge {
    transform: scale(1.2) rotate(10deg);
}

/* فوتر */
.footer {
    margin-top: 3rem;
    padding-top: 2.5rem;
    border-top: 2px solid var(--medium-gray);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.copyright {
    color: var(--dark-gray);
    font-size: 1rem;
    font-family: Vazirmatn, sans-serif;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.copyright i {
    color: var(--danger);
    margin: 0 0.25rem;
}

.footer-links {
    display: flex;
    gap: 1.25rem;
}

.admin-login,
.logout {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 2rem;
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.admin-login {
    background: linear-gradient(135deg, var(--light-blue) 0%, var(--primary-blue) 100%);
    color: white;
}

.logout {
    background: var(--light-gray);
    color: var(--text-dark);
    border: 2px solid var(--medium-gray);
}

.admin-login:hover,
.logout:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.admin-login:hover {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--dark-blue) 100%);
}

.logout:hover {
    background: var(--medium-gray);
}

/* صفحه لاگین */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--dark-blue) 0%, var(--primary-blue) 100%);
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}

.login-page::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(150px, -150px);
}

.login-page::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 200px;
    height: 200px;
    background: rgba(251, 191, 36, 0.1);
    border-radius: 50%;
    transform: translate(-100px, 100px);
}

.login-container {
    width: 100%;
    max-width: 480px;
    position: relative;
    z-index: 1;
}

.login-box {
    background: white;
    border-radius: var(--radius-xl);
    padding: 3rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: popIn 0.6s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.login-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.login-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.login-logo i {
    font-size: 4.5rem;
    color: var(--gold);
    background: linear-gradient(135deg, #fef3c7 0%, var(--gold) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.login-logo h2 {
    font-size: 2rem;
    color: var(--primary-blue);
    font-weight: 900;
    background: linear-gradient(45deg, var(--primary-blue), var(--light-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.login-subtitle {
    color: var(--dark-gray);
    font-size: 1.1rem;
    line-height: 1.6;
}

.login-form {
    margin-bottom: 2.5rem;
}

.login-form .form-group {
    margin-bottom: 1.75rem;
}

.login-form label {
    display: block;
    margin-bottom: 0.75rem;
    color: var(--text-dark);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1rem;
}

.login-form .password-input {
    position: relative;
}

.login-form input {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 2px solid var(--medium-gray);
    border-radius: var(--radius);
    font-size: 1.1rem;
    transition: var(--transition);
    font-family: Vazirmatn, sans-serif;
    background: white;
}

.login-form input:focus {
    outline: none;
    border-color: var(--light-blue);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.password-input .show-password {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--dark-gray);
    cursor: pointer;
    padding: 0.5rem;
    font-size: 1.2rem;
    transition: var(--transition);
}

.password-input .show-password:hover {
    color: var(--primary-blue);
}

.btn-login {
    width: 100%;
    padding: 1.25rem;
    background: linear-gradient(135deg, var(--gold) 0%, var(--dark-gold) 100%);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    transition: var(--transition);
    font-family: Vazirmatn, sans-serif;
}

.btn-login:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(251, 191, 36, 0.3);
    background: linear-gradient(135deg, var(--dark-gold) 0%, #b45309 100%);
}

.login-footer {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    text-align: center;
}

.back-home {
    color: var(--light-blue);
    text-decoration: none;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    transition: var(--transition);
    padding: 0.75rem;
    border-radius: var(--radius);
}

.back-home:hover {
    color: var(--primary-blue);
    gap: 1rem;
    background: var(--light-gray);
}

.login-info {
    color: var(--dark-gray);
    font-size: 0.9rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
}

/* پیام‌ها */
.success-message,
.error-message {
    padding: 1.5rem 2rem;
    border-radius: var(--radius-lg);
    margin-bottom: 2.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    animation: slideDown 0.3s ease;
    border-right: 5px solid transparent;
}

.success-message {
    background: #d1fae5;
    color: #065f46;
    border-right-color: #10b981;
}

.error-message {
    background: #fee2e2;
    color: #7f1d1d;
    border-right-color: #ef4444;
}

.success-message i,
.error-message i {
    font-size: 1.5rem;
}

/* پنل ادمین */
.admin-body {
    background: #f1f5f9;
}

.admin-container {
    display: flex;
    min-height: 100vh;
}

.admin-header {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    background: white;
    padding: 1.25rem 2.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    height: 80px;
}

.admin-logo {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.admin-logo i {
    font-size: 2.5rem;
    color: var(--gold);
    background: linear-gradient(135deg, #fef3c7 0%, var(--gold) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.admin-title h1 {
    font-size: 1.75rem;
    color: var(--text-dark);
    font-weight: 800;
    background: linear-gradient(45deg, var(--primary-blue), var(--light-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.admin-subtitle {
    font-size: 0.95rem;
    color: var(--dark-gray);
    font-weight: 500;
}

.admin-info {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.admin-user,
.admin-date,
.admin-class {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-dark);
    font-weight: 600;
    padding: 0.75rem 1.25rem;
    background: var(--light-gray);
    border-radius: var(--radius);
}

.admin-user i,
.admin-date i,
.admin-class i {
    color: var(--light-blue);
}

/* سایدبار */
.admin-sidebar {
    width: 300px;
    background: white;
    position: fixed;
    top: 80px;
    right: 0;
    bottom: 0;
    box-shadow: var(--shadow-lg);
    z-index: 999;
    padding: 2rem 0;
    overflow-y: auto;
    transition: transform 0.3s ease;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.sidebar-link {
    padding: 1rem 2rem;
    color: var(--text-dark);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: var(--transition);
    border-right: 4px solid transparent;
    font-weight: 600;
    margin: 0 1rem;
    border-radius: var(--radius);
}

.sidebar-link:hover,
.sidebar-link.active {
    background: var(--light-gray);
    border-right-color: var(--light-blue);
    color: var(--primary-blue);
    transform: translateX(-5px);
}

.sidebar-link i {
    width: 24px;
    text-align: center;
    font-size: 1.25rem;
}

.sidebar-section {
    margin-top: 2rem;
    padding: 0 2rem;
}

.sidebar-section h3 {
    font-size: 0.9rem;
    color: var(--dark-gray);
    margin-bottom: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sidebar-footer {
    margin-top: auto;
    padding: 2rem;
    border-top: 1px solid var(--medium-gray);
}

.logout-btn {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--danger);
    text-decoration: none;
    font-weight: 600;
    padding: 1rem;
    border-radius: var(--radius);
    transition: var(--transition);
    background: var(--light-gray);
}

.logout-btn:hover {
    background: #fee2e2;
    color: #dc2626;
    transform: translateX(-5px);
}

/* محتوای اصلی */
.admin-main {
    flex: 1;
    margin-right: 300px;
    margin-top: 80px;
    padding: 2.5rem;
    min-height: calc(100vh - 80px);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

.tab-header {
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--medium-gray);
}

.tab-header h2 {
    font-size: 2rem;
    color: var(--text-dark);
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.tab-header p {
    color: var(--dark-gray);
    font-size: 1.1rem;
    line-height: 1.6;
}

/* فرم‌ها */
.binamaki-form,
.add-form,
.edit-form,
.user-form,
.class-form {
    background: white;
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
    margin-bottom: 2.5rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.75rem;
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.75rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.75rem;
    color: var(--text-dark);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 2px solid var(--medium-gray);
    border-radius: var(--radius);
    font-size: 1.1rem;
    transition: var(--transition);
    font-family: Vazirmatn, sans-serif;
    background: white;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--light-blue);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
    line-height: 1.6;
}

.search-results {
    position: absolute;
    background: white;
    border: 2px solid var(--medium-gray);
    border-radius: var(--radius);
    max-height: 250px;
    overflow-y: auto;
    z-index: 1000;
    width: 100%;
    box-shadow: var(--shadow-xl);
    margin-top: 0.5rem;
}

.search-result {
    padding: 1rem 1.25rem;
    cursor: pointer;
    transition: var(--transition);
    border-bottom: 1px solid var(--light-gray);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.search-result:hover {
    background: var(--light-blue);
    color: white;
}

.search-result:last-child {
    border-bottom: none;
}

.search-result small {
    font-size: 0.9rem;
    opacity: 0.8;
}

.image-preview {
    margin-top: 1rem;
    width: 150px;
    height: 150px;
    border-radius: var(--radius);
    overflow: hidden;
    border: 2px solid var(--medium-gray);
    box-shadow: var(--shadow);
}

.image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.image-preview:hover img {
    transform: scale(1.1);
}

.form-actions {
    display: flex;
    gap: 1.25rem;
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--medium-gray);
    flex-wrap: wrap;
}

.btn-submit,
.btn-reset,
.btn-filter,
.btn-cancel,
.btn-edit,
.btn-delete {
    padding: 1rem 2.5rem;
    border-radius: var(--radius);
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: var(--transition);
    font-family: Vazirmatn, sans-serif;
    text-decoration: none;
    border: none;
}

.btn-submit {
    background: linear-gradient(135deg, var(--light-blue) 0%, var(--primary-blue) 100%);
    color: white;
}

.btn-reset {
    background: var(--light-gray);
    color: var(--text-dark);
    border: 2px solid var(--medium-gray);
}

.btn-filter {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    color: white;
}

.btn-cancel {
    background: linear-gradient(135deg, var(--danger) 0%, #dc2626 100%);
    color: white;
}

.btn-submit:hover,
.btn-filter:hover,
.btn-cancel:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.btn-reset:hover {
    background: var(--medium-gray);
    transform: translateY(-3px);
}

/* فیلترها */
.filters {
    background: white;
    border-radius: var(--radius-xl);
    padding: 2rem;
    margin-bottom: 2.5rem;
    box-shadow: var(--shadow);
}

.filter-form .form-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

/* جداول */
.table-container {
    background: white;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.table-responsive {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1200px;
}

.data-table thead {
    background: linear-gradient(135deg, var(--light-blue) 0%, var(--primary-blue) 100%);
}

.data-table th {
    padding: 1.5rem 1.25rem;
    color: white;
    font-weight: 700;
    text-align: right;
    white-space: nowrap;
    font-size: 1.1rem;
}

.data-table tbody tr {
    border-bottom: 1px solid var(--light-gray);
    transition: var(--transition);
}

.data-table tbody tr:hover {
    background: var(--light-gray);
    transform: translateX(-5px);
}

.data-table td {
    padding: 1.25rem;
    color: var(--text-dark);
    text-align: right;
    font-family: Vazirmatn, sans-serif;
    font-size: 1rem;
}

.person-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.person-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--light-gray);
    box-shadow: var(--shadow-sm);
}

.badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.badge-student {
    background: #dbeafe;
    color: var(--primary-blue);
}

.badge-teacher {
    background: #fef3c7;
    color: var(--dark-gold);
}

.badge-admin {
    background: linear-gradient(135deg, #ede9fe 0%, var(--purple) 100%);
    color: #7c3aed;
}

.badge-registrar {
    background: linear-gradient(135deg, #dcfce7 0%, var(--success) 100%);
    color: #065f46;
}

.badge-success {
    background: #d1fae5;
    color: #065f46;
}

.badge-danger {
    background: #fee2e2;
    color: #7f1d1d;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.action-buttons {
    display: flex;
    gap: 0.75rem;
}

.btn-edit,
.btn-delete,
.btn-view {
    width: 45px;
    height: 45px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
}

.btn-edit {
    background: #dbeafe;
    color: var(--primary-blue);
}

.btn-delete {
    background: #fee2e2;
    color: var(--danger);
}

.btn-view {
    background: #dcfce7;
    color: var(--success);
}

.btn-edit:hover {
    background: var(--light-blue);
    color: white;
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.btn-delete:hover {
    background: var(--danger);
    color: white;
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.btn-view:hover {
    background: var(--success);
    color: white;
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.empty-state {
    text-align: center;
    padding: 5rem 2rem;
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
}

.empty-state i {
    font-size: 5rem;
    color: var(--medium-gray);
    margin-bottom: 2rem;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.75rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
    font-weight: 700;
}

.empty-state p {
    color: var(--dark-gray);
    max-width: 500px;
    margin: 0 auto;
    font-size: 1.1rem;
    line-height: 1.6;
}

/* ویرایش فرم */
.current-avatar {
    text-align: center;
    margin-bottom: 2.5rem;
}

.current-avatar img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid white;
    box-shadow: var(--shadow-lg);
    margin-bottom: 1.5rem;
    transition: var(--transition);
}

.current-avatar img:hover {
    transform: scale(1.05);
}

.current-avatar p {
    color: var(--dark-gray);
    font-size: 1rem;
}

/* گزارش‌ها */
.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2.5rem;
    margin-top: 2.5rem;
}

.chart-container {
    background: white;
    border-radius: var(--radius-xl);
    padding: 2rem;
    box-shadow: var(--shadow);
}

.chart-container h3 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
    color: var(--text-dark);
    font-size: 1.5rem;
    font-weight: 700;
}

.chart {
    height: 300px;
    position: relative;
}

.top-classes {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.class-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: var(--light-gray);
    border-radius: var(--radius);
    transition: var(--transition);
}

.class-item:hover {
    background: white;
    transform: translateX(-5px);
    box-shadow: var(--shadow);
}

.class-name {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 1.1rem;
}

.class-count {
    background: var(--light-blue);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 1rem;
    font-weight: 700;
    font-family: Vazirmatn, sans-serif;
}

/* منوی موبایل */
.menu-toggle {
    display: none;
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1001;
    background: var(--primary-blue);
    color: white;
    border: none;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.menu-toggle:hover {
    background: var(--dark-blue);
    transform: scale(1.1);
}

/* انیمیشن‌ها */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes popIn {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(20px);
    }

    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* تاریخ‌گیر فارسی */
.flatpickr-calendar {
    font-family: Vazirmatn, sans-serif !important;
    direction: rtl !important;
}

.flatpickr-day {
    font-family: Vazirmatn, sans-serif !important;
}

.flatpickr-weekday {
    font-family: Vazirmatn, sans-serif !important;
}

/* ریسپانسیو */
@media (max-width: 1400px) {
    .admin-sidebar {
        width: 280px;
    }

    .admin-main {
        margin-right: 280px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1200px) {
    .container {
        max-width: 100%;
        padding: 1rem;
    }

    .rankings-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }

    .stats-cards {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 992px) {
    .admin-sidebar {
        transform: translateX(100%);
        width: 320px;
    }

    .admin-sidebar.active {
        transform: translateX(0);
    }

    .admin-main {
        margin-right: 0;
    }

    .menu-toggle {
        display: flex;
    }

    .header {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
        padding: 2rem;
    }

    .date-time {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }

    .stats-grid,
    .rankings-grid {
        grid-template-columns: 1fr;
    }

    .logo-text h1 {
        font-size: 2rem;
    }

    .admin-header {
        flex-direction: column;
        gap: 1rem;
        height: auto;
        padding: 1.5rem;
        position: static;
    }

    .admin-main {
        margin-top: 0;
    }

    .admin-info {
        flex-direction: column;
        gap: 1rem;
    }
}

@media (max-width: 768px) {

    .container,
    .admin-main {
        padding: 1rem;
    }

    .header {
        padding: 1.5rem;
    }

    .login-box {
        padding: 2rem;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }

    .form-actions {
        flex-direction: column;
    }

    .btn-submit,
    .btn-reset,
    .btn-filter,
    .btn-cancel {
        width: 100%;
        justify-content: center;
    }

    .section-header,
    .tabs-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }

    .view-all {
        align-self: flex-start;
    }

    .tabs-navigation {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 0.5rem;
    }

    .tab-btn {
        white-space: nowrap;
    }

    .recent-meta {
        flex-direction: column;
        gap: 0.75rem;
    }

    .rank-meta {
        flex-direction: column;
        gap: 0.5rem;
    }

    .data-table {
        min-width: 800px;
    }
}

@media (max-width: 480px) {
    .login-box {
        padding: 1.5rem;
    }

    .tab-header h2 {
        font-size: 1.5rem;
    }

    .rank-card {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
    }

    .rank-avatar {
        order: 0;
        margin-bottom: 1rem;
    }

    .rank-info {
        margin-right: 0;
        text-align: center;
    }

    .rank-stats {
        justify-content: center;
    }

    .recent-item {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
    }

    .recent-avatar {
        margin-bottom: 1rem;
    }

    .recent-badge {
        position: absolute;
        top: 1rem;
        left: 1rem;
    }

    .admin-logo {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }

    .admin-title h1 {
        font-size: 1.25rem;
    }
}

/* اسکرول بار سفارشی */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--light-gray);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb {
    background: var(--medium-gray);
    border-radius: 5px;
    transition: var(--transition);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--dark-gray);
}

/* انیمیشن‌های اضافی */
.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.animate-bounce {
    animation: bounce 1s infinite;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(-25%);
        animation-timing-function: cubic-bezier(0.8, 0, 1, 1);
    }

    50% {
        transform: translateY(0);
        animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
    }
}

/* استایل‌های اضافی برای ظاهر بهتر */
.glass-effect {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hover-lift {
    transition: var(--transition);
}

.hover-lift:hover {
    transform: translateY(-5px);
}

.text-gradient {
    background: linear-gradient(45deg, var(--primary-blue), var(--light-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.bg-gradient {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--light-blue) 100%);
}

/* آیکون‌های متحرک */
.icon-spin {
    animation: spin 2s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* بارگذاری */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(59, 130, 246, 0.3);
    border-radius: 50%;
    border-top-color: var(--light-blue);
    animation: spin 1s ease-in-out infinite;
}

/* استایل‌های خاص برای نمایندگان */
.representative-badge {
    position: relative;
    padding-left: 2.5rem;
}

.representative-badge::before {
    content: '👑';
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
}