/* Admin Panel Styles */

/* CSS Variables for theming */
:root {
    --admin-bg: linear-gradient(135deg, #ffffff 0%, #f3e8ff 50%, #e9d5ff 100%);
    --admin-card-bg: rgba(255, 255, 255, 0.9);
    --admin-text: #2c3e50;
    --admin-text-muted: #666;
    --admin-border: #e0e0e0;
    --admin-primary: #7c3aed;
    --admin-primary-dark: #5b21b6;
    --admin-primary-light: #a78bfa;
    --admin-sidebar-bg: #ffffff;
    --admin-header-bg: linear-gradient(135deg, #6b21a8 0%, #1a1a2e 100%);
    --admin-sidebar-gradient: linear-gradient(180deg, #6b21a8 0%, #1a1a2e 100%);
}

[data-theme="dark"] {
    --admin-bg: linear-gradient(135deg, #0f0015 0%, #1e0a3e 40%, #2d1655 70%, #1a0a2e 100%);
    --admin-card-bg: linear-gradient(135deg, rgba(91, 33, 182, 0.15) 0%, rgba(29, 10, 46, 0.95) 100%);
    --admin-text: rgba(255, 255, 255, 0.95);
    --admin-text-muted: rgba(230, 220, 255, 0.7);
    --admin-border: rgba(139, 92, 246, 0.2);
    --admin-primary: #a78bfa;
    --admin-primary-dark: #7c3aed;
    --admin-primary-light: #c4b5fd;
    --admin-sidebar-bg: linear-gradient(180deg, rgba(91, 33, 182, 0.3) 0%, rgba(10, 5, 20, 0.95) 100%);
    --admin-header-bg: linear-gradient(135deg, #6b21a8 0%, #2d1655 50%, #0a0514 100%);
    --admin-sidebar-gradient: linear-gradient(180deg, #5b21b6 0%, #1d0a2e 50%, #0a0514 100%);
    
    /* متغیرهای اضافی برای دارک مود */
    --card-shadow: 0 8px 32px rgba(139, 92, 246, 0.25);
    --button-bg: linear-gradient(135deg, rgba(124, 58, 237, 0.8) 0%, rgba(91, 33, 182, 0.8) 100%);
    --button-hover: linear-gradient(135deg, rgba(167, 139, 250, 0.9) 0%, rgba(124, 58, 237, 0.9) 100%);
    --icon-color: rgba(255, 255, 255, 0.9);
    --glass-effect: rgba(91, 33, 182, 0.1);
}

/* Admin Body */
.admin-body {
    background: var(--admin-bg);
    background-attachment: fixed;
    background-size: cover;
    color: var(--admin-text);
    font-family: 'Vazirmatn', 'Estedad', 'Cairo', 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: all 0.3s ease;
    min-height: 100vh;
}

/* Admin Header */
.admin-header {
    background: var(--admin-header-bg);
    color: white;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 100px;
    z-index: 1000;
    box-shadow: 0 4px 25px rgba(107, 33, 168, 0.4);
    transition: background 0.3s ease;
    overflow: visible;
}

.admin-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 3rem;
    height: 100%;
    flex-direction: row-reverse;
    overflow: visible;
}

.admin-logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
    color: white;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: color 0.3s ease;
}

[data-theme="light"] .admin-logo h1 {
    color: var(--admin-primary);
    text-shadow: 0 2px 10px rgba(124, 58, 237, 0.2);
}

.admin-logo i {
    margin-left: 0.5rem;
    color: white;
    opacity: 0.95;
    transition: color 0.3s ease;
}

[data-theme="light"] .admin-logo i {
    color: var(--admin-primary);
}

.admin-nav {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-direction: row; /* پروفایل و تم کنار هم */
    overflow: visible;
}

.admin-nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: none;
    border: none;
    outline: none;
    padding: 0;
    order: 2; /* دکمه تم بعد از پروفایل */
    overflow: visible;
}

.theme-toggle {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1.3rem;
}

[data-theme="light"] .theme-toggle {
    background: rgba(124, 58, 237, 0.1);
    border: 1px solid var(--admin-primary-light);
    color: var(--admin-primary);
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 20px rgba(124, 58, 237, 0.4);
}

[data-theme="light"] .theme-toggle:hover {
    background: rgba(124, 58, 237, 0.2);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 20px rgba(124, 58, 237, 0.5);
}

.theme-toggle .theme-text {
    display: none;
}

.theme-toggle .theme-icon {
    font-size: 1.5rem;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
    cursor: pointer;
    padding: 0.6rem 1.2rem;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    order: 1; /* پروفایل قبل از دکمه تم */
}

[data-theme="light"] .user-profile {
    background: rgba(124, 58, 237, 0.1);
    border: 1px solid var(--admin-primary-light);
    box-shadow: 0 2px 10px rgba(124, 58, 237, 0.1);
}

.user-profile:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.3);
}

[data-theme="light"] .user-profile:hover {
    background: rgba(124, 58, 237, 0.15);
    box-shadow: 0 6px 25px rgba(124, 58, 237, 0.4);
    border-color: var(--admin-primary);
}

.profile-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 2px 10px rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

[data-theme="light"] .profile-avatar {
    border: 2px solid var(--admin-primary);
    box-shadow: 0 2px 10px rgba(124, 58, 237, 0.3);
}

.user-profile:hover .profile-avatar {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.4);
}

.username {
    font-weight: 600;
    font-size: 1rem;
    color: white;
    transition: color 0.3s ease;
    letter-spacing: 0.3px;
}

[data-theme="light"] .username {
    color: var(--admin-primary);
    font-weight: 700;
}

.user-profile .dropdown i {
    transition: transform 0.3s ease, color 0.3s ease;
    font-size: 0.85rem;
    opacity: 0.9;
    color: white;
}

[data-theme="light"] .user-profile .dropdown i {
    color: var(--admin-primary);
    opacity: 1;
}

.user-profile:hover .dropdown i {
    transform: rotate(180deg);
    opacity: 1;
}

.user-profile .dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 0.8rem;
    background: linear-gradient(135deg, #7c3aed 0%, #6b21a8 100%);
    border: 2px solid rgba(124, 58, 237, 0.3);
    border-radius: 16px;
    box-shadow: 0 15px 50px rgba(124, 58, 237, 0.5);
    min-width: 238px; /* 240px - 2px */
    padding: 0.8rem 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-15px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: visible;
    z-index: 9999;
}

/* For English (LTR) - dropdown opens from center */
[dir="ltr"] .user-profile .dropdown-menu {
    left: 50%;
    transform: translateX(-50%) translateY(-15px) scale(0.95);
}

/* For Persian and Arabic (RTL) - dropdown opens from LEFT edge */
[dir="rtl"] .user-profile .dropdown-menu {
    left: 0;
    right: auto;
    transform: translateY(-15px) scale(0.95);
}

