/* 
========================================================================
   BOOTSTRAP 5 ADMIN TEMPLATE - SPARK ADMIN
   DESIGN SYSTEM & CUSTOM STYLESHEET
   Developed with premium UI/UX standards

   Template Name: Spark Admin
   Version: 1.0 
   Author: Spark Admin Team 
   Email: hello.sparkadmin@gmail.com
   URL: https://sparkadmin.web.id
========================================================================
*/

/* ---------------------------------------------------------------------
   TABLE OF CONTENTS
   ---------------------------------------------------------------------
   1. Vazirmatn Font (local)
   2. Design System Variables
   3. Base Overrides & Typography
   4. Sidebar Component (.sidebar-wrapper)
   5. Main Wrapper Layout
   6. Custom Header / Navbar Component
   7. Page Title & Controls Row
   8. Cards & Styling Components
   9. Custom List (Transaction List Table replacement)
   10. Custom Progress & Bar Chart Custom Layouts
   11. Right Panel Component & Layout
   12. Responsive Adjustments
   13. Login Page Styles (.login-wrapper)
   14. Flatpickr Theme Customization (Spark Admin Styles)
   15. Dropdown Component Styles (Reusable)
   16. Footer Component Styles
   17. Navbar Profile Dropdown Styles
   18. Reusable Premium Table Component
   19. Custom Premium Form Elements Design System
   20. Reusable Custom Buttons & Alerts Design System
   21. Error 404 Page Styling Layout
   22. Keyframe Animations & Overlays
   23. Reusable Helper & Utility Classes (Zero Inline Style Policy)
   24. Transaction List Component
--------------------------------------------------------------------- */

/* ---------------------------------------------------------------------
   1. Vazirmatn Font (local, from CRM)
--------------------------------------------------------------------- */

@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/vazirmatn/Vazirmatn-Variable.woff2') format('woff2-variations');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/vazirmatn/Vazirmatn-Thin.woff2') format('woff2');
    font-weight: 100;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/vazirmatn/Vazirmatn-ExtraLight.woff2') format('woff2');
    font-weight: 200;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/vazirmatn/Vazirmatn-Light.woff2') format('woff2');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/vazirmatn/Vazirmatn-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/vazirmatn/Vazirmatn-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/vazirmatn/Vazirmatn-SemiBold.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/vazirmatn/Vazirmatn-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/vazirmatn/Vazirmatn-ExtraBold.woff2') format('woff2');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/vazirmatn/Vazirmatn-Black.woff2') format('woff2');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

/* ---------------------------------------------------------------------
   2. Design System Variables
--------------------------------------------------------------------- */
:root {
    /* Brand palette */
    --amber-gold: #ffbe0b;
    --blaze-orange: #fb5607;
    --neon-pink: #ff006e;
    --blue-violet: #8338ec;
    --azure-blue: #3a86ff;
    --menu-accent: #ff6b00;
    --menu-accent-hover: #e55f00;
    --menu-accent-light: #ff8533;
    --menu-accent-soft: rgba(255, 107, 0, 0.08);
    --menu-accent-soft-strong: rgba(255, 107, 0, 0.12);
    --menu-accent-glow: rgba(255, 107, 0, 0.45);

    /* Colors */
    --bs-body-bg: #F7F5FC;
    --bs-body-font-family: 'Vazirmatn', sans-serif;
    
    --brand-forest-dark: #0b2347;
    --brand-forest-medium: #123a6b;
    --brand-forest-light: #1a4fa8;
    --brand-lime: var(--amber-gold);
    --brand-lime-hover: #ffc933;
    --brand-lime-translucent: rgba(255, 190, 11, 0.15);
    --brand-primary: var(--menu-accent);
    --brand-primary-hover: var(--menu-accent-hover);
    --brand-primary-translucent: rgba(255, 107, 0, 0.15);
    --brand-primary-soft: rgba(255, 107, 0, 0.08);
    --brand-primary-border: rgba(255, 107, 0, 0.28);
    
    --text-main: #12101F;
    --text-muted-green: #6B6880;
    --text-sidebar-muted: #ffffff;
    
    --card-background: #FFFFFF;
    --border-light: #E8E4F2;
    --border-dark-green: rgba(255, 255, 255, 0.1);
    
    /* System Colors */
    --sys-green: var(--azure-blue);
    --sys-green-bg: #E8F0FF;
    --sys-red: var(--neon-pink);
    --sys-red-bg: #FFE8F2;
    --sys-orange: var(--blaze-orange);
    --sys-orange-bg: #FFF0E8;
    
    /* Layout Configurations */
    --sidebar-width: 236px;
    --navbar-height: 80px;
    --page-bottom-gap: 3rem;
    
    /* Border Radii */
    --radius-xxl: 24px;
    --radius-xl: 18px;
    --radius-lg: 14px;
    --radius-md: 10px;
    --radius-sm: 6px;
    
    /* Box Shadows */
    --shadow-sm: 0 2px 8px rgba(15, 8, 32, 0.04);
    --shadow-md: 0 10px 30px rgba(15, 8, 32, 0.06);
    --shadow-lg: 0 20px 50px rgba(15, 8, 32, 0.1);
}

/* ---------------------------------------------------------------------
   3. Base Overrides & Typography
--------------------------------------------------------------------- */
body {
    background-color: var(--bs-body-bg);
    color: var(--text-main);
    font-family: var(--bs-body-font-family);
    font-size: 0.925rem;
    font-weight: 500;
    -webkit-font-smoothing: antialiased;
    letter-spacing: -0.01em;
}

h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
    color: var(--text-main);
    font-weight: 700;
    letter-spacing: -0.025em;
}

a {
    color: var(--blue-violet);
    text-decoration: none;
    transition: all 0.25s ease-in-out;
}
a:hover {
    color: var(--azure-blue);
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #CBD5E1;
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94A3B8;
}

/* ---------------------------------------------------------------------
   4. Sidebar Component (.sidebar-wrapper)
   Extremely dark sidebar layout
--------------------------------------------------------------------- */
.sidebar-wrapper {
    width: var(--sidebar-width);
    background: #f4f6f8;
    height: 100vh;
    position: fixed;
    top: 0;
    right: 0;
    left: auto;
    z-index: 1030;
    display: flex;
    flex-direction: column;
    padding: 0.5rem 0.9rem 1rem;
    border-left: 1px solid rgba(11, 19, 15, 0.06);
    border-right: none;
    direction: rtl;
    text-align: right;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-wrapper .sidebar-menu-scroll {
    flex-grow: 1;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.sidebar-wrapper .sidebar-menu-scroll::-webkit-scrollbar {
    display: none;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
    padding: 0 0 0.4rem;
    border-bottom: 1px solid rgba(11, 19, 15, 0.08);
    text-decoration: none;
    transition: color 0.25s ease;
    width: 100%;
    direction: rtl;
}

.sidebar-brand-logo {
    width: auto;
    height: 68px;
    max-width: 96px;
    object-fit: contain;
    flex-shrink: 0;
    margin-left: -0.05rem;
}

.sidebar-brand-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    direction: rtl;
    text-align: right;
    min-width: 0;
    flex: 1;
    gap: 0.08rem;
}

.sidebar-brand-title {
    font-size: 1.12rem;
    font-weight: 800;
    line-height: 1.15;
    color: var(--text-main);
    white-space: nowrap;
    letter-spacing: -0.01em;
}

.sidebar-brand-subtitle {
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.15;
    color: var(--text-muted-green);
    white-space: nowrap;
}

.sidebar-brand:hover .sidebar-brand-logo {
    transform: none;
}

.sidebar-brand i {
    color: var(--menu-accent);
    font-size: 1.5rem;
    transition: transform 0.3s ease, color 0.3s ease;
}

.sidebar-brand:hover {
    color: var(--text-main);
}

.sidebar-brand:hover i {
    transform: none;
    color: var(--menu-accent);
}

.sidebar-menu-scroll > .sidebar-menu-section:first-child {
    margin-top: 0.15rem;
}

.sidebar-menu-scroll > .sidebar-menu-section:first-child .sidebar-menu-title {
    margin-bottom: 0.55rem;
}

.sidebar-menu-section {
    margin-bottom: 1.75rem;
}

.sidebar-menu-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: none;
    letter-spacing: 0;
    color: var(--text-muted-green);
    padding-right: 0.75rem;
    margin-bottom: 0.75rem;
    opacity: 0.85;
    text-align: right;
}

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

.sidebar-menu-item {
    margin-bottom: 0.35rem;
}

.sidebar-menu-link {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 0.85rem;
    padding: 0.75rem 0.85rem;
    font-size: 0.95rem;
    color: var(--text-main);
    border-radius: var(--radius-md);
    font-weight: 500;
    transition: all 0.2s ease-in-out;
    position: relative;
    direction: ltr;
    width: 100%;
}

.sidebar-menu-link span {
    grid-column: 1;
    text-align: right;
    direction: rtl;
    min-width: 0;
    color: var(--text-main);
}

.sidebar-menu-link i {
    grid-column: 2;
    font-size: 1.15rem;
    color: var(--menu-accent);
    transition: color 0.2s ease;
    flex-shrink: 0;
    justify-self: end;
}

/* Active State & Hover States */
.sidebar-menu-link:hover {
    color: var(--text-main);
    background-color: var(--menu-accent-soft);
}

.sidebar-menu-link:hover span {
    color: var(--text-main);
}

.sidebar-menu-link:hover i {
    color: var(--menu-accent-hover);
}

.sidebar-menu-link.active {
    color: var(--text-main);
    background-color: var(--menu-accent-soft-strong);
    font-weight: 600;
}

.sidebar-menu-link.active span {
    color: var(--text-main);
}

.sidebar-menu-link.active::before {
    content: '';
    position: absolute;
    left: -1.5rem;
    right: auto;
    top: 15%;
    height: 70%;
    width: 4px;
    background-color: var(--menu-accent);
    border-radius: 0 4px 4px 0;
    box-shadow: 0 0 10px var(--menu-accent-glow);
}

.sidebar-menu-link.active i {
    color: var(--menu-accent);
}

.sidebar-menu-badge {
    margin-inline-start: auto;
    margin-inline-end: 0;
    font-size: 0.75rem;
    font-weight: 700;
    background-color: var(--brand-lime);
    color: var(--brand-forest-dark);
    padding: 0.15rem 0.5rem;
    border-radius: 50rem;
}

/* Dropdown Caret Styling */
.sidebar-menu-link .dropdown-caret {
    margin-inline-start: auto;
    margin-inline-end: 0;
    font-size: 0.75rem;
    transition: transform 0.2s ease;
}

.sidebar-menu-link[aria-expanded="true"] .dropdown-caret {
    transform: rotate(180deg);
}

/* Submenu layout */
.sidebar-submenu {
    list-style: none;
    padding-inline-end: 2.5rem;
    padding-inline-start: 0;
    margin: 0.25rem 0 0.5rem 0;
}

.sidebar-submenu-link {
    display: block;
    padding: 0.45rem 0;
    color: var(--text-muted-green);
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.2s;
}

.sidebar-submenu-link:hover {
    color: var(--text-main);
}

/* Bottom Profile Card in Sidebar */
.sidebar-profile {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background-color: rgba(255, 255, 255, 0.03);
    padding: 0.85rem;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-dark-green);
    color: #FFFFFF;
}

.sidebar-profile-img {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-lg);
    object-fit: cover;
    background-color: var(--brand-forest-medium);
}

.sidebar-profile-info {
    flex-grow: 1;
    min-width: 0; /* allows text truncation */
}

.sidebar-profile-name {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-profile-email {
    font-size: 0.75rem;
    color: var(--text-sidebar-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    opacity: 0.8;
}

/* Minimized Sidebar Adjustments */
body.sidebar-minimized {
    --sidebar-width: 80px;
}

body.sidebar-minimized .sidebar-wrapper {
    padding: 2rem 0.5rem;
    align-items: center;
}

body.sidebar-minimized .sidebar-menu-scroll {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

body.sidebar-minimized .sidebar-menu-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

body.sidebar-minimized .sidebar-menu-list {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

body.sidebar-minimized .sidebar-menu-item {
    width: 100%;
    display: flex;
    justify-content: center;
}

body.sidebar-minimized .sidebar-brand-text,
body.sidebar-minimized .sidebar-menu-title,
body.sidebar-minimized .sidebar-menu-link span,
body.sidebar-minimized .sidebar-menu-badge,
body.sidebar-minimized .dropdown-caret,
body.sidebar-minimized .sidebar-submenu,
body.sidebar-minimized .sidebar-profile-info {
    display: none !important;
}

body.sidebar-minimized .sidebar-brand {
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

body.sidebar-minimized .sidebar-brand-logo,
body.sidebar-minimized .sidebar-brand i {
    grid-column: auto;
    justify-self: center;
    margin: 0;
    width: 48px;
    height: 48px;
}

body.sidebar-minimized .sidebar-menu-link {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 3rem;
    height: 3rem;
    padding: 0;
    margin-inline: auto;
}

body.sidebar-minimized .sidebar-menu-link.active::before {
    display: none;
}

body.sidebar-minimized .sidebar-menu-link i {
    grid-column: auto;
    justify-self: center;
    margin: 0;
    font-size: 1.35rem;
}

body.sidebar-minimized .sidebar-profile {
    padding: 0.5rem;
    justify-content: center;
    border: none;
    background-color: transparent;
}

/* ---------------------------------------------------------------------
   5. Main Wrapper Layout
--------------------------------------------------------------------- */
.main-wrapper {
    margin-right: var(--sidebar-width);
    margin-left: 0;
    padding: 2rem 2.5rem var(--page-bottom-gap);
    min-height: 100vh;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

/* ---------------------------------------------------------------------
   6. Custom Header / Navbar Component
--------------------------------------------------------------------- */
.navbar-custom {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: rgba(244, 246, 245, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    margin-top: -2rem;
    margin-left: -2.5rem;
    margin-right: -2.5rem;
    padding: 1.25rem 2.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    display: grid !important;
    grid-template-columns: 1fr 480px 1fr !important;
    align-items: center;
    margin-bottom: 2rem;
    gap: 1.5rem;
}

.navbar-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Quick Actions Dropdown Button */
.btn-quick-action {
    background-color: var(--brand-primary);
    color: #FFFFFF;
    border: none;
    border-radius: var(--radius-lg);
    padding: 0.5rem 1.15rem;
    font-size: 0.825rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.25s ease-in-out;
    cursor: pointer;
}


.btn-quick-action:hover {
    background-color: var(--brand-primary-hover);
    color: #FFFFFF;
    box-shadow: 0 4px 16px var(--brand-primary-translucent);
}

.btn-quick-action:focus {
    outline: none;
}

.btn-quick-action.dropdown-toggle::after {
    display: none !important;
}

.btn-quick-action i {
    font-size: 0.85rem;
    transition: transform 0.25s ease;
}

.btn-quick-action:hover i {
    transform: rotate(90deg);
}

/* Custom Dropdown Menu styles */
.dropdown-menu-quick-action {
    background-color: #FFFFFF !important;
    border: 1px solid var(--border-light) !important;
    border-radius: var(--radius-xl) !important;
    box-shadow: var(--shadow-lg) !important;
    padding: 0.5rem !important;
    margin-top: 0.5rem !important;
    overflow: hidden;
    animation: dropdownFadeIn 0.2s ease;
}


.dropdown-menu-quick-action .dropdown-header {
    font-size: 0.725rem;
    font-weight: 750;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted-green);
    padding: 0.35rem 0.85rem 0.25rem;
    text-align: right;
}

.dropdown-menu-quick-action .dropdown-item {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
    padding: 0.55rem 0.85rem;
    margin: 0.1rem 0;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 0.65rem;
    transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
}

.dropdown-menu-quick-action .dropdown-item i {
    font-size: 0.95rem;
    color: var(--text-muted-green);
    transition: color 0.2s;
}

.dropdown-menu-quick-action .dropdown-item:hover {
    background-color: var(--bs-body-bg);
    color: var(--brand-forest-medium);
}

.dropdown-menu-quick-action .dropdown-item:hover i {
    color: var(--brand-forest-medium);
}

.dropdown-menu-quick-action .dropdown-divider {
    border-color: var(--border-light);
    margin: 0.35rem 0.5rem;
}

.navbar-title-dropdown {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0;
}

.navbar-search-wrapper {
    width: 480px;
    max-width: 100%;
    position: relative;
    margin: 0 auto;
}

.navbar-search-input {
    width: 100%;
    background-color: #FFFFFF;
    border: 1px solid var(--border-light);
    border-radius: 50rem;
    padding: 0.65rem 2.75rem 0.65rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-main);
    outline: none;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease-in-out;
    direction: rtl !important;
    text-align: right !important;
}

.navbar-search-input:focus {
    border-color: rgba(26, 16, 64, 0.25);
    box-shadow: 0 4px 12px rgba(11, 19, 15, 0.05);
}

.navbar-search-btn {
    position: absolute;
    right: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted-green);
    padding: 0;
    display: flex;
    align-items: center;
    cursor: pointer;
}

.global-search-panel {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    left: 0;
    z-index: 11020;
    background: #ffffff;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: 0 16px 40px rgba(11, 19, 15, 0.12);
    max-height: min(70vh, 520px);
    overflow-y: auto;
    padding: 0.5rem;
}

.global-search-status {
    padding: 1rem 1.1rem;
    color: var(--text-muted-green);
    font-size: 0.875rem;
    text-align: center;
}

.global-search-group + .global-search-group {
    margin-top: 0.35rem;
    padding-top: 0.35rem;
    border-top: 1px solid rgba(11, 19, 15, 0.06);
}

.global-search-group-title {
    padding: 0.45rem 0.75rem 0.35rem;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted-green);
}

.global-search-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 0.75rem;
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--text-main);
    transition: background-color 0.15s ease;
}

.global-search-item:hover,
.global-search-item.is-active {
    background-color: var(--menu-accent-soft);
    color: var(--text-main);
}

.global-search-item-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--menu-accent-soft);
    color: var(--menu-accent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.global-search-item-body {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
    text-align: right;
}

.global-search-item-title {
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.global-search-item-subtitle {
    font-size: 0.75rem;
    color: var(--text-muted-green);
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.global-search-item-arrow {
    color: var(--text-muted-green);
    font-size: 0.85rem;
    flex-shrink: 0;
}

.navbar-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
}

.navbar-action-btn {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-lg);
    background-color: #FFFFFF;
    border: 1px solid var(--border-light);
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    position: relative;
    box-shadow: var(--shadow-sm);
    transition: all 0.25s ease;
}

.navbar-action-btn:hover {
    background-color: var(--border-light);
    color: var(--brand-forest-medium);
}

.navbar-action-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 11px;
    height: 11px;
    background-color: var(--neon-pink);
    border-radius: 50rem;
    border: 2px solid #FFFFFF;
    box-shadow: 0 0 8px rgba(255, 0, 110, 0.55);
    animation: statusPulse 2s infinite;
}

