body {
    box-sizing: border-box;
    font-family: 'Vazirmatn', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    height: 100%;
    overflow-x: hidden;
    direction: rtl;
}

html {
    height: 100%;
}

.main-container {
    min-height: 100%;
    width: 100%!important;
    display: flex;
    flex-direction: column;
}

/* Homepage Styles */
.homepage {
    min-height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #4766f8 100%);
}

.navbar {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.navbar-brand {
    color: white !important;
    font-size: 1.5rem;
    font-weight: 700;
}

.nav-link {
    color: white !important;
    margin: 0 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: #ffd700 !important;
}

.btn-login-nav {
    background: white;
    color: #667eea;
    padding: 0.5rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    border: none;
    transition: all 0.3s ease;
    text-decoration: none !important;
}

.btn-login-nav:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.3);
}

.hero-section {
    padding: 5rem 0;
    color: white;
    text-align: center;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-hero {
    padding: 1rem 2.5rem;
    border-radius: 30px;
    font-weight: 600;
    font-size: 1.1rem;
    border: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-hero-primary {
    background: white;
    color: #667eea;
}

.btn-hero-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(255, 255, 255, 0.3);
}

.btn-hero-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-hero-secondary:hover {
    background: white;
    color: #667eea;
}

.features-section {
    background: white;
    padding: 5rem 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    color: #212529;
    margin-bottom: 3rem;
}

.feature-card {
    text-align: center;
    padding: 2rem;
    border-radius: 15px;
    transition: all 0.3s ease;
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin: 0 auto 1.5rem;
}

.feature-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #212529;
    margin-bottom: 1rem;
}

.feature-description {
    color: #6c757d;
    line-height: 1.6;
}

.blog-section {
    background: #f8f9fa;
    padding: 5rem 0;
}

.blog-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.blog-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #667eea 0%, #4766f8 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: white;
}

.blog-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.blog-date {
    color: #667eea;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.blog-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #212529;
    margin-bottom: 1rem;
}

.blog-excerpt {
    color: #6c757d;
    line-height: 1.6;
    margin-bottom: 1rem;
    flex: 1;
}

.blog-read-more {
    color: #667eea;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.blog-read-more:hover {
    gap: 1rem;
}

.footer {
    background: #212529;
    color: white;
    padding: 3rem 0 1.5rem;
}

.footer-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 2rem;
    padding-top: 1.5rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
}