[data-theme="light"] .user-profile .dropdown-menu {
    background: linear-gradient(135deg, #7c3aed 0%, #6b21a8 100%);
    border: 2px solid rgba(124, 58, 237, 0.3);
    box-shadow: 0 15px 50px rgba(124, 58, 237, 0.5);
}

/* Show dropdown on hover or active (both LTR and RTL) */
.user-profile:hover .dropdown-menu,
.user-profile.active .dropdown-menu {
    opacity: 1;
    visibility: visible;
}

/* LTR animation */
[dir="ltr"] .user-profile:hover .dropdown-menu,
[dir="ltr"] .user-profile.active .dropdown-menu {
    transform: translateX(-50%) translateY(0) scale(1);
}

/* RTL animation */
[dir="rtl"] .user-profile:hover .dropdown-menu,
[dir="rtl"] .user-profile.active .dropdown-menu {
    transform: translateY(0) scale(1);
}

.user-profile .dropdown-menu li {
    list-style: none;
}

.user-profile .dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    color: #000000;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.user-profile .dropdown-menu a::before {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 0;
    background: rgba(167, 139, 250, 0.25);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.user-profile .dropdown-menu a i {
    color: #000000;
    font-size: 0.9rem;
    width: 20px;
    text-align: center;
    transition: all 0.3s ease;
    z-index: 1;
    filter: none;
    transform: none;
}

.user-profile .dropdown-menu a span,
.user-profile .dropdown-menu a span[data-i18n] {
    color: #000000 !important;
    font-weight: 500;
}

.user-profile .dropdown-menu a:hover {
    color: #ffffff;
    padding-right: 2rem;
    background: transparent;
}

.user-profile .dropdown-menu a:hover::before {
    width: 100%;
}

.user-profile .dropdown-menu a:hover i {
    transform: scale(1.1) translateX(-5px);
}

[data-theme="light"] .user-profile .dropdown-menu a:hover {
    color: #ffffff;
}

.user-profile .dropdown-menu hr {
    margin: 0.5rem 1rem;
    border: none;
    border-top: 2px solid rgba(167, 139, 250, 0.3);
    opacity: 0.8;
}

/* Admin Container */
.admin-container {
    display: flex;
    flex-direction: row-reverse;
    align-items: flex-start;
    justify-content: stretch;
    margin-top: 0;
    min-height: 100vh;
}

/* Agencies Grid & Cards */
.agencies-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 1.75rem;
    padding: 1.5rem 0;
    animation: fadeIn 0.5s ease-in-out;
    width: 100%;
    min-height: 200px;
}

#agenciesListContainer {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 1.75rem;
    width: 100%;
}

/* Empty State for Agencies */
.agencies-grid .empty-state {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.03) 0%, rgba(167, 139, 250, 0.02) 100%);
    border-radius: 16px;
    border: 2px dashed rgba(124, 58, 237, 0.2);
}

.agencies-grid .empty-state i {
    color: rgba(124, 58, 237, 0.3);
    margin-bottom: 1.5rem;
}

.agencies-grid .empty-state h3 {
    color: var(--admin-text);
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 0.75rem 0;
}

.agencies-grid .empty-state p {
    color: var(--admin-text-muted);
    font-size: 1rem;
    margin: 0;
    max-width: 400px;
}

[data-theme="dark"] .agencies-grid .empty-state {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.08) 0%, rgba(91, 33, 182, 0.05) 100%);
    border-color: rgba(139, 92, 246, 0.2);
}

[data-theme="dark"] .agencies-grid .empty-state i {
    color: rgba(139, 92, 246, 0.4);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.agency-card {
    background: var(--admin-card-bg);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--admin-border);
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}

.agency-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.agency-card:hover::before {
    transform: scaleX(1);
}

.agency-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(124, 58, 237, 0.15);
    border-color: var(--admin-primary-light);
}

[data-theme="dark"] .agency-card {
    background: linear-gradient(135deg, rgba(91, 33, 182, 0.12) 0%, rgba(29, 10, 46, 0.95) 100%);
    border-color: rgba(139, 92, 246, 0.2);
}

[data-theme="dark"] .agency-card:hover {
    box-shadow: 0 12px 32px rgba(139, 92, 246, 0.25);
    border-color: rgba(167, 139, 250, 0.4);
}

/* Agency Card Header */
.agency-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--admin-border);
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.03) 0%, rgba(167, 139, 250, 0.02) 100%);
}

[data-theme="dark"] .agency-header {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.08) 0%, rgba(91, 33, 182, 0.05) 100%);
    border-bottom-color: rgba(139, 92, 246, 0.15);
}

.agency-info h3 {
    margin: 0 0 0.75rem 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--admin-text);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 4.5em;
    max-height: 4.5em;
    word-wrap: break-word;
    hyphens: auto;
}

[data-theme="dark"] .agency-info h3 {
    color: rgba(255, 255, 255, 0.95);
}

.agency-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.agency-badges .badge {
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: capitalize;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.badge-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.badge-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.badge-info {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

/* Agency Actions */
.agency-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    flex-wrap: wrap;
}

.agency-actions button {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid var(--admin-border);
    background: white;
    color: var(--admin-text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

[data-theme="dark"] .agency-actions button {
    background: rgba(91, 33, 182, 0.15);
    border-color: rgba(139, 92, 246, 0.2);
    color: rgba(255, 255, 255, 0.7);
}

.agency-actions button:hover {
    background: var(--admin-primary);
    color: white;
    border-color: var(--admin-primary);
    transform: scale(1.05);
}

[data-theme="dark"] .agency-actions button:hover {
    background: var(--admin-primary-light);
    border-color: var(--admin-primary-light);
    color: #0a0514;
}

.view-agency-btn:hover {
    background: #3b82f6 !important;
    border-color: #3b82f6 !important;
}

.manage-brokers-btn:hover {
    background: #10b981 !important;
    border-color: #10b981 !important;
}

.manage-properties-btn:hover {
    background: #f59e0b !important;
    border-color: #f59e0b !important;
}

.edit-agency-btn:hover {
    background: #8b5cf6 !important;
    border-color: #8b5cf6 !important;
}

.delete-agency-btn:hover {
    background: #ef4444 !important;
    border-color: #ef4444 !important;
}

/* Agency Body */
.agency-body {
    padding: 1.25rem 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.agency-detail {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--admin-text-muted);
    padding: 0.25rem 0;
}

.agency-detail i {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--admin-primary);
    margin-top: 0.15rem;
    font-size: 0.95rem;
}

[data-theme="dark"] .agency-detail i {
    color: var(--admin-primary-light);
}

.agency-detail span,
.agency-detail a {
    flex: 1;
    word-break: break-word;
    overflow-wrap: break-word;
    color: var(--admin-text-muted);
    max-width: 100%;
}

.agency-detail a {
    color: var(--admin-primary);
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline-block;
}

.agency-detail a:hover {
    color: var(--admin-primary-dark);
    text-decoration: underline;
}

[data-theme="dark"] .agency-detail a {
    color: var(--admin-primary-light);
}

[data-theme="dark"] .agency-detail a:hover {
    color: #c4b5fd;
}

/* Agency Footer */
.agency-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--admin-border);
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.02) 0%, rgba(167, 139, 250, 0.01) 100%);
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

[data-theme="dark"] .agency-footer {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.05) 0%, rgba(91, 33, 182, 0.03) 100%);
    border-top-color: rgba(139, 92, 246, 0.15);
}

.agency-stat {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--admin-text-muted);
}

.agency-stat i {
    color: var(--admin-primary);
    font-size: 0.85rem;
    flex-shrink: 0;
}

[data-theme="dark"] .agency-stat i {
    color: var(--admin-primary-light);
}

.agency-stat span {
    font-weight: 500;
    color: var(--admin-text);
}

/* Responsive Design */
@media (max-width: 1600px) {
    .agencies-grid {
        grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    }
}

@media (max-width: 1200px) {
    .agencies-grid {
        grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    }
}

@media (max-width: 992px) {
    .agencies-grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
        gap: 1.25rem;
    }
}

