/* ═══════════════════════════════════════════════════════════════
   پلتفرم سرویس خودرو - تم آبی تیره و نارنجی
   Dark Blue & Orange Theme - RTL - Sidebar Layout
   ═══════════════════════════════════════════════════════════════ */

:root {
    --primary-purple: #071BB0;
    --dark-purple: #061894;
    --light-purple: #4A7EF0;
    --primary-orange: #FF6B35;
    --dark-orange: #E55A2B;
    --light-orange: #FF8C5A;
    --gradient-purple-orange: linear-gradient(135deg, #071BB0 0%, #FF6B35 100%);
    --gradient-sidebar: linear-gradient(180deg, #051080 0%, #030852 50%, #020640 100%);
    --white: #FFFFFF;
    --light-gray: #F8F6FA;
    --gray: #9E9E9E;
    --dark-gray: #424242;
    --card-shadow: 0 8px 32px rgba(7, 27, 176, 0.12);
    --card-shadow-hover: 0 16px 48px rgba(7, 27, 176, 0.2);
    --sidebar-width: 280px;
    --sidebar-collapsed: 80px;
    --transition-fast: 0.2s ease;
    --transition-normal: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', 'Vazirmatn', Tahoma, Geneva, Verdana, sans-serif;
    direction: rtl;
    text-align: right;
    background: var(--light-gray);
    color: var(--dark-gray);
    line-height: 1.7;
    overflow-x: hidden;
}

/* ═══ SIDEBAR ═══ */
.app-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--gradient-sidebar);
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    overflow-y: auto;
    transition: width var(--transition-normal), transform var(--transition-normal);
}

.app-sidebar.collapsed {
    width: var(--sidebar-collapsed);
}

.sidebar-brand {
    padding: 1.5rem;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    transition: all var(--transition-normal);
}

.sidebar-brand a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    color: var(--white);
    text-decoration: none;
    font-weight: 700;
    font-size: 1.25rem;
    transition: all var(--transition-normal);
}

.sidebar-brand a:hover {
    color: var(--primary-orange);
}

.sidebar-brand i {
    font-size: 1.75rem;
    background: var(--gradient-purple-orange);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.app-sidebar.collapsed .sidebar-brand span {
    display: none;
}

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

.sidebar-nav .nav-section-title {
    padding: 0.75rem 1.5rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.5);
}

.app-sidebar.collapsed .nav-section-title {
    display: none;
}

.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 1.5rem;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-weight: 500;
    transition: all var(--transition-normal);
    border-right: 3px solid transparent;
}

.sidebar-nav .nav-link i {
    font-size: 1.2rem;
    min-width: 24px;
    text-align: center;
    transition: transform var(--transition-fast);
}

.sidebar-nav .nav-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--white);
    border-right-color: var(--primary-orange);
}

.sidebar-nav .nav-link:hover i {
    transform: scale(1.15);
}

.sidebar-nav .nav-link.active {
    background: rgba(255, 107, 53, 0.15);
    color: var(--primary-orange);
    border-right-color: var(--primary-orange);
}

.app-sidebar.collapsed .nav-link span {
    display: none;
}

.sidebar-toggle {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(50%);
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-normal);
}

.sidebar-toggle:hover {
    background: var(--primary-orange);
}

.app-sidebar.collapsed .sidebar-toggle i {
    transform: rotate(180deg);
}

/* ═══ MAIN CONTENT ═══ */
.main-content {
    margin-right: var(--sidebar-width);
    min-height: 100vh;
    transition: margin var(--transition-normal);
    animation: contentFadeIn 0.6s ease-out;
}

.main-content.sidebar-collapsed {
    margin-right: var(--sidebar-collapsed);
}

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

/* ═══ PAGE TRANSITIONS ═══ */
main {
    animation: pageSlideIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* ═══ CARDS ═══ */
.card {
    border: none;
    border-radius: 16px;
    box-shadow: var(--card-shadow);
    transition: all var(--transition-normal);
    overflow: hidden;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: var(--card-shadow-hover);
}

.card-header {
    background: var(--gradient-purple-orange);
    color: var(--white);
    border: none;
    padding: 1.25rem 1.5rem;
    font-weight: 700;
    font-size: 1.1rem;
}

/* ═══ BUTTONS ═══ */
.btn-primary {
    background: var(--gradient-purple-orange);
    border: none;
    color: var(--white);
    padding: 0.75rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    transition: all var(--transition-normal);
    box-shadow: 0 4px 15px rgba(7, 27, 176, 0.35);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(7, 27, 176, 0.45);
}

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

.btn-outline-primary:hover {
    background: var(--primary-purple);
    color: var(--white);
    transform: translateY(-2px);
}

/* ═══ FORMS ═══ */
.form-control {
    border: 2px solid #E8E4EC;
    border-radius: 12px;
    padding: 0.85rem 1rem;
    transition: all var(--transition-normal);
}

.form-control:focus {
    border-color: var(--primary-purple);
    box-shadow: 0 0 0 4px rgba(7, 27, 176, 0.15);
    outline: none;
}

/* ═══ ANIMATIONS ═══ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(25px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.float-animation {
    animation: float 4s ease-in-out infinite;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 107, 53, 0.4); }
    50% { box-shadow: 0 0 0 12px rgba(255, 107, 53, 0); }
}

.pulse-glow {
    animation: pulse-glow 2s infinite;
}

/* ═══ FOOTER ═══ */
.footer {
    background: var(--gradient-sidebar);
    color: var(--white);
    padding: 2.5rem 0;
    margin-top: 4rem;
}

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

.footer a:hover {
    color: var(--light-orange);
}

/* ═══ MOBILE SIDEBAR TOGGLE ═══ */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.sidebar-overlay.show {
    display: block;
    opacity: 1;
}

.mobile-menu-btn {
    display: none;
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1001;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--gradient-purple-orange);
    border: none;
    color: white;
    font-size: 1.25rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(7, 27, 176, 0.4);
    transition: all var(--transition-normal);
}

.mobile-menu-btn:hover {
    transform: scale(1.05);
}

@media (max-width: 991px) {
    .app-sidebar {
        transform: translateX(100%);
    }
    
    .app-sidebar.show {
        transform: translateX(0);
    }
    
    .main-content {
        margin-right: 0;
    }
    
    .mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* ═══ UTILITY ═══ */
.text-orange { color: var(--primary-orange) !important; }
.text-purple { color: var(--primary-purple) !important; }
.bg-orange { background: var(--primary-orange) !important; }
.bg-purple { background: var(--primary-purple) !important; }
.shadow-custom { box-shadow: var(--card-shadow); }