/* Login Page Styles */
.login-container {
    background: linear-gradient(135deg, #667eea 0%, #4766f8 100%);
    min-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.login-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 450px;
    width: 100%;
    padding: 3rem;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header h1 {
    color: #667eea;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.login-header p {
    color: #6c757d;
    font-size: 1rem;
}

.role-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.role-btn {
    padding: 1rem 0.5rem;
    border: 2px solid #e9ecef;
    background: white;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.role-btn:hover {
    border-color: #667eea;
    transform: translateY(-2px);
}

.role-btn.active {
    border-color: #667eea;
    background: #f0f4ff;
}

.role-btn i {
    font-size: 1.5rem;
    color: #667eea;
    display: block;
    margin-bottom: 0.5rem;
}

.role-btn span {
    font-size: 0.85rem;
    color: #495057;
    font-weight: 500;
}

.form-control {
    border-radius: 10px;
    padding: 0.75rem 1rem;
    border: 2px solid #e9ecef;
}

.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.btn-login {
    background: linear-gradient(135deg, #667eea 0%, #4766f8 100%);
    border: none;
    border-radius: 10px;
    padding: 0.75rem;
    font-weight: 600;
    color: white;
    width: 100%;
    transition: transform 0.2s ease;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* Dashboard Styles */
.dashboard-container {
    display: flex;
    height: 100%;
    width: 100%!important;
    background: #f8f9fa;
}

.sidebar {
    width: 260px;
    background: linear-gradient(180deg, #667eea 0%, #4766f8 100%);
    color: white;
    padding: 1.5rem;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    text-align: center;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 1.5rem;
}

.sidebar-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.sidebar-header p {
    font-size: 0.85rem;
    opacity: 0.9;
    margin: 0;
}

.user-info {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.user-info h5 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.user-info p {
    font-size: 0.85rem;
    opacity: 0.9;
    margin: 0;
}

.nav-menu {
    flex: 1;
}

.nav-item {
    padding: 0.75rem 1rem;
    text-decoration: none !important;
    text-decoration: none;
    color: unset!important;
    margin-bottom: 0.5rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.nav-item.active {
    background: rgba(255, 255, 255, 0.2);
}

.nav-item a {
    text-decoration: none;
    color: unset;
}

.nav-item i {
    font-size: 1.25rem;
}

.logout-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    text-decoration: none !important;
    color: white;
    padding: 0.75rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: auto;
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.main-content {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
}

.content-header {
    margin-bottom: 2rem;
}

.content-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #212529;
    margin-bottom: 0.5rem;
}

.content-header p {
    color: #6c757d;
    margin: 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.stat-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.stat-card-header h6 {
    color: #6c757d;
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0;
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #212529;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: #6c757d;
    font-size: 0.85rem;
}

.content-card {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 1.5rem;
}

.content-card h4 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #212529;
    margin-bottom: 1.5rem;
}

.table-responsive {
    border-radius: 10px;
    overflow: hidden;
}

.table {
    margin: 0;
}

.table thead {
    background: #f8f9fa;
}

.table th {
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
    padding: 1rem;
}

.table td {
    padding: 1rem;
    vertical-align: middle;
}

.table a {
    text-decoration: none;

}

.badge {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.75rem;
}

.btn-action {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary-action {
    background: #667eea;
    color: white;
}

.btn-primary-action:hover {
    background: #5568d3;
}

.text-bg-primary-action {
    color: white;
    background: #667eea;
}


.btn-secondary-action {
    background: #e9ecef;
    color: #495057;
}

.btn-secondary-action:hover {
    background: #dee2e6;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
    display: block;
}

.hidden {
    display: none !important;
}

@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        position: fixed;
        z-index: 1000;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .sidebar.mobile-open {
        transform: translateX(0);
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}

.toast-notification {
    position: fixed;
    top: 20px;
    left: 20px;
    padding: 1rem 1.5rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
    animation: slideIn 0.3s ease;
}

.toast-success {
    background: #4caf50;
    color: white;
}

.toast-error {
    background: #f44336;
    color: white;
}

.toast-info {
    background: #2196f3;
    color: white;
}

.toast-warning {
    background: #ff9800;
    color: white;
}

.error-toast {
    background: #fee;
    border: 2px solid #fcc;
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1rem;
    color: #c33;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.alert-custom-info {
    --bs-alert-color: var(--bs-white);
    --bs-alert-bg: #2196f3;
}

/* Custom class for your modal */
#searchModal .modal-dialog {
    max-width: 90%; /* nice width for large screens */
    margin: 1.5rem auto; /* vertical margin */
}

#searchModal .modal-content {
    border-radius: 12px; /* rounded corners */
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15); /* soft shadow */
    border: none; /* no default border */
    background-color: #fff; /* white background (or your light theme) */
    overflow: hidden; /* ensures rounding stays clean */
}

#searchModal .modal-header {
    border-bottom: none; /* remove default underline */
    padding: 1.25rem 1.5rem;
}

#searchModal .modal-body {
    padding: 1.5rem;
}

#searchModal .btn-close {
    font-size: 1.2rem; /* slightly bigger close icon */
}

.modal-backdrop.show {
    background-color: rgba(0, 0, 0, 0.55); /* darker, more subtle backdrop */
    backdrop-filter: blur(4px); /* slight blur behind modal */
}

.score-input {
    text-align: center;
    width: 70%;
    display: block;
    margin: 0 auto;
}

.persian-date-picker {
    background: #ffffff;
    border-radius: 16px;
    padding: 16px 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    width: 320px;
}

.pdp-header {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    align-items: center;
    justify-content: space-between;
}

.pdp-header select,
.pdp-header input {
    border-radius: 10px;
    border: 1px solid #ddd;
    padding: 6px 8px;
    font-size: 14px;
    outline: none;
}

.pdp-header input {
    width: 80px;
    text-align: center;
}

.pdp-weekdays,
.pdp-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.pdp-weekdays span {
    text-align: center;
    font-size: 12px;
    color: #888;
}

.pdp-days a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 34px;
    border-radius: 10px;
    text-decoration: none;
    font-size: 13px;
    color: #333;
    border: 1px solid transparent;
    transition: 0.15s ease;
}

.pdp-days a:hover {
    background: #007bff15;
    border-color: #007bff40;
}

.pdp-days a.today {
    background: #007bff;
    color: #fff;
}

.pdp-days .empty {
    height: 34px;
}

.pdp-error {
    margin-top: 8px;
    font-size: 12px;
    color: #c00;
    text-align: center;
}

#back-btn{
    text-decoration: none;
}