:root {
    /* Base Backgrounds */
    --bg-main: #12121e;
    --bg-sidebar: #1a1a2e;
    --bg-design-main: #12121e;
    --bg-design-card: #2b2c45;

    /* Primary Colors */
    --primary-purple: #6c5ce7;
    --active-purple: #4834d4;
    --accent-orange: #ffa502;
    --success-green: #00d084;

    /* Text Colors */
    --text-white: #ffffff;
    --text-muted: #8c9cb6;
    --text-placeholder: rgba(255, 255, 255, 0.3);

    /* Components */
    --card-bg: #212239;
    --row-bg: rgba(30, 30, 50, 0.4);
    --table-header-bg: #1a1a35;
    --table-header-text: #8c9cb6;
    --table-text: #ffffff;
    --table-border: rgba(255, 255, 255, 0.05);
    --input-bg: #202136;
    --border-radius: 12px;

    /* Shadows */
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
}

body.light-mode {
    /* Base Backgrounds - Premium Harmony */
    --bg-main: #f8fafc;
    --bg-sidebar: #ffffff;
    --bg-design-main: #f8fafc;
    --bg-design-card: #ffffff;

    /* Text Colors - Professional Slate */
    --text-white: #1e293b;
    --text-muted: #64748b;
    --text-placeholder: #94a3b8;

    /* Components */
    --card-bg: #ffffff;
    --row-bg: rgba(255, 255, 255, 0.7);
    --table-header-bg: #f1f5f9;
    --table-header-text: #475569;
    --table-text: #1e293b;
    --table-border: #e2e8f0;
    --input-bg: #f1f5f9;

    /* Shadows - Soft & Airy */
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);

    --border-color: #e2e8f0;
    --bg-accounting-main: #f8fafc;
}

/* Search Helper */
.search-hidden {
    display: none !important;
}

* {
    --table-border: rgba(0, 0, 0, 0.05);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

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

body {
    background-color: var(--bg-design-main);
    color: var(--text-white);
    overflow-x: hidden;
    font-family: 'Cairo', sans-serif;
}

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

.action-text,
.user-name,
.toggle-label {
    color: var(--text-white);
}

.logout-icon {
    color: #8c9cb6;
    cursor: pointer;
    transition: 0.2s;
}

.logout-icon:hover {
    color: var(--active-purple);
}

body.light-mode .logout-icon {
    color: #64748b;
}

body.light-mode .user-info {
    color: #64748b;
}

.user-info {
    color: var(--text-muted);
}

/* Sidebar Overlay Backdrop */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 1040;
    display: none;
    opacity: 0;
    transition: all 0.3s ease;
}

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

/* Sidebar Styling */
.sidebar {
    width: 280px;
    height: 100vh;
    background-color: var(--bg-sidebar);
    position: fixed;
    right: 0;
    top: 0;
    z-index: 1000;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.05);
    overflow-y: auto;
    border-left: 2px solid var(--primary-purple);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (min-width: 769px) {
    .sidebar.collapsed {
        width: 0;
        padding: 0 !important;
        overflow: hidden;
        border-left: 0;
    }
}

.hamburger-menu {
    cursor: pointer;
    background: rgba(255, 255, 255, 0.05);
    padding: 5px 10px;
    border-radius: 8px;
    transition: 0.3s;
}

.hamburger-menu:hover {
    background: rgba(255, 255, 255, 0.1);
}

body.light-mode .sidebar {
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.02);
    border-left: 2px solid #e2e8f0;
}

.top-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

body.light-mode .top-header {
    background: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid #e2e8f0;
    backdrop-filter: blur(10px);
}

body.light-mode .top-header .search-input {
    background-color: #f1f5f9 !important;
    color: #1e293b !important;
    border: 1px solid #e2e8f0 !important;
}

body.light-mode .top-header .search-input::placeholder {
    color: #94a3b8 !important;
}

/* Global Light Mode Overrides for internal styles */
body.light-mode .content-area,
body.light-mode .main-content,
body.light-mode .tc-container {
    background-color: var(--bg-main) !important;
    background: var(--bg-main) !important;
    color: var(--text-white) !important;
}

body.light-mode .table-bg,
body.light-mode .table-users,
body.light-mode .table-responsive,
body.light-mode .inventory-table-container {
    background-color: var(--card-bg) !important;
    border-color: var(--table-border) !important;
}

body.light-mode .table-users th,
body.light-mode .table-bg th,
body.light-mode .table th {
    background-color: var(--table-header-bg) !important;
    color: var(--table-header-text) !important;
    border-bottom: 1px solid var(--table-border) !important;
}

body.light-mode .table-users td,
body.light-mode .table-bg td,
body.light-mode .table td {
    color: var(--table-text) !important;
    border-bottom: 1px solid var(--table-border) !important;
}

body.light-mode .custom-card,
body.light-mode .inventory-card,
body.light-mode .analysis-card,
body.light-mode .modal-content,
body.light-mode .profile-container {
    background-color: var(--card-bg) !important;
    background: var(--card-bg) !important;
    color: var(--text-white) !important;
    box-shadow: var(--card-shadow) !important;
    border: 1px solid var(--border-color) !important;
}

body.light-mode .pill-input,
body.light-mode .profile-pill-input,
body.light-mode .pill-input-v2,
body.light-mode .filter-search,
body.light-mode select.pill-input-v2,
body.light-mode .modal-container input,
body.light-mode .modal-container textarea,
body.light-mode .modal-container select {
    background-color: var(--input-bg) !important;
    color: var(--text-white) !important;
    border: 1px solid var(--border-color) !important;
}

body.light-mode .pill-input::placeholder,
body.light-mode .profile-pill-input::placeholder {
    color: var(--text-placeholder) !important;
}

body.light-mode .search-empty-row td {
    background-color: var(--bg-main) !important;
    color: var(--text-muted) !important;
}

body.light-mode .section-header,
body.light-mode .table-footer {
    background-color: var(--table-header-bg) !important;
    border-color: var(--table-border) !important;
}

body.light-mode .pill-input,
body.light-mode .pill-select,
body.light-mode .filter-search,
body.light-mode .search-container,
body.light-mode .profile-pill-input,
body.light-mode .img-size-input,
body.light-mode .ticker-textarea,
body.light-mode .rich-editor-wrapper {
    background-color: var(--input-bg) !important;
    border-color: var(--table-border) !important;
    color: var(--text-white) !important;
}

body.light-mode .text-white,
body.light-mode h1,
body.light-mode h2,
body.light-mode h3,
body.light-mode h4,
body.light-mode h5,
body.light-mode h6,
body.light-mode .page-title,
body.light-mode .user-name,
body.light-mode .section-header-right,
body.light-mode .financial-val,
body.light-mode .accounting-title {
    color: var(--text-white) !important;
}

body.light-mode .text-muted,
body.light-mode .text-secondary,
body.light-mode .section-chevron,
body.light-mode .field-label,
body.light-mode .accounting-subtitle,
body.light-mode .financial-label {
    color: var(--text-muted) !important;
}

body.light-mode .search-input {
    color: var(--text-white) !important;
}

body.light-mode .search-input::placeholder {
    color: var(--text-muted) !important;
    opacity: 0.7;
}

/* Specific component overrides for light mode */
body.light-mode .table-dark {
    --bs-table-bg: var(--card-bg);
    --bs-table-color: var(--text-white);
    border-color: var(--table-border);
}

body.light-mode .table-dark thead th {
    background-color: var(--table-header-bg) !important;
    color: var(--table-header-text) !important;
}

body.light-mode .btn-dark-v2,
body.light-mode .btn-save-accounting,
body.light-mode .btn-save-purple {
    background-color: #f1f5f9 !important;
    color: #475569 !important;
    border: 1px solid #e2e8f0 !important;
}

body.light-mode .btn-dark-v2:hover {
    background-color: #e2e8f0 !important;
}