.navbar-notifications.is-disabled {
    display: none;
}

.navbar-notifications.is-disabled .navbar-action-btn {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}

.navbar-notifications.is-disabled .navbar-action-btn:hover {
    background-color: transparent;
    color: inherit;
}

.notification-disabled-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.45rem;
    padding: 1.35rem 1rem;
    text-align: center;
    color: var(--text-muted-green);
}

.notification-disabled-state i {
    font-size: 1.35rem;
    opacity: 0.7;
}

.notification-disabled-state p {
    margin: 0;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-main);
}

.notification-disabled-state span {
    font-size: 0.78rem;
    line-height: 1.6;
}

.notification-footer--disabled {
    display: block;
    padding: 0.75rem 1rem;
    text-align: center;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted-green);
    border-top: 1px solid var(--border-light);
    background: #fafcfb;
    cursor: default;
}

.navbar-actions .dropdown-toggle::after {
    display: none !important;
}

/* Custom Dropdown Notifications */
.dropdown-menu-notification {
    width: 320px;
    border-radius: var(--radius-xl) !important;
    border: 1px solid var(--border-light) !important;
    box-shadow: var(--shadow-lg) !important;
    margin-top: 0.5rem !important;
    border: none !important;
    animation: dropdownFadeIn 0.2s ease;
    direction: rtl;
    text-align: right;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}



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

.notification-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
    text-align: right;
}

.btn-clear-all {
    background: none;
    border: none;
    padding: 0;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--brand-forest-medium);
    transition: color 0.2s;
    outline: none;
}

.btn-clear-all:hover {
    color: var(--brand-lime-hover);
}

.notification-list {
    max-height: 260px;
    overflow-y: auto;
}

.notification-item {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 0.85rem 1.25rem;
    border-bottom: 1px solid var(--border-light);
    transition: background-color 0.2s ease;
    text-decoration: none;
    direction: rtl;
    text-align: right;
}

.notification-item:hover {
    background-color: var(--bs-body-bg);
}

.notification-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.notification-content {
    flex: 1;
    min-width: 0;
    text-align: right;
}

.notification-text {
    font-size: 0.8rem;
    color: var(--text-main);
    margin-bottom: 0.15rem;
    line-height: 1.5;
    text-align: right;
}

.notification-time {
    font-size: 0.725rem;
    color: var(--text-muted-green);
    display: block;
    text-align: right;
}

.notification-unread-dot {
    width: 6px;
    height: 6px;
    border-radius: 50rem;
    background-color: var(--sys-green);
    flex-shrink: 0;
    margin-top: 0.35rem;
    margin-left: 0;
    margin-right: auto;
}

.notification-footer {
    display: block;
    text-align: center;
    padding: 0.85rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--brand-forest-medium);
    text-decoration: none;
    transition: all 0.25s ease-in-out;
    direction: rtl;
}

.notification-footer:hover {
    color: var(--brand-lime-hover);
}

.btn-dark-custom {
    background-color: var(--text-main);
    color: #FFFFFF;
    font-weight: 600;
    font-size: 0.875rem;
    padding: 0.65rem 1.25rem;
    border-radius: 50rem;
    border: none;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease-in-out;
}

.btn-dark-custom:hover {
    background-color: #000000;
    color: #FFFFFF;
    transform: translateY(-1px);
}

.btn-dark-custom .icon-wrap {
    width: 20px;
    height: 20px;
    border-radius: 50rem;
    background-color: #FFFFFF;
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
}

/* Mobile Sidebar Toggle Button */
.sidebar-toggle-btn {
    display: none;
    width: 42px;
    height: 42px;
    border-radius: var(--radius-lg);
    background-color: #FFFFFF;
    border: 1px solid var(--border-light);
    color: var(--text-main);
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
}

/* Desktop Sidebar Toggle Button */
.btn-desktop-toggle {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-lg);
    background-color: #FFFFFF;
    border: 1px solid var(--border-light);
    color: var(--text-main);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: all 0.25s ease;
}

.btn-desktop-toggle:hover {
    background-color: var(--border-light);
    color: var(--brand-forest-medium);
}

/* ---------------------------------------------------------------------
   7. Page Title & Controls Row
--------------------------------------------------------------------- */
.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.page-header:has(nav[aria-label="breadcrumb"]) {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
}

.page-header nav[aria-label="breadcrumb"] {
    order: -1;
    width: 100%;
}

.page-header .breadcrumb {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    width: 100%;
    margin-bottom: 0;
    padding: 0;
    gap: 0.35rem;
}

[dir="rtl"] .page-header .breadcrumb-item + .breadcrumb-item::before {
    float: right;
    padding-right: 0;
    padding-left: 0.5rem;
}

.page-header:has(nav[aria-label="breadcrumb"]) > div:first-child {
    width: 100%;
}

.page-title {
    font-size: 1.75rem;
    margin-bottom: 0.25rem;
}

.page-subtitle {
    font-size: 0.875rem;
    color: var(--text-muted-green);
    margin-bottom: 0;
}

.btn-date-picker {
    position: relative;
    background-color: #FFFFFF;
    border: 1px solid var(--border-light);
    border-radius: 50rem;
    padding: 0.55rem 1.25rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
}

.batab-date-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
    border: 0;
    padding: 0;
    margin: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

.btn-date-picker:hover {
    background-color: var(--border-light);
}

.btn-date-picker > span:first-child {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-date-picker .bi-calendar4-event {
    flex-shrink: 0;
}

/* ---------------------------------------------------------------------
   8. Cards & Styling Components
--------------------------------------------------------------------- */
.card {
    background-color: var(--card-background);
    border: none;
    border-radius: var(--radius-xxl);
    padding: 1.75rem;
    box-shadow: var(--shadow-md);
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
}

.card-panel {
    overflow: visible;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0;
}

.card-more-btn {
    background: none;
    border: none;
    color: var(--text-muted-green);
    font-size: 1.15rem;
    padding: 0;
    display: flex;
    align-items: center;
}

/* Stat-specific cards */
.card-stat {
    height: 100%;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-muted-green);
    margin-bottom: 0.75rem;
    font-weight: 500;
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 0.75rem;
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.trend-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.785rem;
    font-weight: 600;
}

.trend-up {
    color: var(--azure-blue);
}

.trend-down {
    color: var(--neon-pink);
}

/* Hero alert card */
.alert-green-card {
    background: linear-gradient(135deg, var(--blue-violet) 0%, #5b21b6 45%, var(--azure-blue) 100%);
    color: #FFFFFF;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 165px;
    position: relative;
    overflow: hidden;
}

/* Geometric green visual element in bottom right of Alert Card */
.alert-green-bg-shape {
    position: absolute;
    bottom: -24px;
    right: -24px;
    width: 120px;
    height: 120px;
    opacity: 0.95;
    pointer-events: none;
    z-index: 0;
    transform: rotate(15deg);
    transition: transform 0.4s ease-in-out;
}

/* Subtle micro-animation on hover */
.alert-green-card:hover .alert-green-bg-shape {
    transform: rotate(45deg) scale(1.05);
}

.alert-green-card .stat-value {
    color: #FFFFFF;
}

.alert-green-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background-color: rgba(255, 255, 255, 0.1);
    color: #FFFFFF;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.35rem 0.75rem;
    border-radius: 50rem;
    margin-bottom: 1.25rem;
}

.alert-green-badge::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background-color: var(--amber-gold);
    border-radius: 50rem;
    animation: goldPulse 2s infinite;
}

@keyframes goldPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 190, 11, 0.55);
    }
    70% {
        box-shadow: 0 0 0 6px rgba(255, 190, 11, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 190, 11, 0);
    }
}

.alert-green-card > .position-relative {
    position: relative;
    z-index: 2;
    padding-inline-end: 4.5rem;
}

.alert-green-date {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.85);
    opacity: 0.8;
    margin-bottom: 0.35rem;
}

.alert-green-text {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
    max-width: 100%;
}

.alert-green-link {
    color: var(--amber-gold);
    font-size: 0.875rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    margin-top: auto;
    align-self: flex-end;
    position: relative;
    z-index: 2;
    max-width: calc(100% - 5rem);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.alert-green-link:hover {
    color: #FFFFFF;
}

.alert-green-link i {
    transition: transform 0.25s ease;
}

.alert-green-link:hover i {
    transform: translateX(3px);
}

/* ---------------------------------------------------------------------
   9. Custom List (Transaction List Table replacement)
--------------------------------------------------------------------- */
.custom-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.custom-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem;
    background-color: #FFFFFF;
    border-radius: var(--radius-xl);
    transition: background-color 0.2s ease-in-out;
}

.custom-list-item:hover {
    background-color: var(--bs-body-bg);
}

.item-left {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-width: 0;
}

.item-icon-wrapper {
    width: 44px;
    height: 44px;
    border-radius: 50rem;
    background-color: var(--bs-body-bg);
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.item-info {
    min-width: 0;
}

.item-name {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.15rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.item-sub {
    font-size: 0.75rem;
    color: var(--text-muted-green);
    margin-bottom: 0;
}

.item-status-wrapper {
    text-align: right;
    flex-shrink: 0;
}

.item-status {
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 0.15rem;
}

.item-status.completed {
    color: var(--brand-forest-medium);
}

.item-status.pending {
    color: var(--text-muted-green);
    opacity: 0.8;
}

.item-hash {
    font-size: 0.75rem;
    font-family: monospace;
    color: var(--text-muted-green);
    opacity: 0.7;
    margin-bottom: 0;
}

/* ---------------------------------------------------------------------
   10. Custom Progress & Bar Chart Custom Layouts
--------------------------------------------------------------------- */
.progress-container {
    margin-bottom: 1.25rem;
}

.progress-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.progress-label {
    color: var(--text-main);
}

.progress-value {
    color: var(--text-muted-green);
}

.progress {
    height: 10px !important;
    background-color: var(--bs-body-bg) !important;
    border-radius: 50rem !important;
    overflow: hidden !important;
}

.progress-bar {
    height: 100% !important;
    border-radius: 50rem !important;
    transition: width 0.6s ease !important;
}

.bg-forest-medium {
    background-color: var(--brand-forest-medium);
}

.bg-blue-violet {
    background-color: var(--blue-violet);
}

.bg-lime-accent {
    background-color: var(--amber-gold);
}

.bg-brand-orange,
.bg-blaze-orange {
    background-color: var(--blaze-orange);
}

.bg-azure-blue {
    background-color: var(--azure-blue);
}

.bg-neon-pink {
    background-color: var(--neon-pink);
}

/* ---------------------------------------------------------------------
   11. Right Panel Component & Layout
--------------------------------------------------------------------- */
.right-panel-wrapper {
    height: 100%;
    min-height: 0;
}

.promo-card {
    padding: 1.55rem 1.15rem 1.1rem;
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    min-height: 0;
}

.promo-card--fill {
    justify-content: flex-start;
}

.promo-card--fill .btn-promo {
    margin-top: auto;
}

.promo-bg-shape {
    position: absolute;
    top: 1.15rem;
    inset-inline-end: 0.85rem;
    width: 58px;
    height: 58px;
    opacity: 0.92;
    pointer-events: none;
}

.promo-card .promo-title {
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.45;
    color: var(--brand-forest-dark);
    margin: 0;
    padding-inline-end: 4.25rem;
    max-width: 100%;
    z-index: 2;
}

.promo-card .promo-desc {
    font-size: 0.78rem;
    color: var(--brand-forest-medium);
    opacity: 0.88;
    line-height: 1.55;
    margin: 0;
    max-width: 100%;
    z-index: 2;
}

.promo-card .btn-promo {
    padding: 0.58rem 0.95rem;
    font-size: 0.78rem;
}

.dashboard-activity-card,
.dashboard-content-card {
    min-height: 0;
}

.dashboard-activity-card .transaction-list {
    max-height: 22.5rem;
    overflow-y: auto;
    padding-inline-end: 0.15rem;
}

.dashboard-activity-card .transaction-list::-webkit-scrollbar {
    width: 5px;
}

.dashboard-activity-card .transaction-list::-webkit-scrollbar-thumb {
    background: rgba(15, 8, 32, 0.12);
    border-radius: 999px;
}

@media (min-width: 1200px) {
    .right-panel-wrapper {
        align-self: stretch;
    }
}

/* Donut Chart legend styling */
.chart-legends-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: var(--bs-body-bg);
    padding: 0.75rem;
    border-radius: var(--radius-lg);
    margin-top: 1.5rem;
    gap: 0.5rem;
}

.chart-legend-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    font-weight: 700;
}

.legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50rem;
    display: inline-block;
}

/* Promo Banner Card */
.promo-banner-card {
    background-color: #E2E8DF; /* Soft light olive-sage */
    border-radius: var(--radius-xxl);
    padding: 1.75rem;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    margin-bottom: 1.5rem;
}

.promo-banner-card {
    min-height: 250px;
}

/* Geometric green visual element in bottom right */
.promo-banner-bg-shape {
    position: absolute;
    bottom: -15px;
    right: -15px;
    width: 140px;
    height: 140px;
    opacity: 0.95;
    pointer-events: none;
}

