/*
 * Weeba.me - Talent Marketplace Platform
 * Main CSS File
 * Colors extracted from design reference
 */

/* ============================================
   CSS VARIABLES
   ============================================ */
:root {
    /* Primary Colors - Gold/Amber Gradient */
    --primary: #f59e0b;
    --primary-dark: #ea580c;
    --primary-light: #fbbf24;
    --primary-gradient: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%);

    /* Background Colors - Dark Blue/Indigo */
    --bg-dark: #0f172a;
    --bg-dark-secondary: #1e1b4b;
    --bg-gradient: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #0f172a 100%);
    --bg-card: rgba(255, 255, 255, 0.05);
    --bg-card-hover: rgba(255, 255, 255, 0.1);

    /* Accent Colors */
    --accent-purple: #8b5cf6;
    --accent-pink: #ec4899;
    --accent-emerald: #10b981;
    --accent-teal: #14b8a6;
    --accent-blue: #3b82f6;
    --accent-red: #ef4444;
    --accent-yellow: #eab308;

    /* Text Colors */
    --text-white: #ffffff;
    --text-light: rgba(255, 255, 255, 0.9);
    --text-muted: rgba(255, 255, 255, 0.7);
    --text-subtle: rgba(255, 255, 255, 0.5);
    --text-faint: rgba(255, 255, 255, 0.3);

    /* Border Colors */
    --border-light: rgba(255, 255, 255, 0.1);
    --border-medium: rgba(255, 255, 255, 0.2);
    --border-primary: rgba(245, 158, 11, 0.3);

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.4);
    --shadow-primary: 0 4px 14px rgba(245, 158, 11, 0.3);

    /* Spacing */
    --sidebar-width: 260px;
    --topbar-height: 70px;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;

    /* Border Radius */
    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-2xl: 2rem;
    --radius-full: 9999px;
}

/* RTL-specific variables */
[dir="rtl"] {
    --arrow-start: "\2192"; /* → */
    --arrow-end: "\2190"; /* ← */
}

[dir="ltr"] {
    --arrow-start: "\2190"; /* ← */
    --arrow-end: "\2192"; /* → */
}

/* ============================================
   BASE STYLES
   ============================================ */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Tajawal', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-gradient);
    color: var(--text-light);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

[dir="ltr"] body {
    font-family: 'Inter', 'Tajawal', -apple-system, BlinkMacSystemFont, sans-serif;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-light);
}

::selection {
    background: var(--primary);
    color: var(--text-white);
}

/* ============================================
   LOGO STYLES
   ============================================ */
.logo-icon {
    width: 48px;
    height: 48px;
    background: var(--primary-gradient);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-primary);
}

.logo-icon span {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-white);
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #fde68a 0%, #f59e0b 50%, #ea580c 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================
   BUTTON STYLES
   ============================================ */
.btn-primary {
    background: var(--primary-gradient);
    border: none;
    color: var(--text-white);
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-lg);
    transition: all var(--transition-normal);
}

.btn-primary:hover {
    box-shadow: var(--shadow-primary);
    transform: translateY(-2px);
    color: var(--text-white);
}

.btn-secondary {
    background: var(--bg-card);
    border: 1px solid var(--border-medium);
    color: var(--text-light);
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-lg);
    backdrop-filter: blur(10px);
    transition: all var(--transition-normal);
}

.btn-secondary:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-primary);
    color: var(--text-white);
}

.btn-outline-primary {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline-primary:hover {
    background: var(--primary-gradient);
    border-color: transparent;
    color: var(--text-white);
}

/* ============================================
   FORM STYLES
   ============================================ */
.form-control,
.form-select {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    color: var(--text-white);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-lg);
    transition: all var(--transition-fast);
}

.form-control::placeholder {
    color: var(--text-faint);
}

.form-control:focus,
.form-select:focus {
    background: var(--bg-card);
    border-color: var(--primary);
    color: var(--text-white);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}

.form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23f59e0b' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
}

.form-label {
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

/* ============================================
   CARD STYLES
   ============================================ */
.card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    transition: all var(--transition-normal);
}