body.light-mode .btn-orange-v2,
body.light-mode .btn-save-main-pill {
    box-shadow: 0 4px 12px rgba(255, 165, 2, 0.2);
}

/* Profile and Setup boxes in index.html */
body.light-mode [style*="background-color: #1a1a2e"],
body.light-mode [style*="background-color: #1a1a35"],
body.light-mode [style*="background-color: #17182b"],
body.light-mode [style*="background-color: #1a1b2f"] {
    background-color: var(--card-bg) !important;
    color: var(--text-white) !important;
    border: 1px solid var(--table-border) !important;
}

body.light-mode [style*="background-color: #2b2c40"],
body.light-mode [style*="background-color: #252540"],
body.light-mode [style*="background-color: #1e1e36"],
body.light-mode [style*="background-color: #26273b"] {
    background-color: var(--input-bg) !important;
    color: var(--text-white) !important;
}

body.light-mode .text-secondary,
body.light-mode .text-light,
body.light-mode [style*="color: #9094af"],
body.light-mode [style*="color: #8c9cb6"] {
    color: var(--text-muted) !important;
}

body.light-mode .custom-square-check {
    border-color: var(--table-border) !important;
}

body.light-mode .custom-square-check.checked {
    background-color: var(--primary-purple) !important;
}

/* Fix for icons and badges in light mode */
body.light-mode .badge-new {
    background-color: rgba(255, 165, 2, 0.1);
}

body.light-mode .hamburger-menu {
    background: rgba(0, 0, 0, 0.05);
    color: #475569 !important;
}

body.light-mode .hamburger-menu:hover {
    background: rgba(0, 0, 0, 0.1);
}

/* Page-specific complex overrides (inventory, appProfit, etc.) */
body.light-mode .inventory-card,
body.light-mode .app-table td,
body.light-mode .modal-content {
    background-color: var(--card-bg) !important;
    color: var(--text-white) !important;
}

body.light-mode .app-table th,
body.light-mode .app-table-footer,
body.light-mode .modal-header-custom {
    background-color: var(--table-header-bg) !important;
    color: var(--table-header-text) !important;
    border-color: var(--table-border) !important;
}

body.light-mode .search-area,
body.light-mode .custom-border-input,
body.light-mode .pill-input-v2,
body.light-mode .inner-label-wrapper {
    background-color: var(--input-bg) !important;
    border-color: var(--table-border) !important;
    color: var(--text-white) !important;
}

body.light-mode .input-label-floating,
body.light-mode .inner-label,
body.light-mode .profile-pill-label,
body.light-mode .pill-label-right {
    background-color: var(--card-bg) !important;
    color: var(--text-muted) !important;
}

body.light-mode .app-table {
    color: var(--text-white) !important;
}

body.light-mode .app-table td {
    border-color: var(--table-border) !important;
}

body.light-mode .pagination-btn {
    color: var(--text-muted) !important;
}

body.light-mode .pagination-btn:hover {
    color: var(--text-white) !important;
}

body.light-mode .modal-header-custom h5,
body.light-mode .modal-body h5 {
    color: var(--text-white) !important;
}

/* Ensure bootstrap text-white-50 etc are visible */
body.light-mode .text-white-50 {
    color: rgba(30, 41, 59, 0.5) !important;
}

.content-area {
    margin-right: 300px;
    min-height: 100vh;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.content-area.expanded {
    margin-right: 0;
}

.sidebar-close-btn {
    cursor: pointer;
    color: var(--text-white);
    transition: 0.3s;
    background: rgba(255, 255, 255, 0.05);
    padding: 5px;
    border-radius: 8px;
}

.sidebar-close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.user-avatar {
    width: 45px;
    height: 45px;
    background-color: var(--primary-purple);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
    background-size: cover;
    background-position: center;
}

.user-name {
    font-size: 0.9rem;
    font-weight: 500;
}

/* --- Accounting Section Redo --- */
.accounting-hero-section {
    padding: 0 15px;
}

.badge-experimental {
    background-color: transparent;
    color: #ffa502;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 8px;
    display: inline-block;
}

.accounting-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: #ffffff;
}

.accounting-subtitle {
    color: #8c9cb6;
    font-size: 0.95rem;
    line-height: 1.6;
}

.accounting-pill-btn {
    display: inline-flex;
    align-items: center;
    padding: 6px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    color: #ffffff;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.accounting-pill-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.action-desc {
    color: #8c9cb6;
    font-size: 0.9rem;
}

.accounting-dashboard-card {
    background: rgba(30, 31, 48, 0.6);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 30px;
}

.section-title {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 25px;
}

.financial-group-title {
    color: #fbbf24;
    /* Orange */
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.financial-row {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 15px;
    margin-bottom: 12px;
}

.financial-val {
    color: #ffffff;
    font-weight: 700;
    font-size: 1.1rem;
}

.financial-label {
    color: #8c9cb6;
    font-size: 0.9rem;
}

.field-label {
    color: #fbbf24;
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 8px;
    display: block;
}

.field-sublabel {
    color: #8c9cb6;
    font-size: 0.8rem;
    margin-bottom: 8px;
    display: block;
}

.pill-input-wrapper {
    background: rgba(20, 21, 38, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50px;
    padding: 2px;
    transition: all 0.3s ease;
}

.pill-input-wrapper:focus-within {
    border-color: rgba(108, 92, 231, 0.5);
    box-shadow: 0 0 10px rgba(108, 92, 231, 0.15);
}

.accounting-input {
    background: transparent;
    border: none;
    width: 100%;
    padding: 10px 20px;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
}

.accounting-input:focus {
    outline: none;
}

.wallet-badge {
    background: rgba(52, 211, 153, 0.1);
    color: #34d399;
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
}

.currency-label {
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 600;
}

.result-main-val {
    font-size: 2.2rem;
    font-weight: 800;
    color: #fbbf24;
    margin-bottom: 10px;
}

.stat-box {
    border-radius: 12px;
    padding: 20px;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.3s ease;
}

.stat-box:hover {
    transform: translateY(-5px);
}

.stat-box-val {
    font-size: 1.8rem;
    font-weight: 800;
    color: #ffffff;
}

.stat-box-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 600;
}

.bg-stat-red {
    background: #f87171;
    box-shadow: 0 8px 20px rgba(248, 113, 113, 0.2);
}

.bg-stat-green {
    background: #10b981;
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.2);
}

.bg-stat-result {
    background: #ef4444;
    box-shadow: 0 10px 25px rgba(239, 68, 68, 0.3);
}

.btn-save-accounting {
    background: #474a6b;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #a0aec0;
    padding: 12px 40px;
    border-radius: 8px;
    font-weight: 700;
    transition: all 0.3s ease;
}

.btn-save-accounting:hover {
    background: #54577c;
    color: #ffffff;
}

/* Color Helpers */
.text-green {
    color: #34d399 !important;
}

.text-red {
    color: #f87171 !important;
}

.text-orange {
    color: #fbbf24 !important;
}

.text-purple {
    color: #818cf8 !important;
}

/* Dark mode switch customization */
.form-switch .form-check-input {
    width: 3em;
    height: 1.5em;
    background-color: #334155;
    border-color: #475569;
}

.form-switch .form-check-input:checked {
    background-color: var(--primary-purple);
    border-color: var(--primary-purple);
}

/* Nav Links */
.sidebar-nav .nav-link {
    color: var(--text-muted);
    padding: 0.8rem 1.2rem;
    border-radius: 10px;
    margin: 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    position: relative;
    z-index: 1;
}

.sidebar-nav .nav-link i {
    font-size: 1.1rem;
}

.sidebar-nav .nav-link:hover {
    color: var(--text-white);
    background-color: rgba(255, 255, 255, 0.05);
}

.sidebar-nav .nav-link.active {
    background: #cbd0f7 !important;
    color: #4831d4 !important;
    border-radius: 50px;
    margin: 0.5rem 0.5rem;
    padding: 0.8rem 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    font-weight: 700;
    z-index: 2;
}