@media (max-width: 768px) {
    .agencies-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1rem 0;
    }
    
    .agency-card {
        border-radius: 12px;
    }
    
    .agency-info h3 {
        font-size: 1rem;
        -webkit-line-clamp: 3;
        line-clamp: 3;
        min-height: auto;
        max-height: none;
    }
    
    .agency-actions {
        justify-content: flex-start;
    }
    
    .agency-actions button {
        width: 34px;
        height: 34px;
        font-size: 0.85rem;
    }
    
    .agency-footer {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .agency-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 480px) {
    .agency-info h3 {
        font-size: 1rem;
    }
    
    .agency-body {
        padding: 1rem;
    }
    
    .agency-footer {
        padding: 0.75rem 1rem;
    }
}

/* Admin Sidebar */
.admin-sidebar {
    width: 260px;
    background: var(--admin-sidebar-gradient);
    box-shadow: -2px 0 20px rgba(107, 33, 168, 0.4);
    position: sticky;
    top: 0;
    align-self: flex-start;
    max-height: 100vh;
    flex-shrink: 0;
    overflow-y: auto;
    z-index: 10;
    transition: all 0.3s ease;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
    direction: rtl;
    text-align: right;
}

.admin-sidebar::-webkit-scrollbar {
    width: 4px;
}

.admin-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.admin-sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
}

.admin-sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

.sidebar-nav {
    padding: 2rem 0;
}

.nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-item {
    margin-bottom: 0.5rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 2rem;
    color: #7c3aed;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    direction: rtl;
    text-align: right;
    border-radius: 8px;
    margin: 0.25rem 0.5rem;
}

.nav-link:hover,
.nav-item.active .nav-link {
    color: #9f7aea;
    background: rgba(124, 58, 237, 0.15);
    border-right: 3px solid #7c3aed;
}

.nav-link i {
    font-size: 1.2rem;
    width: 20px;
    text-align: center;
    margin-left: 0;
    margin-right: 0;
    color: #7c3aed;
}

.nav-link:hover i,
.nav-item.active .nav-link i {
    color: #9f7aea;
}

.nav-link span {
    flex: 1;
    text-align: right;
}

.nav-link .badge {
    background: rgba(255, 255, 255, 0.9);
    color: #667eea;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.8rem;
    margin-left: auto;
    margin-right: 0;
    font-weight: 600;
}

/* Admin Main */
.admin-main {
    flex: 1;
    margin-left: 0;
    margin-right: 0;
    padding: 2rem;
    min-height: calc(100vh - 70px);
    transition: all 0.3s ease;
    background: var(--admin-bg);
    direction: rtl;
    text-align: right;
}

/* Admin Sections */
.admin-section {
    display: none;
}

.admin-section.active {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

.admin-section.active .agencies-grid {
    display: grid;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e0e0e0;
}

.section-header h2 {
    color: #7c3aed;
    font-size: 1.8rem;
    font-weight: 600;
    margin: 0;
}

.section-header h2 i {
    color: #7c3aed;
}

.section-header h2 [data-i18n] {
    color: #7c3aed;
}

.section-header i {
    margin-left: 0.5rem;
    color: #7c3aed;
}

.header-actions {
    display: flex;
    gap: 1rem;
}

/* Light Mode: عنوان‌ها */
.admin-section h2,
.admin-section h3,
.admin-section h4 {
    color: #7c3aed;
}

.admin-section h2[data-i18n],
.admin-section h3[data-i18n],
.admin-section h4[data-i18n] {
    color: #7c3aed;
}

/* Buttons */
.btn {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-family: 'Vazirmatn', Arial, sans-serif;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    font-size: 0.95rem;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #764ba2;
    transform: translateY(-2px);
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
    transform: translateY(-2px);
}

.btn-success {
    background: #27ae60;
    color: white;
}

.btn-success:hover {
    background: #229954;
    transform: translateY(-2px);
}

.btn-danger {
    background: #667eea;
    color: white;
}

.btn-danger:hover {
    background: #764ba2;
    transform: translateY(-2px);
}

.btn-warning {
    background: #f39c12;
    color: white;
}

.btn-warning:hover {
    background: #e67e22;
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: #666;
    border: 1px solid #ddd;
}

.btn-outline:hover {
    background: #f8f9fa;
    border-color: #667eea;
    color: #667eea;
}

/* Dashboard Grid Layout */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    width: 100%;
}

/* Dashboard Stats Section */
.dashboard-stats {
    width: 100%;
}

/* Stats Grid - Equal distribution */
.stats-grid,
.stats-grid-equal {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 0;
}

/* Dashboard Charts Section */
.dashboard-charts {
    width: 100%;
}

/* Charts Row - Equal distribution */
.charts-row-equal {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    width: 100%;
}

/* Dashboard Activities Section */
.dashboard-activities {
    width: 100%;
}