.card:hover {
    border-color: var(--border-primary);
}

.card-header {
    background: transparent;
    border-bottom: 1px solid var(--border-light);
    padding: 1.25rem 1.5rem;
}

.card-body {
    padding: 1.5rem;
}

/* ============================================
   HEADER / NAVBAR
   ============================================ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-light);
}

.site-header .navbar {
    padding: 1rem 0;
}

.site-header .navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.site-header .nav-link {
    color: var(--text-muted);
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: color var(--transition-fast);
}

.site-header .nav-link:hover,
.site-header .nav-link.active {
    color: var(--text-white);
}

.site-header .nav-btn {
    margin-inline-start: 0.5rem;
}

.site-header .navbar-toggler {
    border-color: var(--border-medium);
    padding: 0.5rem 0.75rem;
}

.site-header .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.7%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.user-avatar-sm {
    width: 32px;
    height: 32px;
    background: var(--primary-gradient);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-white);
    font-weight: 600;
    font-size: 0.875rem;
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
    background: rgba(15, 23, 42, 0.9);
    border-top: 1px solid var(--border-light);
    padding: 4rem 0 2rem;
    margin-top: auto;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.footer-about {
    color: var(--text-subtle);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.footer-title {
    color: var(--text-white);
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--text-subtle);
    transition: all var(--transition-fast);
}

.footer-links a:hover {
    color: var(--primary);
    padding-inline-start: 0.5rem;
}

.footer-contact {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-contact li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    color: var(--text-subtle);
}

.footer-contact i {
    color: var(--primary);
    width: 20px;
}

.footer-contact a {
    color: var(--text-subtle);
}

.social-links {
    display: flex;
    gap: 0.75rem;
}

.social-link {
    width: 40px;
    height: 40px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: all var(--transition-normal);
}

.social-link:hover {
    background: var(--primary-gradient);
    border-color: transparent;
    color: var(--text-white);
    transform: translateY(-3px);
}

.footer-divider {
    border-color: var(--border-light);
    margin: 2rem 0;
}

.footer-bottom {
    color: var(--text-subtle);
    font-size: 0.875rem;
}

.legal-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 1.5rem;
    justify-content: flex-end;
}

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

.legal-links a {
    color: var(--text-subtle);
}

.legal-links a:hover {
    color: var(--primary);
}

/* ============================================
   AUTH PAGES
   ============================================ */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.auth-wrapper {
    width: 100%;
    max-width: 480px;
    position: relative;
}

.auth-lang-switch {
    position: absolute;
    top: -60px;
    inset-inline-end: 0;
}

.lang-link {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.lang-link:hover {
    color: var(--text-white);
}

.auth-container {
    text-align: center;
}

.auth-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.auth-logo .logo-icon {
    width: 64px;
    height: 64px;
}

.auth-logo .logo-icon span {
    font-size: 2rem;
}

.auth-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-2xl);
    padding: 2rem;
    text-align: start;
}

.auth-card h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 0.5rem;
}

.auth-card .subtitle {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.auth-footer {
    margin-top: 1.5rem;
}

.back-link {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.back-link:hover {
    color: var(--text-white);
}

/* ============================================
   DASHBOARD LAYOUT
   ============================================ */
.dashboard-page {
    background: var(--bg-gradient);
}

.dashboard-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.dashboard-sidebar {
    width: var(--sidebar-width);
    background: rgba(15, 23, 42, 0.95);
    border-inline-end: 1px solid var(--border-light);
    position: fixed;
    top: 0;
    bottom: 0;
    inset-inline-start: 0;
    display: flex;
    flex-direction: column;
    z-index: 1050;
    transition: transform var(--transition-normal);
}

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

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

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

.sidebar-logo .logo-icon span {
    font-size: 1.25rem;
}

.sidebar-logo .logo-text {
    font-size: 1.25rem;
}

.sidebar-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.25rem;
    padding: 0.5rem;
    cursor: pointer;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 0;
}

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

.nav-section {
    padding: 1rem 1.5rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-subtle);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.nav-item {
    margin: 0.25rem 0.75rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-muted);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.nav-link i {
    width: 20px;
    text-align: center;
}

.nav-link:hover {
    background: var(--bg-card-hover);
    color: var(--text-white);
}

.nav-link.active {
    background: rgba(245, 158, 11, 0.15);
    color: var(--primary);
    border-inline-end: 3px solid var(--primary);
}

.nav-link .badge {
    margin-inline-start: auto;
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
}

.sidebar-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-light);
}

