:root {
    --primary-color: #2c6db4; /* آبی تیره‌تر */
    --primary-hover-color: #004494;
    --secondary-color: #1a73e8; /* خاکستری */
    --light-gray-color: #f8f9fa;
    --border-color: #ced4da;
    --text-color: #333;
    --danger-color: #dc3545;
    --danger-hover-color: #c82333;
    --success-color: #28a745;
    --info-color: #17a2b8;
    --warning-color: #ffc107;
    --card-bg: #ffffff;
    --body-bg: #eef1f5; /* پس زمینه کمی تیره‌تر برای بدنه */
}
main{
    width: 65%;
    margin: auto;
}
.input-container {
    position: relative;
}
.form-control,
.form-select {
    width: 100%;
    padding: 14px 20px 14px 45px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
    background-color: white;
    appearance: none;
}
.form-control:focus,
.form-select:focus {
    border-color: #3498db;
    outline: none;
}
.floating-label {
    position: absolute;
    right: 10px;
    top: 11px;
    background: white;
    padding: 0 8px;
    color: #95a5a6;
    font-size: 16px;
    transition: all 0.3s;
    pointer-events: none;
}
.form-control:focus~.floating-label,
.form-control:not(:placeholder-shown)~.floating-label,
.form-select:focus~.floating-label,
.form-select:valid~.floating-label {
    top: -10px;
    font-size: 13px;
    color: #3498db;
}
.security-section{
    display: flex;
}
.verify-phone-btn{
    position: relative;
    top: -49px;
    float: left;
    background-color: var(--primary-color);
    padding: 11.9px;
    border-radius: 8px;
    color: white;
    opacity: 0;
    transition: all 300ms ease-in-out;
}
.verify-phone-btn:hover{
    background-color: var(--primary-hover-color);
}
.verify-phone-btn.show{
    opacity: 1;
}
.verify-code-container{
    opacity: 0;
}
.verify-code-Input{
    margin-top: 10px;
    transition: all 300ms ease-in-out;
}
.verify-code-container.show{
    opacity: 1;
}
.check-code{
    position: relative;
    top: -49px;
    float: left;
    background-color: orange;
    padding: 11.9px;
    border-radius: 8px;
    color: #fff;
    transition: all 300ms ease-in-out;
}
.check-code:hover{
    background-color: rgb(213, 156, 12);
}
.check-code.error{
    background-color: var(--danger-color);
}
.check-code.success{
    background-color: var(--success-color);
}
.admin-body { /* کلاس برای صفحات ادمین */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
.admin-header {
    background-color: var(--primary-color);
    color: white;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.admin-header .logo-container {
    display: flex;
    align-items: center;
}
.admin-header .header-logo-icon {
    font-size: 2rem;
    margin-left: 10px; /* یا margin-right اگر لوگو سمت دیگر بود */
}
.admin-header h1 {
    margin: 0;
    font-size: 1.5rem;
}
.admin-header nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
}
.admin-header nav ul li {
    margin-right: 20px; /* فاصله بین آیتم‌های منو */
}
.admin-header nav ul li:last-child {
    margin-right: 0;
}
.admin-header nav a {
    color: white;
    text-decoration: none;
    font-size: 1rem;
    padding: 0.5rem 0;
    transition: color 0.3s ease;
}
.admin-header nav a:hover, .admin-header nav a.active {
    color: var(--light-gray-color);
    border-bottom: 2px solid var(--light-gray-color);
}
.admin-header nav a i {
    margin-left: 5px;
}

.input-group > .btn:hover {
    background-color: #e9ecef;
}
.main-content-wrapper {
    max-width: 1000px;
    width: 90%;
    flex-grow: 1; /* برای اینکه فوتر به پایین بچسبد */
    margin: auto !important;
}
.card {
    top: 10px;
    background-color: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    border: 1px solid #e0e0e0;
}
.card h2, .card h3 {
    color: var(--primary-color);
    margin-top: 0;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 20px;
    font-size: 18pt;
    text-align: center;
}
.card h2 i, .card h3 i {
    margin-left: 8px;
}
/* Forms */
form label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #555;
}
form input[type="text"]:focus,
form input[type="number"]:focus,
form input[type="password"]:focus,
form select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 86, 179, 0.25);
    outline: none;
}
form input[readonly] {
    background-color: #e9ecef;
    cursor: not-allowed;
}
form small {
    display: block;
    margin-top: 5px;
    font-size: 0.85em;
    color: #666;
}
/* بهبود ظاهر کلی سلکت‌ها */
.form-select.text-end {
    direction: rtl;
    text-align: right;
    background-position: left 0.75rem center;
    padding-right: 0.75rem;
    padding-left: 2.25rem;
}
/* استایل گزینه‌ها */
.form-select.text-end option {
    direction: rtl;
    text-align: right;
}
/* آیکون کشویی برای RTL */
.form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' dir='ltr' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
}
.form-label {
    font-weight: 600;
    margin-bottom: 8px;
    color: #34495e;
}     
.form-control, .form-select {
    border: 1px solid #e0e6ed;
    border-radius: 8px;
    padding: 12px 15px;
    font-size: 1rem;
    transition: var(--transition);
    background-color: #fff;
}
.form-select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.25);
}