.stat-card {
    background: var(--admin-card-bg);
    border: 1px solid var(--admin-border);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 5px 20px rgba(107, 33, 168, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(107, 33, 168, 0.25);
}

.stat-icon {
    width: 70px;
    height: 70px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    background: linear-gradient(135deg, #6b21a8, #1a1a2e);
    box-shadow: 0 4px 15px rgba(107, 33, 168, 0.3);
}

.stat-content h3 {
    color: #7c3aed;
    font-size: 0.9rem;
    margin: 0 0 0.5rem 0;
    font-weight: 600;
}

.stat-content h3[data-i18n] {
    color: #7c3aed;
}

.stat-number {
    font-size: 2.2rem;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 0.5rem 0;
}

.stat-change {
    font-size: 0.85rem;
}

.stat-change.positive {
    color: #27ae60;
}

.stat-change.negative {
    color: #667eea;
}

/* Charts */
.charts-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

.chart-container {
    background: var(--admin-card-bg);
    border: 1px solid var(--admin-border);
    border-radius: 15px;
    padding: 0;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    height: 400px;
    min-height: 300px;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem 1rem 2rem;
    border-bottom: 1px solid var(--admin-border);
}

.chart-header h3 {
    color: #7c3aed;
    font-size: 1.1rem;
    margin: 0;
    font-weight: 600;
}

.chart-header h3[data-i18n] {
    color: #7c3aed;
}

.chart-actions {
    display: flex;
    gap: 0.5rem;
}

.chart-body {
    flex: 1;
    padding: 1.5rem 2rem 2rem 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chart-container h3 {
    color: #7c3aed;
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.chart-container h3[data-i18n] {
    color: #7c3aed;
}

/* Recent Activities */
.recent-activities {
    background: var(--admin-card-bg);
    border: 1px solid var(--admin-border);
    border-radius: 15px;
    padding: 0;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 0;
    height: fit-content;
}

.activities-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem 1rem 2rem;
    border-bottom: 1px solid var(--admin-border);
}

.activities-header h3 {
    color: #7c3aed;
    font-size: 1.1rem;
    margin: 0;
    font-weight: 600;
}

.activities-header h3[data-i18n] {
    color: #7c3aed;
}

.activities-actions {
    display: flex;
    gap: 0.5rem;
}

.recent-activities h3 {
    color: #7c3aed;
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.recent-activities h3[data-i18n] {
    color: #7c3aed;
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 1rem 2rem 2rem 2rem;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--admin-border);
    transition: background 0.3s ease;
    position: relative;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-item:hover {
    background: rgba(102, 126, 234, 0.02);
    border-radius: 8px;
    padding: 1rem 0.5rem;
    margin: 0 -0.5rem;
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.activity-content p {
    margin: 0 0 0.3rem 0;
    color: #2c3e50;
    font-weight: 500;
}

.activity-content {
    flex: 1;
    min-width: 0;
}


.activity-content small {
    color: var(--admin-text-muted);
    font-size: 0.85rem;
}

.activity-meta {
    display: flex;
    align-items: center;
    margin-right: auto;
}

.activity-type {
    padding: 0.25rem 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.activity-type.success {
    background: rgba(39, 174, 96, 0.1);
    color: #27ae60;
}

.activity-type.info {
    background: rgba(52, 152, 219, 0.1);
    color: #3498db;
}

.activity-type.warning {
    background: rgba(243, 156, 18, 0.1);
    color: #f39c12;
}

/* Button Styles */
.btn-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 1px solid var(--admin-border);
    background: var(--admin-card-bg);
    color: var(--admin-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.85rem;
}

.btn-icon:hover {
    background: var(--admin-primary);
    color: white;
    border-color: var(--admin-primary);
}

.btn-text {
    background: none;
    border: none;
    color: var(--admin-primary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-text:hover {
    color: var(--admin-text);
    text-decoration: underline;
}

.text-success {
    color: #27ae60 !important;
}

.text-info {
    color: #3498db !important;
}

.text-warning {
    color: #f39c12 !important;
}

/* Tables */
.table-container {
    background: var(--admin-card-bg);
    border: 1px solid var(--admin-border);
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    margin-bottom: 2rem;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table thead {
    background: #f8f9fa;
}

.admin-table th,
.admin-table td {
    padding: 1rem;
    text-align: right;
    border-bottom: 1px solid #e0e0e0;
}

.admin-table th {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.admin-table tbody tr:hover {
    background: #f8f9fa;
}

/* Forms */
.filters-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    align-items: center;
}

.form-select,
.form-input,
.form-textarea {
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: 'Vazirmatn', Arial, sans-serif;
    font-size: 0.95rem;
    transition: border-color 0.3s ease;
}

.form-select:focus,
.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: #667eea;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #2c3e50;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* Properties Management Grid */
.properties-management-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.properties-stats {
    width: 100%;
}

.properties-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.property-stat-card {
    background: var(--admin-card-bg);
    border: 1px solid var(--admin-border);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.property-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.property-stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: white;
}

.property-stat-icon.pending {
    background: linear-gradient(135deg, #f39c12, #e67e22);
}

.property-stat-icon.approved {
    background: linear-gradient(135deg, #27ae60, #229954);
}

.property-stat-icon.sold {
    background: linear-gradient(135deg, #3498db, #2980b9);
}

.property-stat-content {
    display: flex;
    flex-direction: column;
}

.property-stat-number {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--admin-text);
    line-height: 1;
    margin-bottom: 0.2rem;
}

.property-stat-label {
    font-size: 0.85rem;
    color: var(--admin-text-muted);
    font-weight: 500;
}

.properties-filters {
    width: 100%;
}

.filters-container {
    background: var(--admin-card-bg);
    border: 1px solid var(--admin-border);
    border-radius: 12px;
    padding: 1.5rem;
}

.search-group {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.search-btn {
    flex-shrink: 0;
    padding: 0.8rem 1rem;
}

/* Users Management Grid */
.users-management-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.user-stats-enhanced {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

.stat-item-enhanced {
    background: var(--admin-card-bg);
    border: 1px solid var(--admin-border);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.stat-item-enhanced:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.stat-icon-enhanced {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: white;
}

.stat-icon-enhanced.users {
    background: linear-gradient(135deg, #3498db, #2980b9);
}

.stat-icon-enhanced.consultants {
    background: linear-gradient(135deg, #9b59b6, #8e44ad);
}

.stat-icon-enhanced.agencies {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.stat-icon-enhanced.online {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    animation: pulse 2s infinite;
}

.stat-content-enhanced {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.stat-value-enhanced {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--admin-text);
    line-height: 1;
    margin-bottom: 0.2rem;
}

.stat-label-enhanced {
    font-size: 0.85rem;
    color: var(--admin-text-muted);
    font-weight: 500;
    margin-bottom: 0.3rem;
}

.stat-change-enhanced {
    font-size: 0.75rem;
    font-weight: 600;
}

.stat-change-enhanced.positive {
    color: #27ae60;
}

.stat-change-enhanced.neutral {
    color: var(--admin-text-muted);
}

.stat-change-enhanced.live {
    color: #2ecc71;
    animation: blink 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Legacy User Stats */
.user-stats {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    background: var(--admin-card-bg);
    border: 1px solid var(--admin-border);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.stat-item i {
    font-size: 2rem;
    color: #667eea;
    width: 50px;
    text-align: center;
}

.stat-label {
    font-size: 0.9rem;
    color: #666;
    display: block;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #2c3e50;
    display: block;
}

/* Categories Grid */
.categories-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.category-group {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.category-group h3 {
    color: #2c3e50;
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 0.5rem;
}

.category-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Category Card Styles */
.category-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border: 1px solid #e9ecef;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.category-card:hover {
    transform: translateX(-4px);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.15);
    border-color: #667eea;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
}

.category-card:hover::before {
    transform: scaleY(1);
}

.category-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    min-width: 56px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    color: white;
    font-size: 1.5rem;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.25);
    transition: all 0.3s ease;
}

.category-card:hover .category-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 6px 18px rgba(102, 126, 234, 0.35);
}

.category-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.category-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    transition: color 0.3s ease;
}

.category-card:hover .category-name {
    color: #667eea;
}

.category-desc {
    font-size: 0.875rem;
    color: #6c757d;
    line-height: 1.4;
}

.category-actions {
    display: flex;
    gap: 0.5rem;
    opacity: 0;
    transform: translateX(10px);
    transition: all 0.3s ease;
}

.category-card:hover .category-actions {
    opacity: 1;
    transform: translateX(0);
}

.category-actions button {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
    color: #6c757d;
}

.edit-category-btn:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.delete-category-btn:hover {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 87, 108, 0.3);
}

/* Responsive Design for Categories */
@media (max-width: 768px) {
    .category-card {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem 1rem;
    }
    
    .category-actions {
        opacity: 1;
        transform: translateX(0);
        width: 100%;
        justify-content: center;
    }
    
    .category-icon {
        width: 64px;
        height: 64px;
        font-size: 1.75rem;
    }
}

/* Bulk Actions */
.bulk-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-top: 1rem;
}

.selected-count {
    color: #666;
    font-weight: 500;
    margin-left: auto;
}

/* Status Badges */
.status-badge {
    padding: 0.3rem 0.8rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-pending {
    background: rgba(243, 156, 18, 0.2);
    color: #f39c12;
}

.status-approved {
    background: rgba(39, 174, 96, 0.2);
    color: #27ae60;
}

.status-rejected {
    background: rgba(102, 126, 234, 0.2);
    color: #667eea;
}

.status-active {
    background: rgba(39, 174, 96, 0.2);
    color: #27ae60;
}

.status-inactive {
    background: rgba(149, 165, 166, 0.2);
    color: #95a5a6;
}

/* Modal Styles - Full Screen Overlay */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(6px);
    align-items: center;
    justify-content: center;
    padding: 2rem;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.modal.active {
    display: flex;
    opacity: 1;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background: #ffffff;
    color: #2c3e50;
    border: none;
    margin: 0;
    border-radius: 16px;
    max-width: 85%;
    width: 85%;
    max-height: 90%;
    height: 90%;
    overflow-y: auto;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    position: relative;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateY(-30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Dark theme support */
[data-theme="dark"] .modal-content {
    background: var(--admin-card-bg);
    color: var(--admin-text);
    border: 1px solid var(--admin-border);
}

/* Mobile responsive */
@media (max-width: 768px) {
    .modal {
        padding: 0;
    }
    
    .modal-content {
        max-width: 100%;
        width: 100%;
        max-height: 100%;
        height: 100%;
        border-radius: 0;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 3rem;
    border-bottom: 2px solid #f0f0f0;
    position: sticky;
    top: 0;
    background: #ffffff;
    z-index: 10;
}

[data-theme="dark"] .modal-header {
    background: var(--admin-card-bg);
    border-bottom-color: var(--admin-border);
}

.modal-header h3 {
    color: #2c3e50;
    font-size: 1.75rem;
    margin: 0;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

[data-theme="dark"] .modal-header h3 {
    color: var(--admin-text);
}

.modal-header .close-modal,
.modal-header .close {
    background: #f5f5f5;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-header .close-modal:hover,
.modal-header .close:hover {
    background: #e74c3c;
    color: #ffffff;
    transform: rotate(90deg);
}

.modal-body {
    padding: 3rem;
    max-width: 1000px;
    margin: 0 auto;
}

.modal-footer,
.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding: 2rem 3rem;
    position: sticky;
    bottom: 0;
    background: #ffffff;
    border-top: 2px solid #f0f0f0;
    z-index: 10;
}

[data-theme="dark"] .modal-footer,
[data-theme="dark"] .modal-actions {
    background: var(--admin-card-bg);
    border-top-color: var(--admin-border);
}

.modal-actions .btn {
    min-width: 140px;
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.modal-actions .btn-primary {
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
    color: #ffffff;
    border: none;
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
}

.modal-actions .btn-primary:hover {
    background: linear-gradient(135deg, #229954 0%, #1e8449 100%);
    box-shadow: 0 6px 16px rgba(39, 174, 96, 0.4);
    transform: translateY(-2px);
}

.modal-actions .btn-secondary {
    background: #95a5a6;
    color: #ffffff;
    border: none;
    box-shadow: 0 4px 12px rgba(149, 165, 166, 0.3);
}

.modal-actions .btn-secondary:hover {
    background: #7f8c8d;
    box-shadow: 0 6px 16px rgba(149, 165, 166, 0.4);
    transform: translateY(-2px);
}

/* Form Sections in Modal */
.modal-content .form-section {
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #f0f0f0;
}

.modal-content .form-section:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
}

.modal-content .form-section h4 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

[data-theme="dark"] .modal-content .form-section h4 {
    color: var(--admin-text);
}

.modal-content .form-section h4 i {
    color: #667eea;
    font-size: 1.1rem;
}

.modal-content .form-group {
    margin-bottom: 1.5rem;
}

.modal-content .form-group label {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    color: #34495e;
    margin-bottom: 0.5rem;
}

[data-theme="dark"] .modal-content .form-group label {
    color: var(--admin-text);
}

.modal-content .form-group input,
.modal-content .form-group select,
.modal-content .form-group textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Vazirmatn', Arial, sans-serif;
    transition: all 0.3s ease;
    background: #ffffff;
}

.modal-content .form-group input:focus,
.modal-content .form-group select:focus,
.modal-content .form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}


.modal-content .form-group small {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: #7f8c8d;
}

.modal-content .form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}


/* Excel Import Card */
.excel-import-card {
    background: var(--admin-card-bg);
    border: 1px solid var(--admin-border);
    border-radius: 16px;
    padding: 1.75rem;
    margin: 1.75rem 0;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.excel-import-header {
    margin-bottom: 1.25rem;
}

.excel-import-header h3 {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.2rem;
    margin: 0 0 0.35rem;
}

.excel-import-header h3 i {
    color: #16a34a;
}

.excel-import-form .form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}

.excel-import-form .form-group input[type="file"] {
    border: 1px dashed var(--admin-border);
    padding: 0.65rem;
    border-radius: 8px;
    background: rgba(22, 163, 74, 0.08);
}

.excel-import-form .form-group small {
    display: block;
    margin-top: 0.35rem;
    color: var(--admin-text-muted);
    font-size: 0.8rem;
}

.import-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 1.25rem;
}

.import-status {
    margin-top: 1rem;
    font-size: 0.9rem;
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.import-status .loading {
    color: #2563eb;
    font-weight: 500;
}

.import-status .success {
    color: #16a34a;
    font-weight: 600;
}

.import-status .error {
    color: #dc2626;
    font-weight: 600;
}

.import-results {
    margin-top: 1.75rem;
}

.import-empty {
    color: var(--admin-text-muted);
    font-size: 0.9rem;
}

.import-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.85rem;
    margin-bottom: 1.25rem;
}

.import-summary .summary-item {
    background: rgba(15, 23, 42, 0.02);
    border: 1px solid var(--admin-border);
    border-radius: 10px;
    padding: 0.85rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

.import-summary .summary-item strong {
    color: var(--admin-text-muted);
    font-weight: 600;
}

.import-summary .summary-item span {
    font-weight: 600;
    color: var(--admin-text);
}

.import-messages {
    margin: 0 1.5rem 1.5rem;
    color: #d97706;
    font-size: 0.85rem;
}

.import-sample h4 {
    margin: 0 0 0.75rem;
    font-size: 1rem;
}

.import-table .badge {
    display: inline-block;
}

/* Property Detail Panel */
.property-detail-panel {
    margin-top: 2rem;
    background: var(--admin-card-bg);
    border: 1px solid var(--admin-border);
    border-radius: 16px;
    padding: 1.75rem;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

.property-detail-panel h3 {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin: 0 0 1.25rem;
    font-size: 1.25rem;
}

.property-detail-empty {
    color: var(--admin-text-muted);
    font-size: 0.95rem;
}

.property-detail-card {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.property-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.property-detail-item {
    background: rgba(15, 23, 42, 0.02);
    border: 1px solid var(--admin-border);
    border-radius: 12px;
    padding: 0.9rem 1rem;
    position: relative;
}

.property-detail-item span {
    display: block;
    font-size: 0.8rem;
    color: var(--admin-text-muted);
    margin-bottom: 0.4rem;
}

.property-detail-item strong {
    display: block;
    font-size: 1.05rem;
    color: var(--admin-text);
}

.property-detail-item small {
    display: block;
    margin-top: 0.35rem;
    color: var(--admin-text-muted);
    font-size: 0.8rem;
}

.property-detail-contact ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.6rem;
}

.property-detail-contact li {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--admin-text);
    font-size: 0.92rem;
}

.property-detail-contact li i {
    color: #2563eb;
}

.property-detail-contact a {
    color: #2563eb;
    font-weight: 500;
}

.property-detail-socials {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.property-detail-socials a {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(37, 99, 235, 0.08);
    border: 1px solid rgba(37, 99, 235, 0.25);
    color: #1d4ed8;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.property-detail-socials a:hover {
    background: #1d4ed8;
    color: #ffffff;
}

.property-detail-descriptions {
    display: grid;
    gap: 1rem;
}

.property-detail-descriptions article {
    background: rgba(15, 23, 42, 0.02);
    border: 1px solid var(--admin-border);
    border-radius: 12px;
    padding: 1rem 1.25rem;
}

.property-detail-descriptions article h4 {
    margin: 0 0 0.5rem;
    font-size: 1rem;
}

.property-detail-descriptions article p {
    margin: 0;
    line-height: 1.9;
    white-space: pre-line;
}

.property-row.selected {
    background: rgba(16, 185, 129, 0.18);
}

.property-row:hover {
    background: rgba(59, 130, 246, 0.12);
    cursor: pointer;
}


/* Responsive Design */
@media (max-width: 1200px) {
    .admin-sidebar {
        width: 220px;
    }
    
    .admin-main {
        margin-left: 220px;
        width: calc(100% - 220px);
        padding: 1.5rem;
    }
    
    .charts-row,
    .charts-row-equal {
        grid-template-columns: 1fr;
    }
    
    .stats-grid,
    .stats-grid-equal {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }
    
    .properties-stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }
    
    .user-stats-enhanced {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}


@media (max-width: 480px) {
    .admin-header-content {
        padding: 0 1rem;
    }
    
    .admin-logo h1 {
        font-size: 1.2rem;
    }
    
    .username {
        display: none;
    }
    
    .stat-card {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .stat-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .modal-content {
        margin: 10% auto;
        width: 95%;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 1rem;
    }
}

/* dropdown fix */
.admin-header, .admin-header-content, .admin-nav, .user-profile { position: relative; overflow: visible; }


/* dropdown hardening */

/* RTL dropdown positioning */

/* LTR dropdown positioning */

/* Coming Soon Sections */
.coming-soon {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--admin-card-bg);
    border: 1px solid var(--admin-border);
    border-radius: 15px;
    margin: 2rem 0;
}

.coming-soon h3 {
    color: var(--admin-text);
    font-size: 2rem;
    margin-bottom: 1rem;
    opacity: 0.8;
}

.coming-soon p {
    color: var(--admin-text-muted);
    font-size: 1.1rem;
    margin: 0;
}

/* Settings Styles */
.settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.setting-group {
    background: var(--admin-card-bg);
    border: 1px solid var(--admin-border);
    border-radius: 15px;
    padding: 2rem;
}

.setting-group h3 {
    color: var(--admin-text);
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--admin-border);
}

.setting-item {
    margin-bottom: 1.5rem;
}

.setting-item label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--admin-text);
    font-weight: 500;
}

.theme-options {
    display: flex;
    gap: 1rem;
}

.theme-option {
    padding: 0.8rem 1.5rem;
    border: 1px solid var(--admin-border);
    border-radius: 8px;
    background: var(--admin-card-bg);
    color: var(--admin-text);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.theme-option:hover {
    background: var(--admin-primary);
    color: white;
    border-color: var(--admin-primary);
    transform: translateY(-2px);
}

/* Add Property Hero Section */
.add-property-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    padding: 3rem;
    margin-bottom: 2rem;
    color: white;
    position: relative;
    overflow: hidden;
}

.add-property-hero::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 50%, rgba(255,255,255,0.1) 1px, transparent 1px),
                radial-gradient(circle at 70% 20%, rgba(255,255,255,0.05) 2px, transparent 2px),
                radial-gradient(circle at 85% 80%, rgba(255,255,255,0.1) 1.5px, transparent 1.5px);
    background-size: 100px 100px, 150px 150px, 80px 80px;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-info {
    max-width: 600px;
}

.info-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.6rem 1.2rem;
    border-radius: 30px;
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.info-badge i {
    font-size: 1.1rem;
    color: #4fc3f7;
}

.hero-info p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.action-buttons .btn {
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    text-transform: none;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Vazirmatn', Arial, sans-serif;
    font-size: 0.95rem;
}

.action-buttons .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.2);
}

.plus-button-container {
    position: absolute;
    top: 2rem;
    left: 2rem;
    z-index: 3;
}

.plus-button {
    background: #4fc3f7;
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(79, 195, 247, 0.3);
    transition: all 0.3s ease;
    font-family: 'Vazirmatn', Arial, sans-serif;
    white-space: nowrap;
}

.plus-button:hover {
    background: #29b6f6;
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(79, 195, 247, 0.4);
}

/* Responsive adjustments for add-property */

/* مودال تبلیغات نردبانی */
.payment-section {
    background: var(--admin-card-bg);
    border: 1px solid var(--admin-border);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1rem 0;
}

.payment-section p {
    color: var(--admin-text-muted);
    margin-bottom: 1rem;
    font-style: italic;
}



.theme-option:hover,
.theme-option.selected {
    background: var(--admin-primary);
    color: white;
    border-color: var(--admin-primary);
    transform: translateY(-2px);
}

.theme-option i {
    font-size: 1.2rem;
}



/* Property Management Form Styles */
.form-container {
    display: none;
    margin-top: 20px;
    padding: 20px;
    background: var(--admin-card-bg);
    border: 1px solid var(--admin-border);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.form-container.active {
    display: block;
    animation: fadeIn 0.3s ease;
}


.form-container h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: var(--admin-primary);
    font-size: 1.3rem;
}



.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--admin-border);
    border-radius: 8px;
    font-size: 0.95rem;
    background: var(--admin-card-bg);
    color: var(--admin-text);
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--admin-primary);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}


#propertiesTable {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: var(--admin-card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

#propertiesTable th,
#propertiesTable td {
    padding: 12px 15px;
    text-align: right;
    border-bottom: 1px solid var(--admin-border);
}

#propertiesTable th {
    background: var(--admin-primary);
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
}

#propertiesTable tr:hover {
    background: rgba(124, 58, 237, 0.05);
}

#propertiesTable td button {
    margin-left: 5px;
}

/* Properties Management - Modal and Table Styles (moved from inline) */
.card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 10px;
    margin-top: 12px;
}

.card-body {
    padding: 16px;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    border-bottom: 1px solid #f0f0f0;
    padding: 10px;
    white-space: nowrap;
}

.table th {
    text-align: right;
    background: #fafafa;
}






.close {
    background: transparent;
    border: none;
    font-size: 24px;
    cursor: pointer;
}

.grid {
    display: grid;
    gap: 12px;
}

.grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}


.badge {
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 12px;
}

.badge-pending {
    background: #fff7ed;
    border: 1px solid #fdba74;
    color: #c2410c;
}

.badge-approved {
    background: #ecfdf5;
    border: 1px solid #86efac;
    color: #166534;
}

.badge-rejected {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

[data-theme="dark"] .card {
    background: var(--admin-card-bg);
    border-color: var(--admin-border);
    box-shadow: var(--card-shadow);
    backdrop-filter: blur(10px);
}

[data-theme="dark"] .table th {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.2) 0%, rgba(91, 33, 182, 0.2) 100%);
    color: var(--admin-text);
    border-color: var(--admin-border);
}

