/* C:\MAMP\htdocs\nord_wolf\assets\css\style.css */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700&family=Vazirmatn:wght@300;400;600;700;800&display=swap');

:root {
    --primary-gradient: linear-gradient(135deg, #2d5a27 0%, #1e3b1a 100%);
    --accent-color: #ffd54f;
    --accent-hover: #ffe082;
    --bg-light: #f4f6f9;
    --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --hover-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    --text-dark: #263238;
    --text-muted: #78909c;
    --border-color: rgba(45, 90, 39, 0.12);
    --border-radius: 12px;
}

body {
    font-family: 'Vazirmatn', 'Outfit', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    direction: rtl;
    text-align: right;
    margin: 0;
    overflow-x: hidden;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: #f1f1f1;
}
::-webkit-scrollbar-thumb {
    background: #2d5a27;
    border-radius: 4px;
}

/* Main Layout Structure */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Premium Sidebar */
.sidebar {
    width: 260px;
    background: linear-gradient(180deg, #1e3b1a 0%, #0d1a0b 100%);
    color: #fff;
    min-height: 100vh;
    position: fixed;
    right: -260px; /* Off-screen by default */
    top: 0;
    transition: all 0.3s ease;
    z-index: 1050;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
}

.sidebar.show {
    right: 0; /* Slide in on mobile */
}

/* Sidebar Overlay */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1040;
    display: none;
}

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

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
}

.sidebar-logo {
    font-size: 20px;
    font-weight: 800;
    color: var(--accent-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.sidebar-menu {
    list-style: none;
    padding: 20px 10px;
    margin: 0;
    flex-grow: 1;
}

.sidebar-item {
    margin-bottom: 5px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s ease;
}

.sidebar-link:hover, .sidebar-item.active .sidebar-link {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
    transform: translateX(-5px);
}

.sidebar-link i {
    font-size: 16px;
    width: 20px;
    text-align: center;
    color: var(--accent-color);
}

/* Main Content Area */
.main-content {
    margin-right: 0;
    width: 100%;
    transition: all 0.3s ease;
    padding: 25px;
    display: flex;
    flex-direction: column;
}

/* Responsive Desktop Overrides */
@media (max-width: 991.98px) {
    /* A fixed element positioned beyond the viewport still contributes to
       document width in some browsers. Keep the closed drawer out of layout. */
    .sidebar:not(.show) {
        display: none;
    }
    .sidebar.show {
        display: flex;
        right: 0;
    }

    .main-content {
        box-sizing: border-box;
        min-width: 0;
        padding: 12px;
    }

    .top-navbar {
        flex-wrap: wrap;
        gap: 10px;
        padding: 12px;
        margin-bottom: 16px;
    }

    .top-navbar > .d-flex {
        flex: 1 1 100%;
        min-width: 0;
        gap: 8px !important;
    }

    .top-navbar .nav-title {
        min-width: 0;
        font-size: 16px;
        overflow-wrap: anywhere;
    }

    .top-navbar .user-profile {
        margin-inline-start: auto;
        max-width: 100%;
    }
}

@media (min-width: 992px) {
    .sidebar {
        display: none !important;
    }
    .sidebar-overlay {
        display: none !important;
    }
    .main-content {
        margin-right: 0 !important;
        width: 100% !important;
    }
}

/* Top Navbar */
.top-navbar {
    background: #fff;
    padding: 15px 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-title {
    font-weight: 800;
    color: #1e3b1a;
    margin: 0;
    font-size: 20px;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

/* Cards & Dashboard Widgets */
.premium-card {
    background: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
    padding: 24px;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}

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

.widget-icon {
    position: absolute;
    left: 20px;
    bottom: 20px;
    font-size: 48px;
    color: rgba(45, 90, 39, 0.08);
}

/* Currency Badges */
.currency-usd { color: #2e7d32; font-weight: 700; }
.currency-iqd { color: #1565c0; font-weight: 700; }
.currency-tman { color: #e65100; font-weight: 700; }

/* Custom Inputs and Buttons */
.form-control, .form-select {
    border-radius: 8px;
    border: 1.5px solid #cfd8dc;
    padding: 10px 14px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.form-control:focus, .form-select:focus {
    border-color: #2d5a27;
    box-shadow: 0 0 0 3px rgba(45, 90, 39, 0.15);
}

.btn-premium {
    background: var(--primary-gradient);
    color: #fff;
    border: none;
    font-weight: 700;
    padding: 10px 24px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.btn-premium:hover {
    background: linear-gradient(135deg, #376d30 0%, #22431d 100%);
    color: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(45, 90, 39, 0.3);
}

/* Glassmorphism Login Container */
.login-bg {
    background: linear-gradient(135deg, #11220f 0%, #2d5a27 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.3);
    width: 420px;
    padding: 40px;
}

.login-title {
    text-align: center;
    font-weight: 800;
    color: #1e3b1a;
    margin-bottom: 30px;
}

/* Custom Table Styling */
.table-responsive {
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    background: #fff;
}

.table {
    margin-bottom: 0;
}

.table th {
    background-color: #1e3b1a;
    color: #fff;
    font-weight: 700;
    padding: 14px 16px;
    border: none;
}

.table td {
    padding: 12px 16px;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
}

.table tbody tr:hover {
    background-color: rgba(45, 90, 39, 0.03);
}

/* SweetAlert overrides */
.swal2-popup {
    font-family: 'Vazirmatn', sans-serif !important;
}

/* ══════════════════════════════════════════════════════════════
   Splash Screen Styles
   ══════════════════════════════════════════════════════════════ */
#app-splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at center, #1e3b1a 0%, #0a1709 100%);
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    transition: opacity 0.6s ease, visibility 0.6s ease;
    opacity: 1;
    visibility: visible;
}

#app-splash-screen.splash-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.splash-container {
    text-align: center;
    padding: 30px;
    max-width: 480px;
    width: 90%;
}

.splash-logo-wrap {
    position: relative;
    width: 110px;
    height: 110px;
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.splash-logo-ring {
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top-color: #ffd54f;
    border-right-color: rgba(255, 213, 79, 0.4);
    animation: splash-spin 1.2s linear infinite;
}

@keyframes splash-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.splash-logo-img {
    width: 85px;
    height: 85px;
    object-fit: contain;
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.4));
    animation: splash-pulse 2s ease-in-out infinite;
}

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

.splash-title {
    font-size: 24px;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 6px;
    letter-spacing: -0.5px;
}

.splash-subtitle {
    font-size: 15px;
    color: #ffd54f;
    font-weight: 600;
    margin-bottom: 24px;
}

.splash-bar-wrap {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    margin-bottom: 20px;
}

.splash-bar-progress {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #ffd54f 0%, #4caf50 100%);
    border-radius: 10px;
    animation: splash-load 1.2s ease-out forwards;
}

@keyframes splash-load {
    0% { width: 0%; }
    50% { width: 70%; }
    100% { width: 100%; }
}

.splash-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 6px 16px;
    border-radius: 30px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(4px);
}

.splash-badge i {
    color: #1877f2;
}

/* ══════════════════════════════════════════════════════════════
   Bzhmer Advertisement Card & Banner Styles
   ══════════════════════════════════════════════════════════════ */
.bzhmer-ad-card {
    background: linear-gradient(135deg, #1877f2 0%, #0d47a1 50%, #1a237e 100%);
    border-radius: 16px;
    padding: 24px;
    color: #ffffff;
    box-shadow: 0 10px 30px rgba(24, 119, 242, 0.3);
    position: relative;
    overflow: hidden;
    margin-top: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.bzhmer-ad-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 40px rgba(24, 119, 242, 0.45);
}

.bzhmer-ad-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.18) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.bzhmer-ad-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.bzhmer-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(6px);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.5px;
}

.bzhmer-ad-title {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 8px;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.bzhmer-ad-desc {
    font-size: 13.5px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    margin-bottom: 18px;
}

.btn-bzhmer-fb {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #ffffff;
    color: #1877f2 !important;
    font-weight: 800;
    font-size: 14px;
    padding: 10px 22px;
    border-radius: 10px;
    text-decoration: none !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    transition: all 0.25s ease;
    border: none;
    width: 100%;
}

.btn-bzhmer-fb:hover {
    background: #f0f2f5;
    color: #0d47a1 !important;
    transform: scale(1.02);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}
