/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: 10px 20px;
    font-size: 0.9375rem;
    font-weight: 500;
    font-family: inherit;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    text-decoration: none;
    line-height: 1.5;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-2);
}

.btn-secondary {
    background: var(--surface);
    color: var(--text);
    border-color: var(--border);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--border);
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover:not(:disabled) {
    background: color-mix(in srgb, var(--danger) 90%, black);
}

.btn-ghost {
    background: transparent;
    color: var(--text);
}

.btn-ghost:hover:not(:disabled) {
    background: var(--surface);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 12px 24px;
    font-size: 1rem;
}

/* Inputs */
.input-group {
    margin-bottom: var(--spacing-md);
}

.label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: var(--spacing-xs);
    color: var(--text);
}

.input,
.textarea,
.select {
    width: 100%;
    padding: 10px 14px;
    font-size: 0.9375rem;
    font-family: inherit;
    color: var(--text);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.input:focus,
.textarea:focus,
.select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(62, 143, 106, 0.1);
}

.input:disabled,
.textarea:disabled,
.select:disabled {
    background: var(--surface);
    cursor: not-allowed;
}

.textarea {
    resize: vertical;
    min-height: 100px;
}

.error-message {
    color: var(--danger);
    font-size: 0.875rem;
    margin-top: var(--spacing-xs);
    display: block;
}

/* Cards */
.card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-md);
    border-bottom: 1px solid var(--border);
}

.card-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0;
}

.card-body {
    margin-bottom: var(--spacing-md);
}

.card-footer {
    margin-top: var(--spacing-md);
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--border);
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

/* Badges & Chips */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 12px;
    background: var(--surface);
    color: var(--text);
}

.badge-primary {
    background: var(--primary);
    color: white;
}

.badge-success {
    background: var(--success);
    color: white;
}

.badge-warning {
    background: var(--warning);
    color: white;
}

.badge-danger {
    background: var(--danger);
    color: white;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: 6px 12px;
    font-size: 0.875rem;
    border-radius: 16px;
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
}

.chip-removable {
    padding-right: 6px;
}

.chip-remove {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--muted);
    transition: var(--transition);
}

.chip-remove:hover {
    background: var(--border);
    color: var(--text);
}

/* TopBar */
.topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--spacing-md);
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.topbar-logo {
    height: 40px;
    width: auto;
}

.topbar-center {
    display: none !important;
}

.topbar-search {
    display: none !important;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.topbar-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-md);
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: var(--transition);
}

.topbar-btn:hover {
    background: var(--surface);
}

.topbar-btn-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background: var(--danger);
    color: white;
    font-size: 0.625rem;
    font-weight: 600;
    padding: 2px 5px;
    border-radius: 8px;
    min-width: 16px;
    text-align: center;
}

[dir="rtl"] .topbar-btn-badge {
    right: auto;
    left: 4px;
}

.topbar-notification-btn {
    position: relative;
    text-decoration: none;
    color: var(--text);
}

.topbar-notification-btn .notification-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: var(--danger);
    color: white;
    font-size: 0.625rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
    border: 2px solid var(--bg);
}

[dir="rtl"] .topbar-notification-btn .notification-badge {
    right: auto;
    left: -2px;
}

/* Icon Button Styles */
.icon-btn {
    position: relative;
    background: transparent;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: var(--text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    transition: var(--transition);
    font-size: 1.125rem;
}

.icon-btn:hover {
    background: var(--surface);
    color: var(--primary);
}

.icon-btn:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.icon-btn i {
    font-size: 1.125rem;
}

/* Notification Badge Styles - Updated */

/* Notifications Popover */
.notif-popover {
    width: min(420px, calc(100vw - 24px));
    max-width: calc(100vw - 24px);
    max-height: 70vh;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: var(--shadow-lg);
    z-index: 99999;
    display: block;
    visibility: visible;
    opacity: 1;
}

.notif-popover.hidden {
    display: none !important;
    visibility: hidden;
    opacity: 0;
}

.notif-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
}