[data-theme="dark"] .table th,
[data-theme="dark"] .table td {
    border-color: var(--admin-border);
    color: var(--admin-text);
}

[data-theme="dark"] .table tbody tr {
    background: rgba(91, 33, 182, 0.05);
}

[data-theme="dark"] .table tbody tr:hover {
    background: rgba(124, 58, 237, 0.15);
}



/* Dark Mode: دکمه‌ها */
[data-theme="dark"] .btn {
    background: var(--button-bg);
    color: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(167, 139, 250, 0.3);
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.2);
    backdrop-filter: blur(10px);
}

[data-theme="dark"] .btn:hover {
    background: var(--button-hover);
    box-shadow: 0 6px 25px rgba(167, 139, 250, 0.4);
    border-color: rgba(196, 181, 253, 0.5);
    transform: translateY(-2px);
}

[data-theme="dark"] .btn-primary {
    background: linear-gradient(135deg, #7c3aed 0%, #5b21b6 100%);
    color: white;
}

[data-theme="dark"] .btn-primary:hover {
    background: linear-gradient(135deg, #a78bfa 0%, #7c3aed 100%);
    box-shadow: 0 8px 30px rgba(167, 139, 250, 0.5);
}

[data-theme="dark"] .btn-secondary {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.3) 0%, rgba(91, 33, 182, 0.3) 100%);
    color: rgba(255, 255, 255, 0.9);
}