.upgrade-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem;
    background: var(--primary-gradient);
    color: var(--text-white);
    border-radius: var(--radius-md);
    font-weight: 600;
    margin-bottom: 0.75rem;
    transition: all var(--transition-normal);
}

.upgrade-btn:hover {
    box-shadow: var(--shadow-primary);
    color: var(--text-white);
}

.logout-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--accent-red);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.logout-link:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--accent-red);
}

/* Dashboard Main */
.dashboard-main {
    flex: 1;
    margin-inline-start: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Topbar */
.dashboard-topbar {
    height: var(--topbar-height);
    background: rgba(15, 23, 42, 0.95);
    border-bottom: 1px solid var(--border-light);
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(20px);
}

.topbar-start {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.topbar-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-white);
    margin: 0;
}

.sidebar-toggle {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.25rem;
    padding: 0.5rem;
    cursor: pointer;
}

.topbar-end {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.topbar-search {
    position: relative;
    margin-inline-end: 1rem;
}

.search-input-wrapper {
    position: relative;
}

.search-input-wrapper i {
    position: absolute;
    top: 50%;
    inset-inline-start: 1rem;
    transform: translateY(-50%);
    color: var(--text-subtle);
}

.search-input-wrapper .form-control {
    padding-inline-start: 2.75rem;
    width: 280px;
    background: var(--bg-card);
}

.topbar-btn {
    width: 40px;
    height: 40px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-full);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all var(--transition-fast);
}

.topbar-btn:hover {
    background: var(--bg-card-hover);
    color: var(--text-white);
}

.topbar-btn::after {
    display: none;
}

.notification-badge {
    position: absolute;
    top: -2px;
    inset-inline-end: -2px;
    min-width: 18px;
    height: 18px;
    background: var(--accent-red);
    color: var(--text-white);
    font-size: 0.65rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: none;
    border: none;
    padding: 0.25rem;
    padding-inline-end: 0.5rem;
    color: var(--text-light);
}

.topbar-user::after {
    display: none;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: var(--primary-gradient);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-white);
    font-weight: 600;
    overflow: hidden;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-info {
    text-align: start;
}

.user-name {
    display: block;
    font-weight: 600;
    color: var(--text-white);
    font-size: 0.875rem;
}

.user-role {
    display: block;
    font-size: 0.75rem;
    color: var(--text-subtle);
}

/* Dashboard Content */
.dashboard-content {
    flex: 1;
    padding: 1.5rem;
}

.flash-container {
    padding: 0 1.5rem;
}

.page-header {
    margin-bottom: 1.5rem;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 0.5rem;
}

.breadcrumb {
    background: none;
    padding: 0;
    margin: 0;
}

.breadcrumb-item {
    color: var(--text-subtle);
    font-size: 0.875rem;
}

.breadcrumb-item a {
    color: var(--text-muted);
}

.breadcrumb-item a:hover {
    color: var(--primary);
}

.breadcrumb-item.active {
    color: var(--text-muted);
}

/* ============================================
   ADMIN LAYOUT
   ============================================ */
.admin-page .admin-sidebar {
    background: linear-gradient(180deg, #1e1b4b 0%, #0f172a 100%);
}

.admin-logo {
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
}

.admin-avatar {
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
}

.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: var(--sidebar-width);
    position: fixed;
    top: 0;
    bottom: 0;
    inset-inline-start: 0;
    display: flex;
    flex-direction: column;
    z-index: 1050;
    border-inline-end: 1px solid var(--border-light);
}

