/* Global Colors - The following color variables are used throughout the website. Updating them here will change the color scheme of the entire website */
:root {
    --background-color: #ffffff; /* Background color for the entire website, including individual sections */
    --default-color: gray; /* Default color used for the majority of the text content across the entire website */
    --heading-color: #151515; /* Color for headings, subheadings and title throughout the website */
    --accent-color: #38a2fa; /* Accent color that represents your brand on the website. It's used for buttons, links, and other elements that need to stand out */
    --surface-color: #ffffff; /* The surface color is used as a background of boxed elements within sections, such as cards, icon boxes, or other elements that require a visual separation from the global background. */
    --contrast-color: #312f2f; /* Contrast color for text, ensuring readability against backgrounds of accent, heading, or default colors. */
}

/* Nav Menu Colors - The following color variables are used specifically for the navigation menu. They are separate from the global colors to allow for more customization options */
:root {
    --nav-color: rgba(
        255,
        255,
        255,
        0.905
    ); /* The default color of the main navmenu links */
    --nav-hover-color: #ffc451; /* Applied to main navmenu links when they are hovered over or active */
    --nav-mobile-background-color: #ffffff; /* Used as the background color for mobile navigation menu */
    --nav-dropdown-background-color: #ffffff; /* Used as the background color for dropdown items that appear when hovering over primary navigation items */
    --nav-dropdown-color: #212529; /* Used for navigation links of the dropdown items in the navigation menu. */
    --nav-dropdown-hover-color: #38a2fa; /* Similar to --nav-hover-color, this color is applied to dropdown navigation links when they are hovered over. */
}

/* Color Presets - These classes override global colors when applied to any section or element, providing reuse of the sam color scheme. */

.light-background {
    --background-color: #f9f9f9;
    --surface-color: #ffffff;
}

.dark-background {
    --background-color: #060606;
    --default-color: #ffffff;
    --heading-color: #ffffff;
    --surface-color: #252525;
    --contrast-color: #2a2727;
}

/* Smooth scroll */
:root {
    scroll-behavior: smooth;
}

/*--------------------------------------------------------------
# Preloader
--------------------------------------------------------------*/
#preloader {
    position: fixed;
    inset: 0;
    z-index: 999999;
    overflow: hidden;
    background: #000;
    transition: all 0.6s ease-out;
}

#preloader:before {
    content: "";
    position: fixed;
    top: calc(50% - 30px);
    left: calc(50% - 30px);
    border: 6px solid #ffffff;
    border-color: var(--accent-color) transparent var(--accent-color)
        transparent;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: animate-preloader 1.5s linear infinite;
}