[data-theme="dark"] .btn-success {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.8) 0%, rgba(22, 163, 74, 0.8) 100%);
    color: white;
}

[data-theme="dark"] .btn-danger {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.8) 0%, rgba(220, 38, 38, 0.8) 100%);
    color: white;
}

[data-theme="dark"] .btn-warning {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.8) 0%, rgba(245, 158, 11, 0.8) 100%);
    color: rgba(15, 1, 21, 0.95);
}

[data-theme="dark"] .btn-info {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.8) 0%, rgba(37, 99, 235, 0.8) 100%);
    color: white;
}

/* Dark Mode: متن‌های ترجمه شده */
[data-theme="dark"] [data-i18n],
[data-theme="dark"] span[data-i18n],
[data-theme="dark"] h2[data-i18n],
[data-theme="dark"] h3[data-i18n],
[data-theme="dark"] h4[data-i18n] {
    color: var(--admin-primary-light) !important;
    text-shadow: 0 0 20px rgba(167, 139, 250, 0.3);
}

[data-theme="dark"] .section-header h2 [data-i18n] {
    color: var(--admin-primary-light) !important;
}

[data-theme="dark"] .modal-header h3 [data-i18n] {
    color: var(--admin-primary-light) !important;
}

[data-theme="dark"] label [data-i18n],
[data-theme="dark"] button [data-i18n],
[data-theme="dark"] .btn [data-i18n] {
    color: inherit !important;
    text-shadow: none !important;
}