.admin-main {
    flex: 1;
    margin-inline-start: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.admin-topbar {
    height: var(--topbar-height);
    background: rgba(15, 23, 42, 0.95);
    border-bottom: 1px solid var(--border-light);
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(20px);
}

.admin-content {
    flex: 1;
    padding: 1.5rem;
}

.admin-flash-container {
    padding: 0 1.5rem;
}

.nav-divider {
    height: 1px;
    background: var(--border-light);
    margin: 1rem 1.5rem;
}

/* ============================================
   DROPDOWN MENUS
   ============================================ */
.dropdown-menu {
    background: rgba(30, 27, 75, 0.98);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-lg);
    padding: 0.5rem;
}

.dropdown-item {
    color: var(--text-muted);
    padding: 0.625rem 1rem;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.dropdown-item:hover,
.dropdown-item:focus {
    background: var(--bg-card-hover);
    color: var(--text-white);
}

.dropdown-item.active {
    background: rgba(245, 158, 11, 0.15);
    color: var(--primary);
}

.dropdown-item.text-danger:hover {
    background: rgba(239, 68, 68, 0.15);
    color: var(--accent-red);
}

.dropdown-header {
    color: var(--text-subtle);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    text-transform: uppercase;
}

.dropdown-divider {
    border-color: var(--border-light);
    margin: 0.5rem 0;
}

/* Notifications Dropdown */
.notifications-dropdown,
.messages-dropdown {
    width: 320px;
    padding: 0;
}

.notifications-dropdown .dropdown-header,
.messages-dropdown .dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--border-light);
}

.mark-all-read {
    font-size: 0.75rem;
    color: var(--primary);
}

.notifications-list,
.messages-list {
    max-height: 300px;
    overflow-y: auto;
}

.notification-empty,
.message-empty {
    padding: 2rem;
    text-align: center;
    color: var(--text-subtle);
}

.notification-empty i,
.message-empty i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.dropdown-footer {
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--border-light);
    text-align: center;
}

.dropdown-footer a {
    color: var(--primary);
    font-size: 0.875rem;
    font-weight: 500;
}

/* ============================================
   ALERTS
   ============================================ */
.alert {
    border: none;
    border-radius: var(--radius-lg);
    padding: 1rem 1.25rem;
}

.alert-floating {
    position: fixed;
    top: 1rem;
    inset-inline-end: 1rem;
    z-index: 1100;
    max-width: 400px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

[dir="rtl"] @keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.alert-success {
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent-emerald);
}

.alert-danger {
    background: rgba(239, 68, 68, 0.15);
    color: var(--accent-red);
}

.alert-warning {
    background: rgba(234, 179, 8, 0.15);
    color: var(--accent-yellow);
}

.alert-info {
    background: rgba(59, 130, 246, 0.15);
    color: var(--accent-blue);
}

.btn-close {
    filter: invert(1);
    opacity: 0.7;
}

/* ============================================
   MOBILE RESPONSIVE
   ============================================ */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1040;
}

.sidebar-overlay.active {
    display: block;
}

@media (max-width: 991.98px) {
    .dashboard-sidebar,
    .admin-sidebar {
        transform: translateX(-100%);
    }

    [dir="rtl"] .dashboard-sidebar,
    [dir="rtl"] .admin-sidebar {
        transform: translateX(100%);
    }

    .dashboard-sidebar.active,
    .admin-sidebar.active {
        transform: translateX(0);
    }

    .dashboard-main,
    .admin-main {
        margin-inline-start: 0;
    }
}