.notif-title {
    font-weight: 700;
    color: var(--text);
}

.notif-link {
    background: transparent;
    border: 0;
    color: var(--primary);
    cursor: pointer;
    font-weight: 600;
}

.notif-list {
    max-height: calc(70vh - 56px);
    overflow: auto;
}

.notif-item {
    width: 100%;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    text-align: left;
    padding: 12px 14px;
    border: 0;
    border-bottom: 1px solid var(--border);
    background: transparent;
    cursor: pointer;
}

.notif-item:hover {
    background: var(--surface);
}

.notif-item.is-unread .notif-item-title {
    color: var(--text);
}

.notif-item.is-read {
    opacity: 0.75;
}

.notif-item-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    color: var(--primary);
    margin-top: 2px;
}

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

.notif-item-title {
    font-weight: 700;
    color: var(--text);
    margin-bottom: 2px;
}

.notif-item-body {
    color: var(--muted);
    font-size: 13px;
    margin-top: 4px;
}

.notif-item-time {
    margin-top: 6px;
    font-size: 12px;
    color: var(--muted);
}

.notif-empty {
    padding: 18px 14px;
    color: var(--muted);
}

.notif-badge {
    position: absolute;
    transform: translate(10px, -10px);
    min-width: 18px;
    height: 18px;
    padding: 0 6px;
    border-radius: 999px;
    font-size: 12px;
    line-height: 18px;
    text-align: center;
    background: var(--success);
    color: white;
    font-weight: 800;
}

.notif-badge.hidden {
    display: none;
}

.topbar-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    object-fit: cover;
}

.topbar-menu {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    min-width: 200px;
    z-index: 1001;
    overflow: hidden;
}

[dir="rtl"] .dropdown-menu {
    right: auto;
    left: 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 16px;
    text-align: left;
    background: transparent;
    border: none;
    color: var(--text);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    text-decoration: none;
}

[dir="rtl"] .dropdown-item {
    text-align: right;
}

.dropdown-item svg {
    width: 18px;
    height: 18px;
    color: var(--muted);
    flex-shrink: 0;
    transition: color 0.2s ease;
}

.dropdown-item:hover {
    background: color-mix(in srgb, var(--primary) 8%, transparent);
    color: var(--primary);
}

.dropdown-item:hover svg {
    color: var(--primary);
}

.dropdown-item--danger {
    color: var(--danger);
}

.dropdown-item--danger:hover {
    background: color-mix(in srgb, var(--danger) 10%, transparent);
    color: var(--danger);
}

.dropdown-item--danger svg {
    color: var(--danger);
}

.dropdown-divider {
    height: 1px;
    background: var(--border);
    margin: 6px 0;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--sidebar-border);
    overflow-y: auto;
    z-index: 999;
    display: none;
    padding: 0;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

[data-theme="dark"] .sidebar {
    box-shadow: 2px 0 12px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"][dir="rtl"] .sidebar {
    box-shadow: -2px 0 12px rgba(0, 0, 0, 0.3);
}

[dir="rtl"] .sidebar {
    left: auto;
    right: 0;
    border-left: 1px solid var(--sidebar-border);
    border-right: none;
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.1);
}

@media (min-width: 768px) {
    .sidebar {
        display: flex;
        flex-direction: column;
    }
}