/* Light Mode: متن‌های ترجمه شده */
[data-i18n],
span[data-i18n],
h2 [data-i18n],
h3 [data-i18n],
h4 [data-i18n] {
    color: #7c3aed !important;
    font-weight: 600;
}

.section-header h2 [data-i18n] {
    color: #7c3aed !important;
}

label [data-i18n],
button [data-i18n],
.btn [data-i18n] {
    color: inherit !important;
}

/* Dark Mode: آیکون‌ها */
[data-theme="dark"] i,
[data-theme="dark"] .fas,
[data-theme="dark"] .far,
[data-theme="dark"] .fab {
    color: var(--icon-color);
}

[data-theme="dark"] .admin-logo i,
[data-theme="dark"] .nav-link i {
    color: rgba(196, 181, 253, 0.9);
}

/* Dark Mode: Sidebar */
[data-theme="dark"] .admin-sidebar {
    background: var(--admin-sidebar-bg);
    border-right: 1px solid var(--admin-border);
    box-shadow: 4px 0 20px rgba(139, 92, 246, 0.15);
}

[data-theme="dark"] .nav-link {
    color: rgba(230, 220, 255, 0.8);
}

[data-theme="dark"] .nav-link:hover {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.2) 0%, rgba(91, 33, 182, 0.2) 100%);
    color: rgba(255, 255, 255, 0.95);
}

[data-theme="dark"] .nav-link.active {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.4) 0%, rgba(91, 33, 182, 0.4) 100%);
    color: white;
    border-right: 3px solid #a78bfa;
}

[data-theme="dark"] .nav-section-title {
    color: rgba(196, 181, 253, 0.7);
    border-bottom: 1px solid var(--admin-border);
}

/* Dark Mode: کارت‌های آمار */
[data-theme="dark"] .stat-card {
    background: var(--admin-card-bg);
    border: 1px solid var(--admin-border);
    box-shadow: var(--card-shadow);
    backdrop-filter: blur(10px);
}

[data-theme="dark"] .stat-card:hover {
    box-shadow: 0 12px 40px rgba(167, 139, 250, 0.35);
    border-color: rgba(167, 139, 250, 0.4);
}

[data-theme="dark"] .stat-number {
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 2px 10px rgba(167, 139, 250, 0.3);
}

[data-theme="dark"] .stat-icon {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.3) 0%, rgba(91, 33, 182, 0.3) 100%);
    color: rgba(196, 181, 253, 0.95);
}

/* Dark Mode: فرم‌ها و Input */
[data-theme="dark"] .form-control,
[data-theme="dark"] .form-input,
[data-theme="dark"] input,
[data-theme="dark"] textarea,
[data-theme="dark"] select {
    background: rgba(91, 33, 182, 0.1);
    border: 1px solid var(--admin-border);
    color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
}

[data-theme="dark"] .form-control:focus,
[data-theme="dark"] .form-input:focus,
[data-theme="dark"] input:focus,
[data-theme="dark"] textarea:focus,
[data-theme="dark"] select:focus {
    border-color: rgba(167, 139, 250, 0.5);
    box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.1);
    background: rgba(124, 58, 237, 0.15);
}

[data-theme="dark"] ::placeholder {
    color: rgba(196, 181, 253, 0.4);
}

/* Dark Mode: لیبل‌ها */
[data-theme="dark"] label {
    color: rgba(230, 220, 255, 0.85);
}

/* Dark Mode: Badge ها */
[data-theme="dark"] .badge {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.3) 0%, rgba(91, 33, 182, 0.3) 100%);
    color: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(167, 139, 250, 0.3);
    backdrop-filter: blur(10px);
}

[data-theme="dark"] .badge-success {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.3) 0%, rgba(22, 163, 74, 0.3) 100%);
    color: rgba(220, 252, 231, 0.95);
    border-color: rgba(134, 239, 172, 0.3);
}

[data-theme="dark"] .badge-warning {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.3) 0%, rgba(245, 158, 11, 0.3) 100%);
    color: rgba(254, 249, 195, 0.95);
    border-color: rgba(252, 211, 77, 0.3);
}

[data-theme="dark"] .badge-danger {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.3) 0%, rgba(220, 38, 38, 0.3) 100%);
    color: rgba(254, 226, 226, 0.95);
    border-color: rgba(252, 165, 165, 0.3);
}

[data-theme="dark"] .badge-info {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.3) 0%, rgba(37, 99, 235, 0.3) 100%);
    color: rgba(219, 234, 254, 0.95);
    border-color: rgba(147, 197, 253, 0.3);
}

/* Dark Mode: Header */
[data-theme="dark"] .admin-header {
    background: var(--admin-header-bg);
    box-shadow: 0 4px 25px rgba(139, 92, 246, 0.4);
}

[data-theme="dark"] .section-header h2,
[data-theme="dark"] .section-header h3 {
    color: rgba(255, 255, 255, 0.95);
}

/* Dark Mode: Dropdown Menu */
[data-theme="dark"] .dropdown-menu {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 15px 50px rgba(139, 92, 246, 0.4);
}

[data-theme="dark"] .dropdown-menu a {
    color: #ffffff;
}

[data-theme="dark"] .dropdown-menu a:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

/* Dark Mode: تم تاگل */
[data-theme="dark"] .theme-toggle {
    background: linear-gradient(135deg, rgba(167, 139, 250, 0.2) 0%, rgba(124, 58, 237, 0.2) 100%);
    border: 1px solid rgba(167, 139, 250, 0.3);
    color: rgba(255, 255, 255, 0.95);
}