.promo-title {
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1.25;
    color: var(--brand-forest-dark);
    margin-bottom: 0.75rem;
    max-width: 80%;
    z-index: 2;
}

.promo-desc {
    font-size: 0.85rem;
    color: var(--brand-forest-medium);
    opacity: 0.85;
    line-height: 1.4;
    margin-bottom: auto;
    max-width: 80%;
    z-index: 2;
}

.btn-promo {
    background-color: var(--brand-forest-dark);
    color: #FFFFFF;
    font-weight: 700;
    font-size: 0.85rem;
    padding: 0.75rem 1.25rem;
    border-radius: 50rem;
    text-align: center;
    border: none;
    width: 100%;
    margin-top: 1.5rem;
    z-index: 2;
    transition: all 0.25s ease;
}

.btn-promo:hover {
    background-color: #000000;
    color: #FFFFFF;
}

/* ---------------------------------------------------------------------
   12. Responsive Adjustments
--------------------------------------------------------------------- */
@media (max-width: 1200px) {
    .sidebar-wrapper {
        transform: translateX(100%);
    }
    
    .sidebar-wrapper.show {
        transform: translateX(0);
        box-shadow: var(--shadow-lg);
    }
    
    .main-wrapper {
        margin-right: 0;
        margin-left: 0;
        padding: 1.5rem 1.5rem;
    }
    
    .sidebar-toggle-btn {
        display: flex;
    }
    
    .navbar-search-wrapper {
        order: 3;
        max-width: 100%;
        width: 100%;
        margin-top: 0.5rem;
    }
    
    .navbar-custom {
        display: flex !important;
        margin-top: -1.5rem;
        margin-left: -1.5rem;
        margin-right: -1.5rem;
        padding: 1rem 1.5rem;
        flex-wrap: wrap;
        gap: 0.75rem;
    }
}

@media (max-width: 768px) {
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .btn-date-picker {
        width: 100%;
        justify-content: center;
    }
}

/* ---------------------------------------------------------------------
   14. Flatpickr Theme Customization (Spark Admin Styles)
--------------------------------------------------------------------- */
.flatpickr-calendar {
    background: #FFFFFF !important;
    border: 1px solid var(--border-light) !important;
    border-radius: 20px !important;
    box-shadow: var(--shadow-lg) !important;
    font-family: 'Vazirmatn', sans-serif !important;
    width: 324px !important;
    padding: 16px 14px 10px 14px !important;
    z-index: 10050 !important;
}

.flatpickr-jalali {
    direction: rtl !important;
}

.jalali-header-controls {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.jalali-picker-trigger {
    font-weight: 700;
    color: var(--text-main);
    background: #fff;
    border: 1px solid rgba(251, 86, 7, 0.18);
    border-radius: 10px;
    padding: 6px 12px;
    font-size: 0.92rem;
    cursor: pointer;
    font-family: 'Vazirmatn', sans-serif;
    transition: all 0.15s ease;
}

.jalali-picker-trigger:hover,
.jalali-picker-trigger.is-open {
    background: var(--sys-orange-bg);
    border-color: var(--blaze-orange);
    color: var(--blaze-orange);
}

.jalali-picker-panels {
    margin-top: 0.25rem;
}

.jalali-picker-panels.is-collapsed {
    display: none;
}

.jalali-picker-panel {
    background: #fff;
    border: 1px solid rgba(251, 86, 7, 0.15);
    border-radius: 12px;
    padding: 0.5rem;
    margin-bottom: 0.35rem;
    box-shadow: 0 8px 20px rgba(251, 86, 7, 0.08);
}

.jalali-month-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.35rem;
}

.jalali-year-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.35rem;
    max-height: 220px;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.jalali-picker-item {
    border: 1px solid transparent;
    background: transparent;
    border-radius: 8px;
    padding: 0.45rem 0.35rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    font-family: 'Vazirmatn', sans-serif;
    transition: all 0.15s ease;
}

.jalali-picker-item:hover {
    background: var(--sys-orange-bg);
    color: var(--blaze-orange);
}

.jalali-picker-item.is-selected {
    background: var(--blaze-orange);
    color: #fff;
    border-color: var(--blaze-orange);
}

.jalali-presets {
    display: flex;
    gap: 0.45rem;
    width: 100%;
    margin: 0 0 0.35rem;
    padding-bottom: 0.35rem;
    border-bottom: 1px solid rgba(251, 86, 7, 0.12);
}

.flatpickr-jalali .flatpickr-innerContainer {
    display: block !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
    width: 100% !important;
}

.flatpickr-jalali .flatpickr-rContainer {
    width: 100% !important;
    padding: 0 !important;
}

.flatpickr-jalali .flatpickr-weekdays {
    height: auto !important;
    min-height: 0 !important;
    margin: 0 0 0.25rem !important;
    padding: 0 !important;
}

.flatpickr-jalali span.flatpickr-weekday {
    line-height: 1.2 !important;
    padding: 0 !important;
}

.jalali-preset-btn {
    flex: 1;
    border: 1px solid rgba(251, 86, 7, 0.2);
    background: #fff;
    color: var(--text-main);
    border-radius: 999px;
    padding: 0.4rem 0.35rem;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Vazirmatn', sans-serif;
    transition: all 0.15s ease;
}

.jalali-preset-btn:hover {
    background: var(--sys-orange-bg);
    border-color: var(--blaze-orange);
    color: var(--blaze-orange);
}

.flatpickr-jalali .flatpickr-monthDropdown-months,
.flatpickr-jalali .numInput.cur-year,
.flatpickr-jalali .jalali-month-label {
    display: none !important;
}

.flatpickr-jalali .jalali-day {
    font-variant-numeric: tabular-nums;
}

.flatpickr-jalali .dayContainer {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    width: 294px !important;
    min-width: 294px !important;
    max-width: 294px !important;
}

.flatpickr-jalali .flatpickr-day {
    flex: 0 0 14.2857143% !important;
    width: 14.2857143% !important;
    max-width: 14.2857143% !important;
    box-sizing: border-box !important;
}

.flatpickr-calendar.arrowTop:before,
.flatpickr-calendar.arrowTop:after {
    border-bottom-color: #FFFFFF !important;
}

/* Month and Year navigation banner */
.flatpickr-months {
    position: relative !important;
    height: 40px !important;
    align-items: center !important;
}

.flatpickr-month {
    height: 40px !important;
    color: var(--text-main) !important;
}

.flatpickr-current-month {
    font-size: 1.05rem !important;
    font-weight: 700 !important;
    color: var(--text-main) !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.25rem !important;
    height: 40px !important;
}

.flatpickr-current-month select.flatpickr-monthDropdown-months {
    font-weight: 700 !important;
    color: var(--text-main) !important;
    background: transparent !important;
    border: none !important;
    border-radius: var(--radius-md) !important;
    padding: 4px 8px !important;
    font-size: 1.05rem !important;
    cursor: pointer !important;
    appearance: none !important;
    -webkit-appearance: none !important;
}

.flatpickr-current-month select.flatpickr-monthDropdown-months:hover {
    background: var(--bs-body-bg) !important;
}

.flatpickr-current-month input.cur-year {
    font-weight: 700 !important;
    color: var(--text-main) !important;
    font-size: 1.05rem !important;
    padding: 4px 6px !important;
    border-radius: var(--radius-md) !important;
    width: 55px !important;
    cursor: pointer !important;
}

.flatpickr-current-month input.cur-year:hover {
    background: var(--bs-body-bg) !important;
}

/* Hide default numeric scroll spinner arrows */
.numInputWrapper span {
    display: none !important;
}

/* Center navigation chevrons and style with hover circle */
.flatpickr-months .flatpickr-prev-month,
.flatpickr-months .flatpickr-next-month {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 32px !important;
    height: 32px !important;
    border-radius: 50rem !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    background: transparent !important;
    transition: all 0.2s ease !important;
    color: var(--text-main) !important;
    fill: var(--text-main) !important;
}

.flatpickr-jalali .flatpickr-months .flatpickr-prev-month:hover,
.flatpickr-jalali .flatpickr-months .flatpickr-next-month:hover {
    background-color: var(--sys-orange-bg) !important;
    color: var(--blaze-orange) !important;
}

.flatpickr-months .flatpickr-prev-month svg,
.flatpickr-months .flatpickr-next-month svg {
    width: 12px !important;
    height: 12px !important;
}

/* Weekday labels row */
.flatpickr-weekdays {
    height: 30px !important;
    margin-top: 10px !important;
    margin-bottom: 6px !important;
}

span.flatpickr-weekday {
    font-weight: 700 !important;
    color: var(--text-sidebar-muted) !important;
    font-size: 0.8rem !important;
    opacity: 0.85;
}

/* Days container layout */
.flatpickr-innerContainer {
    margin-top: 6px !important;
}

.flatpickr-days {
    width: 294px !important;
}

.dayContainer {
    width: 294px !important;
    min-width: 294px !important;
    max-width: 294px !important;
    gap: 2px 0px !important;
}

/* Day grid cell elements */
.flatpickr-day {
    font-weight: 600 !important;
    color: var(--text-main) !important;
    border-radius: 50rem !important;
    height: 38px !important;
    line-height: 38px !important;
    max-width: 38px !important;
    font-size: 0.85rem !important;
    transition: all 0.15s ease !important;
    border: none !important;
    margin: 0 auto !important;
}

.flatpickr-jalali .flatpickr-day:hover,
.flatpickr-jalali .flatpickr-day:focus {
    background-color: var(--sys-orange-bg) !important;
    color: var(--blaze-orange) !important;
    border-radius: 50rem !important;
}

/* Selected endpoints styling */
.flatpickr-jalali .flatpickr-day.selected,
.flatpickr-jalali .flatpickr-day.startRange,
.flatpickr-jalali .flatpickr-day.endRange {
    background-color: var(--blaze-orange) !important;
    color: #FFFFFF !important;
    box-shadow: 0 4px 10px rgba(251, 86, 7, 0.28) !important;
}

.flatpickr-jalali .flatpickr-day.startRange {
    border-radius: 0 50rem 50rem 0 !important;
}

.flatpickr-jalali .flatpickr-day.endRange {
    border-radius: 50rem 0 0 50rem !important;
}

.flatpickr-jalali .flatpickr-day.startRange.endRange {
    border-radius: 50rem !important;
}

/* Selected in-range days styling */
.flatpickr-jalali .flatpickr-day.inRange,
.flatpickr-jalali .flatpickr-day.prevMonthDay.inRange,
.flatpickr-jalali .flatpickr-day.nextMonthDay.inRange,
.flatpickr-jalali .flatpickr-day.today.inRange,
.flatpickr-jalali .flatpickr-day.prevMonthDay.today.inRange,
.flatpickr-jalali .flatpickr-day.nextMonthDay.today.inRange {
    background-color: var(--sys-orange-bg) !important;
    color: var(--blaze-orange) !important;
    border-radius: 0 !important;
}

/* Disabled and adjacent month days */
.flatpickr-day.flatpickr-disabled,
.flatpickr-day.flatpickr-disabled:hover,
.flatpickr-day.prevMonthDay,
.flatpickr-day.nextMonthDay {
    color: #CBD5E1 !important;
    background: transparent !important;
}

/* ---------------------------------------------------------------------
   15. Dropdown Component Styles (Reusable)
--------------------------------------------------------------------- */
.dropdown-menu-custom {
    background: #FFFFFF !important;
    border: 1px solid rgba(11, 19, 15, 0.05) !important;
    border-radius: var(--radius-lg) !important;
    box-shadow: var(--shadow-lg) !important;
    padding: 8px 6px !important;
    min-width: 170px !important;
    margin-top: 6px !important;
    transition: all 0.2s ease !important;
    border: 1px solid var(--border-light) !important;
    z-index: 1050 !important;
}

.dropdown-menu-custom .dropdown-item {
    font-family: 'Vazirmatn', sans-serif !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    color: var(--text-muted-green) !important;
    padding: 8px 12px !important;
    border-radius: var(--radius-md) !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    transition: all 0.15s ease !important;
}

.dropdown-menu-custom .dropdown-item i {
    font-size: 1rem !important;
}

.dropdown-menu-custom .dropdown-item:hover,
.dropdown-menu-custom .dropdown-item:focus {
    background-color: var(--bs-body-bg) !important;
    color: var(--text-main) !important;
}

.dropdown-menu-custom .dropdown-item.text-danger:hover {
    background-color: var(--sys-red-bg) !important;
    color: var(--sys-red) !important;
}

.dropdown-menu-custom .dropdown-divider {
    border-top: 1px solid var(--border-light) !important;
    margin: 6px 0 !important;
    opacity: 1 !important;
}

/* Custom ApexCharts Hover Overrides */
.apexcharts-bar-area[fill="#ffbe0b"]:hover,
.apexcharts-bar-area[fill="#B4F105"]:hover,
.apexcharts-bar-area[fill="#b4f105"]:hover,
.apexcharts-pie-area[fill="#ffbe0b"]:hover,
.apexcharts-pie-area[fill="#B4F105"]:hover,
.apexcharts-pie-area[fill="#b4f105"]:hover {
    fill: var(--blaze-orange) !important;
}

/* ---------------------------------------------------------------------
   16. Footer Component Styles
--------------------------------------------------------------------- */
.footer-custom {
    margin-top: auto;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(11, 19, 15, 0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1.5rem;
    font-size: 0.85rem;
    color: var(--text-muted-green);
    transition: all 0.3s ease;
}

.footer-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.footer-logo {
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.footer-logo i {
    color: var(--amber-gold);
    font-size: 0.95rem;
    display: inline-block;
    animation: rotateLogo 12s linear infinite;
}

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

.footer-separator {
    color: var(--border-light);
    opacity: 0.6;
    user-select: none;
}

.footer-copy {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.footer-heart {
    font-size: 0.75rem;
    display: inline-block;
    animation: heartBeat 1.5s ease infinite;
}

@keyframes heartBeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.footer-right {
    display: flex;
    align-items: center;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.footer-link {
    color: var(--text-muted-green);
    font-weight: 600;
    transition: color 0.25s ease-in-out;
    text-decoration: none;
}

.footer-link:hover {
    color: var(--brand-forest-dark);
    text-decoration: none;
}


.footer-link .status-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    background-color: var(--sys-green);
    border-radius: 50%;
    margin-left: 0.35rem;
    vertical-align: middle;
    box-shadow: 0 0 6px var(--sys-green);
    animation: statusPulse 2s infinite;
}

@keyframes statusPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4);
    }
    70% {
        box-shadow: 0 0 0 6px rgba(34, 197, 94, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
    }
}

@media (max-width: 768px) {
    .footer-custom {
        flex-direction: column;
        align-items: center;
        text-align: center;
        margin-top: 1.5rem;
        gap: 1rem;
    }
    
    .footer-left {
        flex-direction: column;
        gap: 0.5rem;
        align-items: center;
    }
    
    .footer-separator {
        display: none;
    }
    
    .footer-links {
        justify-content: center;
        flex-wrap: wrap;
        gap: 1rem;
    }
}

/* ---------------------------------------------------------------------
   13. Login Page Styles (.login-wrapper)
--------------------------------------------------------------------- */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bs-body-bg);
    padding: 1.5rem 1.5rem var(--page-bottom-gap);
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
}

/* Geometric background decoration */
.login-bg-shape {
    position: absolute;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--brand-lime-translucent) 0%, rgba(255, 190, 11, 0) 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}
.login-bg-shape-1 {
    top: -50px;
    left: -50px;
}
.login-bg-shape-2 {
    bottom: -100px;
    right: -50px;
    width: 400px;
    height: 400px;
}

.login-card {
    background-color: var(--card-background);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xxl);
    padding: 1.35rem 1.5rem 1.25rem;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-lg);
    z-index: 1;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.login-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 30px 60px rgba(11, 19, 15, 0.12);
}

.login-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--brand-forest-dark);
    margin-bottom: 0.5rem;
    text-decoration: none;
}

.login-brand-logo {
    width: auto;
    height: 72px;
    max-width: 260px;
    object-fit: contain;
    flex-shrink: 0;
    display: block;
}