.sidebar-header {
    padding: var(--spacing-lg);
    border-bottom: 1px solid var(--sidebar-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--sidebar-surface);
    flex-shrink: 0;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.sidebar-header-actions {
    display: flex;
    gap: var(--spacing-xs);
    align-items: center;
}

.sidebar-theme-btn {
    background: var(--sidebar-surface);
    border: 1.5px solid var(--sidebar-border);
    border-radius: 10px;
    padding: 10px;
    cursor: pointer;
    color: var(--sidebar-text);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: inherit;
    width: 40px;
    height: 40px;
}

.sidebar-theme-btn:hover {
    background: color-mix(in srgb, var(--primary) 10%, var(--sidebar-surface));
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(62, 143, 106, 0.15);
}

.sidebar-logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.sidebar-logo {
    height: 40px;
    width: auto;
}

.sidebar-lang-btn {
    background: var(--sidebar-surface);
    border: 1.5px solid var(--sidebar-border);
    border-radius: 10px;
    padding: 10px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--sidebar-text);
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.sidebar-lang-btn:hover {
    background: color-mix(in srgb, var(--primary) 10%, var(--sidebar-surface));
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(62, 143, 106, 0.15);
}

.sidebar-auth {
    padding: var(--spacing-lg);
    border-bottom: 1px solid var(--border);
}

.sidebar-user {
    padding: var(--spacing-lg);
    border-bottom: 1px solid var(--sidebar-border);
    background: var(--sidebar-surface);
    flex-shrink: 0;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.sidebar-user-link {
    text-decoration: none;
    display: block;
    margin-bottom: var(--spacing-md);
}

.sidebar-user-info {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.sidebar-avatar-wrapper {
    position: relative;
    flex-shrink: 0;
}

.sidebar-avatar-img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
}

.sidebar-avatar-fallback {
    width: 48px;
    height: 48px;
    font-size: 1.125rem;
}

.sidebar-user-details {
    flex: 1;
    min-width: 0;
}

.sidebar-user-name {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--sidebar-text);
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-user-stats {
    font-size: 0.75rem;
    color: var(--sidebar-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.sidebar-user-rating {
    font-size: 0.75rem;
    color: var(--sidebar-text);
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 2px;
}

.sidebar-user-actions {
    display: flex;
    gap: var(--spacing-xs);
    justify-content: flex-end;
}

.sidebar-menu-wrapper {
    position: relative;
}

.sidebar-user-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-action-btn {
    background: var(--sidebar-surface);
    border: 1.5px solid var(--sidebar-border);
    border-radius: 10px;
    padding: 10px;
    cursor: pointer;
    color: var(--sidebar-text);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.2s ease;
    width: 40px;
    height: 40px;
}

.sidebar-action-btn:hover {
    background: color-mix(in srgb, var(--primary) 10%, var(--sidebar-surface));
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(62, 143, 106, 0.15);
}

.sidebar-action-btn:active {
    transform: translateY(0);
}

.sidebar-action-btn--notifications {
    position: relative;
}

.sidebar-action-btn--menu {
    position: relative;
}

.sidebar-action-btn svg {
    width: 18px;
    height: 18px;
    transition: transform 0.2s ease;
}

.sidebar-action-btn:hover svg {
    transform: scale(1.1);
}

.sidebar-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: linear-gradient(135deg, var(--danger), #dc2626);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 6px;
    border-radius: 10px;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(220, 38, 38, 0.4);
    border: 2px solid var(--sidebar-bg);
    line-height: 1;
}

.sidebar-badge--notifications {
    animation: pulse-badge 2s infinite;
}

@keyframes pulse-badge {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.sidebar-alert {
    margin: var(--spacing-md);
    padding: var(--spacing-md);
    background: var(--sidebar-surface);
    border: 1px solid var(--sidebar-border);
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    border-left: 3px solid var(--primary);
}

.sidebar-alert-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

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

.sidebar-alert-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--sidebar-text);
    margin-bottom: 2px;
}

.sidebar-alert-link {
    font-size: 0.75rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.sidebar-alert-link:hover {
    text-decoration: underline;
}

.sidebar-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: var(--bg);
    border: 1.5px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08);
    min-width: 240px;
    z-index: 1001;
    overflow: hidden;
    animation: dropdownFadeIn 0.2s ease;
}

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

.sidebar-dropdown--notifications {
    position: fixed;
    top: 70px;
    right: 24px;
    width: 420px;
    max-width: calc(100vw - 48px);
    max-height: calc(100vh - 140px);
    overflow: hidden;
    display: flex !important;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2), 0 8px 24px rgba(0, 0, 0, 0.15);
    border-radius: 20px;
    border: 1.5px solid var(--border);
    background: var(--bg);
    z-index: 9999;
    animation: notificationsSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.sidebar-dropdown--notifications.hidden {
    display: none !important;
}

@keyframes notificationsSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Mobile positioning for notifications */
@media (max-width: 768px) {
    .sidebar-dropdown--notifications {
        top: 80px;
        right: 16px;
        left: 16px;
        width: auto;
        max-width: none;
        max-height: calc(100vh - 120px);
        z-index: 10000;
    }
}

/* Tablet positioning */
@media (min-width: 769px) and (max-width: 1024px) {
    .sidebar-dropdown--notifications {
        right: 20px;
        width: 380px;
    }
    
    [dir="rtl"] .sidebar-dropdown--notifications {
        right: auto;
        left: calc(280px + 20px);
        max-width: calc(100vw - 280px - 40px);
    }
}

.sidebar-dropdown--profile {
    min-width: 200px;
}

[dir="rtl"] .sidebar-dropdown--profile {
    right: auto;
    left: 0;
    transform: translateX(0);
}

.dropdown-header {
    padding: 12px 16px;
    background: color-mix(in srgb, var(--primary) 5%, transparent);
    border-bottom: 1px solid var(--border);
}

.dropdown-header-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Notifications Dropdown Styles - Premium Enhanced */
.notifications-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 12%, transparent), color-mix(in srgb, var(--primary) 5%, transparent));
    position: sticky;
    top: 0;
    z-index: 10;
}