@media (max-width: 767.98px) {
    .site-header .navbar-collapse {
        background: rgba(15, 23, 42, 0.98);
        border-radius: var(--radius-lg);
        padding: 1rem;
        margin-top: 1rem;
        border: 1px solid var(--border-light);
    }

    .dashboard-content,
    .admin-content {
        padding: 1rem;
    }

    .topbar-search {
        display: none;
    }

    .notifications-dropdown,
    .messages-dropdown {
        width: 280px;
    }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.text-primary {
    color: var(--primary) !important;
}

.text-muted {
    color: var(--text-muted) !important;
}

.bg-primary-subtle {
    background: rgba(245, 158, 11, 0.15) !important;
}

.bg-success-subtle {
    background: rgba(16, 185, 129, 0.15) !important;
}

.bg-danger-subtle {
    background: rgba(239, 68, 68, 0.15) !important;
}

.bg-warning-subtle {
    background: rgba(234, 179, 8, 0.15) !important;
}

.bg-info-subtle {
    background: rgba(59, 130, 246, 0.15) !important;
}

.border-primary {
    border-color: var(--primary) !important;
}

.rounded-lg {
    border-radius: var(--radius-lg) !important;
}

.rounded-xl {
    border-radius: var(--radius-xl) !important;
}

.rounded-2xl {
    border-radius: var(--radius-2xl) !important;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--border-medium);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-subtle);
}

/* Focus Styles */
:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    /* Hide non-essential elements */
    .dashboard-sidebar,
    .admin-sidebar,
    .dashboard-topbar,
    .admin-topbar,
    .site-header,
    .site-footer,
    .breadcrumb-nav,
    .btn,
    button,
    .no-print,
    .toast-container,
    .offline-notification,
    .app-initial-loader,
    nav,
    .pagination,
    .modal,
    .dropdown-menu,
    .alert-dismissible .btn-close,
    .sidebar-overlay,
    [data-bs-toggle],
    .social-share,
    .comments-form {
        display: none !important;
    }

    /* Reset layout */
    .dashboard-main,
    .admin-main,
    .main-content {
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
    }

    /* Base styles */
    * {
        color-adjust: exact !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    body {
        background: white !important;
        color: black !important;
        font-size: 12pt;
        line-height: 1.5;
        font-family: 'Times New Roman', serif;
    }

    /* Typography */
    h1, h2, h3, h4, h5, h6 {
        color: black !important;
        page-break-after: avoid;
        page-break-inside: avoid;
    }

    h1 { font-size: 24pt; }
    h2 { font-size: 20pt; }
    h3 { font-size: 16pt; }
    h4 { font-size: 14pt; }

    p, li {
        orphans: 3;
        widows: 3;
    }

    /* Links */
    a {
        color: black !important;
        text-decoration: underline;
    }

    a[href^="http"]:after {
        content: " (" attr(href) ")";
        font-size: 9pt;
        color: #666;
    }

    a[href^="/"]:after,
    a[href^="#"]:after {
        content: "";
    }

    /* Images */
    img {
        max-width: 100% !important;
        page-break-inside: avoid;
    }

    /* Cards and containers */
    .card,
    .profile-card,
    .artist-card {
        border: 1px solid #ddd !important;
        box-shadow: none !important;
        background: white !important;
        page-break-inside: avoid;
    }

    /* Tables */
    table {
        border-collapse: collapse !important;
    }

    table th,
    table td {
        border: 1px solid #ddd !important;
        padding: 8px !important;
        background: white !important;
        color: black !important;
    }

    table th {
        background: #f5f5f5 !important;
    }

    thead {
        display: table-header-group;
    }

    tr {
        page-break-inside: avoid;
    }

    /* Page breaks */
    .page-break {
        page-break-before: always;
    }

    .page-break-after {
        page-break-after: always;
    }

    .avoid-break {
        page-break-inside: avoid;
    }

    /* Profile print styles */
    .profile-header {
        border-bottom: 2px solid #333;
        padding-bottom: 20px;
        margin-bottom: 20px;
    }

    .profile-avatar {
        width: 100px !important;
        height: 100px !important;
        border-radius: 50%;
    }

    /* Casting print styles */
    .casting-details {
        border: 1px solid #ddd;
        padding: 15px;
        margin-bottom: 15px;
    }

    /* Show print-only elements */
    .print-only {
        display: block !important;
    }

    /* Page margins */
    @page {
        margin: 2cm;
        size: A4;
    }

    @page :first {
        margin-top: 3cm;
    }

    /* Footer with page numbers */
    @page {
        @bottom-center {
            content: "Page " counter(page) " of " counter(pages);
        }
    }
}