@keyframes animate-preloader {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/*--------------------------------------------------------------
# Scroll Top Button
--------------------------------------------------------------*/
.scroll-top {
    position: fixed;
    visibility: hidden;
    opacity: 0;
    right: 15px;
    bottom: 1%;
    z-index: 99999;
    background-color: var(--accent-color);
    width: 40px;
    height: 40px;
    border-radius: 4px;
    transition: all 0.4s;
}

.scroll-top i {
    font-size: 24px;
    color: var(--contrast-color);
    line-height: 0;
}

.scroll-top:hover {
    background-color: color-mix(in srgb, var(--accent-color), transparent 20%);
    color: var(--contrast-color);
}

.scroll-top.active {
    visibility: hidden;
    opacity: 1;
}

/*--------------------------------------------------------------
# Disable aos animation delay on mobile devices
--------------------------------------------------------------*/
@media screen and (max-width: 768px) {
    [data-aos-delay] {
        transition-delay: 0 !important;
    }
}

/*--------------------------------------------------------------
# Fonts
--------------------------------------------------------------*/
@import url("https://fonts.googleapis.com/css2?family=Cairo:wght@400;700&display=swap");

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

/*--------------------------------------------------------------
# Typography
--------------------------------------------------------------*/
h5 {
    font-size: 18px;
}

h6 {
    font-size: 16px;
}

/*--------------------------------------------------------------
# Body
--------------------------------------------------------------*/
body {
    font-family: "Cairo", sans-serif;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

body.index-page {
    background-color: #0f0f0f;
    color: #fff;
}

/*--------------------------------------------------------------
# Global Sections
--------------------------------------------------------------*/
section {
    color: #fff;
    background-color: white;
    padding: 0 !important;
    scroll-margin-top: 80px;
    overflow: clip;
}

@media (max-width: 1199px) {
    section,
    .section {
        scroll-margin-top: 58px;
    }
}

/*--------------------------------------------------------------
# Main Layout (Login Page)
--------------------------------------------------------------*/
main {
    direction: rtl;
    background-color: #0f0f0f;
    min-height: 100vh;
    height: auto; /* أضف هذا */
    padding: 0 !important;
    margin: 0 !important;
}

main section {
    flex: 1;
    overflow: hidden;
}

/*--------------------------------------------------------------
# Main Layout (Index Page)
--------------------------------------------------------------*/
.main {
    direction: rtl;
    min-height: 100vh;
    background-color: #fff;
    padding: 0 !important;
    margin: 0 !important;
}

/*--------------------------------------------------------------
# Decorative Circles
--------------------------------------------------------------*/
.deco-circle-1 {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    width: 400px;
    height: 400px;
    background: rgba(231, 76, 60, 0.08);
    top: -100px;
    left: -100px;
}

.deco-circle-2 {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    width: 300px;
    height: 300px;
    background: rgba(46, 204, 113, 0.08);
    bottom: -80px;
    right: -80px;
}

/*--------------------------------------------------------------
# Container
--------------------------------------------------------------*/
.container {
    position: relative;
    z-index: 1;
}

/*--------------------------------------------------------------
# Login Page — Title & Subtitle
--------------------------------------------------------------*/
.login-title {
    font-size: 22px;
    font-weight: 300;
    letter-spacing: 4px;
    color: #000;
}

.login-subtitle {
    color: #888;
}

/*--------------------------------------------------------------
# Login Card
--------------------------------------------------------------*/
.login-card {
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.login-input-icon {
    background: #111;
    border: none !important;
    color: #888;
    border-radius: 0px 5px 5px 0px !important;
}

.login-input {
    background: rgba(255, 255, 255, 0.07) !important;
    border: none !important;
    color: #fff !important;
    border-radius: 5px 0 0 5px !important;
}

.login-input::placeholder {
    color: rgba(255, 255, 255, 0.25);
}

.login-btn {
    width: 100%;
    background: #2ecc71;
    border: none;
    padding: 12px;
    border-radius: 12px;
    font-weight: bold;
    color: #fff;
    cursor: pointer;
}

.login-divider {
    width: 60px;
    height: 2px;
    background: linear-gradient(to right, #e74c3c, #2ecc71);
    margin: 12px auto;
}

.login-logo-link {
    display: inline-block;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.login-logo-link img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    pointer-events: none;
}

/*--------------------------------------------------------------
# Error Message
--------------------------------------------------------------*/
.error-msg {
    background: #fcebeb;
    border: 0.5px solid #f09595;
    border-left: 3px solid #e24b4a;
    border-radius: 6px;
    padding: 10px 14px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 6px;
}

.error-msg small {
    color: #a32d2d;
    font-size: 13px;
    line-height: 1.5;
}

.error-icon {
    flex-shrink: 0;
    margin-top: 1px;
}

/*--------------------------------------------------------------
# Hero Section
--------------------------------------------------------------*/
.hero {
    width: 100%;
    min-height: 100vh;
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 0 !important;
    margin: 0 !important;
}

.hero:before {
    display: none !important;
}

.hero .container {
    position: relative;
    z-index: 3;
    padding-top: 0.5rem;
    padding-bottom: 1rem;
}

.hero .icon-box i {
    font-size: 32px;
    line-height: 1;
    color: var(--accent-color);
}

.hero h2 {
    font-size: 32px;
}

.hero p {
    font-size: 18px;
}

/*--------------------------------------------------------------
# Hero — Data Pages (Sales / Expenses)
--------------------------------------------------------------*/
.hero.hero-data {
    min-height: 100vh; /* يملأ الشاشة كاملاً */
    height: auto;
    overflow: visible;
    background-color: #fff; /* خلفية بيضاء للمحتوى */
}

/*--------------------------------------------------------------
# Hero — Inner Elements
--------------------------------------------------------------*/
main .hero .container .about .col-xl-12 {
    background-color: #cccccc;
}

.hero .container .row .col-xl-12 p,
.hero .container .row .col-xl-12 a {
    font-weight: bold;
    font-size: 23px;
}

main .hero .container .cards .col-xl-2 .icon-box .card {
    border: 2px solid gray;
    border-radius: 10px;
    background-color: transparent;
}

main .hero .container .cards .col-xl-2 .icon-box .card .container {
    width: 100%;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
}

main .hero .container .cards .col-xl-2 .icon-box .card .card-body {
    flex-grow: 1;
}

/*--------------------------------------------------------------
# Empty Message
--------------------------------------------------------------*/
.empty-message {
    text-align: center;
    padding: 3rem 1rem;
    width: 100%;
    color: black;
    animation: fadeIn 0.5s ease-in-out;
}

.empty-message img {
    width: 80px;
    opacity: 0.4;
    margin-bottom: 1rem;
}

.empty-message p {
    font-size: 1rem;
    margin: 0;
    color: black;
}

.empty-message span {
    font-size: 0.8rem;
    color: black;
    display: block;
    margin-top: 0.4rem;
}

/*--------------------------------------------------------------
# Section Title
--------------------------------------------------------------*/
.section-title {
    color: #aaa;
    font-size: 18px;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding-right: 10px;
    margin-bottom: 8px;
}

.section-title-success {
    border-right: 3px solid #2ecc71;
}

.section-title-danger {
    border-right: 3px solid #e74c3c;
}

/*--------------------------------------------------------------
# Navbar
--------------------------------------------------------------*/
.navbar-custom {
    background: rgba(20, 20, 30, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.navbar-brand-custom {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.navbar-logo {
    height: 36px;
    width: auto;
    object-fit: contain;
}

.navbar-title {
    color: #fff;
    font-size: 15px;
    font-weight: 400;
    letter-spacing: 2px;
    white-space: nowrap;
}

.navbar-user {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
    min-width: 0;
    padding: 5px 0px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-right: 2%;
}

.user-avatar {
    width: 34px;
    height: 34px;
}

.user-name {
    white-space: nowrap;
    font-size: 16px;
}

.logout-btn {
    display: flex;
    align-items: center;
    gap: 7px;
    background: rgba(226, 75, 74, 0.12);
    border: 1px solid rgba(226, 75, 74, 0.3);
    color: #e24b4a;
    border-radius: 8px;
    padding: 7px 14px;
    font-size: 13px;
    cursor: pointer;
    transition:
        background 0.2s,
        border-color 0.2s;
    white-space: nowrap;
}

.logout-btn:hover {
    background: rgba(226, 75, 74, 0.22);
    border-color: rgba(226, 75, 74, 0.5);
}

.logout-btn i {
    font-size: 13px;
}

/*--------------------------------------------------------------
# Dropdown
--------------------------------------------------------------*/
.dropdown {
    position: relative;
    direction: rtl;
}

.dropdown-toggle {
    cursor: pointer;
    direction: ltr;
}

.dropdown-menu-custom {
    position: absolute;
    left: 0;
    top: 120%;
    right: auto;
    background: rgba(20, 20, 30, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    width: 200px;
    padding: 8px 0;
    display: none;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    z-index: 999;
    direction: rtl;
    text-align: right;
    inset-inline-start: 0;
    inset-inline-end: auto;
}

.dropdown-menu-custom.show {
    display: block;
    margin-right: 2%;
}

.dropdown-header {
    padding: 10px 15px;
    font-size: 14px;
    color: #ccc;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    font-size: 16px;
    color: #fff;
    text-decoration: none;
    width: 100%;
    background: none;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}

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

.logout-item {
    color: #e24b4a;
}

/*--------------------------------------------------------------
# Alert Custom
--------------------------------------------------------------*/
.alert-success-custom {
    background: rgba(46, 204, 113, 0.1);
    border: 1px solid rgba(46, 204, 113, 0.3);
    color: #2ecc71;
    border-radius: 10px;
    padding: 10px 15px;
    font-size: 14px;
    text-align: right;
    margin-bottom: 1rem;
    transition: opacity 0.5s ease;
}

.alert-error-custom {
    background: rgba(226, 75, 74, 0.1);
    border: 1px solid rgba(226, 75, 74, 0.3);
    color: #e24b4a;
    border-radius: 10px;
    padding: 10px 15px;
    font-size: 14px;
    text-align: right;
    margin-bottom: 1rem;
    transition: opacity 0.5s ease;
}

/*--------------------------------------------------------------
# Alert RTL
--------------------------------------------------------------*/
.alert-rtl {
    font-family: "Cairo", sans-serif;
    direction: rtl;
    font-size: 15px;
}

/*--------------------------------------------------------------
# Total Box
--------------------------------------------------------------*/
.total-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.total-title {
    font-size: 13px;
    color: #777;
    font-weight: 500;
}

.total-box {
    background: linear-gradient(135deg, #0d6efd, #6610f2);
    color: #fff;
    padding: 6px 5px;
    border-radius: 6px;
    font-size: 18px;
    font-weight: bold;
    display: inline-block;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    min-width: 100%;
    text-align: center;
}

.total-box:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

.total-box.animate {
    transform: scale(1.15);
}

/*--------------------------------------------------------------
# Hero — Dashboard Variant
--------------------------------------------------------------*/
.hero.hero-dashboard {
    .hero.hero-dashboard {
        height: auto; /* بدلاً من calc(100vh - 70px) */
        min-height: calc(100vh - 70px);
        align-items: flex-start;
        padding-top: 80px;
        overflow: visible; /* بدلاً من hidden */
    }
}

.hero-dashboard .page-title h2 {
    color: #000;
    font-size: 22px;
    font-weight: 300;
    letter-spacing: 4px;
    text-transform: uppercase;
}

/*--------------------------------------------------------------
# Nav Menu Button (Sales / Expenses)
--------------------------------------------------------------*/
.nav-menu-btn {
    background-color: #1a1a1a;
    color: white;
    border-radius: 20px;
    padding: 28px 36px;
    font-size: 24px;
    font-weight: bold;
    border: 1px solid rgba(46, 204, 113, 0.4);
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    text-decoration: none;
}

.nav-menu-btn:hover {
    color: white;
}

.nav-menu-btn.success {
    border-color: rgba(46, 204, 113, 0.4);
}

.nav-menu-btn.success:hover {
    border: 3px solid #2ecc71;
}

.nav-menu-btn.danger {
    border-color: rgba(231, 76, 60, 0.4);
}

.nav-menu-btn.danger:hover {
    border: 3px solid #e74c3c;
}

.nav-menu-btn-icon {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.nav-menu-btn-icon.success {
    background: rgba(46, 204, 113, 0.15);
}

.nav-menu-btn-icon.danger {
    background: rgba(231, 76, 60, 0.15);
}

.nav-menu-btn-label {
    font-size: 20px;
    text-align: right;
}

.nav-menu-btn-sub {
    font-size: 12px;
    color: #888;
    font-weight: normal;
}

/*--------------------------------------------------------------
# Daily Total Card
--------------------------------------------------------------*/
.daily-total-card {
    border-radius: 14px;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.daily-total-card.success {
    background: linear-gradient(
        135deg,
        rgba(46, 204, 113, 0.1),
        rgba(46, 204, 113, 0.05)
    );
    border: 1px solid rgba(46, 204, 113, 0.2);
}

.daily-total-card.danger {
    background: linear-gradient(
        135deg,
        rgba(231, 76, 60, 0.1),
        rgba(231, 76, 60, 0.05)
    );
    border: 1px solid rgba(231, 76, 60, 0.2);
}

.daily-total-label {
    font-size: 13px;
    color: #888;
}

.daily-total-value {
    font-size: 18px;
    font-weight: bold;
}

.daily-total-value.success {
    color: #2ecc71;
}

.daily-total-value.danger {
    color: #e74c3c;
}

/*--------------------------------------------------------------
# Breadcrumb Nav
--------------------------------------------------------------*/
.breadcrumb-nav {
    color: #999999;
    display: flex;
    align-items: center;
    gap: 0;
    font-weight: bold;
    margin-bottom: 0.5rem;
    width: 100%;
}

.breadcrumb-nav a {
    color: #999999;
    text-decoration: none;
    white-space: nowrap;
}

.breadcrumb-nav .breadcrumb-sep {
    font-weight: normal;
    padding-left: 5px;
    white-space: nowrap;
}

.breadcrumb-nav svg {
    flex: 1;
    height: 1px;
    min-width: 0;
    overflow: visible;
}

/*--------------------------------------------------------------
# Data Card (Shared — Sales & Expenses)
--------------------------------------------------------------*/
.data-card-img {
    margin-right: 20px;
    padding: 0;
}

.data-card-img img {
    height: 70px;
    width: 70px;
    object-fit: contain;
}

.data-card-divider {
    width: 2px;
    height: 100%;
    background-color: #eee;
}

.data-card-divider-col {
    padding: 0 0 0 5px;
}

.data-card-separator {
    padding: 0 10px;
}

.data-card-badge {
    padding: 3px 8px;
    border-radius: 5px;
    color: white;
    font-size: 14px;
    display: inline-block;
}

.data-card-badge.danger {
    border: 1px solid red;
    background-color: red;
}

.data-card-badge.success {
    border: 1px solid green;
    background-color: green;
}

/*--------------------------------------------------------------
# Responsive — min-width: 768px
--------------------------------------------------------------*/
@media (min-width: 768px) {
    .hero .icon-box {
        transition: ease-in-out 0.3s;
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    .hero .container .row .col-xl-12 {
        background-color: rgba(0, 0, 0, 0.9);
        border-radius: 10px;
        padding-bottom: 10px;
    }

    /* Card inner padding — desktop only */
    main .hero .container .cards .col-xl-4 .icon-box,
    main .hero .container .cards .col-lg-4 .icon-box,
    main .hero .container .cards .col-md-6 .icon-box {
        width: 100%;
    }

    main .hero .container .cards .col-xl-4 .icon-box .card,
    main .hero .container .cards .col-lg-4 .icon-box .card,
    main .hero .container .cards .col-md-6 .icon-box .card {
        width: 100%;
        border: 1px solid #ddd;
        border-radius: 12px;
        padding: 8px 4px;
        min-height: 110px;
    }

    .data-card-img img {
        height: 70px;
        width: 70px;
        object-fit: contain;
    }

    .data-card-badge {
        padding: 3px 8px;
        font-size: 14px;
    }
}

/*--------------------------------------------------------------
# Responsive — max-width: 768px
--------------------------------------------------------------*/
@media (max-width: 768px) {
    /* Decorative circles */
    .deco-circle-1 {
        width: 200px;
        height: 200px;
        top: -50px;
        left: -50px;
    }

    /* Hero */
    .hero .icon-box {
        width: 100%;
    }

    .hero .icon-box .card .card-body p {
        font-size: 24px;
    }

    .hero .container .row .col-xl-12 {
        background-color: rgba(0, 0, 0, 0.1);
        width: calc(100% - 20px);
        border-radius: 10px;
        padding-bottom: 0px;
    }

    .hero h2 {
        font-size: 32px;
    }

    .hero p {
        font-size: 18px;
    }
}

/*--------------------------------------------------------------
# Responsive — max-width: 576px
--------------------------------------------------------------*/
@media (max-width: 576px) {
    .user-name {
        display: inline !important;
        max-width: 80px;
    }

    .logout-text {
        display: none;
    }

    .logout-btn {
        padding: 7px 10px;
    }
}

/*--------------------------------------------------------------
# Responsive — min-width: 577px
--------------------------------------------------------------*/
@media (min-width: 577px) {
    .user-name {
        max-width: 120px;
    }

    .logout-text {
        display: inline !important;
    }
}