.notifications-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.notifications-title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.3px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.notifications-title::before {
    content: '';
    width: 4px;
    height: 16px;
    background: var(--primary);
    border-radius: 2px;
}

.notifications-mark-all {
    padding: 6px 12px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
    color: var(--text);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    white-space: nowrap;
}

.notifications-mark-all:hover {
    border-color: var(--primary);
    background: var(--primary);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(62, 143, 106, 0.2);
}

.notifications-body {
    max-height: calc(100vh - 280px);
    overflow-y: auto;
    min-height: 200px;
    background: var(--bg);
    padding: 4px 0;
}

.notifications-body::-webkit-scrollbar {
    width: 6px;
}

.notifications-body::-webkit-scrollbar-track {
    background: transparent;
}

.notifications-body::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

.notifications-body::-webkit-scrollbar-thumb:hover {
    background: var(--muted);
}

.notifications-empty {
    padding: 48px 24px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.notifications-empty-icon {
    color: var(--muted);
    opacity: 0.3;
    width: 44px;
    height: 44px;
}

.notifications-empty-text {
    margin: 0;
    font-size: 14px;
    color: var(--muted);
    font-weight: 500;
}

.notifications-list {
    display: flex;
    flex-direction: column;
}

.notification-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    background: var(--bg);
    margin: 0 8px;
    border-radius: 12px;
    margin-bottom: 4px;
}

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

.notification-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--primary);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.notification-item:hover {
    background: linear-gradient(90deg, color-mix(in srgb, var(--primary) 12%, transparent), color-mix(in srgb, var(--primary) 6%, transparent));
    padding-left: 28px;
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(62, 143, 106, 0.15);
}

.notification-item:hover::before {
    opacity: 1;
}

.notification-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: color-mix(in srgb, var(--primary) 15%, transparent);
    color: var(--primary);
    border: 1.5px solid color-mix(in srgb, var(--primary) 25%, transparent);
    transition: all 0.2s ease;
}

.notification-item:hover .notification-icon {
    transform: scale(1.05);
    border-color: var(--primary);
}

.notification-icon svg {
    width: 20px;
    height: 20px;
}