.login-brand i {
    color: var(--brand-forest-medium);
    font-size: 1.75rem;
    animation: rotateLogo 15s linear infinite;
}

.login-brand:hover,
.login-brand:hover i,
.login-brand:focus,
.login-brand:focus i {
    color: var(--brand-forest-dark);
    text-decoration: none;
}

.login-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
    text-align: center;
    margin-bottom: 0.35rem;
    letter-spacing: -0.02em;
}

.login-subtitle {
    font-size: 0.875rem;
    color: var(--text-muted-green);
    text-align: center;
    margin-bottom: 1rem;
}

.login-form-group {
    margin-bottom: 0.85rem;
    position: relative;
}

.login-form-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.5rem;
    display: block;
}

.login-input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.login-input-group i.input-icon {
    position: absolute;
    left: 1.25rem;
    color: var(--text-muted-green);
    font-size: 1.1rem;
    pointer-events: none;
    transition: color 0.25s ease;
}

.login-input {
    width: 100%;
    background-color: var(--bs-body-bg);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 0.8rem 1.25rem 0.8rem 2.85rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
    outline: none;
    transition: all 0.25s ease-in-out;
}

/* Adjust padding for password field to fit eye toggle */
.login-input-password {
    padding-right: 2.85rem;
}

.login-input:focus {
    background-color: #FFFFFF;
    border-color: var(--brand-forest-medium);
    box-shadow: 0 0 0 4px var(--brand-lime-translucent);
}

.login-input:focus + i.input-icon {
    color: var(--brand-forest-medium);
}

.password-toggle-btn {
    position: absolute;
    right: 1.25rem;
    background: none;
    border: none;
    color: var(--text-muted-green);
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    font-size: 1.1rem;
    transition: color 0.2s;
}

.password-toggle-btn:hover {
    color: var(--brand-forest-medium);
}

.login-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    font-size: 0.825rem;
}

/* Custom Checkbox Styling */
.custom-control-label {
    cursor: pointer;
    font-weight: 600;
    color: var(--text-muted-green);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    user-select: none;
}

.custom-checkbox-input {
    width: 18px;
    height: 18px;
    border-radius: var(--radius-sm);
    border: 2px solid var(--text-muted-green);
    appearance: none;
    outline: none;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
    background-color: transparent;
}

.custom-checkbox-input:checked {
    background-color: var(--brand-forest-medium);
    border-color: var(--brand-forest-medium);
}

.custom-checkbox-input:checked::before {
    content: "\f272"; /* check icon in bootstrap-icons font */
    font-family: "bootstrap-icons";
    font-weight: 900;
    font-size: 0.7rem;
    color: #FFFFFF;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.forgot-password-link {
    color: var(--brand-forest-medium);
    font-weight: 600;
    text-decoration: none;
}

.forgot-password-link:hover {
    color: var(--brand-lime-hover);
    text-decoration: underline;
}

.btn-login {
    background-color: var(--brand-primary);
    color: #FFFFFF;
    border: none;
    border-radius: var(--radius-lg);
    padding: 0.85rem;
    font-weight: 700;
    font-size: 0.95rem;
    width: 100%;
    box-shadow: var(--shadow-sm);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-login:hover {
    background-color: var(--brand-primary-hover);
    color: #FFFFFF;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--brand-primary-translucent);
}

.btn-login i {
    font-size: 1rem;
    transition: transform 0.25s ease;
}

.btn-login:hover i {
    transform: translateX(3px);
}

.login-divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--text-muted-green);
    margin: 1.75rem 0;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.6;
}

.login-divider::before,
.login-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-light);
}

.login-divider:not(:empty)::before {
    margin-right: .75rem;
}

.login-divider:not(:empty)::after {
    margin-left: .75rem;
}

.social-login-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 1.75rem;
}

.btn-social {
    background-color: #FFFFFF;
    border: 1px solid var(--border-light);
    color: var(--text-main);
    border-radius: var(--radius-lg);
    padding: 0.7rem;
    font-weight: 600;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}

.btn-social:hover {
    background-color: var(--bs-body-bg);
    border-color: rgba(0, 0, 0, 0.1);
}

.btn-social i {
    font-size: 1.1rem;
}

.login-footer-text {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted-green);
    font-weight: 600;
    margin-top: 0.85rem;
    margin-bottom: 0;
}

.login-footer-text a {
    color: var(--brand-forest-medium);
    font-weight: 700;
}

.login-footer-text a:hover {
    color: var(--brand-lime-hover);
    text-decoration: underline;
}

/* =====================================================================
   16. Navbar Profile Dropdown Styles
   ===================================================================== */
.navbar-profile-btn {
    background: transparent;
    border: none;
    padding: 0.25rem 0;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    border-radius: var(--radius-lg);
    transition: all 0.2s ease-in-out;
    cursor: pointer;
}

.navbar-profile-btn:hover {
    background-color: var(--bs-body-bg);
}

.navbar-profile-btn:focus {
    outline: none;
}

.navbar-profile-btn.dropdown-toggle::after {
    display: none !important;
}

.navbar-profile-img {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    transition: border-color 0.2s;
}

.navbar-profile-btn:hover .navbar-profile-img {
    border-color: var(--brand-lime-hover);
}

.navbar-profile-name {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-main);
    transition: color 0.2s;
}

.navbar-profile-btn:hover .navbar-profile-name {
    color: var(--brand-forest-medium);
}

.navbar-profile-caret {
    font-size: 0.75rem;
    color: var(--text-muted-green);
    transition: transform 0.2s, color 0.2s;
}

.navbar-profile-btn:hover .navbar-profile-caret {
    color: var(--brand-forest-medium);
}

.navbar-profile-btn[aria-expanded="true"] .navbar-profile-caret {
    transform: rotate(180deg);
}

/* Custom Dropdown Menu for Profile */
.dropdown-menu-profile {
    width: 240px;
    background-color: #FFFFFF !important;
    border: 1px solid var(--border-light) !important;
    border-radius: var(--radius-xl) !important;
    box-shadow: var(--shadow-lg) !important;
    padding: 0.5rem 0 !important;
    margin-top: 0.5rem !important;
    border: none !important;
    animation: dropdownFadeIn 0.2s ease;
}

.profile-dropdown-head {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1.25rem 0.75rem;
}

.profile-dropdown-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid var(--border-light);
}

.profile-dropdown-info {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.profile-dropdown-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.3;
}

.profile-dropdown-welcome {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted-green);
}


.dropdown-menu-profile .dropdown-header {
    font-size: 0.725rem;
    font-weight: 750;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted-green);
    padding: 0.65rem 1.25rem 0.35rem;
}

.dropdown-menu-profile .dropdown-item {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
    padding: 0.65rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.2s ease-in-out;
}

.dropdown-menu-profile .dropdown-item i {
    font-size: 1.05rem;
    color: var(--text-muted-green);
    transition: color 0.2s;
}

.dropdown-menu-profile .dropdown-item:hover {
    background-color: var(--bs-body-bg);
    color: var(--brand-forest-medium);
}

.dropdown-menu-profile .dropdown-item:hover i {
    color: var(--brand-forest-medium);
}

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

/* ---------------------------------------------------------------------
   18. Reusable Premium Table Component
--------------------------------------------------------------------- */
.table-card-custom {
    background-color: #FFFFFF;
    border-radius: var(--radius-xl);
    border: 1px solid rgba(11, 19, 15, 0.06) !important;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    margin-bottom: 1.25rem !important; /* Pushes the main footer down to create breathing space */
    width: 100%;
}

.table-card-custom .table-responsive {
    padding: 0.35rem 1.5rem 0.15rem;
}

.table-custom {
    width: 100%;
    margin-bottom: 0;
    vertical-align: middle;
    border-collapse: collapse;
}

.table-custom th,
.table-custom td {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(11, 19, 15, 0.05);
    white-space: nowrap;
}

.table-custom th {
    background-color: #F8FAF9;
    color: var(--text-muted-green);
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.05em;
    border-bottom: 1px solid rgba(11, 19, 15, 0.08);
}

.table-custom tbody tr {
    transition: background-color 0.2s ease-in-out;
}

.table-custom tbody tr.table-row-clickable {
    cursor: pointer;
}

.table-custom tbody tr.table-row-clickable:hover {
    background-color: rgba(58, 134, 255, 0.07);
}

.table-custom tbody tr:hover {
    background-color: rgba(58, 134, 255, 0.07);
}

.table-custom tbody tr:last-child td {
    border-bottom: none;
}

/* User/Product visual info cell */
.table-user-cell {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.table-user-avatar {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-lg);
    object-fit: cover;
    background-color: var(--brand-forest-medium);
}

.table-user-name {
    font-weight: 700;
    color: var(--text-main);
    font-size: 0.875rem;
}

.table-user-sub {
    font-size: 0.75rem;
    color: var(--text-muted-green);
}

/* Badge styles */
.badge-table {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.65rem;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 50rem;
}

.badge-table::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50rem;
}

.badge-table.success {
    background-color: rgba(34, 197, 94, 0.12);
    color: #16a34a;
}
.badge-table.success::before {
    background-color: #22c55e;
}

.badge-table.pending {
    background-color: rgba(249, 115, 22, 0.1);
    color: var(--sys-orange);
}
.badge-table.pending::before {
    background-color: var(--sys-orange);
}

.badge-table.failed {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--sys-red);
}
.badge-table.failed::before {
    background-color: var(--sys-red);
}

/* Table Controls Top bar */
.table-per-page-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(11, 19, 15, 0.06);
    background-color: #FFFFFF;
}

.table-header-control {
    background-color: #FFFFFF;
    padding: 1.1rem 1.5rem;
    border-bottom: 1px solid rgba(11, 19, 15, 0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.table-search-box {
    position: relative;
    max-width: 320px;
    flex-grow: 1;
}

.table-search-input {
    width: 100%;
    padding: 0.5rem 2.25rem 0.5rem 1rem;
    font-size: 0.85rem;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(11, 19, 15, 0.1);
    background-color: #FDFDFD;
    transition: all 0.2s ease-in-out;
    direction: rtl !important;
    text-align: right !important;
}

.table-search-input:focus {
    outline: none;
    border-color: var(--brand-forest-medium);
    box-shadow: 0 0 0 3px rgba(7, 47, 31, 0.08);
}

.table-search-icon {
    position: absolute;
    right: 0.75rem;
    left: auto;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted-green);
    font-size: 0.85rem;
}

/* Table Actions dropdown/filters */
.table-filter-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.btn-table-action {
    background-color: #FFFFFF;
    border: 1px solid rgba(11, 19, 15, 0.1);
    color: var(--brand-forest-dark);
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-lg);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    transition: all 0.2s ease-in-out;
}

.btn-table-action:hover {
    background-color: #F8FAF9;
    border-color: var(--brand-forest-medium);
}

/* Action button items in table cell */
.table-btn-action {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(11, 19, 15, 0.08);
    background-color: #FFFFFF;
    color: var(--brand-forest-dark);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    transition: all 0.2s ease-in-out;
    text-decoration: none;
    cursor: pointer;
    padding: 0;
}

.table-btn-action:hover {
    background-color: var(--brand-forest-medium);
    color: #FFFFFF;
    border-color: var(--brand-forest-medium);
}

.table-btn-action.edit {
    color: var(--brand-primary);
    border-color: var(--brand-primary-border);
    background-color: var(--brand-primary-soft);
    width: 34px;
    height: 34px;
    font-size: 0.95rem;
}

.table-btn-action.edit:hover {
    background-color: var(--brand-primary);
    color: #FFFFFF;
    border-color: var(--brand-primary);
}

.table-btn-action.delete {
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.28);
    background-color: rgba(239, 68, 68, 0.08);
}

.table-btn-action.delete:hover {
    background-color: #ef4444;
    color: #FFFFFF;
    border-color: #ef4444;
}

.table-row-actions {
    gap: 0.5rem !important;
}

.table-per-page {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.82rem;
    color: var(--text-muted-green);
    white-space: nowrap;
}

.table-per-page label {
    margin: 0;
    font-weight: 600;
}

.table-per-page-select {
    width: auto;
    min-width: 72px;
    padding: 0.45rem 1.75rem 0.45rem 0.75rem;
    font-size: 0.82rem;
    font-weight: 700;
}

.table-per-page .custom-select {
    width: auto;
    min-width: 118px;
}

.table-per-page .custom-select-trigger {
    padding: 0.45rem 0.75rem;
    font-size: 0.82rem;
    font-weight: 700;
    min-height: auto;
}

.table-per-page .custom-select-menu {
    min-width: 118px;
}

