/* =====================================================
   🎨 تم اصلی پروژه – طراحی شیشه‌ای (Glassmorphism)
   ===================================================== */

/* ----- Reset & Base ----- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Vazir', 'Mir', sans-serif;
    direction: rtl;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #fff;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ----- Container اصلی ----- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 30px;
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

/* ----- Login ----- */
.login-container {
    max-width: 420px;
    margin: 0 auto;
}
.login-container h1 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 30px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* ----- فرم‌ها و ورودی‌ها (یکدست) ----- */
.form-group {
    margin-bottom: 20px;
}
.form-group label {
    display: block;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 6px;
    font-weight: 400;
    font-size: 0.95rem;
}

/* ورودی‌های متنی، عددی، ایمیل، رمز، تاریخ */
input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
input[type="date"],
input[type="datetime-local"],
textarea,
select {
    width: 100%;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 12px !important;
    color: #ffffff !important;
    font-size: 0.95rem;
    font-family: 'Vazir', 'Mir', sans-serif !important;
    outline: none;
    transition: all 0.25s ease;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

input:focus,
textarea:focus,
select:focus {
    background: rgba(255, 255, 255, 0.18) !important;
    border-color: #ffd700 !important;
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.15);
}

input::placeholder,
textarea::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

/* =====================================================
   🎯 منوهای کشویی (select) – اصلاح نهایی
   ===================================================== */
select {
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: left 12px center !important;
    background-size: 14px !important;
    padding-left: 40px !important;
    cursor: pointer !important;
}

select option {
    background: #1e272e !important;
    color: #ffffff !important;
    padding: 8px 12px !important;
    font-family: 'Vazir', 'Mir', sans-serif !important;
    border: none !important;
}
select option:hover,
select option:focus,
select option:checked {
    background: #6c5ce7 !important;
    color: #ffffff !important;
}

/* ----- قانون اختصاصی برای فرم ویرایش درس (برای اطمینان) ----- */
#editOfferingForm select {
    background-color: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
}

/* ----- دکمه‌ها ----- */
.btn {
    padding: 10px 24px;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 700;
    font-family: 'Vazir', 'Mir', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #ffffff;
    color: #764ba2;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
}
.btn:hover {
    transform: scale(1.02);
    background: #f0e6ff;
}
.btn-primary {
    background: #ffd700;
    color: #2d3436;
}
.btn-primary:hover {
    background: #f0c800;
}
.btn-danger {
    background: rgba(225, 112, 85, 0.7);
    color: #fff;
}
.btn-danger:hover {
    background: rgba(225, 112, 85, 0.9);
}
.btn-success {
    background: rgba(0, 184, 148, 0.7);
    color: #fff;
}
.btn-success:hover {
    background: rgba(0, 184, 148, 0.9);
}
.btn-sm {
    padding: 4px 14px;
    font-size: 0.8rem;
    border-radius: 30px;
}

/* ----- پیام‌ها ----- */
.msg-success {
    background: rgba(0, 255, 0, 0.12);
    color: #b3ffb3;
    padding: 12px 18px;
    border-radius: 12px;
    border: 1px solid rgba(0, 255, 0, 0.15);
    margin-bottom: 15px;
}
.msg-error {
    background: rgba(255, 0, 0, 0.12);
    color: #ffb3b3;
    padding: 12px 18px;
    border-radius: 12px;
    border: 1px solid rgba(255, 0, 0, 0.15);
    margin-bottom: 15px;
}

/* ----- جداول ----- */
.table-container {
    overflow-x: auto;
    margin-top: 15px;
}
table {
    width: 100%;
    border-collapse: collapse;
    color: #fff;
}
table th,
table td {
    padding: 10px 12px;
    text-align: right;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
table th {
    background: rgba(255, 255, 255, 0.06);
    font-weight: 700;
}
table tr:hover {
    background: rgba(255, 255, 255, 0.03);
}
table th a {
    color: #fff;
}
table th a:hover {
    color: #ffd700;
}

/* ----- کارت‌های آماری ----- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}
.stat-card {
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(6px);
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-right: 4px solid #ffd700;
    transition: 0.3s;
}
.stat-card:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.10);
}
.stat-card .number {
    font-size: 2.4rem;
    font-weight: 700;
    color: #ffd700;
}
.stat-card .label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    margin-top: 4px;
}
.stat-card .icon {
    font-size: 2rem;
    color: #ffd700;
    margin-bottom: 8px;
}

/* ----- صفحه‌بندی ----- */
.pagination {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin-top: 20px;
    flex-wrap: wrap;
}
.pagination a,
.pagination span {
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    color: #fff;
    transition: 0.3s;
}
.pagination a:hover {
    background: rgba(255, 255, 255, 0.2);
}
.pagination .active {
    background: #ffd700;
    color: #2d3436;
}

/* ----- جستجو ----- */
.search-box {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.search-box input {
    flex: 1;
    padding: 10px 18px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    min-width: 200px;
}
.search-box input:focus {
    border-color: #ffd700;
    background: rgba(255, 255, 255, 0.15);
}

/* ----- سایدبار ----- */
.sidebar {
    width: 260px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    padding: 20px 0;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    overflow-y: auto;
    z-index: 1000;
}
.sidebar-brand {
    padding: 16px 24px;
    font-size: 1.3rem;
    font-weight: 700;
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 16px;
}
.sidebar-brand i {
    margin-left: 10px;
    color: #ffd700;
}
.sidebar-menu {
    list-style: none;
    padding: 0;
}
.sidebar-menu li {
    padding: 10px 24px;
    transition: 0.2s;
    border-right: 3px solid transparent;
}
.sidebar-menu li:hover {
    background: rgba(255, 255, 255, 0.06);
    border-right-color: #ffd700;
}
.sidebar-menu li.active {
    background: rgba(255, 255, 255, 0.08);
    border-right-color: #ffd700;
}
.sidebar-menu li a {
    color: rgba(255, 255, 255, 0.85);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
}
.sidebar-menu li a i {
    width: 22px;
}
.sidebar-footer {
    position: absolute;
    bottom: 20px;
    width: 100%;
    padding: 12px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.sidebar-footer a {
    color: rgba(255, 255, 255, 0.5);
    display: flex;
    align-items: center;
    gap: 10px;
}
.sidebar-footer a:hover {
    color: #fff;
}

/* ----- محتوای اصلی ----- */
.main-content {
    margin-right: 260px;
    padding: 30px;
    min-height: 100vh;
}
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    padding: 12px 24px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}
.page-header h1 {
    font-size: 1.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.page-header .admin-info {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255, 255, 255, 0.85);
}
.page-header .admin-info i {
    font-size: 1.4rem;
    color: #ffd700;
}

.content-box {
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(8px);
    border-radius: 20px;
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    margin-bottom: 24px;
}
.content-box h2,
.content-box h3 {
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.content-box label {
    color: rgba(255, 255, 255, 0.85);
}

/* ----- فوتر ----- */
.footer {
    text-align: center;
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.75rem;
    margin-top: 30px;
    line-height: 1.6;
}
.footer .designer {
    color: rgba(255, 255, 255, 0.5);
}

/* ----- ریسپانسیو ----- */
@media (max-width: 768px) {
    .sidebar {
        width: 70px;
    }
    .sidebar-brand span {
        display: none;
    }
    .sidebar-menu li a span {
        display: none;
    }
    .sidebar-footer span {
        display: none;
    }
    .main-content {
        margin-right: 70px;
        padding: 15px;
    }
    .container {
        padding: 16px;
    }
}