.notification-icon--offer {
    background: color-mix(in srgb, var(--primary) 15%, transparent);
    color: var(--primary);
    border-color: color-mix(in srgb, var(--primary) 25%, transparent);
}

.notification-icon--message {
    background: color-mix(in srgb, #6366f1 15%, transparent);
    color: #6366f1;
    border-color: color-mix(in srgb, #6366f1 25%, transparent);
}

.notification-icon--request {
    background: color-mix(in srgb, var(--warning) 15%, transparent);
    color: var(--warning);
    border-color: color-mix(in srgb, var(--warning) 25%, transparent);
}

.notification-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.notification-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.3;
    letter-spacing: -0.1px;
}

.notification-body {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.5;
}

.notification-time {
    font-size: 11px;
    color: var(--muted);
    font-weight: 500;
    margin-top: 2px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.notification-time::before {
    content: '•';
    font-size: 8px;
}

.notification-mark-read {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    border: none;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    opacity: 0;
    margin-top: 2px;
}

.notification-item:hover .notification-mark-read {
    opacity: 1;
}

.notification-mark-read:hover {
    background: color-mix(in srgb, var(--danger) 15%, transparent);
    color: var(--danger);
    transform: scale(1.1);
}

.notification-mark-read svg {
    width: 14px;
    height: 14px;
}

.notifications-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--bg) 95%, transparent));
    position: sticky;
    bottom: 0;
    z-index: 10;
}

.notifications-view-all {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    background: linear-gradient(135deg, var(--primary), color-mix(in srgb, var(--primary) 90%, var(--primary-2)));
    border: none;
    border-radius: 10px;
    color: white;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s ease;
    width: 100%;
    box-shadow: 0 2px 8px rgba(62, 143, 106, 0.2);
}

.notifications-view-all:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(62, 143, 106, 0.3);
}

.notifications-view-all:active {
    transform: translateY(0);
}

.notifications-view-all svg {
    transition: transform 0.2s ease;
    width: 16px;
    height: 16px;
}

.notifications-view-all:hover svg {
    transform: translateX(3px);
}

[data-theme="dark"] .sidebar-dropdown {
    background: var(--surface);
    border-color: var(--border);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .sidebar-dropdown--notifications {
    background: var(--bg);
}

[dir="rtl"] .sidebar-dropdown {
    right: auto;
    left: 0;
}

[dir="rtl"] .sidebar-dropdown--notifications {
    right: auto;
    left: calc(280px + 24px);
    max-width: calc(100vw - 280px - 48px);
}

@media (max-width: 768px) {
    [dir="rtl"] .sidebar-dropdown--notifications {
        right: 16px;
        left: 16px;
        max-width: calc(100vw - 32px);
    }
}

/* Notifications Backdrop Overlay */
.notifications-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9998;
    animation: backdropFadeIn 0.2s ease;
}

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

.sidebar-nav {
    list-style: none;
    padding: var(--spacing-md) 0;
    flex: 1;
    overflow-y: auto;
}

.sidebar-item {
    margin-bottom: var(--spacing-xs);
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: 10px var(--spacing-md);
    color: var(--sidebar-text);
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 0.9375rem;
    position: relative;
}

.sidebar-link:hover {
    background: var(--sidebar-hover);
    color: var(--sidebar-text);
    transform: translateX(2px);
}

[dir="rtl"] .sidebar-link:hover {
    transform: translateX(2px);
}

.sidebar-link.active {
    background: var(--sidebar-active);
    color: var(--primary);
    font-weight: 600;
}

.sidebar-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--primary);
    border-radius: 0 2px 2px 0;
}

.sidebar-link-badge {
    margin-left: auto;
    background: var(--primary);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
}

.sidebar-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: var(--sidebar-muted);
}

.sidebar-link.active .sidebar-icon {
    color: var(--primary);
}