/* Table Footer Pagination */
.table-footer-control {
    background-color: #FFFFFF;
    padding: 1.1rem 1.5rem 1.25rem;
    border-top: 1px solid rgba(11, 19, 15, 0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.table-pagination-info {
    font-size: 0.85rem;
    color: var(--text-muted-green);
    font-weight: 500;
}

.table-pagination {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.table-pagination-pages {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.btn-table-page {
    min-width: 36px;
    height: 36px;
    padding: 0 0.75rem;
    border: 1px solid rgba(11, 19, 15, 0.1);
    border-radius: var(--radius-lg);
    background-color: #FFFFFF;
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    transition: all 0.2s ease-in-out;
    cursor: pointer;
}

.btn-table-page:hover:not(:disabled):not(.active) {
    border-color: var(--brand-primary);
    color: var(--brand-primary);
    background-color: var(--brand-primary-soft);
}

.btn-table-page.active {
    background-color: var(--brand-primary);
    border-color: var(--brand-primary);
    color: #FFFFFF;
    box-shadow: 0 4px 12px var(--brand-primary-translucent);
}

.btn-table-page:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    background-color: #F8FAF9;
}

.btn-table-page.nav-btn {
    padding: 0 1rem;
    font-weight: 600;
    color: var(--text-muted-green);
}

.btn-table-page.nav-btn:not(:disabled):hover {
    color: var(--brand-primary);
}

.table-role-cell {
    min-width: 160px;
}

.table-users th,
.table-users td {
    white-space: normal;
    padding: 0.85rem 1.1rem;
    font-size: 0.84rem;
}

.table-users .table-order-id {
    width: 52px;
    white-space: nowrap;
}

.table-users .table-user-name {
    min-width: 120px;
    max-width: 160px;
}

.table-users .table-user-username code {
    font-size: 0.78rem;
    white-space: nowrap;
}

.table-users .table-user-email {
    max-width: 170px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.table-users .table-role-label {
    white-space: nowrap;
    font-weight: 600;
}

.table-users .table-user-login {
    white-space: nowrap;
    font-size: 0.78rem;
    color: var(--text-muted-green);
}

.table-users .table-row-actions {
    white-space: nowrap;
}

.table-users th:last-child,
.table-users td:last-child {
    width: 84px;
}

.table-users .badge-table {
    font-size: 0.68rem;
    padding: 0.15rem 0.45rem;
}

.table-role-select {
    min-width: 140px;
    padding: 0.45rem 1.75rem 0.45rem 0.75rem;
    font-size: 0.82rem;
}

/* Custom column styles */
.table-order-id {
    font-weight: 700;
    color: var(--text-main);
}

.table-product-name {
    font-weight: 600;
    color: var(--text-main);
}

.table-amount {
    font-weight: 700;
    color: var(--text-main);
}

/* Custom Table pagination overrides */
.table-footer-control .pagination .page-link {
    border-radius: var(--radius-md);
    color: var(--brand-forest-dark);
    background-color: transparent;
    transition: all 0.25s ease-in-out;
}

.table-footer-control .pagination .page-link:hover {
    background-color: #F8FAF9;
    color: var(--brand-forest-medium);
}

.table-footer-control .pagination .page-item.active .page-link {
    background-color: var(--brand-forest-medium) !important;
    color: #FFFFFF !important;
}

.table-footer-control .pagination .page-item.disabled .page-link {
    opacity: 0.5;
    color: var(--text-muted-green);
    pointer-events: none;
}

/* ---------------------------------------------------------------------
   19. Custom Premium Form Elements Design System
--------------------------------------------------------------------- */
.form-label-custom {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.form-control-custom {
    display: block;
    width: 100%;
    padding: 0.6rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.5;
    color: var(--text-main);
    background-color: #FFFFFF;
    background-clip: padding-box;
    border: 1px solid rgba(11, 19, 15, 0.12);
    border-radius: var(--radius-lg);
    transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    direction: rtl !important;
    text-align: right !important;
}

.form-control-custom[dir="ltr"],
.input-ltr {
    direction: ltr !important;
    text-align: left !important;
}

/* RTL caret for all Persian text fields */
body[dir="rtl"] textarea:not([dir="ltr"]):not(.input-ltr),
body[dir="rtl"] input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="image"]):not([dir="ltr"]):not(.input-ltr):not(.batab-date-input) {
    direction: rtl !important;
    text-align: right !important;
}

body[dir="rtl"] textarea:not([dir="ltr"]):not(.input-ltr)::placeholder,
body[dir="rtl"] input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([dir="ltr"]):not(.input-ltr):not(.batab-date-input)::placeholder,
.form-control-custom:not([dir="ltr"]):not(.input-ltr)::placeholder {
    direction: rtl !important;
    text-align: right !important;
}

.form-control-custom:focus {
    color: var(--text-main);
    background-color: #FFFFFF;
    border-color: var(--brand-primary);
    outline: 0;
    box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.12);
}

.form-control-custom::placeholder {
    color: var(--text-muted-green);
    opacity: 0.55;
}

.form-control-custom:disabled,
.form-control-custom[readonly] {
    background-color: #F8FAF9;
    border-color: rgba(11, 19, 15, 0.06);
    color: var(--text-muted-green);
    opacity: 0.8;
    cursor: not-allowed;
}

/* Sizing overrides */
.form-control-custom-sm {
    padding: 0.35rem 0.75rem;
    font-size: 0.75rem;
    border-radius: var(--radius-md);
}

.form-control-custom-lg {
    padding: 0.75rem 1.25rem;
    font-size: 1rem;
    border-radius: var(--radius-xl);
}

/* Select overrides */
.form-select-custom {
    display: block;
    width: 100%;
    padding: 0.6rem 2.25rem 0.6rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.5;
    color: var(--text-main);
    background-color: #FFFFFF;
    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='%23072F1F' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 12px 10px;
    border: 1px solid rgba(11, 19, 15, 0.12);
    border-radius: var(--radius-lg);
    transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    appearance: none;
}

.form-select-custom:focus {
    border-color: var(--brand-forest-medium);
    outline: 0;
    box-shadow: 0 0 0 3px rgba(7, 47, 31, 0.08);
}

.form-select-custom:disabled {
    background-color: #F8FAF9;
    border-color: rgba(11, 19, 15, 0.06);
    color: var(--text-muted-green);
    opacity: 0.8;
    cursor: not-allowed;
}

/* Custom in-page select (replaces native browser dropdown) */
.custom-select {
    position: relative;
    width: 100%;
}

.custom-select-native {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.custom-select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    width: 100%;
    padding: 0.6rem 1rem;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.5;
    color: var(--text-main);
    background-color: #FFFFFF;
    border: 1px solid rgba(11, 19, 15, 0.12);
    border-radius: var(--radius-lg);
    cursor: pointer;
    text-align: right;
    transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.custom-select-trigger:hover {
    border-color: rgba(11, 19, 15, 0.2);
}

.custom-select-trigger:focus {
    border-color: var(--brand-forest-medium);
    outline: 0;
    box-shadow: 0 0 0 3px rgba(7, 47, 31, 0.08);
}

.custom-select.is-open .custom-select-trigger {
    border-color: var(--brand-forest-medium);
    box-shadow: 0 0 0 3px rgba(7, 47, 31, 0.08);
}

.custom-select-value {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.custom-select-chevron {
    font-size: 0.75rem;
    color: var(--text-muted-green);
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.custom-select.is-open .custom-select-chevron {
    transform: rotate(180deg);
}

.custom-select-menu {
    display: none;
    position: fixed;
    z-index: 10060;
    background: #FFFFFF;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 8px 6px;
    max-height: 280px;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 107, 0, 0.45) transparent;
}

.custom-select-menu::-webkit-scrollbar {
    width: 6px;
}

.custom-select-menu::-webkit-scrollbar-thumb {
    background: rgba(255, 107, 0, 0.45);
    border-radius: 999px;
}

.custom-select-menu.is-visible {
    display: block;
    animation: dropdownFadeIn 0.2s ease;
}

.custom-select-option {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 8px 12px;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted-green);
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    text-align: right;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.custom-select-option:hover,
.custom-select-option:focus {
    background: rgba(7, 47, 31, 0.06);
    color: var(--text-main);
    outline: none;
}

.custom-select-option.is-selected {
    color: var(--brand-primary);
    background: var(--brand-primary-soft);
}

.custom-select-option.is-disabled,
.custom-select-option:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.custom-select.is-disabled .custom-select-trigger {
    background-color: #F8FAF9;
    border-color: rgba(11, 19, 15, 0.06);
    color: var(--text-muted-green);
    opacity: 0.8;
    cursor: not-allowed;
}

/* Custom Checkbox & Radios */
.form-check-custom {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 1.5rem;
    margin-bottom: 0.5rem;
}

.form-check-input-custom {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 18px;
    height: 18px;
    margin-top: 0;
    vertical-align: top;
    background-color: #FFFFFF;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    border: 1px solid rgba(11, 19, 15, 0.15);
    transition: background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
    cursor: pointer;
}

.form-check-input-custom[type="checkbox"] {
    border-radius: var(--radius-md);
}

.form-check-input-custom[type="radio"] {
    border-radius: 50rem;
}

.form-check-input-custom:focus {
    outline: 0;
    border-color: var(--brand-lime-hover);
    box-shadow: 0 0 0 3px var(--brand-lime-translucent);
}

.form-check-input-custom:checked {
    background-color: var(--brand-lime);
    border-color: var(--brand-lime);
}

.form-check-input-custom[type="checkbox"]:checked {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23072F1F' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e");
}

.form-check-input-custom[type="radio"]:checked {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3ccircle cx='8' cy='8' r='3.5' fill='%23072F1F'/%3e%3c/svg%3e");
}

.form-check-input-custom:disabled {
    background-color: #F8FAF9;
    border-color: rgba(11, 19, 15, 0.06);
    opacity: 0.8;
    cursor: not-allowed;
}

/* Custom switch button style */
.form-switch-custom {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-height: 1.5rem;
    margin-bottom: 0.5rem;
}

.form-switch-input-custom {
    width: 38px;
    height: 20px;
    border-radius: 50rem;
    background-color: rgba(11, 19, 15, 0.1);
    position: relative;
    border: 1px solid rgba(11, 19, 15, 0.08);
    transition: background-color 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    appearance: none;
    outline: none;
}

.form-switch-input-custom::before {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border-radius: 50rem;
    left: 1px;
    top: 1px;
    background-color: #FFFFFF;
    box-shadow: 0 2px 4px rgba(11, 19, 15, 0.15);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-switch-input-custom:checked {
    background-color: var(--brand-forest-medium);
    border-color: var(--brand-forest-medium);
}

.form-switch-input-custom:checked::before {
    transform: translateX(18px);
}

.form-switch-input-custom:focus {
    box-shadow: 0 0 0 3px rgba(7, 47, 31, 0.08);
}

.form-switch-input-custom:disabled {
    background-color: #F8FAF9;
    border-color: rgba(11, 19, 15, 0.06);
    opacity: 0.8;
    cursor: not-allowed;
}

/* Input group styles */
.input-group-custom {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    width: 100%;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(11, 19, 15, 0.12);
    background-color: #FFFFFF;
    overflow: hidden;
    transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.input-group-custom:focus-within {
    border-color: var(--brand-forest-medium);
    box-shadow: 0 0 0 3px rgba(7, 47, 31, 0.08);
}

.input-group-text-custom {
    display: flex;
    align-items: center;
    padding: 0.375rem 0.85rem;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.5;
    color: var(--text-muted-green);
    text-align: center;
    white-space: nowrap;
    background-color: #F8FAF9;
}

.input-group-custom .form-control-custom {
    border: none !important;
    border-radius: 0 !important;
    flex: 1 1 auto;
    width: 1%;
    min-width: 0;
    padding-left: 0.75rem;
}

.input-group-custom .form-control-custom:focus {
    box-shadow: none !important;
}

#postSlug,
.input-group-custom #postSlug {
    direction: ltr !important;
    text-align: left !important;
}

/* Validation styles */
.form-control-custom.is-invalid-custom {
    border-color: var(--sys-red) !important;
}

.form-control-custom.is-invalid-custom:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.08) !important;
}

.form-control-custom.is-valid-custom {
    border-color: var(--sys-green) !important;
}

.form-control-custom.is-valid-custom:focus {
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.08) !important;
}

.form-feedback-custom {
    display: block;
    width: 100%;
    margin-top: 0.35rem;
    font-size: 0.75rem;
    font-weight: 700;
}

.form-feedback-custom.invalid-custom {
    color: var(--sys-red);
}

.form-feedback-custom.valid-custom {
    color: var(--sys-green);
}

/* ---------------------------------------------------------------------
   20. Reusable Custom Buttons & Alerts Design System
--------------------------------------------------------------------- */
/* Custom Buttons base style */
.btn-custom {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.6rem 1.25rem;
    border-radius: var(--radius-lg);
    border: 1px solid transparent;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    text-decoration: none;
    line-height: 1.5;
}

.btn-custom:active {
    transform: scale(0.97);
}

.btn-custom:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(7, 47, 31, 0.15);
}

/* Custom Buttons sizing variants */
.btn-custom-sm {
    padding: 0.35rem 0.75rem;
    font-size: 0.75rem;
    border-radius: var(--radius-md);
}

.btn-custom-lg {
    padding: 0.75rem 1.75rem;
    font-size: 1rem;
    border-radius: var(--radius-xl);
}

/* Custom Buttons color variants */
.btn-custom-primary {
    background-color: var(--brand-primary);
    border-color: var(--brand-primary);
    color: #FFFFFF;
}

.btn-custom-primary:hover {
    background-color: var(--brand-primary-hover);
    border-color: var(--brand-primary-hover);
    color: #FFFFFF;
}

.btn-custom-secondary {
    background-color: var(--brand-primary);
    border-color: var(--brand-primary);
    color: #FFFFFF;
}

.btn-custom-secondary:hover {
    background-color: var(--brand-primary-hover);
    border-color: var(--brand-primary-hover);
    color: #FFFFFF;
}

.btn-custom-light {
    background-color: #F8FAF9;
    border-color: rgba(11, 19, 15, 0.08);
    color: var(--brand-forest-dark);
}

.btn-custom-light:hover {
    background-color: #EEF2F0;
    border-color: rgba(11, 19, 15, 0.12);
    color: var(--brand-forest-dark);
}

.btn-custom-danger {
    background-color: var(--sys-red);
    border-color: var(--sys-red);
    color: #FFFFFF;
}

.btn-custom-danger:hover {
    background-color: #d90063;
    border-color: #d90063;
    color: #FFFFFF;
}

.btn-custom-warning {
    background-color: var(--amber-gold);
    border-color: var(--amber-gold);
    color: var(--brand-forest-dark);
}

.btn-custom-warning:hover {
    background-color: var(--brand-lime-hover);
    border-color: var(--brand-lime-hover);
    color: var(--brand-forest-dark);
}

/* Custom Buttons outline variants */
.btn-custom-outline-primary {
    background-color: transparent;
    border-color: var(--brand-primary);
    color: var(--brand-primary);
}

.btn-custom-outline-primary:hover {
    background-color: var(--brand-primary);
    border-color: var(--brand-primary);
    color: #FFFFFF;
}

.btn-custom-outline-secondary {
    background-color: transparent;
    border-color: var(--amber-gold);
    color: var(--brand-forest-dark);
}

.btn-custom-outline-secondary:hover {
    background-color: var(--amber-gold);
    border-color: var(--amber-gold);
    color: var(--brand-forest-dark);
}

.btn-custom-outline-danger {
    background-color: transparent;
    border-color: var(--sys-red);
    color: var(--sys-red);
}

.btn-custom-outline-danger:hover {
    background-color: var(--sys-red);
    color: #FFFFFF;
}

.settings-tabs .nav-link {
    color: var(--text-muted-green);
    font-weight: 700;
    border: none;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    padding: 0.75rem 1rem;
}

.settings-tabs .nav-link.active {
    color: var(--menu-accent);
    background: transparent;
    border-bottom-color: var(--menu-accent);
}

.settings-repeat-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.settings-repeat-item {
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 1rem;
    background: #fff;
}

/* Settings Studio */
.settings-studio-page .main-wrapper {
    padding-bottom: var(--page-bottom-gap);
}

.settings-page-header {
    align-items: flex-start;
}

.settings-header-actions {
    flex-shrink: 0;
}

.settings-studio-layout {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
}

.settings-studio-nav {
    position: sticky;
    top: 1rem;
    padding: 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    overflow: visible;
}

.settings-nav-search-wrap {
    position: relative;
    padding: 0 0.15rem;
}

.settings-nav-search-wrap > i {
    position: absolute;
    right: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted-green);
    font-size: 0.9rem;
    pointer-events: none;
}

.settings-nav-search {
    width: 100%;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    background: #fff;
    padding: 0.55rem 2.1rem 0.55rem 0.75rem;
    font-size: 0.85rem;
    color: var(--text-main);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.settings-nav-search:focus {
    outline: none;
    border-color: rgba(255, 122, 0, 0.45);
    box-shadow: 0 0 0 3px rgba(255, 122, 0, 0.1);
}

.settings-nav-tree {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.settings-nav-group {
    border-radius: var(--radius-md);
}

.settings-nav-group.is-hidden {
    display: none;
}

.settings-nav-group-toggle {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    width: 100%;
    border: none;
    background: transparent;
    border-radius: var(--radius-md);
    padding: 0.45rem 0.55rem;
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--text-muted-green);
    text-align: right;
}

.settings-nav-group-toggle > i:first-child {
    color: var(--menu-accent);
    font-size: 0.95rem;
}

.settings-nav-group-toggle .settings-nav-chevron {
    margin-right: auto;
    font-size: 0.75rem;
    transition: transform 0.2s;
}

.settings-nav-group.is-collapsed .settings-nav-chevron {
    transform: rotate(-90deg);
}

.settings-nav-group-items {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    padding: 0.1rem 0.25rem 0.25rem 0;
}

.settings-nav-group.is-collapsed .settings-nav-group-items {
    display: none;
}

.settings-nav-subitem {
    display: block;
    width: 100%;
    border: none;
    background: transparent;
    border-radius: var(--radius-md);
    padding: 0.42rem 0.65rem 0.42rem 1.25rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted-green);
    text-align: right;
    transition: background 0.15s, color 0.15s;
}

.settings-nav-subitem:hover {
    background: rgba(0, 0, 0, 0.04);
    color: var(--text-dark);
}

.settings-nav-subitem.active {
    background: rgba(255, 122, 0, 0.12);
    color: var(--menu-accent);
    font-weight: 700;
}

.settings-nav-subitem.is-hidden {
    display: none;
}

.settings-nav-empty {
    padding: 0.75rem;
    text-align: center;
    color: var(--text-muted-green);
    font-size: 0.82rem;
}

.settings-studio-content {
    padding: 1.25rem 1.5rem 1.5rem;
    min-width: 0;
}

.settings-studio-nav-title {
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--text-muted-green);
    padding: 0.35rem 0.75rem 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.settings-nav-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    width: 100%;
    border: none;
    background: transparent;
    border-radius: var(--radius-md);
    padding: 0.7rem 0.85rem;
    font-weight: 700;
    color: var(--text-muted-green);
    text-align: right;
    transition: background 0.15s, color 0.15s;
}

.settings-nav-item i {
    font-size: 1.05rem;
    opacity: 0.85;
}

.settings-nav-item:hover {
    background: rgba(0, 0, 0, 0.04);
    color: var(--text-dark);
}