[data-theme="dark"] .theme-toggle:hover {
    background: linear-gradient(135deg, rgba(196, 181, 253, 0.3) 0%, rgba(167, 139, 250, 0.3) 100%);
    box-shadow: 0 4px 20px rgba(167, 139, 250, 0.4);
}

/* Dark Mode: انیمیشن‌ها */
[data-theme="dark"] * {
    scrollbar-color: rgba(167, 139, 250, 0.5) rgba(29, 10, 46, 0.3);
}

[data-theme="dark"] ::-webkit-scrollbar-track {
    background: rgba(29, 10, 46, 0.3);
}

[data-theme="dark"] ::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.6) 0%, rgba(91, 33, 182, 0.6) 100%);
    border-radius: 10px;
}

[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, rgba(167, 139, 250, 0.8) 0%, rgba(124, 58, 237, 0.8) 100%);
}

/* ======================
   Agency Management Modal Styles
   ====================== */

.modal-section {
    margin-bottom: 30px;
    padding: 20px;
    background: var(--admin-card-bg);
    border-radius: 12px;
    border: 1px solid var(--admin-border);
}

.modal-section h4 {
    margin: 0 0 15px 0;
    color: var(--admin-primary);
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-box {
    position: relative;
    margin-bottom: 20px;
}

.search-box input {
    width: 100%;
    padding: 12px 40px 12px 12px;
    border: 1px solid var(--admin-border);
    border-radius: 8px;
    font-size: 0.95rem;
    background: var(--admin-card-bg);
    color: var(--admin-text);
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: var(--admin-primary);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.search-box i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--admin-text-muted);
    pointer-events: none;
}

/* Lists */
.assigned-list,
.available-list {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid var(--admin-border);
    border-radius: 8px;
    background: var(--admin-card-bg);
}

.assigned-list:empty::before,
.available-list:empty::before {
    content: 'موردی یافت نشد';
    display: block;
    text-align: center;
    padding: 40px 20px;
    color: var(--admin-text-muted);
    font-style: italic;
}

/* List Items */
.broker-item,
.property-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    border-bottom: 1px solid var(--admin-border);
    transition: background-color 0.2s ease;
}

.broker-item:last-child,
.property-item:last-child {
    border-bottom: none;
}

.broker-item:hover,
.property-item:hover {
    background: rgba(124, 58, 237, 0.05);
}

.broker-info,
.property-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.broker-name,
.property-title {
    font-weight: 600;
    color: var(--admin-text);
    font-size: 0.95rem;
}

.broker-email,
.broker-phone,
.property-details {
    font-size: 0.85rem;
    color: var(--admin-text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}



/* Action Buttons */
.broker-actions,
.property-actions {
    display: flex;
    gap: 8px;
}

.btn-assign,
.btn-remove {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-assign {
    background: linear-gradient(135deg, var(--admin-primary) 0%, var(--admin-primary-dark) 100%);
    color: white;
}

.btn-assign:hover {
    background: linear-gradient(135deg, var(--admin-primary-light) 0%, var(--admin-primary) 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}


.btn-remove:hover {
    background: linear-gradient(135deg, #f87171 0%, #ef4444 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.btn-assign:disabled,
.btn-remove:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Badge Styles */

.badge-success {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
}

.badge-warning {
    background: rgba(251, 146, 60, 0.1);
    color: #ea580c;
}

.badge-info {
    background: rgba(59, 130, 246, 0.1);
    color: #2563eb;
}

/* Agency Card Action Buttons Enhancement */
.agency-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.view-agency-btn {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
}

.view-agency-btn:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.view-agency-btn i {
    font-size: 1rem;
}

.manage-brokers-btn,
.manage-properties-btn {
    background: linear-gradient(135deg, var(--admin-primary) 0%, var(--admin-primary-dark) 100%);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
}

.manage-brokers-btn:hover,
.manage-properties-btn:hover {
    background: linear-gradient(135deg, var(--admin-primary-light) 0%, var(--admin-primary) 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

.manage-brokers-btn i,
.manage-properties-btn i {
    font-size: 1rem;
}

/* Dark Mode Adjustments */
[data-theme="dark"] .modal-section {
    background: rgba(91, 33, 182, 0.1);
    border-color: rgba(139, 92, 246, 0.2);
}

[data-theme="dark"] .search-box input,
[data-theme="dark"] .assigned-list,
[data-theme="dark"] .available-list {
    background: rgba(29, 10, 46, 0.6);
    border-color: rgba(139, 92, 246, 0.2);
    color: rgba(255, 255, 255, 0.95);
}

[data-theme="dark"] .broker-item:hover,
[data-theme="dark"] .property-item:hover {
    background: rgba(124, 58, 237, 0.15);
}

[data-theme="dark"] .broker-name,
[data-theme="dark"] .property-title {
    color: rgba(255, 255, 255, 0.95);
}

[data-theme="dark"] .broker-email,
[data-theme="dark"] .broker-phone,
[data-theme="dark"] .property-details {
    color: rgba(230, 220, 255, 0.7);
}

/* Auto Translation Indicator */
.translation-indicator {
    margin-top: 0.75rem;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.03) 100%);
    border: 1px solid rgba(102, 126, 234, 0.2);
    border-radius: 8px;
    animation: slideIn 0.3s ease-out;
}

.translation-indicator.loading {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--admin-primary);
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
}

.translation-indicator.loading i {
    font-size: 1rem;
}

.translation-preview {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.translation-preview > i {
    color: var(--admin-primary);
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.translation-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--admin-primary);
    margin-bottom: 0.5rem;
}

.translation-results {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.lang-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: white;
    border: 1px solid rgba(102, 126, 234, 0.15);
    border-radius: 6px;
    font-size: 0.85rem;
    color: var(--admin-text);
    transition: all 0.2s ease;
}

.lang-badge:hover {
    background: rgba(102, 126, 234, 0.05);
    border-color: rgba(102, 126, 234, 0.3);
    transform: translateX(-2px);
}

.lang-badge i {
    color: var(--admin-primary);
    font-size: 0.8rem;
}

[data-theme="dark"] .translation-indicator {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(91, 33, 182, 0.05) 100%);
    border-color: rgba(139, 92, 246, 0.25);
}

[data-theme="dark"] .lang-badge {
    background: rgba(91, 33, 182, 0.15);
    border-color: rgba(139, 92, 246, 0.2);
    color: rgba(255, 255, 255, 0.9);
}

[data-theme="dark"] .lang-badge:hover {
    background: rgba(139, 92, 246, 0.2);
    border-color: rgba(139, 92, 246, 0.35);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Translation hint for form fields */
.form-group.translatable {
    position: relative;
}

.form-group.translatable::after {
    content: '\f0ac';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    left: 1rem;
    top: 2.8rem;
    color: rgba(102, 126, 234, 0.3);
    font-size: 0.9rem;
    pointer-events: none;
}

.form-group.translatable input,
.form-group.translatable textarea {
    padding-left: 2.5rem;
}

/* Responsive for translation indicator */
@media (max-width: 768px) {
    .translation-results {
        gap: 0.4rem;
    }
    
    .lang-badge {
        font-size: 0.8rem;
        padding: 0.4rem 0.6rem;
    }
}

/* Loading State */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(124, 58, 237, 0.2);
    border-top-color: var(--admin-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive */




