/********** ARMANJAFARI.COM UI SYSTEM **********/

:root {
    --primary: #ff2b2b;

    --primary-hover: #ff4444;

    --primary-soft: rgba(255, 43, 43, 0.12);

    --secondary: #111318;

    --dark: #07090d;

    --dark-light: #161a22;

    --dark-card: #141821;

    --light: #9ca3af;

    --white: #f5f7fa;

    --border: rgba(255, 255, 255, 0.06);

    --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);

    --radius: 18px;

    --transition: 0.25s ease;
}

/********** GLOBAL **********/

html {
    scroll-behavior: smooth;
}

body {
    background:
        linear-gradient(rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.92)),
        url("/images/background.webp");

    background-size: cover;
    background-position: center;
    background-attachment: fixed;

    color: var(--white);

    font-family: Vazirmatn, sans-serif;

    overflow-x: hidden;
}

/********** TEXT SELECTION **********/

::selection {
    background: rgba(255, 43, 43, 0.35);

    color: #fff;
}

/********** SCROLLBAR **********/

* {
    scrollbar-width: thin;

    scrollbar-color: rgba(255, 0, 0, 0.35) #090909;
}

::-webkit-scrollbar {
    width: 10px;

    height: 10px;
}

::-webkit-scrollbar-track {
    background: #090909;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 0, 0, 0.25);

    border-radius: 20px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 0, 0, 0.45);
}

/********** SIDEBAR **********/

.sidebar {
    position: fixed;

    top: 0;
    right: 0;
    bottom: 0;

    width: 280px;

    height: 100vh;

    overflow-y: auto;

    z-index: 997;

    background: linear-gradient(
        180deg,
        rgba(15, 15, 18, 0.96),
        rgba(8, 8, 10, 0.98)
    );

    backdrop-filter: blur(14px);

    border-left: 1px solid var(--border);

    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.35);

    transition: var(--transition);
}

/********** SIDEBAR BRAND **********/

.armanjafari_brand_row {
    padding-top: 12px;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 12px;
    color: var(--primary) !important;
}

.armanjafari_brand_row img {
    filter: drop-shadow(0 0 8px rgba(255, 0, 0))
        drop-shadow(0 0 18px rgba(255, 0, 0, 0.18));
    height: 50px;
}
.armanjafari_brand_row {
    transition: 0.4s;
}

.armanjafari_brand_row:hover {
    transform: scale(1.06);
    filter: drop-shadow(0 0 15px rgba(255, 0, 0, 0.65))
        drop-shadow(0 0 35px rgba(255, 0, 0, 0.35));
}

/********** USER PROFILE **********/

.sidebar .d-flex.align-items-center {
    background: rgba(255, 255, 255, 0.03);

    border: 1px solid var(--border);

    border-radius: var(--radius);

    padding: 14px;

    margin-top: 10px;

    backdrop-filter: blur(10px);
}

.sidebar .rounded-circle {
    border: 2px solid rgba(255, 0, 0, 0.25);

    object-fit: cover;
}

.sidebar h6 {
    color: var(--white);

    font-size: 14px;

    font-weight: 700;
}

.sidebar span {
    color: var(--light);

    font-size: 12px;
}

/********** SIDEBAR LINKS **********/

.sidebar .navbar-nav {
    gap: 8px;
}

.sidebar .navbar .navbar-nav .nav-link {
    position: relative;

    display: flex;
    align-items: center;

    gap: 14px;

    margin: 0 12px;

    padding: 14px 18px;

    border-radius: 16px;

    color: rgba(255, 255, 255, 0.72);

    border: 1px solid transparent;

    transition: var(--transition);

    font-size: 14px;

    font-weight: 500;

    overflow: hidden;
}

.sidebar .navbar .navbar-nav .nav-link i {
    width: 20px;

    height: 20px;

    display: flex;
    align-items: center;
    justify-content: center;

    color: var(--primary);

    font-size: 15px;
}

.sidebar .navbar .navbar-nav .nav-link:hover {
    background: rgba(255, 255, 255, 0.04);

    color: var(--white);

    transform: translateX(-4px);
}

.sidebar .navbar .navbar-nav .nav-link.active {
    background: linear-gradient(
        90deg,
        rgba(255, 0, 0, 0.16),
        rgba(255, 0, 0, 0.04)
    );

    border: 1px solid rgba(255, 0, 0, 0.12);

    color: var(--white);
}

/********** CONTENT **********/

.content {
    margin-right: 280px;

    min-height: 100vh;

    background: transparent;

    transition: var(--transition);
}

/********** TOP NAVBAR **********/

.content .navbar,
.top-navbar {
    background: rgba(12, 12, 15, 0.78) !important;

    backdrop-filter: blur(18px);

    border-bottom: 1px solid rgba(255, 255, 255, 0.05);

    min-height: 76px;

    z-index: 998;
}

.content .navbar .nav-link {
    color: rgba(255, 255, 255, 0.75);

    transition: var(--transition);
}

.content .navbar .nav-link:hover {
    color: var(--white);
}

/********** SIDEBAR TOGGLER **********/

.sidebar-toggler {
    width: 48px;

    height: 48px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 16px;

    background: rgba(255, 255, 255, 0.04);

    border: 1px solid rgba(255, 255, 255, 0.06);

    color: #fff;

    transition: var(--transition);
}

.sidebar-toggler:hover {
    background: rgba(255, 0, 0, 0.08);

    color: #fff;

    transform: translateY(-2px);
}

/********** CARDS **********/

.bg-secondary {
    background: linear-gradient(
        180deg,
        rgba(18, 18, 22, 0.92),
        rgba(12, 12, 15, 0.95)
    ) !important;

    border: 1px solid var(--border);

    box-shadow: var(--shadow);

    backdrop-filter: blur(10px);
}

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

/********** HEADINGS **********/

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--white);

    font-weight: 700;
}

p,
span,
small,
label,
li,
td,
th {
    color: inherit;
}

/********** LINKS **********/

a {
    transition: var(--transition);

    text-decoration: none;
}

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

/********** FORMS **********/

.form-control,
.form-select,
textarea,
input,
select {
    background: rgba(255, 255, 255, 0.03) !important;

    border: 1px solid rgba(255, 255, 255, 0.06) !important;

    color: var(--white) !important;

    border-radius: 14px;

    transition: var(--transition);

    box-shadow: none !important;
}
.form-control,
.form-select {
    min-height: 50px;
}

/********** OPTION FIX **********/

select,
.form-select {
    appearance: none;

    -webkit-appearance: none;

    -moz-appearance: none;

    background-color: #18181b !important;

    color: #f5f7fa !important;
}

select option,
.form-select option {
    background: #18181b !important;

    background-color: #18181b !important;

    color: #f5f7fa !important;
}

/********** WINDOWS + FIREFOX FIX **********/

@-moz-document url-prefix() {
    select,
    .form-select,
    select option,
    .form-select option {
        background-color: #18181b !important;

        color: #f5f7fa !important;
    }
}

/********** OPTION HOVER **********/

select option:checked,
select option:hover {
    background: #1d2430 !important;

    color: #ffffff !important;
}

/********** INPUT FOCUS **********/

.form-control:focus,
.form-select:focus,
textarea:focus,
input:focus,
select:focus {
    border-color: rgba(255, 0, 0, 0.3) !important;

    background: rgba(255, 255, 255, 0.04) !important;

    color: #fff !important;

    box-shadow: 0 0 0 4px rgba(255, 0, 0, 0.08) !important;
}

/********** PLACEHOLDER **********/

.form-control::placeholder,
input::placeholder,
textarea::placeholder {
    color: rgba(255, 255, 255, 0.25);
}

/********** LABEL **********/

.form-label {
    margin-bottom: 10px;

    color: rgba(255, 255, 255, 0.85);

    font-size: 13px;

    font-weight: 500;
}

/********** BUTTONS **********/

.btn {
    border-radius: 14px;

    min-height: 48px;

    padding: 10px 22px;

    font-weight: 600;

    transition: var(--transition);

    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, #ff3434, #c40000) !important;

    color: #fff !important;

    box-shadow: 0 10px 20px rgba(255, 0, 0, 0.18);
}

.btn-primary:hover {
    transform: translateY(-2px);

    box-shadow: 0 14px 28px rgba(255, 0, 0, 0.28);
}

/********** ALERTS **********/

.alert {
    border: 1px solid rgba(255, 255, 255, 0.06);

    border-radius: 16px;

    backdrop-filter: blur(10px);

    box-shadow: var(--shadow);
}
/********** MENU ITEMS **********/

.menu-item {
    display: flex !important;
    align-items: center;
    gap: 14px;

    min-height: 52px;

    border-radius: 16px !important;

    transition: 0.25s ease;
}

.menu-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

/********** MENU ICON **********/

.menu-icon {
    width: 38px;
    height: 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 12px;

    background: rgba(255, 0, 0, 0.1);

    border: 1px solid rgba(255, 0, 0, 0.18);

    flex-shrink: 0;
}

.menu-icon i {
    color: #ff3b3b;

    font-size: 15px;
}

/********** NOTIFICATIONS **********/

.notification-wrapper {
    position: absolute;

    display: flex;
    flex-direction: column;
    gap: 14px;

    width: fit-content;
    max-width: 420px;

    z-index: 999999 !important;
}

/********** NOTIFICATION ALERT **********/

.notification-alert {
    min-width: 320px;

    backdrop-filter: blur(14px);

    border-radius: 18px;

    border: 1px solid rgba(255, 255, 255, 0.08);

    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.45),
        0 0 20px rgba(255, 0, 0, 0.08);

    overflow: hidden;
}

/********** BTN CLOSE **********/

.notification-alert .btn-close {
    filter: invert(1) brightness(2);

    opacity: 0.8;
}

.notification-alert .btn-close:hover {
    opacity: 1;
}
/********** DROPDOWNS **********/

.dropdown-menu,
.user-menu,
.sidebar .dropdown-menu {
    background: rgba(20, 20, 24, 0.98) !important;

    border: 1px solid rgba(255, 255, 255, 0.06) !important;

    border-radius: 18px !important;

    box-shadow: var(--shadow);

    overflow: hidden;
}

.dropdown-item,
.user-menu .dropdown-item,
.sidebar .dropdown-item {
    color: rgba(255, 255, 255, 0.78) !important;

    border-radius: 12px;

    transition: var(--transition);
    text-align: right;
}

.dropdown-item:hover,
.dropdown-item:focus,
.user-menu .dropdown-item:hover,
.sidebar .dropdown-item:hover {
    background: rgba(255, 255, 255, 0.05) !important;

    color: #fff !important;
}

/********** TABLE **********/

.table {
    color: rgba(255, 255, 255, 0.82);
}

.table th {
    background: rgba(255, 255, 255, 0.03);

    border-color: rgba(255, 255, 255, 0.05);
}

.table td {
    border-color: rgba(255, 255, 255, 0.04);
}

/********** MODAL **********/

.modal-content {
    background: #111318;

    border: 1px solid rgba(255, 255, 255, 0.06);

    border-radius: 22px;

    color: #fff;
}

.modal-header,
.modal-footer {
    border-color: rgba(255, 255, 255, 0.05);
}
/*********************************
        USER MENU ICONS
*********************************/

.user-menu .dropdown-item i,
.logout-btn i {
    width: 20px;

    min-width: 20px;

    display: inline-flex;

    align-items: center;
    justify-content: center;

    font-size: 15px;

    color: var(--primary);

    text-shadow: 0 0 10px rgba(255, 43, 43, 0.45);

    transition:
        color 0.25s ease,
        transform 0.25s ease,
        text-shadow 0.25s ease;
}

/*********************************
        ITEM HOVER EFFECT
*********************************/

.user-menu .dropdown-item:hover i,
.logout-btn:hover i {
    color: #ff4d4d;

    transform: scale(1.08);

    text-shadow: 0 0 16px rgba(255, 43, 43, 0.75);
}

/*********************************
        MENU ITEMS
*********************************/

.user-menu .dropdown-item,
.logout-btn {
    position: relative;

    overflow: hidden;

    display: flex;
    align-items: center;

    gap: 14px;

    min-height: 52px;

    border-radius: 16px;

    transition:
        background 0.25s ease,
        transform 0.25s ease,
        border-color 0.25s ease;

    border: 1px solid transparent;
}

/*********************************
        HOVER BACKGROUND
*********************************/

.user-menu .dropdown-item:hover,
.logout-btn:hover {
    background: linear-gradient(
        90deg,
        rgba(255, 43, 43, 0.1),
        rgba(255, 43, 43, 0.03)
    );

    border-color: rgba(255, 43, 43, 0.12);

    transform: translateX(-3px);
}

/*********************************
        TEXT STYLE
*********************************/

.user-menu .dropdown-item span,
.logout-btn span {
    color: rgba(255, 255, 255, 0.82);

    font-size: 14px;

    font-weight: 600;

    transition: color 0.25s ease;
}

.user-menu .dropdown-item:hover span,
.logout-btn:hover span {
    color: #ffffff;
}

/*********************************
        DIVIDER
*********************************/

.user-menu .dropdown-divider {
    border-top-color: rgba(255, 255, 255, 0.06);

    margin: 10px 0;
}
/********** USER NAVBAR **********/

.user-dropdown {
    display: flex;
    align-items: center;

    gap: 12px;

    padding: 8px 14px !important;

    border-radius: 18px;

    background: rgba(255, 255, 255, 0.03);

    border: 1px solid rgba(255, 255, 255, 0.05);

    transition: var(--transition);
}

.user-dropdown:hover {
    background: rgba(255, 255, 255, 0.05);
}

.user-avatar {
    width: 44px;

    height: 44px;

    border-radius: 50%;

    object-fit: cover;

    border: 2px solid rgba(255, 0, 0, 0.18);
}

.user-meta {
    flex-direction: column;

    text-align: right;
}

.user-name {
    color: #fff;

    font-size: 14px;

    font-weight: 600;
}

.user-status {
    color: rgba(255, 255, 255, 0.45);

    font-size: 11px;
}

/********** LOGOUT **********/

.logout-btn {
    width: 100%;

    border: none;

    background: transparent;

    text-align: right;
}

/********** BACK TO TOP **********/

.back-to-top {
    position: fixed;

    right: 28px;

    bottom: 28px;

    width: 56px;

    height: 56px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 18px;

    background: linear-gradient(
        145deg,
        rgba(255, 40, 40, 0.95),
        rgba(170, 0, 0, 0.92)
    );

    color: #fff !important;

    font-size: 28px;

    text-decoration: none;

    z-index: 9999;

    opacity: 0;

    visibility: hidden;

    transform: translateY(20px);

    transition:
        opacity 0.25s ease,
        transform 0.25s ease,
        background 0.25s ease,
        box-shadow 0.25s ease;

    box-shadow:
        0 10px 30px rgba(255, 0, 0, 0.22),
        inset 0 1px 1px rgba(255, 255, 255, 0.12);

    border: 1px solid rgba(255, 255, 255, 0.08);

    backdrop-filter: blur(10px);
}

.back-to-top.show {
    opacity: 1;

    visibility: visible;

    transform: translateY(0);
}

.back-to-top:hover {
    color: #fff;

    transform: translateY(-4px);

    box-shadow:
        0 18px 40px rgba(255, 0, 0, 0.35),
        inset 0 1px 1px rgba(255, 255, 255, 0.12);
}

.back-to-top i {
    line-height: 1;
}

/********** MOBILE **********/

@media (max-width: 991.98px) {
    .sidebar {
        margin-right: -280px;
        width: 280px;
        padding-top: 78px;
    }

    .sidebar.open {
        margin-right: 0;
    }

    .content {
        width: 100%;

        margin-right: 0;
    }

    .content .navbar {
        padding-right: 12px !important;

        padding-left: 12px !important;
    }
}

@media (min-width: 992px) {
    .sidebar.open {
        margin-right: -280px;
    }

    .content {
        width: calc(100% - 280px);
    }

    .content.open {
        width: 100%;

        margin-right: 0;
    }
}

@media (max-width: 768px) {
    .back-to-top {
        width: 50px;

        height: 50px;

        left: 18px;

        bottom: 18px;

        font-size: 24px;

        border-radius: 16px;
    }
}

/* =========================
      FORM CHECK INPUT (FIX STABLE CHECKMARK)
========================= */

.form-check-input {
    width: 1.25em;
    height: 1.25em;
    min-width: 1em;
    min-height: 1em;
    margin-top: 0.15em;

    background-color: #f8fafc;
    border: 2px solid #cbd5e1;

    border-radius: 0.35em;

    transition: all 0.2s ease;

    cursor: pointer;

    position: relative;

    appearance: none;
    -webkit-appearance: none;
}

/* Hover */

.form-check-input:hover {
    border-color: #60a5fa;

    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.15);
}

/* Focus */

.form-check-input:focus {
    border-color: #3b82f6;

    outline: none;

    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.25);
}

/* Checked state */

.form-check-input:checked {
    background-color: #3b82f6;
    border-color: #3b82f6;

    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

/* مهم: حذف کامل تیک Bootstrap */
.form-check-input:checked {
    background-image: none !important;
}

/* تیک کاملاً پایدار و همیشه قابل نمایش */
.form-check-input:checked::after {
    content: "";

    position: absolute;

    top: 50%;
    left: 50%;

    width: 4px;
    height: 8px;

    border: solid #ffffff;
    border-width: 0 2px 2px 0;

    transform: translate(-50%, -55%) rotate(45deg);

    opacity: 1;

    pointer-events: none;
}

/* =========================
   DARK LOADING SCREEN
========================= */

#spinner {
    opacity: 0;
    visibility: hidden;

    transition:
        opacity 0.45s ease,
        visibility 0s linear 0.45s;

    z-index: 999999;

    background:
        radial-gradient(circle at top, rgba(255, 0, 60, 0.12), transparent 40%),
        radial-gradient(
            circle at bottom,
            rgba(255, 255, 255, 0.03),
            transparent 40%
        ),
        #06070b;
}

#spinner.show {
    opacity: 1;
    visibility: visible;

    transition:
        opacity 0.45s ease,
        visibility 0s linear 0s;
}

/* کانتینر اصلی */

.loading-box {
    position: relative;

    width: 180px;
    height: 180px;

    display: flex;
    align-items: center;
    justify-content: center;
}

/* حلقه بیرونی */

.loading-ring {
    position: absolute;

    width: 180px;
    height: 180px;

    border-radius: 50%;

    border: 2px solid rgba(255, 255, 255, 0.04);
    border-top: 2px solid #ff1744;

    animation: spin 2.4s linear infinite;

    box-shadow:
        0 0 35px rgba(255, 23, 68, 0.12),
        inset 0 0 20px rgba(255, 255, 255, 0.02);
}

/* حلقه داخلی */

.loading-ring::before {
    content: "";

    position: absolute;
    inset: 18px;

    border-radius: 50%;

    border: 2px solid rgba(255, 255, 255, 0.03);
    border-bottom: 2px solid #ff3d71;

    animation: spinReverse 1.6s linear infinite;
}

/* مرکز */

.loading-core {
    position: relative;

    width: 72px;
    height: 72px;

    border-radius: 24px;

    background: linear-gradient(
        145deg,
        rgba(25, 27, 35, 0.95),
        rgba(10, 10, 15, 0.98)
    );

    display: flex;
    align-items: center;
    justify-content: center;

    box-shadow:
        0 0 30px rgba(255, 23, 68, 0.15),
        inset 0 0 20px rgba(255, 255, 255, 0.03);

    overflow: hidden;
}

/* افکت نور */

.loading-core::before {
    content: "";

    position: absolute;
    inset: -40%;

    background: linear-gradient(
        45deg,
        transparent,
        rgba(255, 255, 255, 0.08),
        transparent
    );

    animation: shine 3s linear infinite;
}

/* نقطه قرمز */

.loading-dot {
    position: relative;

    width: 14px;
    height: 14px;

    border-radius: 50%;

    background: #ff1744;

    box-shadow:
        0 0 12px #ff1744,
        0 0 30px rgba(255, 23, 68, 0.6);

    animation: pulse 1.2s ease-in-out infinite;
}

/* متن */

.loading-text {
    position: absolute;
    bottom: -40px;

    width: 100%;

    text-align: center;

    font-size: 13px;
    letter-spacing: 4px;

    color: rgba(255, 255, 255, 0.55);

    text-transform: uppercase;

    animation: textFade 2s ease-in-out infinite;
}

/* انیمیشن‌ها */

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

@keyframes spinReverse {
    from {
        transform: rotate(360deg);
    }
    to {
        transform: rotate(0deg);
    }
}

@keyframes pulse {
    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.5);
        opacity: 0.7;
    }
}

@keyframes shine {
    from {
        transform: translateX(-120%) rotate(45deg);
    }

    to {
        transform: translateX(120%) rotate(45deg);
    }
}

@keyframes textFade {
    0%,
    100% {
        opacity: 0.35;
        letter-spacing: 4px;
    }

    50% {
        opacity: 1;
        letter-spacing: 6px;
    }
}

/* موبایل */

@media (max-width: 768px) {
    .loading-box {
        width: 140px;
        height: 140px;
    }

    .loading-ring {
        width: 140px;
        height: 140px;
    }

    .loading-core {
        width: 58px;
        height: 58px;
        border-radius: 18px;
    }

    .loading-text {
        font-size: 11px;
        bottom: -34px;
    }
}