.settings-nav-item.active {
    background: rgba(255, 122, 0, 0.1);
    color: var(--menu-accent);
}

.settings-panel {
    display: none;
}

.settings-panel.active {
    display: block;
}

.settings-panel-head {
    margin-bottom: 1rem;
    scroll-margin-top: 1rem;
}

.settings-panel-head h2 {
    font-size: 1.15rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
}

.settings-panel-head p {
    color: var(--text-muted-green);
    margin: 0;
    font-size: 0.85rem;
}

[data-settings-block].settings-section-highlight {
    animation: settingsHighlight 1.2s ease;
}

@keyframes settingsHighlight {
    0% { box-shadow: 0 0 0 0 rgba(255, 122, 0, 0.35); }
    100% { box-shadow: 0 0 0 0 rgba(255, 122, 0, 0); }
}

.settings-card {
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.settings-card-head {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-light);
}

.settings-card-head i {
    color: var(--menu-accent);
    font-size: 1.1rem;
}

.settings-card-head h3 {
    font-size: 1rem;
    font-weight: 800;
    margin: 0;
}

.settings-field {
    margin-bottom: 1rem;
}

.settings-field label {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted-green);
    margin-bottom: 0.4rem;
}

.settings-section-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.settings-stack {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.settings-entity-card {
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.settings-entity-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    background: linear-gradient(180deg, #fafcfb 0%, #fff 100%);
    border-bottom: 1px solid var(--border-light);
}

.settings-entity-title {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
}

.settings-entity-badge {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(255, 122, 0, 0.12);
    color: var(--menu-accent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 800;
    flex-shrink: 0;
}

.settings-entity-title strong {
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.settings-entity-actions {
    display: flex;
    gap: 0.35rem;
    flex-shrink: 0;
}

.settings-entity-body {
    padding: 1rem;
}

.settings-link-table {
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-top: 0.75rem;
}

.settings-link-table-head,
.settings-link-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) auto;
    gap: 0.5rem;
    align-items: center;
    padding: 0.55rem 0.65rem;
}

.settings-link-table-head {
    background: #f7faf8;
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--text-muted-green);
}

.settings-link-row + .settings-link-row {
    border-top: 1px solid var(--border-light);
}

.settings-link-row input {
    min-width: 0;
}

.settings-icon-btn {
    width: 34px;
    height: 34px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    background: #fff;
    color: var(--text-muted-green);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: all 0.15s;
}

.settings-icon-btn:hover {
    border-color: var(--menu-accent);
    color: var(--menu-accent);
}

.settings-icon-btn.danger:hover {
    border-color: var(--sys-red);
    color: var(--sys-red);
    background: rgba(220, 53, 69, 0.06);
}

.settings-subsection {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px dashed var(--border-light);
}

.settings-subsection-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.65rem;
}

.settings-subsection-head h4 {
    font-size: 0.85rem;
    font-weight: 800;
    margin: 0;
    color: var(--text-dark);
}

.settings-add-btn {
    width: 28px;
    height: 28px;
    min-width: 28px;
    padding: 0;
    border-radius: 8px;
    gap: 0;
    flex-shrink: 0;
}

.settings-add-btn i {
    font-size: 1.05rem;
    line-height: 1;
    font-weight: 700;
}

.settings-chip-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.settings-chip-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.5rem;
    align-items: center;
}

.settings-empty-hint {
    border: 1px dashed var(--border-light);
    border-radius: var(--radius-md);
    padding: 1rem;
    text-align: center;
    color: var(--text-muted-green);
    font-size: 0.85rem;
}

.settings-pricing-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.settings-pricing-tab {
    border: 1px solid var(--border-light);
    background: #fff;
    border-radius: 999px;
    padding: 0.55rem 1rem;
    font-weight: 700;
    color: var(--text-muted-green);
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    transition: all 0.15s;
}

.settings-pricing-tab:hover {
    border-color: rgba(255, 122, 0, 0.35);
    color: var(--menu-accent);
}

.settings-pricing-tab.active {
    background: rgba(255, 122, 0, 0.1);
    border-color: var(--menu-accent);
    color: var(--menu-accent);
}

.settings-plan-card {
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    background: #fff;
    overflow: hidden;
}

.settings-plan-card.featured {
    border-color: rgba(255, 122, 0, 0.45);
    box-shadow: 0 0 0 1px rgba(255, 122, 0, 0.08);
}

.settings-plan-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    background: #fafcfb;
    border-bottom: 1px solid var(--border-light);
}

.settings-plan-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
    padding: 1rem;
}

.settings-plan-grid .full {
    grid-column: 1 / -1;
}

.settings-save-float {
    position: fixed;
    left: 1.5rem;
    bottom: 1.25rem;
    z-index: 1040;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.35rem 0.45rem 0.35rem 0.8rem;
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: 999px;
    box-shadow: 0 6px 20px rgba(15, 8, 32, 0.1);
}

.settings-save-float .settings-save-hint {
    color: var(--text-muted-green);
    font-size: 0.72rem;
    white-space: nowrap;
}

.settings-save-float.is-dirty .settings-save-hint {
    color: var(--menu-accent);
    font-weight: 600;
}

.settings-save-float.is-clean .settings-save-hint {
    color: var(--text-muted-green);
}

.settings-save-float .btn-custom:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Pricing live preview */
.pricing-section-preview {
    border-color: rgba(255, 122, 0, 0.2);
    background: linear-gradient(180deg, #fff 0%, #fffcf9 100%);
}

.pricing-preview-head {
    justify-content: space-between;
    gap: 0.75rem;
}

.pricing-preview-head-text {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.pricing-preview-type {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--menu-accent);
    background: rgba(255, 122, 0, 0.1);
    border: 1px solid rgba(255, 122, 0, 0.2);
    border-radius: 999px;
    padding: 0.25rem 0.65rem;
    white-space: nowrap;
}

.pricing-preview-note {
    color: var(--text-muted-green);
    font-size: 0.82rem;
    margin: -0.35rem 0 1rem;
}

.pricing-live-preview {
    background: linear-gradient(180deg, #faf6f1 0%, #f3f6f8 100%);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    overflow-x: auto;
}

.pv-empty {
    text-align: center;
    color: var(--text-muted-green);
    font-size: 0.88rem;
    padding: 2rem 1rem;
}

.pv-plans-title {
    text-align: center;
    font-size: 1.35rem;
    font-weight: 800;
    margin: 0 0 0.5rem;
    color: var(--text-main);
}

.pv-plans-title .mark {
    color: #ff6b00;
}

.pv-plans-sub {
    text-align: center;
    color: #6b7280;
    font-size: 0.85rem;
    max-width: 36rem;
    margin: 0 auto 1.25rem;
    line-height: 1.8;
}

.pv-plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    align-items: stretch;
}

.pv-plan-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #eeeaf2;
    border-radius: 1.25rem;
    box-shadow: 0 8px 28px rgba(17, 24, 39, 0.06);
    padding: 1.25rem 1rem;
    min-height: 100%;
}

.pv-plan-card.featured {
    background: linear-gradient(180deg, #fff8f3 0%, #fff 42%);
    border: 1.5px solid #ff6b00;
    box-shadow: 0 12px 32px rgba(233, 111, 50, 0.15);
}

.pv-plan-badge {
    position: absolute;
    top: -10px;
    right: 50%;
    transform: translateX(50%);
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: linear-gradient(90deg, #ff8c33, #ff6b00);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.28rem 0.7rem;
    border-radius: 999px;
    white-space: nowrap;
}

.pv-plan-badge svg { width: 0.75rem; height: 0.75rem; }

.pv-plan-name {
    margin: 0.1rem 0 0.55rem;
    font-size: 1.1rem;
    font-weight: 800;
    color: #ff6b00;
    text-align: center;
}

.pv-plan-price {
    margin: 0;
    font-size: 1.55rem;
    font-weight: 800;
    color: #111827;
    text-align: center;
}

.pv-plan-price small {
    font-size: 0.75rem;
    font-weight: 600;
    color: #6b7280;
}

.pv-plan-period,
.pv-plan-desc {
    margin: 0.25rem 0 0.6rem;
    font-size: 0.78rem;
    color: #6b7280;
    text-align: center;
    line-height: 1.6;
}

.pv-plan-card hr {
    border: 0;
    border-top: 1px solid #efeaf3;
    margin: 0 0 0.85rem;
}

.pv-plan-features {
    list-style: none;
    margin: 0 0 1rem;
    padding: 0;
    flex: 1;
}

.pv-plan-features li {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: #374151;
    line-height: 1.55;
    margin-bottom: 0.55rem;
}

.pv-plan-check {
    flex-shrink: 0;
    width: 1.15rem;
    height: 1.15rem;
    border-radius: 0.35rem;
    background: #e8f8ee;
    color: #16a34a;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.pv-plan-check svg { width: 0.65rem; height: 0.65rem; }

.pv-plan-btn {
    display: block;
    margin-top: auto;
    text-align: center;
    color: #111827;
    background: #fff;
    border: 1px solid #e5e7eb;
    font-weight: 700;
    font-size: 0.82rem;
    border-radius: 0.75rem;
    padding: 0.65rem 0.75rem;
}

.pv-plan-card.featured .pv-plan-btn {
    color: #fff;
    border: 0;
    background: linear-gradient(90deg, #ff8c33, #ff6b00);
}

.pv-ig-head {
    text-align: center;
    margin-bottom: 1rem;
}

.pv-ig-head h2 {
    font-size: 1.25rem;
    font-weight: 800;
    margin: 0 0 0.35rem;
}

.pv-ig-head p {
    margin: 0;
    color: #6b7280;
    font-size: 0.82rem;
    line-height: 1.7;
}

.pv-ig-plans {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 1rem;
}

.pv-ig-plan {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
    text-align: center;
    background: #fff;
    border: 1px solid #efe8df;
    border-radius: 1.25rem;
    padding: 1.1rem 0.95rem 0.9rem;
    box-shadow: 0 8px 24px rgba(17, 24, 39, 0.06);
    min-height: 100%;
}

.pv-ig-plan::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 4px;
    background: #ff8a1f;
}

.pv-ig-plan.is-reco {
    border-color: #ff6b00;
    background: linear-gradient(180deg, #fff7f0 0%, #fff 46%);
}

.pv-ig-plan.is-reco::before { background: #ff6b00; }

.pv-ig-plan.is-boom {
    border-color: #0b8eb8;
}

.pv-ig-plan.is-boom::before { background: #0b8eb8; }

.pv-ig-plan-badge {
    display: inline-flex;
    margin: 0 0 0.4rem;
    background: #ff6b00;
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.22rem 0.65rem;
    border-radius: 999px;
}

.pv-ig-plan-kicker {
    margin: 0 0 0.15rem;
    color: #ff6b00;
    font-size: 0.72rem;
    font-weight: 700;
}

.pv-ig-plan h3 {
    margin: 0 0 0.15rem;
    font-size: 1rem;
    font-weight: 800;
}

.pv-ig-plan-price {
    margin: 0 0 0.55rem;
    color: #ff6b00;
    font-size: 1.15rem;
    font-weight: 800;
}

.pv-ig-plan-price small {
    color: #6b7280;
    font-size: 0.72rem;
    font-weight: 600;
}

.pv-ig-plan ul {
    list-style: none;
    margin: 0 0 auto;
    padding: 0;
    width: 100%;
}

.pv-ig-plan li {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    margin: 0 0 0.3rem;
    font-size: 0.8rem;
    color: #374151;
    line-height: 1.55;
}

.pv-ig-plan li::before {
    content: "";
    width: 0.38rem;
    height: 0.38rem;
    border-radius: 50%;
    background: #ff6b00;
    flex-shrink: 0;
}

.pv-ig-plan-foot {
    margin: 0.65rem 0 0;
    padding-top: 0.55rem;
    border-top: 1px solid #f0e9e1;
    color: #6b7280;
    font-size: 0.78rem;
    line-height: 1.6;
    width: 100%;
}

.pv-seo-trust {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1rem;
    padding: 0.75rem;
    background: #fff;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
}

.pv-seo-trust p {
    margin: 0;
    font-size: 0.78rem;
    color: #374151;
    font-weight: 600;
}

.pv-ig-addons {
    margin-top: 1rem;
    padding: 1rem;
    background: #fff;
    border: 1px solid #efe8df;
    border-radius: 1rem;
}

.pv-ig-addons h3 {
    margin: 0 0 0.75rem;
    text-align: center;
    font-size: 0.95rem;
    font-weight: 800;
}

.pv-ig-addon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem;
}

.pv-ig-addon {
    border: 1px solid #f0e9e1;
    border-radius: 0.85rem;
    padding: 0.75rem;
    background: #faf8f5;
}

.pv-ig-addon-tag {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    color: #ff6b00;
    margin-bottom: 0.35rem;
}

.pv-ig-addon h4 {
    margin: 0 0 0.25rem;
    font-size: 0.85rem;
    font-weight: 800;
}

.pv-ig-addon p {
    margin: 0;
    font-size: 0.76rem;
    color: #6b7280;
    line-height: 1.55;
}

.pv-ig-addon .hl {
    margin-top: 0.35rem;
    color: #ff6b00;
    font-weight: 600;
}

.pv-ig-cta {
    margin-top: 1rem;
    padding: 1rem;
    text-align: center;
    background: #fff;
    border: 1px dashed #ff6b00;
    border-radius: 1rem;
}

.pv-ig-cta h2 {
    margin: 0 0 0.25rem;
    font-size: 1rem;
    font-weight: 800;
}

.pv-ig-cta p {
    margin: 0;
    font-size: 0.8rem;
    color: #6b7280;
}

.settings-save-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1040;
    background: rgba(255, 255, 255, 0.96);
    border-top: 1px solid var(--border-light);
    backdrop-filter: blur(8px);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.06);
}

.settings-save-bar--mini {
    box-shadow: 0 -1px 8px rgba(0, 0, 0, 0.04);
}

.settings-save-bar-inner {
    max-width: calc(100% - var(--sidebar-width, 260px));
    margin-right: var(--sidebar-width, 260px);
    padding: 0.85rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.settings-save-bar--mini .settings-save-bar-inner {
    padding: 0.4rem 1.25rem;
    justify-content: flex-end;
    gap: 0.65rem;
}

.settings-save-hint {
    color: var(--text-muted-green);
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.settings-save-bar--mini .settings-save-hint {
    font-size: 0.75rem;
    opacity: 0.85;
}

.settings-save-bar--mini .settings-save-hint i {
    font-size: 0.45rem;
    color: var(--menu-accent);
}

@media (max-width: 991.98px) {
    .settings-studio-layout {
        grid-template-columns: 1fr;
    }

    .settings-studio-nav {
        position: static;
        max-height: none;
        overflow: visible;
    }

    .settings-studio-nav-title {
        width: 100%;
    }

    .settings-nav-item {
        flex: 1 1 auto;
        justify-content: center;
    }

    .settings-save-float {
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
        justify-content: space-between;
        width: auto;
    }

    .settings-plan-grid {
        grid-template-columns: 1fr;
    }

    .settings-link-table-head {
        display: none;
    }

    .settings-link-row {
        grid-template-columns: 1fr;
    }
}

/* Custom alert components */
.alert-custom {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-lg);
    border: 1px solid transparent;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    position: relative;
    font-size: 0.875rem;
    font-weight: 500;
}

.alert-custom-icon {
    font-size: 1.15rem;
    flex-shrink: 0;
}

.alert-custom-content {
    flex-grow: 1;
}

.alert-custom-close {
    background: none;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    opacity: 0.5;
}

.alert-custom-close:hover {
    opacity: 1;
    background-color: rgba(11, 19, 15, 0.05);
}

/* Alert theme variations */
.alert-custom-primary {
    background-color: rgba(7, 47, 31, 0.04);
    border-color: rgba(7, 47, 31, 0.08);
    color: var(--brand-forest-dark);
}

.alert-custom-success {
    background-color: #f0fdf4;
    border-color: #bbf7d0;
    color: #166534;
}

.alert-custom-danger {
    background-color: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

.alert-custom-warning {
    background-color: #fffbeb;
    border-color: #fef3c7;
    color: #92400e;
}

.alert-custom-info {
    background-color: #f0f9ff;
    border-color: #bae6fd;
    color: #075985;
}

/* ---------------------------------------------------------------------
   21. Error 404 Page Styling Layout
--------------------------------------------------------------------- */
.error-card-custom {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 5rem 2rem;
    min-height: 480px;
    background-color: #FFFFFF;
    border-radius: var(--radius-xl);
    border: 1px solid rgba(11, 19, 15, 0.06) !important;
    box-shadow: var(--shadow-sm);
    margin-bottom: 2rem;
}

.error-title-huge {
    font-size: 7.5rem;
    font-weight: 800;
    line-height: 1;
    color: var(--brand-forest-dark);
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.15em;
    font-family: 'Vazirmatn', sans-serif;
}

.error-title-huge .bi-asterisk {
    font-size: 5.5rem;
    color: var(--brand-lime);
    display: inline-block;
    animation: asteriskSpin 20s infinite linear;
}

.error-subtitle {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 1rem;
}

.error-desc {
    max-width: 480px;
    font-size: 0.95rem;
    color: var(--text-muted-green);
    margin-bottom: 2.25rem;
    line-height: 1.6;
}

.error-actions-group {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

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

/* ---------------------------------------------------------------------
   23. Reusable Helper & Utility Classes (Zero Inline Style Policy)
--------------------------------------------------------------------- */
.z-index-2 {
    z-index: 2 !important;
}

.sparkline-card-footer {
    margin-left: -1.75rem;
    margin-right: -1.75rem;
    margin-bottom: -1.75rem;
    margin-top: 1.25rem;
    overflow: hidden;
    border-bottom-left-radius: var(--radius-xxl);
    border-bottom-right-radius: var(--radius-xxl);
}

.chart-legend-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted-green);
}

.stat-value-amount {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-main);
}

.fs-xs {
    font-size: 0.75rem !important;
}

.w-38 {
    width: 38% !important;
}

.w-45 {
    width: 45% !important;
}

.w-50 {
    width: 50% !important;
}

.w-65 {
    width: 65% !important;
}

.w-75 {
    width: 75% !important;
}

.w-85 {
    width: 85% !important;
}


.empty-state-icon {
    font-size: 3.5rem;
    opacity: 0.25;
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(15, 8, 32, 0.4);
    backdrop-filter: blur(4px);
    z-index: 1025;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.sidebar-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* ---------------------------------------------------------------------
   24. Transaction List Component
--------------------------------------------------------------------- */
.transaction-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.transaction-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0.85rem;
    background-color: var(--bs-body-bg);
    border-radius: var(--radius-lg);
    transition: background-color 0.2s ease-in-out;
    min-width: 0;
}

.transaction-item:hover {
    background-color: rgba(15, 8, 32, 0.06);
}

.transaction-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
}

.transaction-icon--thumb {
    background: #fff;
    border: 2px solid rgba(131, 56, 236, 0.18);
    overflow: hidden;
    padding: 0;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.65);
}

.transaction-icon--thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.transaction-info {
    flex: 1 1 auto;
    min-width: 0;
}

.transaction-name {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.2rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.transaction-date {
    font-size: 0.75rem;
    color: var(--text-muted-green);
    margin-bottom: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.transaction-amount {
    font-size: 0.78rem;
    font-weight: 700;
    text-align: left;
    flex: 0 0 auto;
    max-width: 5.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bg-forest-light {
    background-color: var(--brand-forest-dark) !important;
}

.text-lime {
    color: var(--amber-gold) !important;
}

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

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

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

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

/* ---------------------------------------------------------------------
   24. Internal UI: Tooltips, Modals, Toasts
--------------------------------------------------------------------- */
.ui-tooltip {
    position: fixed;
    z-index: 11050;
    background-color: var(--text-main);
    color: #ffffff;
    padding: 0.45rem 0.8rem;
    border-radius: var(--radius-md);
    font-size: 0.8rem;
    font-weight: 600;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease, visibility 0.15s ease;
    white-space: nowrap;
    box-shadow: var(--shadow-md);
}

.ui-tooltip.show {
    opacity: 1;
    visibility: visible;
}

.ui-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 11000;
    background-color: rgba(18, 16, 31, 0.45);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.ui-modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

body.ui-modal-open {
    overflow: hidden;
}

.ui-modal {
    width: 100%;
    max-width: 420px;
    background-color: #ffffff;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-lg);
    padding: 1.5rem;
    transform: translateY(12px) scale(0.98);
    transition: transform 0.2s ease;
}

.ui-modal-overlay.show .ui-modal {
    transform: translateY(0) scale(1);
}

.ui-modal-header {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    margin-bottom: 1.25rem;
}

.ui-modal-icon {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-lg);
    background-color: rgba(255, 0, 110, 0.1);
    color: var(--neon-pink);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
}

.ui-modal-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
    color: var(--text-main);
}

.ui-modal-message {
    margin: 0;
    color: var(--text-muted-green);
    font-size: 0.9rem;
    line-height: 1.6;
}

.ui-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.65rem;
}

.ui-toast-container {
    position: fixed;
    top: 1.25rem;
    left: 1.25rem;
    z-index: 11060;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    pointer-events: none;
}

.ui-toast {
    min-width: 280px;
    max-width: 360px;
    background-color: #ffffff;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 0.85rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    opacity: 0;
    transform: translateY(-8px);
    transition: all 0.2s ease;
    pointer-events: auto;
}

.ui-toast.show {
    opacity: 1;
    transform: translateY(0);
}

.ui-toast-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
}