.password-toggle {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: gray;
    cursor: pointer;
    font-size: 18px;
    z-index: 10;
}

.form-group {
    width: 49%;
    position: relative;
}
.col-md-6 {
    width: 49%;
}

.mb-3{
    font-size: 17pt;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 0.95rem;
}
.form-label span {
    color: var(--danger-color);
}

.input-with-icon {
    position: relative;
}

.input-with-icon i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
    font-size: 18px;
}

.spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border-left-color: #09f;
    animation: spin 1s ease infinite;
    display: none; /* مخفی به صورت پیش‌فرض */
    margin: 0 auto; /* برای وسط چین کردن اگر دکمه محتوای دیگری ندارد */
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Buttons */
.button-primary, .button-secondary, .button-danger {
    padding: 10px 18px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-family: var(--font-family);
    font-size: 1rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}
.button-primary i, .button-secondary i, .button-danger i {
    margin-left: 8px;
}

.button-primary {
    background-color: var(--primary-color);
    color: white;
}
.button-primary:hover {
    background-color: var(--primary-hover-color);
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
}

.button-secondary {
    background-color: var(--secondary-color);
    color: white;
}
.button-secondary:hover {
    background-color: #5a6268;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.button-danger {
    background-color: var(--danger-color);
    color: white;
    font-size: 0.8rem; /* کوچکتر برای دکمه حذف */
    padding: 6px 10px;
}
.button-danger:hover {
    background-color: var(--danger-hover-color);
}

/* Messages */
.message-container {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
    text-align: center;
    font-weight: 500;
    border: 1px solid transparent;
}
.message-container.fixed-top { /* برای پیام گلوبال در هدر */
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1050;
    min-width: 300px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.message.success, .message-container.success {
    color: #155724;
    background-color: #d4edda;
    border-color: #155724;
}
.message.error, .message-container.error {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #721c24;
}
.message.info, .message-container.info {
    color: #0c5460;
    background-color: #d1ecf1;
    border-color: #0c5460;
}
.message.warning, .message-container.warning {
    color: #856404;
    background-color: #fff3cd;
    border-color: #856404;
}

.loading-placeholder, .empty-placeholder, .error-placeholder {
    color: #777;
    font-style: italic;
    text-align: center;
    padding: 20px;
}

/* Login Page Specifics */
.login-page .login-card {
    max-width: 450px;
    margin: 40px auto;
}
.login-card .form-footer-note {
    text-align: center;
    margin-top: 20px;
    font-size: 0.9em;
}
.login-card .form-footer-note a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}
.login-card .form-footer-note a:hover {
    text-decoration: underline;
}

.alert-custom-error {
    color: #721c24; /* متن */
    background-color: #f8d7da; /* پس‌زمینه */
    border-color: #f5c6cb; /* حاشیه */
    /* یا هر رنگ دلخواه دیگر */
}

/* Home Page Specifics */
.home-page .welcome-card h2 {
    color: var(--success-color); /* رنگ سبز برای خوشامدگویی */
    border-bottom-color: var(--success-color);
}
.quick-actions ul {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap; /* برای نمایش در چند خط در صفحه کوچک */
    gap: 15px; /* فاصله بین دکمه‌ها */
}

.quick-actions .button-secondary {
    width: 100%; /* برای اینکه دکمه‌ها تمام عرض آیتم لیست را بگیرند */
    background-color: #5a6268; /* کمی متفاوت از خاکستری پیش‌فرض */
    border: 1px solid #4e555b;
}
.quick-actions .button-secondary:hover {
    background-color: #4e555b;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .admin-header {
        flex-direction: column;
        padding: 1rem;
    }
    .admin-header h1 {
        margin-bottom: 0.5rem;
        text-align: center;
    }
    .admin-header nav ul {
        justify-content: center;
        flex-wrap: wrap; /* منو هم در صفحه کوچک بپیچد */
    }
    .admin-header nav ul li {
        margin: 5px 10px;
    }
    .main-content-wrapper {
        width: 95%;
        padding: 15px;
    }
    .quick-actions ul {
        flex-direction: column; /* دکمه‌ها زیر هم در موبایل */
    }
}
@media (max-width: 796px){
    .col-md-6{
        width: 100%;
    }
    main{
        width: 80%;
    }
}
@media (max-width: 450px){
    .form-control ,.form-select {
        font-size: 9pt;
    }
    .floating-label {
        font-size: 9pt;
    }
    .card h2{
        font-size: 12pt;
    }
    .mb-3{
        font-size: 12pt;
    }
    .verify-phone-btn{
        padding: 15.9px;
        font-size: 11px;
    }
}
@media (max-width: 340px){
    main{
        width: 95%;
    }
}