/* BottomNav */
.bottomnav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: var(--bg);
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-around;
    z-index: 1000;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.05);
    margin-top: 0;
}

@media (min-width: 768px) {
    .bottomnav {
        display: none;
    }
}

.bottomnav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: var(--spacing-xs);
    color: var(--muted);
    text-decoration: none;
    font-size: 0.75rem;
    transition: var(--transition);
    position: relative;
    flex: 1;
}

.bottomnav-item:hover,
.bottomnav-item.active {
    color: var(--primary);
}

.bottomnav-icon {
    width: 24px;
    height: 24px;
}

.bottomnav-badge {
    position: absolute;
    top: 0;
    right: 20%;
    background: var(--danger);
    color: white;
    font-size: 0.625rem;
    padding: 2px 5px;
    border-radius: 8px;
    min-width: 16px;
    text-align: center;
}

[dir="rtl"] .bottomnav-badge {
    right: auto;
    left: 20%;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--overlay);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: var(--spacing-md);
    animation: fadeIn 150ms ease;
}

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

.modal {
    background: var(--bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 200ms ease;
}

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

.modal-header {
    padding: var(--spacing-lg);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.modal-close {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: var(--muted);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--surface);
    color: var(--text);
}

.modal-body {
    padding: var(--spacing-lg);
}

.modal-footer {
    padding: var(--spacing-lg);
    border-top: 1px solid var(--border);
    display: flex;
    gap: var(--spacing-sm);
    justify-content: flex-end;
}

[dir="rtl"] .modal-footer {
    justify-content: flex-start;
}

/* Success Modal - Modern Design */
.success-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: var(--spacing-md);
    animation: fadeIn 200ms ease;
}

.success-modal {
    background: var(--bg);
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.2);
    max-width: 420px;
    width: 100%;
    border: 1px solid var(--border);
    overflow: hidden;
    animation: modalSlideUp 300ms cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.success-modal-content {
    padding: var(--spacing-2xl);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-lg);
}

.success-modal-icon-wrapper {
    position: relative;
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--spacing-sm);
}

.success-modal-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #10b981, #059669);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    z-index: 2;
    position: relative;
    animation: iconScale 400ms cubic-bezier(0.34, 1.56, 0.64, 1) 100ms;
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.4);
}

.success-modal-icon svg {
    width: 36px;
    height: 36px;
    stroke-width: 3;
}

.success-modal-icon-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(5, 150, 105, 0.1));
    animation: pulse 1.5s ease-out infinite;
    z-index: 1;
}

@keyframes iconScale {
    from {
        transform: scale(0);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes pulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.6;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0.3;
    }
}

.success-modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    color: var(--text);
    letter-spacing: -0.5px;
}

.success-modal-message {
    font-size: 1rem;
    color: var(--muted);
    margin: 0;
    line-height: 1.6;
    max-width: 320px;
}

.success-modal-actions {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    width: 100%;
    margin-top: var(--spacing-sm);
}

.success-modal-btn {
    min-width: 140px;
    padding: 12px 32px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: white;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(62, 143, 106, 0.3);
}

.success-modal-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(62, 143, 106, 0.4);
}

.success-modal-btn:active {
    transform: translateY(0);
}

/* Error Modal - Similar styling */
.error-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: var(--spacing-md);
    animation: fadeIn 200ms ease;
}

.error-modal {
    background: var(--bg);
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.2);
    max-width: 420px;
    width: 100%;
    border: 1px solid var(--border);
    overflow: hidden;
    animation: modalSlideUp 300ms cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}

.error-modal-content {
    padding: var(--spacing-2xl);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-lg);
}

.error-modal-icon-wrapper {
    position: relative;
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--spacing-sm);
}

.error-modal-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    z-index: 2;
    position: relative;
    animation: iconScale 400ms cubic-bezier(0.34, 1.56, 0.64, 1) 100ms;
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.4);
}