.ui-toast-text {
    flex: 1;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-main);
}

.ui-toast-close {
    border: none;
    background: transparent;
    color: var(--text-muted-green);
    padding: 0.15rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
}

.ui-toast-close:hover {
    background-color: rgba(11, 19, 15, 0.05);
    color: var(--text-main);
}

.ui-toast-success {
    border-color: #bbf7d0;
}

.ui-toast-success .ui-toast-icon {
    color: #16a34a;
}

.ui-toast-danger {
    border-color: #fecaca;
}

.ui-toast-danger .ui-toast-icon {
    color: var(--neon-pink);
}

.ui-toast-warning {
    border-color: #fef3c7;
}

.ui-toast-warning .ui-toast-icon {
    color: var(--amber-gold);
}

.ui-toast-info {
    border-color: #bae6fd;
}

.ui-toast-info .ui-toast-icon {
    color: var(--azure-blue);
}

/* ---------------------------------------------------------------------
   SEO Assistant (Yoast-style)
--------------------------------------------------------------------- */
.seo-assistant-card {
    margin-top: 1.5rem;
}

.seo-assistant-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.seo-assistant-subtitle {
    font-size: 0.82rem;
    color: var(--text-muted-green);
}

.seo-density-line {
    margin-top: 0.45rem;
    font-size: 0.78rem;
    color: var(--text-muted-green);
}

.seo-density-line strong {
    color: var(--text-main);
    font-weight: 700;
}

.seo-result-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 0.75rem 0 0.35rem;
}

.seo-result-filters button {
    border: 1px solid rgba(15, 61, 46, 0.12);
    background: #fff;
    color: #31463d;
    border-radius: 999px;
    padding: 0.28rem 0.7rem;
    font-size: 0.75rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.seo-result-filters button:hover {
    border-color: rgba(255, 107, 0, 0.35);
    color: #ea580c;
}

.seo-result-filters button.active {
    background: rgba(255, 107, 0, 0.1);
    border-color: rgba(255, 107, 0, 0.45);
    color: #c2410c;
}

.seo-filter-count {
    display: inline-block;
    min-width: 1.1rem;
    margin-right: 0.2rem;
    font-variant-numeric: tabular-nums;
    opacity: 0.75;
}

.seo-kw-mark,
.seo-preview-title mark,
.seo-preview-desc mark {
    background: rgba(255, 214, 102, 0.85);
    color: inherit;
    padding: 0 0.1em;
    border-radius: 2px;
}

.seo-score-ring {
    --seo-score-color: #ef4444;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-shrink: 0;
}

.seo-score-ring::before {
    content: '';
    position: absolute;
    inset: 5px;
    background: #fff;
    border-radius: 50%;
}

.seo-score-value {
    position: relative;
    z-index: 1;
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--text-main);
}

.seo-assistant-scores {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.seo-score-label {
    font-size: 0.72rem;
    color: var(--text-muted-green);
    text-align: center;
    margin-top: 0.25rem;
}

.seo-preview-google {
    background: #f8faf9;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 1rem 1.25rem;
}

.seo-preview-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted-green);
    margin-bottom: 0.75rem;
}

.seo-preview-url {
    font-size: 0.78rem;
    color: #137333;
    margin-bottom: 0.25rem;
    direction: ltr;
    text-align: right;
}

.seo-preview-title {
    font-size: 1.05rem;
    color: #1a0dab;
    font-weight: 600;
    margin-bottom: 0.25rem;
    line-height: 1.4;
}

.seo-preview-desc {
    font-size: 0.82rem;
    color: #4d5156;
    line-height: 1.6;
}

.seo-fields {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    margin-top: 1.25rem;
}

.seo-field {
    background: #fafbfc;
    border: 1px solid var(--border-light);
    border-radius: 14px;
    padding: 0.95rem 1rem 1rem;
}

.seo-field-label {
    display: block;
    margin-bottom: 0.45rem;
}

.seo-field-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.45rem;
}

.seo-field-control {
    background: #fff;
}

.seo-field-textarea {
    min-height: 88px;
    resize: vertical;
}

.seo-field-hint {
    margin: 0.45rem 0 0;
    font-size: 0.74rem;
    color: var(--text-muted-green);
    line-height: 1.5;
}

.seo-char-count {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted-green);
    white-space: nowrap;
    flex-shrink: 0;
}

.seo-tabs {
    display: flex;
    gap: 0.5rem;
    list-style: none;
    padding: 0;
    margin: 1.25rem 0 0.75rem;
    border-bottom: 1px solid var(--border-light);
}

.seo-tabs button {
    background: none;
    border: none;
    padding: 0.65rem 1rem;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted-green);
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    cursor: pointer;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.seo-tabs button.active {
    color: var(--brand-primary);
    border-bottom-color: var(--brand-primary);
}

.seo-score-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 72px;
}

.seo-score-verdict {
    font-size: 0.7rem;
    font-weight: 700;
    margin-top: 0.2rem;
    text-align: center;
}