body.light-mode .sidebar-nav .nav-link.active {
    background-color: #d1d2ff !important;
}

/* Removed green icon override for active state to maintain original icon colors */

.badge-new {
    background-color: rgba(255, 165, 2, 0.15);
    color: #ffa502;
    font-size: 0.65rem;
    padding: 1px 6px;
    border-radius: 4px;
    margin-right: -2px;
    margin-left: 10px;
    border: 1px solid rgba(255, 165, 2, 0.4);
    font-weight: 800;
    letter-spacing: 0.5px;
}

/* Status Badges */
.status-badge {
    padding: 2px 18px;
    border-radius: 20px;
    font-size: 0.75rem;
    border: 1px solid;
    background: transparent !important;
    display: inline-block;
}

.status-normal {
    border-color: #4834d4;
    color: #686de0;
}

.status-high {
    border-color: #ffa502;
    color: #ffa502;
}

.status-urgent {
    border-color: #ff5e57;
    color: #ff5e57;
}

/* Action Icons */
.action-icon {
    margin: 0 8px;
    cursor: pointer;
    font-size: 1.1rem;
    transition: 0.2s;
}

.icon-delete {
    color: #ff5e57 !important;
}

.icon-edit {
    color: #00d2b4 !important;
}

.icon-complete {
    color: #3498db !important;
}

.icon-undone {
    color: #3498db !important;
}

/* Pagination Refinement */
.pagination-controls {
    font-size: 0.85rem;
    color: #8c9cb6 !important;
}

.pagination-controls i {
    color: #4b5a74;
}

.rows-per-page .btn {
    color: #ffffff;
    border: none;
    border-bottom: 1px solid #ffffff;
    border-radius: 0;
    padding: 0 5px;
    font-size: 0.85rem;
}

.rows-per-page .dropdown-menu {
    background-color: #1a1a35;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    min-width: 60px;
    text-align: center;
}

.rows-per-page .dropdown-item {
    color: #8c9cb6;
    font-size: 0.85rem;
    padding: 5px 10px;
}

.rows-per-page .dropdown-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: white;
}

/* Icon Colors */
.icon-green {
    color: #2ecc71 !important;
}

.icon-orange {
    color: #f39c12 !important;
}

.icon-teal {
    color: #1abc9c !important;
}

.icon-red {
    color: #e74c3c !important;
}

.icon-yellow {
    color: #f1c40f !important;
}

.icon-purple {
    color: #9b59b6 !important;
}

.icon-blue {
    color: #3498db !important;
}

/* Submenu toggle icons */
.submenu-arrow {
    font-size: 0.8rem;
    color: var(--text-muted);
    transition: transform 0.3s;
}

.has-submenu.open .submenu-arrow {
    transform: rotate(-90deg);
}

.sidebar-nav .submenu {
    display: none;
    padding-right: 2.5rem;
    list-style: none;
    background: rgba(0, 0, 0, 0.1);
}

.has-submenu.open .submenu {
    display: block;
}

.sidebar-nav .submenu li a {
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: 0.2s;
}

.sidebar-nav .submenu li a:hover {
    color: var(--text-white);
}

.icon-green-alt {
    color: #2ecc71 !important;
}

/* Main Content Styling */
.top-header {
    background-color: var(--card-bg);
    margin: 15px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 10px 20px !important;
}

.search-container {
    position: relative;
    width: 280px;
    background: rgba(30, 30, 50, 0.6);
    border-radius: 50px;
    display: flex;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    height: 42px;
}

.search-icon-wrapper {
    position: absolute;
    left: 1px;
    width: 40px;
    height: 40px;
    background: #6c5ce7;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(108, 92, 231, 0.3);
    z-index: 2;
}

.search-input {
    width: 100%;
    background: transparent;
    border: none;
    padding: 5px 15px 5px 50px !important;
    color: #ffffff;
    font-size: 0.9rem;
    outline: none;
    text-align: right;
    /* RTL text alignment */
    height: 100%;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.version-indicator {
    color: #42b983;
    /* Greenish/Teal version text as per image */
    font-weight: bold;
    font-family: monospace;
}

/* Buttons & Inputs */
.btn-orange {
    background-color: var(--accent-orange);
    color: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
}

.btn-orange:hover {
    background-color: #e67e22;
    color: white;
}

.custom-checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid #475569 !important;
}

.table-title {
    color: #94a3b8;
}

/* Table Styling */
.custom-card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