.error-modal-icon svg {
    width: 36px;
    height: 36px;
    stroke-width: 3;
}

.error-modal-icon-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(220, 38, 38, 0.1));
    animation: pulse 1.5s ease-out infinite;
    z-index: 1;
}

.error-modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    color: var(--text);
    letter-spacing: -0.5px;
}

.error-modal-message {
    font-size: 1rem;
    color: var(--muted);
    margin: 0;
    line-height: 1.6;
    max-width: 320px;
}

.error-modal-actions {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    width: 100%;
    margin-top: var(--spacing-sm);
}

.error-modal-btn {
    min-width: 140px;
    padding: 12px 32px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 12px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.error-modal-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.4);
}

.error-modal-btn:active {
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
    .success-modal,
    .error-modal {
        max-width: 90%;
        margin: var(--spacing-md);
    }
    
    .success-modal-content,
    .error-modal-content {
        padding: var(--spacing-xl);
    }
    
    .success-modal-icon-wrapper,
    .error-modal-icon-wrapper {
        width: 80px;
        height: 80px;
    }
    
    .success-modal-icon,
    .error-modal-icon {
        width: 56px;
        height: 56px;
    }
    
    .success-modal-icon svg,
    .error-modal-icon svg {
        width: 32px;
        height: 32px;
    }
    
    .success-modal-title,
    .error-modal-title {
        font-size: 1.25rem;
    }
    
    .success-modal-message,
    .error-modal-message {
        font-size: 0.9375rem;
    }
}

/* Drawer */
.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--overlay);
    z-index: 2000;
    animation: fadeIn 150ms ease;
}

.drawer {
    position: fixed;
    top: 0;
    bottom: 0;
    right: 0;
    width: 400px;
    max-width: 90vw;
    background: var(--bg);
    box-shadow: var(--shadow-lg);
    z-index: 2001;
    display: flex;
    flex-direction: column;
    animation: slideInRight 250ms ease;
}

[dir="rtl"] .drawer {
    right: auto;
    left: 0;
    animation: slideInLeft 250ms ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

.drawer-header {
    padding: var(--spacing-lg);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.drawer-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: var(--spacing-lg);
}

.drawer-footer {
    padding: var(--spacing-lg);
    border-top: 1px solid var(--border);
}

/* Toast */
.toast-container {
    position: fixed;
    top: 80px;
    right: var(--spacing-md);
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    max-width: 400px;
}

[dir="rtl"] .toast-container {
    right: auto;
    left: var(--spacing-md);
}

.toast {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    animation: slideInRight 250ms ease;
    min-width: 300px;
}

[dir="rtl"] .toast {
    animation: slideInLeft 250ms ease;
}

.toast-success {
    border-left: 3px solid var(--success);
}

[dir="rtl"] .toast-success {
    border-left: none;
    border-right: 3px solid var(--success);
}

.toast-error {
    border-left: 3px solid var(--danger);
}

[dir="rtl"] .toast-error {
    border-left: none;
    border-right: 3px solid var(--danger);
}

.toast-info {
    border-left: 3px solid var(--primary);
}

[dir="rtl"] .toast-info {
    border-left: none;
    border-right: 3px solid var(--primary);
}

.toast-message {
    flex: 1;
    font-size: 0.9375rem;
}

.toast-close {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: var(--muted);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: var(--spacing-2xl) var(--spacing-lg);
    color: var(--muted);
}

.empty-state-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto var(--spacing-md);
    opacity: 0.5;
}

.empty-state-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
    color: var(--text);
}

.empty-state-text {
    font-size: 0.9375rem;
    margin-bottom: var(--spacing-lg);
}