.seo-score-verdict-good { color: #16a34a; }
.seo-score-verdict-ok { color: #d97706; }
.seo-score-verdict-bad { color: #dc2626; }

.seo-char-meter {
    height: 5px;
    background: #e8ecea;
    border-radius: 999px;
    margin-top: 0.55rem;
    overflow: hidden;
}

.seo-char-meter-bar {
    height: 100%;
    width: 0;
    border-radius: 999px;
    background: #94a3b8;
    transition: width 0.2s ease, background-color 0.2s ease;
}

.seo-char-meter-bar.good { background: #22c55e; }
.seo-char-meter-bar.ok { background: #f59e0b; }
.seo-char-meter-bar.bad { background: #ef4444; }

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

.seo-check-section-title {
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--text-muted-green);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 1rem 0 0.35rem;
    border-bottom: none;
}

.seo-check-section-title:first-child {
    padding-top: 0.25rem;
}

.seo-check-empty {
    padding: 1rem 0;
    color: var(--text-muted-green);
    font-size: 0.85rem;
}

.seo-check-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.55rem 0;
    border-bottom: 1px solid rgba(11, 19, 15, 0.05);
    font-size: 0.84rem;
    line-height: 1.6;
}

.seo-check-item:last-child { border-bottom: none; }

.seo-traffic-light {
    flex-shrink: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-top: 0.35rem;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.seo-traffic-light.good { background: #22c55e; }
.seo-traffic-light.ok { background: #f59e0b; }
.seo-traffic-light.bad { background: #ef4444; }

.seo-check-text { flex: 1; color: var(--text-main); }

/* Featured image card */
.featured-image-card .card-title {
    margin-bottom: 0;
}

.featured-image-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.featured-image-preview {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius-lg);
    border: 1px dashed rgba(11, 19, 15, 0.14);
    background: #f8faf9;
    overflow: hidden;
}

.featured-image-preview.is-empty {
    border-style: dashed;
}

.featured-image-preview:not(.is-empty) {
    border-style: solid;
    border-color: var(--border-light);
}

.featured-image-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    z-index: 1;
}

.featured-image-placeholder {
    position: absolute;
    inset: 0;
    z-index: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    width: 100%;
    height: 100%;
    padding: 1rem;
    text-align: center;
    color: var(--text-muted-green);
}

.featured-image-placeholder i {
    font-size: 2rem;
    opacity: 0.55;
}

.featured-image-placeholder small {
    font-size: 0.72rem;
    opacity: 0.85;
}

.featured-image-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: var(--radius-md);
    background: rgba(239, 68, 68, 0.06);
    color: #dc2626;
    cursor: pointer;
    transition: background 0.15s ease;
}

.featured-image-remove:hover {
    background: rgba(239, 68, 68, 0.12);
}

.featured-image-pick {
    margin-top: 0.85rem;
}

.media-dropzone {
    border: 2px dashed var(--border-color, #d8e2dc);
    border-radius: 14px;
    padding: 2rem 1.25rem;
    text-align: center;
    background: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.media-dropzone i {
    font-size: 2rem;
    color: var(--primary-green, #2d6a4f);
    display: block;
    margin-bottom: 0.5rem;
}

.media-dropzone.is-dragover,
.media-dropzone:hover {
    border-color: var(--primary-green, #2d6a4f);
    background: rgba(45, 106, 79, 0.04);
}

.media-dropzone.is-uploading {
    opacity: 0.7;
    pointer-events: none;
}

.media-card {
    width: 100%;
    border: 1px solid var(--border-color, #e8efe9);
    border-radius: 12px;
    background: #fff;
    padding: 0.5rem;
    text-align: right;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.media-card:hover {
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
    transform: translateY(-2px);
}

.media-thumb {
    border-radius: 10px;
    overflow: hidden;
    background: #f4f7f5;
    height: 140px;
}

.media-thumb-img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    display: block;
}

.media-thumb-file {
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 2.5rem;
}

.media-card-body {
    padding: 0.65rem 0.35rem 0.25rem;
}

.media-card-name {
    display: block;
    font-size: 0.85rem;
    color: var(--text-main, #1f2937);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.media-card-meta {
    display: block;
    font-size: 0.75rem;
    color: var(--muted-green, #6b7f73);
    margin-top: 0.2rem;
}

.media-empty-state {
    text-align: center;
    color: var(--muted-green, #6b7f73);
    padding: 2.5rem 1rem;
    border: 1px dashed var(--border-color, #d8e2dc);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.6);
}

.media-preview-body {
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8faf9;
    border-radius: 12px;
    overflow: hidden;
}

.media-preview-image {
    max-width: 100%;
    max-height: 70vh;
    display: block;
    margin: 0 auto;
}

.media-preview-frame {
    width: 100%;
    min-height: 420px;
    border: 0;
    border-radius: 8px;
    background: #fff;
}

.media-preview-file {
    text-align: center;
    color: #64748b;
    padding: 2rem;
}

.media-preview-file i {
    font-size: 3rem;
    display: block;
    margin-bottom: 0.75rem;
}

.media-preview-meta {
    display: grid;
    gap: 0.35rem;
    font-size: 0.9rem;
    color: var(--muted-green, #6b7f73);
}

.table-filter-panel .form-label-custom {
    margin-bottom: 0.35rem;
}

.btn-custom.is-active {
    box-shadow: inset 0 0 0 2px rgba(45, 106, 79, 0.25);
}

/* Media Picker Modal (WordPress-style) */
.media-picker-modal {
    --mp-bg: #f4f6f8;
    --mp-surface: #ffffff;
    --mp-border: rgba(11, 19, 15, 0.08);
}

.media-picker-modal .modal-backdrop.show {
    opacity: 0.45;
}

.media-picker-dialog {
    max-width: min(920px, calc(100vw - 2rem));
    margin: 1rem auto;
}

.media-picker-modal .modal-content {
    border: 1px solid var(--mp-border);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(15, 8, 32, 0.18);
    background: var(--mp-surface);
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 2rem);
}

.media-picker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.1rem 1.35rem;
    border-bottom: 1px solid var(--mp-border);
    background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
}

.media-picker-header-text {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-width: 0;
}

.media-picker-header-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 107, 0, 0.1);
    color: var(--brand-primary);
    font-size: 1.15rem;
    flex-shrink: 0;
}

.media-picker-header .modal-title {
    font-size: 1.05rem;
    font-weight: 800;
}

.media-picker-header-sub {
    font-size: 0.78rem;
    color: var(--text-muted-green);
    margin-top: 0.15rem;
}

.media-picker-close {
    width: 36px;
    height: 36px;
    border: 1px solid var(--mp-border);
    border-radius: 10px;
    background: #fff;
    color: var(--text-muted-green);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.media-picker-close:hover {
    background: #f8faf9;
    color: var(--text-main);
    border-color: rgba(11, 19, 15, 0.14);
}

.media-picker-modal .modal-body {
    background: var(--mp-bg);
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.media-picker-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
    padding: 0.85rem 1.25rem;
    border-bottom: 1px solid var(--mp-border);
    background: var(--mp-surface);
    flex-wrap: wrap;
    flex-shrink: 0;
}

.media-picker-search {
    flex: 1;
    min-width: 200px;
    max-width: none;
    margin: 0;
}

.media-picker-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.media-picker-body {
    display: grid;
    grid-template-columns: 260px 1fr;
    flex: 1;
    min-height: 0;
    max-height: min(58vh, 520px);
    overflow: hidden;
}

.media-picker-sidebar {
    border-left: 1px solid var(--mp-border);
    background: var(--mp-surface);
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.media-picker-sidebar-title {
    padding: 0.85rem 1rem;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted-green);
    border-bottom: 1px solid var(--mp-border);
}

.media-picker-sidebar-content {
    flex: 1;
    min-height: 0;
    padding: 1rem;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.media-picker-sidebar-empty {
    height: 100%;
    min-height: 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--text-muted-green);
    gap: 0.35rem;
    padding: 1rem;
}

.media-picker-sidebar-empty-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: var(--mp-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #94a3b8;
    margin-bottom: 0.35rem;
}

.media-picker-sidebar-empty p {
    margin: 0;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-main);
}

.media-picker-sidebar-empty span {
    font-size: 0.76rem;
    line-height: 1.5;
    max-width: 180px;
}

.media-picker-sidebar-preview {
    border-radius: 12px;
    overflow: hidden;
    background:
        linear-gradient(45deg, #eceff1 25%, transparent 25%),
        linear-gradient(-45deg, #eceff1 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #eceff1 75%),
        linear-gradient(-45deg, transparent 75%, #eceff1 75%);
    background-size: 16px 16px;
    background-position: 0 0, 0 8px, 8px -8px, -8px 0;
    background-color: #f8faf9;
    border: 1px solid var(--mp-border);
    margin-bottom: 0.85rem;
}

.media-picker-sidebar-img {
    width: 100%;
    display: block;
    max-height: 200px;
    object-fit: contain;
    background: transparent;
}

.media-picker-sidebar-file {
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.75rem;
    color: #94a3b8;
}

.media-picker-sidebar-meta {
    display: grid;
    gap: 0.65rem;
}

.media-picker-meta-row {
    display: grid;
    gap: 0.2rem;
}

.media-picker-meta-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted-green);
}

.media-picker-meta-value {
    font-size: 0.82rem;
    color: var(--text-main);
    word-break: break-word;
}

.media-picker-meta-row strong.media-picker-meta-value {
    font-weight: 700;
}

.media-picker-grid-wrap {
    padding: 1rem;
    overflow-y: auto;
    min-height: 0;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    transition: background 0.15s ease;
}

.media-picker-grid-wrap.is-dragover {
    background: rgba(255, 107, 0, 0.06);
    outline: 2px dashed rgba(255, 107, 0, 0.35);
    outline-offset: -6px;
}

.media-picker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
    gap: 0.75rem;
    align-content: start;
}

.media-picker-grid-status {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--text-muted-green);
    padding: 3rem 1rem;
    font-size: 0.9rem;
}

.media-picker-grid-status.is-error {
    color: #dc2626;
}

.media-picker-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 2.5rem 1.5rem;
    border: 1px dashed rgba(11, 19, 15, 0.12);
    border-radius: 14px;
    background: var(--mp-surface);
}

.media-picker-empty-icon {
    width: 52px;
    height: 52px;
    margin: 0 auto 0.75rem;
    border-radius: 14px;
    background: rgba(255, 107, 0, 0.1);
    color: var(--brand-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
}

.media-picker-empty h6 {
    margin: 0 0 0.35rem;
    font-size: 0.95rem;
    font-weight: 800;
}

.media-picker-empty p {
    margin: 0;
    font-size: 0.82rem;
    color: var(--text-muted-green);
}

.media-picker-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 12px;
    background: var(--mp-surface);
    box-shadow: 0 1px 3px rgba(15, 8, 32, 0.06);
    cursor: pointer;
    text-align: right;
    overflow: hidden;
    position: relative;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.media-picker-card:hover {
    border-color: rgba(255, 107, 0, 0.25);
    box-shadow: 0 8px 20px rgba(15, 8, 32, 0.08);
    transform: translateY(-1px);
}

.media-picker-card.is-selected {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.18);
}

.media-picker-card-check {
    position: absolute;
    top: 6px;
    left: 6px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--brand-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.15s ease, transform 0.15s ease;
    z-index: 2;
    box-shadow: 0 2px 6px rgba(255, 107, 0, 0.35);
}

.media-picker-card.is-selected .media-picker-card-check {
    opacity: 1;
    transform: scale(1);
}

.media-picker-thumb {
    aspect-ratio: 1;
    overflow: hidden;
    background: #eef1f4;
}

.media-picker-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.media-picker-thumb-file {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 2rem;
}

.media-picker-card-name {
    display: block;
    padding: 0.45rem 0.5rem 0.55rem;
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.media-picker-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 0.9rem 1.25rem;
    border-top: 1px solid var(--mp-border);
    background: var(--mp-surface);
    flex-shrink: 0;
}

.media-picker-selection {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.82rem;
    color: var(--text-muted-green);
    min-width: 0;
    flex: 1;
}

.media-picker-selection i {
    font-size: 1rem;
    flex-shrink: 0;
    opacity: 0.45;
}

.media-picker-selection span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.media-picker-selection.is-active {
    color: var(--text-main);
    font-weight: 600;
}

.media-picker-selection.is-active i {
    color: var(--brand-primary);
    opacity: 1;
}

.media-picker-footer-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .media-picker-body {
        grid-template-columns: 1fr;
        max-height: none;
    }

    .media-picker-sidebar {
        border-left: 0;
        border-bottom: 1px solid var(--mp-border);
        max-height: 220px;
    }

    .media-picker-sidebar-content {
        display: block;
    }

    .media-picker-sidebar-preview {
        width: 88px;
        flex-shrink: 0;
        margin-bottom: 0;
    }

    .media-picker-sidebar-img {
        max-height: 88px;
    }

    .media-picker-sidebar-empty {
        min-height: 120px;
    }
}

/* Media attachment details (WordPress-style) */
.media-attachment-modal .modal-content {
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid rgba(11, 19, 15, 0.08);
    box-shadow: 0 24px 64px rgba(15, 8, 32, 0.16);
}

.media-attachment-header {
    padding: 1rem 1.25rem;
    background: linear-gradient(180deg, #fff 0%, #fafbfc 100%);
    border-bottom: 1px solid rgba(11, 19, 15, 0.08);
}

.media-attachment-subtitle {
    font-size: 0.78rem;
    color: var(--text-muted-green);
    margin-top: 0.2rem;
}

.media-attachment-body {
    display: grid;
    grid-template-columns: 1fr 320px;
    min-height: 420px;
}

.media-attachment-preview-wrap {
    background: #f0f2f5;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 320px;
}

.media-attachment-preview {
    width: 100%;
    max-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.media-attachment-panel {
    background: #fff;
    border-right: 1px solid rgba(11, 19, 15, 0.08);
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.media-attachment-panel-title {
    padding: 0.85rem 1rem;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted-green);
    border-bottom: 1px solid rgba(11, 19, 15, 0.08);
}

.media-attachment-panel-inner {
    padding: 1rem;
    overflow-y: auto;
    flex: 1;
}

.media-attachment-meta {
    display: grid;
    gap: 0.55rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(11, 19, 15, 0.06);
}

.media-attachment-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    font-size: 0.8rem;
}

.media-attachment-meta-row span {
    color: var(--text-muted-green);
}

.media-attachment-meta-row strong {
    font-weight: 700;
    color: var(--text-main);
    text-align: left;
    word-break: break-all;
}

.media-attachment-fields {
    margin-bottom: 1rem;
}

.media-field-hint {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.72rem;
    color: var(--text-muted-green);
    line-height: 1.45;
}

.media-url-group {
    display: flex;
    gap: 0.5rem;
    align-items: stretch;
}

.media-url-group .form-control-custom {
    flex: 1;
    min-width: 0;
}

.media-attachment-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.9rem 1.25rem;
    border-top: 1px solid rgba(11, 19, 15, 0.08);
    background: #fff;
}

.media-card {
    position: relative;
}

.media-card-wrap {
    position: relative;
}

.media-card-delete {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    z-index: 3;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 8px;
    background: rgba(185, 28, 28, 0.92);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity 0.15s ease, transform 0.15s ease, background 0.15s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

.media-card-wrap:hover .media-card-delete,
.media-card-wrap:focus-within .media-card-delete,
.media-card-delete:focus {
    opacity: 1;
    transform: translateY(0);
}

.media-card-delete:hover {
    background: #991b1b;
}

@media (hover: none) {
    .media-card-delete {
        opacity: 1;
        transform: none;
    }
}

.media-card-alt-badge {
    position: absolute;
    top: 0.55rem;
    left: 0.55rem;
    z-index: 2;
    width: 22px;
    height: 22px;
    border-radius: 6px;
    background: rgba(255, 107, 0, 0.92);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    box-shadow: 0 2px 6px rgba(255, 107, 0, 0.3);
}

.media-picker-meta-form {
    margin-top: 0.85rem;
    padding-top: 0.85rem;
    border-top: 1px solid rgba(11, 19, 15, 0.08);
    display: grid;
    gap: 0.45rem;
}

.media-picker-meta-form-title {
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--text-muted-green);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 0.15rem;
}

.media-picker-meta-form .media-picker-meta-label {
    margin-top: 0.15rem;
}

.media-picker-meta-form .form-control-custom-sm {
    padding: 0.45rem 0.75rem;
    font-size: 0.8rem;
}

@media (max-width: 900px) {
    .media-attachment-body {
        grid-template-columns: 1fr;
    }

    .media-attachment-panel {
        border-right: 0;
        border-top: 1px solid rgba(11, 19, 15, 0.08);
    }
}

/* Dashboard live charts */
.dashboard-period-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.65rem 1rem;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    color: var(--text-muted-green);
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
}

.dashboard-period-badge i {
    color: var(--menu-accent);
    font-size: 1rem;
}

.dashboard-chart-card {
    overflow: hidden;
}

.dashboard-chart-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.dashboard-chart-sub {
    color: var(--text-muted-green);
    font-size: 0.82rem;
}

.dashboard-chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    justify-content: flex-end;
}

.dashboard-chart-summary {
    display: flex;
    align-items: baseline;
    gap: 0.65rem;
    margin-bottom: 0.35rem;
}

.dashboard-chart-canvas {
    min-height: 0;
}

.dashboard-chart-canvas--donut {
    margin-top: -0.35rem;
}

.dashboard-chart-canvas--compact {
    margin-top: -0.25rem;
    margin-bottom: -0.45rem;
}

.dashboard-chart-card--mix {
    padding-bottom: 1rem;
}

.dashboard-chart-card--mix .card-header {
    margin-bottom: 0.35rem !important;
}

.dashboard-chart-card--mix .dashboard-chart-canvas--compact {
    min-height: 0;
}

.dashboard-status-legend {
    display: grid;
    gap: 0.55rem;
    margin-top: 0.35rem;
    padding-top: 0.85rem;
    border-top: 1px solid var(--border-light);
}

.dashboard-status-legend-item {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.82rem;
    color: var(--text-main);
}

.dashboard-status-legend-item .legend-dot {
    width: 0.62rem;
    height: 0.62rem;
    border-radius: 50%;
    flex-shrink: 0;
}

.dashboard-status-legend-label {
    flex: 1;
    color: var(--text-muted-green);
    font-weight: 600;
}

.dashboard-status-legend-item strong {
    font-weight: 800;
    color: var(--text-main);
}

@media (max-width: 767px) {
    .dashboard-chart-head {
        flex-direction: column;
    }

    .dashboard-chart-legend {
        justify-content: flex-start;
    }
}

/* ─── ویرایشگر متن کلاسیک (متن کامل نوشته) ─── */
.rte-wrap {
    border: 1px solid rgba(15, 61, 46, 0.12);
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.rte-wrap:focus-within {
    border-color: rgba(255, 107, 0, 0.45);
    box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.12);
}

.rte-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem;
    padding: 0.45rem 0.55rem;
    border-bottom: 1px solid rgba(15, 61, 46, 0.1);
    background: linear-gradient(180deg, #fbfafc 0%, #f4f2f8 100%);
}

.rte-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #31463d;
    cursor: pointer;
    transition: background 0.12s ease, color 0.12s ease;
}

.rte-btn:hover {
    background: rgba(255, 107, 0, 0.12);
    color: #ea580c;
}

.rte-btn:focus-visible {
    outline: 2px solid rgba(255, 107, 0, 0.45);
    outline-offset: 1px;
}

.rte-btn i {
    font-size: 1rem;
    line-height: 1;
}

.rte-sep {
    width: 1px;
    height: 1.35rem;
    margin: 0 0.2rem;
    background: rgba(15, 61, 46, 0.12);
    flex-shrink: 0;
}

.rte-select {
    min-width: 7.5rem;
    height: 2rem;
    padding: 0 0.55rem;
    border: 1px solid rgba(15, 61, 46, 0.12);
    border-radius: 8px;
    background: #fff;
    color: #31463d;
    font-size: 0.78rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
}

.rte-editor {
    min-height: 280px;
    max-height: 560px;
    overflow-y: auto;
    padding: 0.95rem 1rem;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: #fff;
    line-height: 1.9;
    outline: none;
    direction: rtl;
    text-align: right;
}

.rte-editor:empty:before {
    content: attr(data-placeholder);
    color: #9aa8a1;
    pointer-events: none;
}

.rte-editor p {
    margin: 0 0 0.85rem;
}

.rte-editor h2,
.rte-editor h3,
.rte-editor h4 {
    margin: 1.1rem 0 0.65rem;
    font-weight: 800;
    line-height: 1.45;
    color: #0f3d2e;
}

.rte-editor h2 { font-size: 1.35rem; }
.rte-editor h3 { font-size: 1.15rem; }
.rte-editor h4 { font-size: 1.02rem; }

.rte-editor ul,
.rte-editor ol {
    margin: 0 0 0.85rem;
    padding-right: 1.35rem;
    padding-left: 0;
}

.rte-editor li {
    margin-bottom: 0.25rem;
}

.rte-editor blockquote {
    margin: 0.85rem 0;
    padding: 0.55rem 0.9rem;
    border-right: 3px solid #ff6b00;
    background: rgba(255, 107, 0, 0.06);
    color: #374151;
}

.rte-editor a {
    color: #ea580c;
    text-decoration: underline;
}

.rte-source[hidden] {
    display: none !important;
}

@media (max-width: 575px) {
    .rte-select {
        min-width: 100%;
        margin-bottom: 0.15rem;
    }
}