body.light-mode .custom-card {
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.table-dark {
    --bs-table-bg: transparent;
}

.table thead th {
    background-color: var(--table-header-bg);
    border-bottom: 2px solid var(--table-border);
    color: var(--table-header-text);
    font-weight: 600;
    padding: 1.2rem 1rem;
    font-size: 0.85rem;
    text-align: center;
}

.table tbody td {
    border-bottom: 1px solid var(--table-border);
    padding: 1rem;
    vertical-align: middle;
    color: var(--table-text) !important;
    text-align: center;
}

.table tbody td:first-child {
    font-weight: 700;
    text-align: right;
    padding-right: 2.5rem;
    color: var(--table-text) !important;
}

.table tbody td:last-child {
    text-align: left;
    padding-left: 2rem;
}

.empty-row td {
    color: var(--text-muted);
    font-style: italic;
}

.table-footer {
    background-color: #14142b;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.pagination-controls i {
    cursor: pointer;
    font-size: 1.1rem;
}

.pagination-controls i:hover {
    color: white !important;
}

/* Responsiveness */
@media (max-width: 992px) {
    .sidebar {
        width: 280px !important;
        transform: translateX(100%) !important;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 2000;
        right: 0;
        padding-top: 1.5rem !important;
    }

    .sidebar.show {
        transform: translateX(0) !important;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
    }

    .sidebar-close-btn {
        display: block !important;
        position: absolute;
        left: 15px;
        top: 15px;
        font-size: 1.25rem;
        z-index: 2010;
        color: var(--text-white);
    }

    .content-area {
        margin-right: 0 !important;
        width: 100% !important;
        flex: none;
    }

    .sidebar .user-name,
    .sidebar .nav-link span,
    .sidebar .dark-mode-toggle .toggle-label {
        display: inline-block !important; /* Force visibility in mobile overlay */
    }

    .top-header {
        margin: 10px !important;
        width: auto !important;
    }

    .search-container {
        width: 100% !important;
        max-width: 250px;
    }
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal-overlay.active {
    display: flex;
}

.modal-container {
    width: 450px;
    max-width: 90%;
    background-color: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bg-dark-soft {
    background-color: #111827 !important;
}

.custom-textarea {
    resize: none;
    border-radius: 12px;
}

.custom-textarea:focus,
.form-select:focus {
    background-color: #111827;
    border-color: var(--accent-orange);
    color: white;
    box-shadow: 0 0 0 0.25rem rgba(243, 156, 18, 0.25);
}

.custom-select-wrapper {
    position: relative;
}

.select-arrow {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

.form-select {
    appearance: none;
    padding-left: 40px;
    border-radius: 12px;
}

.btn-dark-outline {
    background-color: transparent;
    border: 1px solid #334155;
    color: var(--text-white);
    border-radius: 8px;
    transition: 0.3s;
}

.btn-dark-outline:hover {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: #475569;
    color: white;
}

.btn-orange {
    border-radius: 8px !important;
}

/* Sidebar overlap logic unified in 992px media query */

/* Design Settings Page Styles */
.design-card {
    background-color: var(--bg-design-card);
    border-radius: 20px;
    border: 1px solid var(--border-color);
    box-shadow: var(--design-card-shadow, 0 10px 40px rgba(0, 0, 0, 0.3));
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-end;
}

.radio-item {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    flex-direction: row-reverse;
}

.radio-item input[type="radio"] {
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid var(--text-muted);
    border-radius: 50%;
    position: relative;
    transition: 0.2s;
    background: transparent;
}

.radio-item input[type="radio"]:checked {
    border-color: #686de0;
}

.radio-item input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    background: #686de0;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.radio-item span {
    color: var(--text-white);
    font-size: 0.95rem;
}

.pill-input-wrapper {
    position: relative;
    margin-top: 15px;
}

.pill-label {
    position: absolute;
    top: -10px;
    right: 50%;
    transform: translateX(50%);
    background: var(--bg-design-card);
    padding: 0 10px;
    font-size: 0.75rem;
    color: var(--text-muted);
    z-index: 1;
    white-space: nowrap;
}

.pill-input {
    background: var(--bg-design-input, rgba(0, 0, 0, 0.2)) !important;
    border: 1.5px solid var(--border-design-input, rgba(255, 255, 255, 0.1)) !important;
    border-radius: 50px !important;
    padding: 10px 20px !important;
    color: var(--text-design-input, white) !important;
    font-size: 0.9rem !important;
    transition: all 0.3s ease;
    text-align: center;
    appearance: none;
}

.pill-input:focus {
    border-color: var(--primary-purple) !important;
    box-shadow: 0 0 0 0.2rem rgba(72, 52, 212, 0.25) !important;
}

.screen-distribution-card {
    background-color: var(--bg-design-input, rgba(0, 0, 0, 0.2));
    border-radius: 20px;
}

.btn-save-orange {
    background-color: #f39c12;
    color: white;
    font-weight: bold;
    font-size: 1.1rem;
    padding: 12px;
    border-radius: 12px;
    transition: 0.3s;
    border: none;
}

.btn-save-orange:hover {
    background-color: #e67e22;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(243, 156, 18, 0.3);
}

.btn-save-purple {
    background-color: var(--purple-btn);
    color: white;
    font-weight: bold;
    padding: 10px 40px;
    border-radius: 12px;
    transition: 0.3s;
    border: none;
}

.btn-save-purple:hover {
    background-color: #7d3c98;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(142, 68, 173, 0.3);
}

/* Custom transitions for inputs */
input,
select {
    transition: border-color 0.2s, box-shadow 0.2s;
}

/* Profile Page Styles */
.profile-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

.profile-avatar-wrapper {
    position: relative;
    width: 15rem;
    height: 15rem;
    margin: 0 auto 3rem;
    background: #ffa502;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    background-size: cover;
    background-position: center;
}

@media (max-width: 480px) {
    .profile-avatar-wrapper {
        width: 12rem;
        height: 12rem;
        margin-bottom: 2rem;
    }
}

.avatar-change-btn {
    position: absolute;
    bottom: 2rem;
    right: 0.5rem;
    width: 2rem;
    height: 2rem;
    background: #ff5e57;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.9rem;
    border: 3px solid var(--bg-main);
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.pill-input-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .pill-input-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

.profile-pill-wrapper {
    position: relative;
}

.profile-pill-label {
    position: absolute;
    top: -10px;
    right: 50%;
    transform: translateX(50%);
    background-color: var(--bg-design-main);
    padding: 0 10px;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 700;
    z-index: 1;
    white-space: nowrap;
}

.profile-pill-input {
    width: 100%;
    background: rgba(30, 30, 50, 0.6) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 50px !important;
    padding: 12px 25px !important;
    color: #ffffff !important;
    font-size: 0.95rem !important;
    outline: none;
    transition: 0.3s;
    text-align: center;
}

.profile-pill-input:focus {
    border-color: var(--primary-purple) !important;
    background: rgba(40, 40, 60, 0.8) !important;
}

.btn-save-main-pill {
    width: 100%;
    background-color: #00d084;
    color: white;
    font-weight: 800;
    font-size: 1.15rem;
    padding: 14px;
    border-radius: 50px;
    border: none;
    transition: 0.3s;
    margin-bottom: 3rem;
}

.btn-save-main-pill:hover {
    background-color: #00b874;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 208, 132, 0.3);
}

.tfa-divider {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 1rem;
    padding-top: 2rem;
}

.tfa-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: white;
    margin-bottom: 1.5rem;
}

.tfa-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: transparent;
    padding: 0.5rem 0;
}

.tfa-label {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.custom-square-check {
    width: 22px;
    height: 22px;
    background-color: transparent;
    border: 2px solid #ffffff;
    border-radius: 4px;
    cursor: pointer;
    display: inline-block;
    position: relative;
    transition: 0.2s;
}

.custom-square-check.active {
    background-color: var(--primary-purple);
    border-color: var(--primary-purple);
}

.custom-square-check::after {
    content: '\F26E';
    /* bi-check */
    font-family: 'bootstrap-icons';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 1rem;
    display: none;
}

.custom-square-check.active::after {
    display: block;
}

/* Toast Notification System */
.toast-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.custom-toast {
    min-width: 300px;
    padding: 15px 25px;
    background: rgba(26, 26, 46, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    color: white;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: toast-in 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
    pointer-events: auto;
    direction: rtl;
}

.custom-toast.success {
    border-right: 5px solid #00d084;
}

.custom-toast.error {
    border-right: 5px solid #ff5e57;
}

.custom-toast.info {
    border-right: 5px solid var(--primary-purple);
}

.custom-toast i {
    font-size: 1.4rem;
}

.custom-toast.success i {
    color: #00d084;
}

.custom-toast.error i {
    color: #ff5e57;
}

.custom-toast.info i {
    color: var(--primary-purple);
}

.custom-toast.fade-out {
    animation: toast-out 0.5s ease forwards;
}

@keyframes toast-in {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes toast-out {
    from {
        opacity: 1;
        transform: translateY(0);
    }

    to {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
}

.summary-card {
    background-color: var(--bg-design-card);
    border-radius: 15px;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease;
    height: 100%;
}

.summary-card:hover {
    transform: translateY(-5px);
}

.summary-icon {
    width: 45px;
    height: 45px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.icon-purple {
    background: rgba(108, 92, 231, 0.1);
    color: #6c5ce7;
}

.icon-orange {
    background: rgba(255, 165, 2, 0.1);
    color: #ffa502;
}

.icon-green {
    background: rgba(0, 208, 132, 0.1);
    color: #00d084;
}

.icon-teal {
    background: rgba(0, 206, 201, 0.1);
    color: #00cec9;
}

.table-cell-input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: white;
    padding: 4px 8px;
    width: 100px;
    text-align: center;
}

.table-cell-input:focus {
    outline: none;
    border-color: var(--primary-purple);
    background: rgba(255, 255, 255, 0.1);
}

.text-cyan {
    color: #00cec9 !important;
}

.text-danger {
    color: #ff5e57 !important;
}

.btn-icon-teal {
    color: #00cec9;
    background: transparent;
    border: none;
}

.btn-icon-red {
    color: #ff5e57;
    background: transparent;
    border: none;
}

.btn-icon-teal:hover,
.btn-icon-red:hover {
    opacity: 0.7;
}

body.light-mode.accounting-page .content-area {
    background-color: var(--bg-accounting-main, #f0f2f5) !important;
}

body.light-mode .table-cell-input {
    background: #f8fafc;
    border-color: #e2e8f0;
    color: #1e293b;
}

body.light-mode .table-hover tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.02) !important;
}

/* API Inventory Custom Styles */
.btn-circular-purple {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: #6c5ce7;
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: 0.3s;
}

.custom-alert {
    padding: 12px 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 0.95rem;
}

.alert-green {
    background-color: #2ecc71;
    color: white;
}

.alert-warning {
    background-color: rgba(45, 46, 64, 0.8);
    border: 1px solid #ffa502;
    color: #ffa502;
}

/* Custom Picker Modals - Pixel Perfect Refinement */
.custom-picker-modal .modal-content {
    background-color: #333333;
    max-width: 310px;
    margin: auto;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.picker-header {
    background-color: #242533;
    color: white;
    padding: 20px !important;
    text-align: right;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.selected-year {
    font-size: 0.85rem;
    color: #909090;
    margin-bottom: 2px;
}

.selected-date {
    font-size: 1.8rem;
    font-weight: 500;
}

.picker-body {
    background-color: #424242;
    /* Darker gray for calendar body */
}

.calendar-controls {
    color: white;
    font-size: 0.95rem;
}

.days-header {
    display: flex;
    justify-content: space-around;
    padding: 0 10px;
}

.days-header span {
    width: 35px;
    text-align: center;
    color: #999;
    font-size: 0.75rem;
    font-weight: bold;
}

.calendar-grid {
    padding: 10px 15px;
}

.days-body {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.calendar-day {
    height: 38px;
    width: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 50%;
    color: white;
    font-size: 0.85rem;
    margin: auto;
}

.calendar-day:hover:not(.empty) {
    background: rgba(255, 255, 255, 0.1);
}

.calendar-day.selected {
    background: #5c6bc0 !important;
    color: white !important;
}

.picker-footer {
    padding: 10px 20px 15px !important;
    background: #333333;
    border-top: none !important;
}

.btn-link.text-purple {
    color: #9fa8da !important;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1px;
}

/* Time Picker Specifics */
.clock-face {
    width: 220px;
    height: 220px;
    background: #616161;
    /* Specific gray from screenshot */
    border-radius: 50%;
    position: relative;
    margin: 15px auto;
}

.clock-center {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 6px;
    height: 6px;
    background: #3f51b5;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
}

.clock-hand {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 2px;
    height: 80px;
    /* Length of the hand */
    background: #3f51b5;
    transform-origin: bottom center;
    /* Rotate around the clock center */
    transform: translate(-50%, -100%) rotate(0deg);
    z-index: 5;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* The circle at the end of the clock hand (the pointer tip) */
.clock-hand::after {
    content: '';
    position: absolute;
    top: -16px;
    /* Position at the top tip of the hand */
    left: 50%;
    width: 32px;
    height: 32px;
    background: #3f51b5;
    border-radius: 50%;
    transform: translateX(-50%);
}

.clock-number {
    position: absolute;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: white;
    cursor: pointer;
    border-radius: 50%;
    z-index: 6;
}

.clock-number.active {
    color: white;
}

.selected-time {
    color: #e0e0e0;
    font-weight: 400;
    font-size: 4rem;
    line-height: 1;
}

.period-toggle {
    font-size: 0.8rem;
    font-weight: 600;
    color: #7986cb;
    letter-spacing: 0.5px;
}

/* Todo Modal Redesign v2 - Precise Match */
.todo-v2 .modal-container {
    background-color: #1a1a2e;
    border-radius: 24px;
    border: 1.5px solid rgba(255, 255, 255, 0.05);
    padding: 0;
    width: 440px;
    max-width: 95%;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    z-index: 2001;
}

.todo-v2 .modal-header-custom h5 {
    font-size: 1.25rem;
    letter-spacing: 0.5px;
}

.todo-v2 .inner-label-wrapper {
    position: relative;
    width: 100%;
}

.todo-v2 .inner-label {
    position: absolute;
    top: 15px;
    right: 20px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
    pointer-events: none;
}

.todo-v2 .pill-input-v2 {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 20px !important;
    padding: 15px 20px !important;
    color: #fff !important;
    width: 100%;
    outline: none;
    transition: 0.3s;
    text-align: right;
}

.todo-v2 textarea.pill-input-v2 {
    padding-top: 45px !important;
    /* Make room for inner label */
    border-radius: 24px !important;
    resize: none;
}

.todo-v2 .pill-input-wrapper-v2 {
    position: relative;
    width: 100%;
}

.todo-v2 .pill-label-right {
    position: absolute;
    top: -10px;
    right: 30px;
    background: #1a1a2e;
    padding: 0 10px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8rem;
    z-index: 5;
}

.todo-v2 select.pill-input-v2 {
    border-radius: 50px !important;
    height: 50px;
    appearance: none;
    cursor: pointer;
    background-color: #1a1a2e !important;
    /* Ensure the select itself has the correct bg */
}

.todo-v2 select.pill-input-v2 option {
    background-color: #1a1a2e;
    color: #fff;
}

.todo-v2 .custom-select-wrapper-v2 {
    position: relative;
    width: 100%;
}

.todo-v2 .select-arrow-v2 {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    pointer-events: none;
}

.todo-v2 .btn-orange-v2 {
    background-color: #ffa502 !important;
    color: #fff !important;
    border: none;
    border-radius: 8px;
    padding: 10px 25px;
    font-weight: 600;
    transition: 0.3s;
}

.todo-v2 .btn-dark-v2 {
    background-color: #242426 !important;
    color: rgba(255, 255, 255, 0.8) !important;
    border: none;
    border-radius: 8px;
    padding: 10px 25px;
    font-weight: 600;
    transition: 0.3s;
}

.todo-v2 .btn-orange-v2:hover,
.todo-v2 .btn-dark-v2:hover {
    opacity: 0.8;
}

/* --- Premium Delete Confirmation Modal --- */
.delete-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.delete-modal-overlay.active {
    display: flex;
    opacity: 1;
}

.delete-modal-content {
    background: var(--bg-sidebar);
    width: 400px;
    max-width: 90%;
    border-radius: 24px;
    padding: 30px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.delete-modal-overlay.active .delete-modal-content {
    transform: scale(1);
}

.delete-icon-wrapper {
    width: 80px;
    height: 80px;
    background: rgba(255, 94, 87, 0.1);
    color: #ff5e57;
    font-size: 2.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    animation: pulse-red 2s infinite;
}

@keyframes pulse-red {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 94, 87, 0.4);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(255, 94, 87, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 94, 87, 0);
    }
}

.delete-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 10px;
}

.delete-text {
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 25px;
}

.delete-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.btn-cancel {
    padding: 10px 25px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-white);
    font-weight: 600;
    transition: 0.2s;
    cursor: pointer;
}

.btn-cancel:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.btn-confirm-delete {
    padding: 10px 25px;
    border-radius: 12px;
    border: none;
    background: #ff5e57;
    color: white;
    font-weight: 600;
    transition: 0.2s;
    box-shadow: 0 4px 15px rgba(255, 94, 87, 0.3);
    cursor: pointer;
}

.btn-confirm-delete:hover {
    background: #ff3b30;
    box-shadow: 0 6px 20px rgba(255, 94, 87, 0.4);
}

/* --- Theme Settings Refinement (Dark Theme) --- */
.design-settings-container {
    max-width: 1200px;
    margin: 0 auto;
}

.settings-grid-v5 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
    margin-bottom: 50px;
}

.setting-section-v5 {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.setting-group-v5 {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
    /* Center labels and radios as per image_1 */
}

.title-v5 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 20px;
    text-align: center;
}

/* Precise Radio RTL */
.radio-group-v5 {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.radio-item-v5 {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    flex-direction: row-reverse;
    /* Circle on right */
    justify-content: flex-end;
}

.radio-item-v5 input[type="radio"] {
    appearance: none;
    width: 22px;
    height: 22px;
    border: 2px solid #6c5ce7;
    border-radius: 50%;
    position: relative;
    transition: 0.2s;
    background: transparent;
}

.radio-item-v5 input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    background: #6c5ce7;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.radio-item-v5 span {
    color: var(--text-white);
    font-size: 1rem;
}

/* Centered Pill Inputs */
.pill-input-wrapper-v5 {
    position: relative;
    width: 100%;
    margin-top: 10px;
}

.pill-label-v5 {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: #19192a;
    /* Dashboard dark bg */
    padding: 2px 15px;
    font-size: 0.85rem;
    color: #8c9cb6;
    z-index: 2;
    white-space: nowrap;
    border-radius: 4px;
}

.dist-card-v5 .pill-label-v5 {
    background: #212239;
    /* Card background match */
}

.pill-input-v5 {
    background: rgba(0, 0, 0, 0.2) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 50px !important;
    padding: 14px 25px !important;
    color: white !important;
    width: 100%;
    text-align: center;
    font-size: 0.95rem !important;
    transition: 0.3s;
}

.pill-input-v5:focus {
    border-color: #6c5ce7 !important;
    box-shadow: 0 0 15px rgba(108, 92, 231, 0.2) !important;
    outline: none;
}

/* Select styling */
.pill-select-v5 {
    appearance: none;
    cursor: pointer;
}

.select-arrow-v5 {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #8c9cb6;
    pointer-events: none;
}

/* Screen Distribution Card */
.dist-card-v5 {
    background: #212239;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 40px;
}

.dist-title-v5 {
    text-align: right;
    margin-bottom: 25px;
}

.dist-grid-v5 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

/* Save Buttons */
.btn-save-primary-v5 {
    background: #ffa502;
    color: white;
    border: none;
    padding: 16px;
    border-radius: 12px;
    width: 100%;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 30px;
    transition: 0.3s;
    box-shadow: 0 4px 15px rgba(255, 165, 2, 0.3);
}

.btn-save-secondary-v5 {
    background: #6c5ce7;
    color: white;
    border: none;
    padding: 10px 30px;
    border-radius: 10px;
    font-weight: 600;
    float: left;
    transition: 0.3s;
}

.btn-save-primary-v5:hover,
.btn-save-secondary-v5:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

.version-v5 {
    color: #00d084;
    font-weight: 700;
}

@media (max-width: 768px) {

    .settings-grid-v5,
    .dist-grid-v5 {
        grid-template-columns: 1fr;
    }
}

/* Refined Header v6 */
.refined-header-v6 {
    background: rgba(33, 34, 57, 0.6);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 50px;
    padding: 12px 30px;
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.version-v6 {
    color: #00d084;
    font-size: 0.9rem;
    font-weight: 700;
}

.title-v6 {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    font-weight: 600;
}

/* Comparison Grid Styles */
.diff-card-v6 {
    background: #212239;
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 25px;
}

.diff-table-v6 {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 10px;
}

.diff-row-v6 {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    transition: 0.3s;
}

.diff-row-v6:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: scale(1.005);
}

.diff-cell-v6 {
    padding: 15px 20px;
    color: white;
}

.diff-cell-v6:first-child {
    border-radius: 0 12px 12px 0;
}

.diff-cell-v6:last-child {
    border-radius: 12px 0 0 12px;
}

.status-badge-v6 {
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.status-match {
    background: rgba(0, 208, 132, 0.1);
    color: #00d084;
    border: 1px solid rgba(0, 208, 132, 0.2);
}

.status-diff {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.amount-diff {
    font-weight: 700;
    color: #ef4444;
}

.amount-match {
    font-weight: 700;
    color: #00d084;
}

.search-bar-v6 {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 10px 20px;
    color: white;
    width: 300px;
    margin-bottom: 20px;
}

/* Premium Detail Modal */
.modal-detail-v6 {
    background: rgba(25, 25, 42, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    color: white;
}

.detail-item-v6 {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 15px;
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.detail-label-v6 {
    color: #8c9cb6;
    font-size: 0.8rem;
    display: block;
    margin-bottom: 5px;
}

.detail-value-v6 {
    font-weight: 700;
    font-size: 1.1rem;
}

/* Custom Premium Toasts */
.premium-toast-v6 {
    background: rgba(0, 208, 132, 0.9);
    color: white;
    border-radius: 50px;
    padding: 12px 30px;
    border: none;
    box-shadow: 0 10px 30px rgba(0, 208, 132, 0.3);
    backdrop-filter: blur(10px);
    animation: toastFadeIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.premium-toast-v6.error {
    background: rgba(239, 68, 68, 0.9);
    box-shadow: 0 10px 30px rgba(239, 68, 68, 0.3);
}

@keyframes toastFadeIn {
    from {
        transform: translateY(100px) scale(0.8);
        opacity: 0;
    }

    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

/* --- Analysis Page Styles --- */
.analysis-page {
    background-color: #1a1b2e !important;
    min-height: 100vh;
}

.analysis-container {
    max-width: 1200px;
    margin: 0 auto;
    padding-bottom: 50px;
}

/* Analysis Filter Grid */
.analysis-filter-card {
    background: rgba(33, 34, 57, 0.5);
    border-radius: 24px;
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
}

.filter-pill-input {
    background: #252642;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 12px;
    padding: 12px 20px;
    font-size: 0.9rem;
    width: 100%;
    transition: 0.3s;
}

.filter-pill-input:focus {
    outline: none;
    border-color: #6f42c1;
    box-shadow: 0 0 0 3px rgba(111, 66, 193, 0.1);
}

.btn-search-v6 {
    background: #6f42c1;
    color: white;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    box-shadow: 0 4px 15px rgba(111, 66, 193, 0.3);
    transition: 0.3s;
}

.btn-search-v6:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(111, 66, 193, 0.4);
}

/* Alerts */
.analysis-alert-success {
    background: #198754;
    color: white;
    border: none;
    border-radius: 12px;
    padding: 15px 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.analysis-alert-warning {
    background: transparent;
    color: #fd7e14;
    border: 1px solid #fd7e14;
    border-radius: 12px;
    padding: 15px 20px;
}

/* --- Custom Picker Modals --- */
.picker-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    display: none;
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.picker-card {
    background: #2d2e46;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    width: 320px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    animation: pickerPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes pickerPop {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.picker-header {
    background: #1a1b2e;
    padding: 20px;
    text-align: right;
}

.picker-footer {
    padding: 15px;
    display: flex;
    justify-content: flex-end;
    gap: 15px;
}

/* Calendar Specific */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    padding: 15px;
    gap: 5px;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 50%;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
    transition: 0.2s;
}

.calendar-day:hover {
    background: rgba(255, 255, 255, 0.1);
}

.calendar-day.active {
    background: #6f42c1;
    color: white;
    font-weight: bold;
}

.calendar-day.today {
    border: 1px solid #6f42c1;
}

.weekday-header {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
    text-align: center;
    padding-bottom: 10px;
}

/* Analog Clock Specific */
.clock-container {
    position: relative;
    width: 220px;
    height: 220px;
    background: #252642;
    border-radius: 50%;
    margin: 20px auto;
    border: 2px solid rgba(255, 255, 255, 0.05);
}

.clock-number {
    position: absolute;
    width: 30px;
    height: 30px;
    text-align: center;
    line-height: 30px;
    color: white;
    font-size: 0.9rem;
    cursor: pointer;
    border-radius: 50%;
}

.clock-center {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    background: #6f42c1;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
}

.clock-hand {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 2px;
    background: #6f42c1;
    transform-origin: bottom center;
    transform: translate(-50%, -100%) rotate(0deg);
}

.hand-hour {
    height: 60px;
    width: 3px;
}

.hand-minute {
    height: 85px;
}


/* --- Design Modification Page Specific Styles (v16.3) --- */
.design-card-v2 {
    background: #1e1e30;
    border-radius: 24px;
    padding: 2.5rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.radio-group-v2 {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: flex-end;
}

.radio-item-v2 {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    user-select: none;
    color: #fff;
    font-size: 0.95rem;
}

.radio-item-v2 input {
    display: none;
}

.radio-circle-v2 {
    width: 22px;
    height: 22px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    position: relative;
    transition: all 0.2s;
}

.radio-item-v2 input:checked+.radio-circle-v2 {
    border-color: #7b61ff;
    box-shadow: 0 0 10px rgba(123, 97, 255, 0.4);
}

.radio-item-v2 input:checked+.radio-circle-v2::after {
    content: "";
    position: absolute;
    width: 10px;
    height: 10px;
    background: #7b61ff;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.pill-wrapper-v2 {
    position: relative;
    margin-bottom: 5px;
}

.pill-label-v2 {
    position: absolute;
    top: -10px;
    right: 25px;
    background: #1e1e30;
    padding: 0 10px;
    font-size: 0.85rem;
    color: #a0a0c0;
    z-index: 10;
}

.pill-input-v2 {
    background: #252545 !important;
    border: 1.5px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 50px !important;
    color: white !important;
    padding: 12px 25px !important;
    width: 100%;
    text-align: center;
    transition: border-color 0.3s;
    appearance: none !important;
    -webkit-appearance: none !important;
}

.pill-input-v2:focus {
    border-color: #7b61ff !important;
    box-shadow: none !important;
    outline: none;
}

.pill-select-v2 {
    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='%23a0a0c0' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") !important;
    background-position: left 20px center !important;
    background-size: 14px !important;
    padding-left: 45px !important;
}

.screen-dist-container {
    background: #1a1a2e;
    border-radius: 20px;
    padding: 2rem;
    margin-top: 3rem;
}

.btn-save-orange {
    background: #ffa500 !important;
    color: #000 !important;
    font-weight: 700 !important;
    border-radius: 15px !important;
    padding: 12px !important;
    font-size: 1.1rem !important;
    text-align: center;
    border: none;
    transition: transform 0.2s;
}

.btn-save-purple {
    background: #6a11cb !important;
    color: white !important;
    border-radius: 12px !important;
    padding: 8px 30px !important;
    border: none;
}

.v-indicator {
    color: #00ff88;
    font-size: 0.85rem;
    font-weight: 600;
}

.label-group-title {
    color: #fff;
    font-weight: 600;
    margin-bottom: 20px;
}

/* --- Design Modification V2 --- */
.design-v2-container {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.design-v2-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.design-v2-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #8c9cb6;
}

.design-v2-section {
    background: transparent;
    margin-bottom: 40px;
}

/* Custom Radio Group */
.radio-group-v2 {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 30px;
}

.radio-group-v2 .group-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 5px;
    color: #ffffff;
}

.radio-option-v2 {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    user-select: none;
    color: #8c9cb6;
    font-size: 0.95rem;
}

.radio-option-v2 input {
    display: none;
}

.radio-circle-v2 {
    width: 20px;
    height: 20px;
    border: 2px solid #8c9cb6;
    border-radius: 50%;
    position: relative;
    transition: 0.3s;
}

.radio-option-v2 input:checked+.radio-circle-v2 {
    border-color: var(--purple-accent);
}

.radio-circle-v2::after {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    background: var(--purple-accent);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.radio-option-v2 input:checked+.radio-circle-v2::after {
    transform: translate(-50%, -50%) scale(1);
}

.radio-option-v2 input:checked~span {
    color: #ffffff;
}

/* Pill Input V2 with Border Label */
.pill-input-v2-wrapper {
    position: relative;
    margin-bottom: 30px;
    width: 100%;
}

.pill-input-v2-wrapper .border-label {
    position: absolute;
    top: -9px;
    right: 30px;
    /* Aligned to right per new design */
    left: auto;
    transform: none;
    background: #202136;
    padding: 0 10px;
    font-size: 0.65rem;
    font-weight: 600;
    color: #8c9cb6;
    z-index: 10;
    white-space: nowrap;
}

.pill-input-v2 {
    width: 100%;
    background: var(--bg-design-input);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    padding: 12px 25px;
    color: #ffffff;
    font-size: 1rem;
    outline: none;
    transition: 0.3s;
    text-align: center;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.pill-input-v2:focus {
    border-color: var(--purple-accent);
    box-shadow: 0 0 10px rgba(108, 92, 231, 0.2);
}

.pill-input-v2.gradient-text {
    font-size: 0.85rem;
    font-weight: 500;
}

/* Custom Select V2 */
.custom-select-v2-wrapper {
    position: relative;
}

.custom-select-v2-wrapper .select-arrow {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #8c9cb6;
    pointer-events: none;
}

/* Action Buttons V2 */
.btn-save-main-v2 {
    background: var(--orange-accent);
    color: #12121e;
    border: none;
    border-radius: 12px;
    padding: 15px;
    width: 100%;
    font-weight: 700;
    font-size: 1.1rem;
    margin: 20px 0;
    transition: 0.3s;
}

.btn-save-main-v2:hover {
    background: #e67e22;
    transform: translateY(-2px);
}

.btn-save-sizes-v2 {
    background: var(--purple-accent);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 10px 30px;
    font-weight: 600;
    float: right;
    transition: 0.3s;
}

.btn-save-sizes-v2:hover {
    background: var(--active-purple);
    box-shadow: 0 4px 15px rgba(108, 92, 231, 0.3);
}

/* Items Grid Section */
.items-grid-section {
    border-top: 2px solid rgba(255, 255, 255, 0.05);
    padding-top: 30px;
    margin-top: 20px;
}

.section-subtitle-v2 {
    font-size: 0.9rem;
    color: #ffffff;
    font-weight: 600;
    margin-bottom: 10px;
}

.section-hint-v2 {
    font-size: 0.8rem;
    color: #8c9cb6;
    margin-bottom: 20px;
}

/* Sidebar LTR Adjustments */
[dir="ltr"] .sidebar {
    right: auto;
    left: 0;
    border-left: none;
    border-right: 2px solid var(--primary-purple);
}

[dir="ltr"] .content-area {
    margin-right: 0;
    margin-left: 280px;
}

[dir="ltr"] .content-area.expanded {
    margin-left: 0;
}

[dir="ltr"] .top-header {
    margin: 15px;
}

[dir="ltr"] .sidebar-nav .nav-link.active {
    margin: 0.5rem 0.5rem;
}

[dir="ltr"] .search-icon-wrapper {
    left: auto;
    right: 1px;
}

[dir="ltr"] .search-input {
    padding: 5px 50px 5px 15px !important;
    text-align: left;
}

/* --- Table V2 Styles (Capital Page) --- */
.capital-container {
    padding: 30px;
}

.capital-title-row {
    margin-bottom: 40px;
}

.capital-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: #ffffff;
}

.btn-add-orange {
    background-color: var(--orange-accent);
    color: #12121e;
    border: none;
    padding: 10px 25px;
    border-radius: 8px;
    font-weight: 700;
    transition: 0.3s;
}

.btn-add-orange:hover {
    background-color: #e67e22;
    transform: translateY(-2px);
}

.v-indicator {
    color: #00ff88;
    /* Neon Green matched from image */
    font-size: 0.85rem;
    font-weight: 700;
}

.table-v2-wrapper {
    background: #1e1f3a;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.table-v2 {
    width: 100%;
    margin-bottom: 0;
    color: #ffffff;
    border-collapse: collapse;
}

.table-v2 thead th {
    background: #14152d;
    padding: 18px 20px;
    text-align: center;
    color: #8c9cb6;
    font-size: 0.85rem;
    font-weight: 500;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.table-v2 tbody td {
    padding: 15px 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    vertical-align: middle;
}

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

.table-v2-footer {
    background: #14152d;
    padding: 12px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #8c9cb6;
    font-size: 0.8rem;
    direction: ltr;
    /* Ensure pagination internal order is LTR across all modes */
}

.rows-per-page-v2 {
    display: flex;
    align-items: center;
    gap: 10px;
}

.rows-select-v2 {
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0 2px;
    outline: none;
    font-size: 0.8rem;
    cursor: pointer;
    text-align: center;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.pagination-arrow {
    cursor: pointer;
    font-size: 1rem;
    color: #8c9cb6;
    transition: 0.2s;
}

.pagination-arrow:hover {
    color: white;
}

/* Modal V2 Refinements */
.modal-overlay-v2 {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 3000;
}

.modal-overlay-v2.show {
    display: flex;
}

.modal-content-v2 {
    background: #202136;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 40px;
    width: 480px;
    max-width: 90%;
    position: relative;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.modal-title-v2 {
    text-align: center;
    margin-bottom: 35px;
    color: white;
    font-size: 1.4rem;
    font-weight: 600;
}

.btn-modal-submit-v2 {
    background: #6c5ce7;
    color: white;
    border: none;
    border-radius: 50px;
    width: 100%;
    /* Full width per new design */
    padding: 12px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 30px auto 0;
    font-size: 1.1rem;
    font-weight: 600;
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 5px 20px rgba(108, 92, 231, 0.4);
}

.btn-modal-submit-v2:hover {
    transform: translateY(-2px) scale(1.05);
    background: #7d6df2;
}

/* Premium Confirm Modal */
.premium-confirm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 5000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.premium-confirm-overlay.show {
    display: flex;
    opacity: 1;
}

.premium-confirm-content {
    background: #1e1f3a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 35px;
    width: 400px;
    max-width: 90%;
    text-align: center;
    transform: scale(0.8);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

.premium-confirm-overlay.show .premium-confirm-content {
    transform: scale(1);
}

.confirm-icon-wrapper {
    width: 70px;
    height: 70px;
    background: rgba(231, 76, 60, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: #e74c3c;
    font-size: 2.5rem;
    box-shadow: 0 0 20px rgba(231, 76, 60, 0.2);
}

.confirm-title {
    color: white;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.confirm-text {
    color: #8c9cb6;
    font-size: 0.95rem;
    margin-bottom: 30px;
    line-height: 1.6;
}

.confirm-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.btn-confirm-delete {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 10px 30px;
    border-radius: 50px;
    font-weight: 600;
    transition: 0.3s;
    flex: 1;
}

.btn-confirm-delete:hover {
    background: #ff5e57;
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.4);
}

.btn-confirm-cancel {
    background: rgba(255, 255, 255, 0.05);
    color: #8c9cb6;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 10px 30px;
    border-radius: 50px;
    font-weight: 600;
    transition: 0.3s;
    flex: 1;
}

.btn-confirm-cancel:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

/* --- PM Details V2 Styles --- */
.pm-details-container {
    padding: 30px;
    color: white;
    background: #1a1b2e;
    /* Deeper navy matching the image background */
    min-height: 100vh;
}

.pm-filter-row {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
}

.btn-search-purple {
    background: #6c5ce7;
    color: white;
    border: none;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    box-shadow: 0 0 25px rgba(108, 92, 231, 0.6);
    /* Stronger glow per image */
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-search-purple:hover {
    transform: scale(1.1);
    box-shadow: 0 0 35px rgba(108, 92, 231, 0.8);
}

.date-input-v2-wrapper {
    position: relative;
    width: 280px;
}

.date-input-v2-wrapper .date-label {
    position: absolute;
    top: -9px;
    right: 25px;
    background: #1a1b2e;
    /* Matched background */
    padding: 0 12px;
    font-size: 0.75rem;
    font-weight: 500;
    color: #8c9cb6;
    z-index: 5;
}

.date-input-v2 {
    width: 100%;
    background: #23253a;
    /* Slightly lighter than page bg */
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50px;
    padding: 12px 25px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    text-align: center;
    outline: none;
    transition: 0.3s;
}

.pm-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

.pm-stats-card {
    text-align: right;
    padding: 20px;
}

.pm-stats-title {
    color: #8c9cb6;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.pm-stats-value {
    font-size: 1.25rem;
    font-weight: 800;
    /* Heavier per image */
    color: white;
    margin-bottom: 5px;
}

.pm-stats-divider {
    grid-column: span 2;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin: 10px 0;
}

.pm-currency-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.pm-currency-item {
    font-size: 0.95rem;
    color: #ffffff;
}

/* Net Available Card */
.net-available-card {
    border: 1px solid #00f2fe;
    /* Thinner but brighter teal/cyan */
    background: #1a1b2e;
    border-radius: 14px;
    padding: 35px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    /* Aligned to top per image */
    margin-bottom: 50px;
    box-shadow: 0 0 20px rgba(0, 242, 254, 0.05);
}

.net-available-title {
    color: white;
    font-size: 1.25rem;
    font-weight: 700;
    text-align: right;
}

.net-available-actions-col {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.net-action-row {
    display: flex;
    gap: 10px;
}

.btn-net-transfer {
    background: rgba(64, 153, 255, 0.08);
    border: 1px solid #4099ff;
    color: #4099ff;
    border-radius: 8px;
    padding: 10px 20px;
    font-size: 0.95rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: 0.3s;
    min-width: 160px;
    justify-content: center;
}

.btn-net-transfer:hover {
    background: rgba(64, 153, 255, 0.2);
    box-shadow: 0 0 15px rgba(64, 153, 255, 0.2);
}

.btn-net-reset {
    background: rgba(255, 93, 87, 0.08);
    /* Red tint */
    border: 1px solid #ff5d57;
    color: #ff5d57;
    border-radius: 8px;
    padding: 10px 20px;
    font-size: 0.95rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: 0.3s;
    min-width: 120px;
    justify-content: center;
    flex-direction: row-reverse;
    /* Trash icon on LEFT side of translated text */
}

.btn-net-reset:hover {
    background: rgba(255, 93, 87, 0.2);
    box-shadow: 0 0 15px rgba(255, 93, 87, 0.2);
}

.pm-section-divider {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    /* Divider above titles */
    margin: 60px 0 25px;
}

/* PM Tables Section */
.pm-table-section {
    margin-bottom: 40px;
}

.pm-section-title {
    text-align: right;
    font-size: 1.15rem;
    font-weight: 700;
    color: white;
    margin-bottom: 25px;
    letter-spacing: 0.5px;
}

.pm-subheader-usdt {
    text-align: right;
    color: #ffffff;
    font-weight: 800;
    font-size: 1.1rem;
    margin-bottom: 25px;
    opacity: 0.9;
}

.pm-table thead tr {
    background: #14152d !important;
    /* Dark solid header per image */
}

.pm-table th {
    border: none;
    padding: 15px 20px;
    color: #ffffff;
    font-weight: 600;
    font-size: 0.95rem;
}

/* Align values in PM tables specifically */
.pm-table th:nth-child(1),
.pm-table td:nth-child(1) {
    text-align: right;
}

.pm-table th:nth-child(2),
.pm-table td:nth-child(2) {
    text-align: center;
}

.pm-table th:nth-child(3),
.pm-table td:nth-child(3) {
    text-align: left;
}

.pm-table-footer {
    background: #14152d;
    padding: 8px 20px;
    border-radius: 0 0 12px 12px;
    display: flex;
    align-items: center;
    gap: 20px;
    color: #8c9cb6;
    font-size: 0.9rem;
}

.pm-pagination-info {
    font-weight: 600;
    color: white;
}

/* Overriding primitive submenu styling with standard nav-link styling */
.sidebar-nav .submenu {
    padding-right: 1.5rem !important;
    background: transparent !important;
}

.sidebar-nav .submenu li a {
    color: var(--text-muted) !important;
    padding: 0.8rem 1.2rem !important;
    border-radius: 10px !important;
    margin: 0.5rem 0 !important;
    font-size: 0.95rem !important;
}

.sidebar-nav .submenu li a i {
    font-size: 1.1rem !important;
}

.sidebar-nav .submenu li a:hover {
    color: var(--text-white) !important;
    background-color: rgba(255, 255, 255, 0.05) !important;
}

.sidebar-nav .submenu li a.active {
    background: #cbd0f7 !important;
    color: #4831d4 !important;
    border-radius: 50px !important;
    margin: 0.5rem 0.5rem !important;
    padding: 0.8rem 1.5rem !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15) !important;
    font-weight: 700 !important;
}

body.light-mode .sidebar-nav .submenu li a.active {
    background-color: #d1d2ff !important;
}