/* Tables */
.table-container {
    overflow-x: auto;
    background: var(--bg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

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

.table th,
.table td {
    padding: 12px var(--spacing-md);
    text-align: left;
    border-bottom: 1px solid var(--border);
}

[dir="rtl"] .table th,
[dir="rtl"] .table td {
    text-align: right;
}

.table th {
    background: var(--surface);
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table tr:hover {
    background: var(--surface);
}

.table tr:last-child td {
    border-bottom: none;
}

/* Lists */
.list {
    list-style: none;
    padding: 0;
}

.list-item {
    padding: var(--spacing-md);
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
}

.list-item:hover {
    background: var(--surface);
}

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

/* Grid */
.grid {
    display: grid;
    gap: var(--spacing-md);
}

.grid-2 {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--surface);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--primary);
    transition: width 300ms ease;
}

.progress-text {
    font-size: 0.875rem;
    color: var(--muted);
    margin-top: var(--spacing-xs);
}

/* Tabs */
.tabs {
    display: flex;
    gap: var(--spacing-sm);
    border-bottom: 1px solid var(--border);
    margin-bottom: var(--spacing-lg);
    overflow-x: auto;
}

.tab {
    padding: var(--spacing-sm) var(--spacing-md);
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--muted);
    cursor: pointer;
    font-size: 0.9375rem;
    font-family: inherit;
    white-space: nowrap;
    transition: var(--transition);
}

.tab:hover {
    color: var(--text);
}

.tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* Avatar */
.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    flex-shrink: 0;
}

.avatar-sm {
    width: 32px;
    height: 32px;
    font-size: 0.875rem;
}

.avatar-lg {
    width: 64px;
    height: 64px;
    font-size: 1.5rem;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

/* Rating */
.rating {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.rating-stars {
    display: inline-flex;
    gap: 2px;
    color: var(--warning);
}

.rating-value {
    font-weight: 500;
    color: var(--text);
}

.rating-count {
    font-size: 0.875rem;
    color: var(--muted);
}

/* Status Timeline */
.timeline {
    position: relative;
    padding-left: var(--spacing-lg);
}

[dir="rtl"] .timeline {
    padding-left: 0;
    padding-right: var(--spacing-lg);
}

.timeline::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border);
}

[dir="rtl"] .timeline::before {
    left: auto;
    right: 8px;
}

.timeline-item {
    position: relative;
    padding-bottom: var(--spacing-lg);
}

.timeline-dot {
    position: absolute;
    left: 0;
    top: 4px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--border);
    border: 3px solid var(--bg);
}

[dir="rtl"] .timeline-dot {
    left: auto;
    right: 0;
}

.timeline-dot.active {
    background: var(--primary);
}

.timeline-content {
    padding-left: var(--spacing-lg);
}

[dir="rtl"] .timeline-content {
    padding-left: 0;
    padding-right: var(--spacing-lg);
}

/* Chat */
.chat-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 200px);
    min-height: 400px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: var(--spacing-lg);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.chat-message {
    display: flex;
    gap: var(--spacing-sm);
    max-width: 70%;
}

.chat-message.sent {
    align-self: flex-end;
    flex-direction: row-reverse;
}

[dir="rtl"] .chat-message.sent {
    align-self: flex-start;
}

.chat-message-bubble {
    padding: 10px 14px;
    border-radius: var(--radius-md);
    background: var(--surface);
}

.chat-message.sent .chat-message-bubble {
    background: var(--primary);
    color: white;
}

.chat-message-time {
    font-size: 0.75rem;
    color: var(--muted);
    margin-top: var(--spacing-xs);
}

.chat-input-container {
    padding: var(--spacing-md);
    border-top: 1px solid var(--border);
    display: flex;
    gap: var(--spacing-sm);
}

.chat-input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-family: inherit;
}

/* Filters */
.filters {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
    padding: var(--spacing-md);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
    min-width: 150px;
}

/* Responsive */
@media (max-width: 767px) {
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    .modal {
        max-width: 100%;
        margin: var(--spacing-md);
    }

    .drawer {
        width: 100%;
        max-width: 100%;
    }

    .topbar-center {
        display: none;
    }
}

