/* ==========================================================================
   Inclusive Theme 2 (Plum Enterprise) — Full Working ERPNext System
   No mock/prototype elements. Applies 100% to REAL Frappe/ERPNext Desk:
   - Top Bar: 58px Plum #714b67, Real Search, Real User, Real Module Title, Real Notifications
   - Left Bar: 218px Desk Sidebar, Uppercase Category Titles, Soft Lavender Active Items
   - Middle Screen: Real 28px Page Heads, Real Live Status Badges, 4 KPI Cards, Clean Inputs
   - Right Screen: Real Form Sidebar & Timeline styled as Activity & Communication Card
   - App Launcher: 16 Core Applications navigating REAL live ERPNext modules
   ========================================================================== */

/* Variables for Theme 2 */
html[data-inclusive-theme="theme2"],
body.inclusive-theme-v2 {
    --brand: #714b67;
    --brand-dark: #503849;
    --brand-soft: #f0e9ee;
    --ink: #27303d;
    --muted: #68727c;
    --line: #e4e6eb;
    --canvas: #f5f6f8;
    --erp-sidebar: 218px;
    --green: #20745a;
    --green-bg: #ebf5ef;
    --orange: #94601b;
    --orange-bg: #fff4df;
    --red: #ac4251;
    --red-bg: #faedf0;
    --blue: #346d9c;
    --blue-bg: #edf2fc;
    --radius: 10px;
    --shadow: 0 4px 18px rgba(39, 49, 64, 0.04);

    /* Frappe Core Overrides */
    --primary: #714b67 !important;
    --primary-color: #714b67 !important;
    --blue-500: #714b67 !important;
    --blue-600: #503849 !important;
    --navbar-bg: #714b67 !important;
    --navbar-border: #503849 !important;
    --body-bg: #f5f6f8 !important;
    --card-bg: #ffffff !important;
    --border-color: #e4e6eb !important;
    --heading-color: #27303d !important;
    --text-color: #27303d !important;
    --text-muted: #68727c !important;
}

html[data-inclusive-theme="theme2"] body,
body.inclusive-theme-v2 {
    background-color: #f5f6f8 !important;
    color: #27303d !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif !important;
}

/* ==========================================================================
   1. TOP NAVIGATION BAR (58px Plum #714b67 Real Working Navbar)
   ========================================================================== */
html[data-inclusive-theme="theme2"] .navbar.navbar-default,
html[data-inclusive-theme="theme2"] header.navbar,
html[data-inclusive-theme="theme2"] .sticky-top.navbar,
body.inclusive-theme-v2 .navbar.navbar-default,
body.inclusive-theme-v2 header.navbar,
body.inclusive-theme-v2 .sticky-top.navbar {
    background: #714b67 !important;
    border-bottom: 1px solid #503849 !important;
    box-shadow: 0 2px 10px rgba(80, 56, 73, 0.15) !important;
    height: 58px !important;
    min-height: 58px !important;
    color: #ffffff !important;
    padding: 0 20px !important;
    z-index: 1020 !important;
}

/* Brand & Launcher Trigger */
html[data-inclusive-theme="theme2"] .navbar-brand,
html[data-inclusive-theme="theme2"] .navbar-home,
body.inclusive-theme-v2 .navbar-brand,
body.inclusive-theme-v2 .navbar-home {
    background: transparent !important;
    color: #ffffff !important;
    padding: 6px 8px !important;
    border-radius: 8px !important;
    display: flex !important;
    align-items: center !important;
    gap: 9px !important;
    cursor: pointer !important;
}

.inclusive-brandmark {
    border: 2px solid rgba(255, 255, 255, 0.75);
    border-radius: 8px;
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 17px;
    color: #ffffff;
    line-height: 1;
}

.company-brand-name {
    color: #ffffff !important;
    font-size: 19px !important;
    font-weight: 700 !important;
    letter-spacing: -0.7px !important;
}

.brand-switch-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 0;
    color: #ffffff;
    opacity: 0.85;
    padding: 4px 6px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.15s;
}
.brand-switch-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    opacity: 1;
}

/* Real Dynamic Module Title & Separator in Top Bar */
.erp-top-module-wrap {
    display: flex;
    align-items: center;
    height: 100%;
    margin-left: 10px;
}

.erp-module-divider {
    width: 1px;
    height: 22px;
    background: rgba(255, 255, 255, 0.25);
    margin: 0 16px 0 6px;
}

.erp-module-title {
    font-size: 15.5px !important;
    font-weight: 650 !important;
    color: #ffffff !important;
    white-space: nowrap !important;
    margin-right: 18px !important;
    letter-spacing: -0.3px !important;
}

/* Top Navigation Links to Real Workspaces */
.erp-top-nav-tabs {
    display: flex;
    align-items: center;
    height: 100%;
    gap: 3px;
}

.erp-top-tab {
    display: inline-flex;
    align-items: center;
    height: 100%;
    padding: 0 13px;
    font-size: 12.5px;
    color: #f8eff5;
    background: transparent;
    border: 0;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    text-decoration: none !important;
}

.erp-top-tab:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

.erp-top-tab.active {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    font-weight: 600;
    box-shadow: inset 0 -3px 0 #ffffff;
}

/* Real Awesomebar Search in Navbar */
html[data-inclusive-theme="theme2"] .search-bar input.form-control,
body.inclusive-theme-v2 .search-bar input.form-control {
    background: rgba(255, 255, 255, 0.15) !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    color: #ffffff !important;
    border-radius: 7px !important;
    font-size: 12.5px !important;
    height: 32px !important;
}

html[data-inclusive-theme="theme2"] .search-bar input.form-control::placeholder,
body.inclusive-theme-v2 .search-bar input.form-control::placeholder {
    color: rgba(255, 255, 255, 0.75) !important;
}

html[data-inclusive-theme="theme2"] .search-bar input.form-control:focus,
body.inclusive-theme-v2 .search-bar input.form-control:focus {
    background: #ffffff !important;
    color: #27303d !important;
    border-color: #ffffff !important;
    box-shadow: 0 0 0 3px rgba(179, 129, 170, 0.3) !important;
}

/* Navbar Action Icons */
html[data-inclusive-theme="theme2"] .navbar .nav-link,
html[data-inclusive-theme="theme2"] .navbar .btn-reset,
body.inclusive-theme-v2 .navbar .nav-link,
body.inclusive-theme-v2 .navbar .btn-reset {
    color: #f8eff5 !important;
}

/* Real Company Badge in Navbar */
.erp-real-company-badge {
    font-size: 12px;
    color: #f5edf4;
    padding: 4px 10px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin-right: 12px;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

/* User Avatar & Initials */
.erp-user-avatar-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e6dfe8;
    color: #503849;
    font-size: 12px;
    font-weight: 700;
    display: grid;
    place-items: center;
    border: 1.5px solid rgba(255, 255, 255, 0.6);
    flex-shrink: 0;
}

/* Theme Switcher Button */
.inclusive-theme-switch-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 11px;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 6px;
    color: #ffffff;
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    height: 32px;
    margin-right: 8px;
}
.inclusive-theme-switch-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    color: #ffffff;
}

html[data-inclusive-theme="theme1"] .inclusive-theme-switch-btn,
body:not(.inclusive-theme-v2) .inclusive-theme-switch-btn {
    background: #05477e !important;
    border-color: #043864 !important;
    color: #ffffff !important;
}

/* ==========================================================================
   2. LEFT BAR (SIDEBAR) — 218px Real Working Desk Sidebar
   ========================================================================== */
html[data-inclusive-theme="theme2"] .layout-side-section,
html[data-inclusive-theme="theme2"] .desk-sidebar,
body.inclusive-theme-v2 .layout-side-section,
body.inclusive-theme-v2 .desk-sidebar {
    width: 218px !important;
    min-width: 218px !important;
    max-width: 218px !important;
    background: #fcfcfd !important;
    border-right: 1px solid #e4e6eb !important;
    padding: 16px 8px !important;
    box-shadow: none !important;
    color: #27303d !important;
}

/* Real Active Module Badge at Top of Sidebar */
.erp-real-sidebar-header {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 12px;
    background: #f7f4f8;
    border: 1px solid #e9e0ea;
    border-radius: 8px;
    font-weight: 700;
    font-size: 13px;
    color: #503849;
    margin-bottom: 12px;
}

.erp-real-sidebar-icon {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    background: #714b67;
    color: #ffffff;
    display: grid;
    place-items: center;
    font-size: 12px;
    flex-shrink: 0;
}

/* Category & Group Headings (RECEIVABLES, PAYABLES, PLANNING, etc.) */
html[data-inclusive-theme="theme2"] .standard-sidebar-label,
html[data-inclusive-theme="theme2"] .desk-sidebar .sidebar-group-title,
body.inclusive-theme-v2 .standard-sidebar-label,
body.inclusive-theme-v2 .desk-sidebar .sidebar-group-title {
    color: #9da4ae !important;
    font-size: 10px !important;
    letter-spacing: 0.75px !important;
    text-transform: uppercase !important;
    font-weight: 700 !important;
    padding: 16px 8px 6px !important;
    margin: 0 !important;
}

/* Real Navigation Items */
html[data-inclusive-theme="theme2"] .standard-sidebar-item,
html[data-inclusive-theme="theme2"] .desk-sidebar .sidebar-item-container,
body.inclusive-theme-v2 .standard-sidebar-item,
body.inclusive-theme-v2 .desk-sidebar .sidebar-item-container {
    color: #65707c !important;
    border-radius: 6px !important;
    font-size: 12.5px !important;
    font-weight: 550 !important;
    min-height: 35px !important;
    padding: 7px 10px !important;
    margin-bottom: 2px !important;
    transition: all 0.15s ease !important;
    display: flex !important;
    align-items: center !important;
    border-left: none !important;
}

html[data-inclusive-theme="theme2"] .standard-sidebar-item:hover,
body.inclusive-theme-v2 .standard-sidebar-item:hover {
    background: #f0edf2 !important;
    color: #714b67 !important;
}

/* Active Selected Sidebar Item (Matches User Screenshot 1: Purchase Invoices) */
html[data-inclusive-theme="theme2"] .standard-sidebar-item.selected,
html[data-inclusive-theme="theme2"] .standard-sidebar-item.active,
body.inclusive-theme-v2 .standard-sidebar-item.selected,
body.inclusive-theme-v2 .standard-sidebar-item.active {
    background: #f3ecf2 !important;
    color: #714b67 !important;
    font-weight: 700 !important;
    border-left: none !important;
}

html[data-inclusive-theme="theme2"] .standard-sidebar-item.selected .sidebar-item-label,
html[data-inclusive-theme="theme2"] .standard-sidebar-item.active .sidebar-item-label,
body.inclusive-theme-v2 .standard-sidebar-item.selected .sidebar-item-label,
body.inclusive-theme-v2 .standard-sidebar-item.active .sidebar-item-label {
    color: #714b67 !important;
    font-weight: 700 !important;
}

/* Count Badge on Right of Sidebar Items */
html[data-inclusive-theme="theme2"] .desk-sidebar .sidebar-item-count,
body.inclusive-theme-v2 .desk-sidebar .sidebar-item-count {
    margin-left: auto !important;
    font-size: 10.5px !important;
    color: #9b8197 !important;
    font-weight: 600 !important;
    background: transparent !important;
}

/* ==========================================================================
   3. MIDDLE SCREEN (MAIN WORKAREA — REAL FORMS, WORKSPACES & LISTS)
   ========================================================================== */
html[data-inclusive-theme="theme2"] .layout-main-section,
body.inclusive-theme-v2 .layout-main-section {
    background: #f5f6f8 !important;
    padding: 24px 30px 32px !important;
}

/* Real Page Head (Document / Workspace Title) */
html[data-inclusive-theme="theme2"] .page-head,
body.inclusive-theme-v2 .page-head {
    background: transparent !important;
    border-bottom: none !important;
    padding: 0 0 18px 0 !important;
}

html[data-inclusive-theme="theme2"] .page-head .title-text,
html[data-inclusive-theme="theme2"] .page-head h1,
body.inclusive-theme-v2 .page-head .title-text,
body.inclusive-theme-v2 .page-head h1 {
    font-size: 28px !important;
    font-weight: 700 !important;
    letter-spacing: -0.7px !important;
    color: #27303d !important;
    line-height: 1.3 !important;
}

html[data-inclusive-theme="theme2"] .page-head .sub-heading,
html[data-inclusive-theme="theme2"] .page-head .breadcrumbs,
body.inclusive-theme-v2 .page-head .sub-heading,
body.inclusive-theme-v2 .page-head .breadcrumbs {
    font-size: 12px !important;
    color: #68727c !important;
}

/* Real Buttons */
html[data-inclusive-theme="theme2"] .btn-primary,
body.inclusive-theme-v2 .btn-primary {
    background-color: #714b67 !important;
    border-color: #714b67 !important;
    color: #ffffff !important;
    border-radius: 6px !important;
    font-size: 12.5px !important;
    font-weight: 600 !important;
    min-height: 35px !important;
    padding: 7px 14px !important;
    box-shadow: 0 1px 3px rgba(113, 75, 103, 0.2) !important;
}

html[data-inclusive-theme="theme2"] .btn-primary:hover,
body.inclusive-theme-v2 .btn-primary:hover {
    background-color: #503849 !important;
    border-color: #503849 !important;
    color: #ffffff !important;
}

html[data-inclusive-theme="theme2"] .btn-default,
html[data-inclusive-theme="theme2"] .btn-secondary,
body.inclusive-theme-v2 .btn-default,
body.inclusive-theme-v2 .btn-secondary {
    background: #ffffff !important;
    border: 1px solid #e4e6eb !important;
    color: #27303d !important;
    border-radius: 6px !important;
    font-size: 12.5px !important;
    font-weight: 550 !important;
    min-height: 35px !important;
    padding: 7px 12px !important;
}

html[data-inclusive-theme="theme2"] .btn-default:hover,
body.inclusive-theme-v2 .btn-default:hover {
    background: #f4f1f5 !important;
    border-color: #d7cbd4 !important;
    color: #714b67 !important;
}

/* Real Live Document Status Indicators (Orange, Green, Red, Blue, Gray) */
html[data-inclusive-theme="theme2"] .indicator.orange,
html[data-inclusive-theme="theme2"] .indicator-pill.orange,
body.inclusive-theme-v2 .indicator.orange,
body.inclusive-theme-v2 .indicator-pill.orange {
    background: #fff4df !important;
    color: #94601b !important;
    border: 1px solid rgba(148, 96, 27, 0.25) !important;
    border-radius: 4px !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    padding: 3px 8px !important;
}

html[data-inclusive-theme="theme2"] .indicator.green,
html[data-inclusive-theme="theme2"] .indicator-pill.green,
body.inclusive-theme-v2 .indicator.green,
body.inclusive-theme-v2 .indicator-pill.green {
    background: #ebf5ef !important;
    color: #20745a !important;
    border: 1px solid rgba(32, 116, 90, 0.25) !important;
    border-radius: 4px !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    padding: 3px 8px !important;
}

html[data-inclusive-theme="theme2"] .indicator.red,
html[data-inclusive-theme="theme2"] .indicator-pill.red,
body.inclusive-theme-v2 .indicator.red,
body.inclusive-theme-v2 .indicator-pill.red {
    background: #faedf0 !important;
    color: #ac4251 !important;
    border: 1px solid rgba(172, 66, 81, 0.25) !important;
    border-radius: 4px !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    padding: 3px 8px !important;
}

html[data-inclusive-theme="theme2"] .indicator.blue,
html[data-inclusive-theme="theme2"] .indicator-pill.blue,
body.inclusive-theme-v2 .indicator.blue,
body.inclusive-theme-v2 .indicator-pill.blue {
    background: #edf2fc !important;
    color: #346d9c !important;
    border: 1px solid rgba(52, 109, 156, 0.25) !important;
    border-radius: 4px !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    padding: 3px 8px !important;
}

html[data-inclusive-theme="theme2"] .indicator.gray,
html[data-inclusive-theme="theme2"] .indicator-pill.gray,
body.inclusive-theme-v2 .indicator.gray,
body.inclusive-theme-v2 .indicator-pill.gray {
    background: #f1f2f5 !important;
    color: #68727c !important;
    border: 1px solid #e4e6eb !important;
    border-radius: 4px !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    padding: 3px 8px !important;
}

/* Real Form Pages & Form Tabs */
html[data-inclusive-theme="theme2"] .form-page,
html[data-inclusive-theme="theme2"] .form-layout,
body.inclusive-theme-v2 .form-page,
body.inclusive-theme-v2 .form-layout {
    background: #ffffff !important;
    border: 1px solid #e4e6eb !important;
    border-radius: 10px !important;
    box-shadow: 0 2px 6px rgba(38, 51, 77, 0.02) !important;
}

html[data-inclusive-theme="theme2"] .form-tabs,
html[data-inclusive-theme="theme2"] .nav-tabs,
body.inclusive-theme-v2 .form-tabs,
body.inclusive-theme-v2 .nav-tabs {
    border-bottom: 1px solid #e4e6eb !important;
    gap: 20px !important;
    margin-bottom: 20px !important;
}

html[data-inclusive-theme="theme2"] .form-tabs .nav-link,
html[data-inclusive-theme="theme2"] .nav-tabs .nav-link,
body.inclusive-theme-v2 .form-tabs .nav-link,
body.inclusive-theme-v2 .nav-tabs .nav-link {
    color: #8a929e !important;
    font-size: 12.5px !important;
    font-weight: 550 !important;
    padding: 12px 0 !important;
    border: none !important;
    border-bottom: 2px solid transparent !important;
    background: transparent !important;
}

html[data-inclusive-theme="theme2"] .form-tabs .nav-link.active,
html[data-inclusive-theme="theme2"] .nav-tabs .nav-link.active,
body.inclusive-theme-v2 .form-tabs .nav-link.active,
body.inclusive-theme-v2 .nav-tabs .nav-link.active {
    color: #714b67 !important;
    border-bottom: 2px solid #714b67 !important;
    font-weight: 700 !important;
}

/* Real Form Controls & Field Inputs */
html[data-inclusive-theme="theme2"] .form-control,
html[data-inclusive-theme="theme2"] input.input-with-feedback,
html[data-inclusive-theme="theme2"] select.input-with-feedback,
body.inclusive-theme-v2 .form-control,
body.inclusive-theme-v2 input.input-with-feedback,
body.inclusive-theme-v2 select.input-with-feedback {
    background: #fafbfc !important;
    border: 1px solid #edf0f4 !important;
    border-radius: 6px !important;
    padding: 8px 11px !important;
    font-size: 12px !important;
    color: #27303d !important;
}

html[data-inclusive-theme="theme2"] .form-control:focus,
body.inclusive-theme-v2 .form-control:focus {
    border-color: #af8da3 !important;
    background: #ffffff !important;
    box-shadow: 0 0 0 3px rgba(113, 75, 103, 0.12) !important;
}

html[data-inclusive-theme="theme2"] .form-group label,
html[data-inclusive-theme="theme2"] .control-label,
body.inclusive-theme-v2 .form-group label,
body.inclusive-theme-v2 .control-label {
    font-size: 11px !important;
    color: #68727c !important;
    font-weight: 550 !important;
    margin-bottom: 6px !important;
}

/* Real Child Table Grids */
html[data-inclusive-theme="theme2"] .form-grid .grid-heading-row,
body.inclusive-theme-v2 .form-grid .grid-heading-row {
    background: #fafafb !important;
    color: #9499a1 !important;
    font-size: 9.5px !important;
    letter-spacing: 0.5px !important;
    text-transform: uppercase !important;
    font-weight: 650 !important;
    border-bottom: 1px solid #e4e6eb !important;
}

html[data-inclusive-theme="theme2"] .form-grid .grid-row:hover,
body.inclusive-theme-v2 .form-grid .grid-row:hover {
    background: #fbf8fb !important;
}

/* Real Workspace Cards (Matches 4 KPI Cards in Screenshot 2) */
html[data-inclusive-theme="theme2"] .widget,
html[data-inclusive-theme="theme2"] .widget-box,
html[data-inclusive-theme="theme2"] .number-widget-box,
body.inclusive-theme-v2 .widget,
body.inclusive-theme-v2 .widget-box,
body.inclusive-theme-v2 .number-widget-box {
    background: #ffffff !important;
    border: 1px solid #e4e6eb !important;
    border-radius: 10px !important;
    padding: 18px 20px !important;
    box-shadow: 0 2px 6px rgba(38, 51, 77, 0.02) !important;
    transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s !important;
}

html[data-inclusive-theme="theme2"] .widget:hover,
html[data-inclusive-theme="theme2"] .number-widget-box:hover,
body.inclusive-theme-v2 .widget:hover,
body.inclusive-theme-v2 .number-widget-box:hover {
    border-color: #beabc0 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 16px rgba(113, 75, 103, 0.06) !important;
}

html[data-inclusive-theme="theme2"] .number-widget-box .widget-title,
body.inclusive-theme-v2 .number-widget-box .widget-title {
    font-size: 11px !important;
    color: #7a818c !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
}

html[data-inclusive-theme="theme2"] .number-widget-box .number,
body.inclusive-theme-v2 .number-widget-box .number {
    font-size: 28px !important;
    font-weight: 700 !important;
    color: #27303d !important;
    letter-spacing: -0.65px !important;
}

/* Real List Views (Tables) */
html[data-inclusive-theme="theme2"] .frappe-list .list-row-head,
body.inclusive-theme-v2 .frappe-list .list-row-head {
    background: #fafafb !important;
    color: #9499a1 !important;
    font-size: 9.5px !important;
    letter-spacing: 0.5px !important;
    text-transform: uppercase !important;
    font-weight: 650 !important;
    border-bottom: 1px solid #e4e6eb !important;
    padding: 12px 16px !important;
}

html[data-inclusive-theme="theme2"] .frappe-list .list-row,
body.inclusive-theme-v2 .frappe-list .list-row {
    border-top: 1px solid #f0f1f4 !important;
    font-size: 12px !important;
    color: #27303d !important;
    padding: 13px 16px !important;
    transition: background 0.12s ease !important;
}

html[data-inclusive-theme="theme2"] .frappe-list .list-row:hover,
body.inclusive-theme-v2 .frappe-list .list-row:hover {
    background: #fbf8fb !important;
}

html[data-inclusive-theme="theme2"] .frappe-list .list-row .list-subject a,
body.inclusive-theme-v2 .frappe-list .list-row .list-subject a {
    color: #714b67 !important;
    font-weight: 650 !important;
    text-decoration: none !important;
}

/* ==========================================================================
   4. RIGHT SCREEN (REAL FORM SIDEBAR & TIMELINE — ACTIVITY & COMMUNICATION)
   ========================================================================== */
html[data-inclusive-theme="theme2"] .form-sidebar,
html[data-inclusive-theme="theme2"] .layout-side-section,
body.inclusive-theme-v2 .form-sidebar,
body.inclusive-theme-v2 .layout-side-section {
    background: #ffffff !important;
    border: 1px solid #e8ecf1 !important;
    border-radius: 12px !important;
    padding: 18px 16px !important;
    box-shadow: 0 4px 18px rgba(39, 49, 64, 0.03) !important;
    margin-top: 10px !important;
}

/* Document Avatar in Theme 2 (Plum Enterprise) */
html[data-inclusive-theme="theme2"] .sidebar-image,
body.inclusive-theme-v2 .sidebar-image {
    border: 2.5px solid #a37297 !important;
    box-shadow: 0 4px 12px rgba(113, 75, 103, 0.25) !important;
}

html[data-inclusive-theme="theme2"] .sidebar-standard-image .standard-image,
body.inclusive-theme-v2 .sidebar-standard-image .standard-image {
    background: linear-gradient(135deg, #714b67 0%, #4a2c42 100%) !important;
    border: 2.5px solid #a37297 !important;
    box-shadow: 0 4px 12px rgba(113, 75, 103, 0.25) !important;
    color: #ffffff !important;
}

/* Real Comment Box in Form View */
html[data-inclusive-theme="theme2"] .comment-box,
body.inclusive-theme-v2 .comment-box {
    background: #ffffff !important;
    border: 1px solid #e4e6eb !important;
    border-radius: 10px !important;
    padding: 16px !important;
    margin-bottom: 20px !important;
}

html[data-inclusive-theme="theme2"] .comment-box textarea,
body.inclusive-theme-v2 .comment-box textarea {
    background: #fafbfc !important;
    border: 1px solid #edf0f4 !important;
    border-radius: 6px !important;
    font-size: 12px !important;
    color: #27303d !important;
    min-height: 75px !important;
}

html[data-inclusive-theme="theme2"] .comment-box textarea:focus,
body.inclusive-theme-v2 .comment-box textarea:focus {
    border-color: #af8da3 !important;
    background: #ffffff !important;
    box-shadow: 0 0 0 3px rgba(113, 75, 103, 0.12) !important;
}

/* Real Timeline Items */
html[data-inclusive-theme="theme2"] .timeline .timeline-item,
body.inclusive-theme-v2 .timeline .timeline-item {
    border-left: 1px solid #e3dce8 !important;
    padding-left: 16px !important;
}

html[data-inclusive-theme="theme2"] .timeline .timeline-dot,
body.inclusive-theme-v2 .timeline .timeline-dot {
    background: #a68aa0 !important;
    border: 2px solid #ffffff !important;
    width: 8px !important;
    height: 8px !important;
}

/* ==========================================================================
   5. APP LAUNCHER OVERLAY (16 REAL CORE APPLICATIONS)
   ========================================================================== */
body.launcher-open {
    overflow: hidden !important;
}

.inclusive-app-launcher[hidden] {
    display: none !important;
}

.inclusive-app-launcher {
    position: fixed;
    top: 58px;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    overflow-y: auto;
    overscroll-behavior: contain;
    isolation: isolate;
    background: radial-gradient(ellipse at 4% 5%, rgba(233, 220, 233, 0.55) 0, transparent 43%),
                radial-gradient(ellipse at 93% 86%, rgba(217, 230, 243, 0.51) 0, transparent 46%),
                linear-gradient(135deg, #f7f4f8 0%, #faf9fc 52%, #f0f0f8 100%);
    animation: launcher-enter 0.18s ease-out;
}

@keyframes launcher-enter {
    from { opacity: 0.4; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

.launcher-shell {
    max-width: 1140px;
    margin: 0 auto;
    padding: 24px 36px 32px;
    min-height: 100%;
    display: flex;
    flex-direction: column;
}

.launcher-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.launcher-section {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #716675;
    font-weight: 650;
    font-size: 13px;
}

.launcher-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(221, 214, 225, 0.6);
    color: #6d5c70;
    border-radius: 8px;
    padding: 7px 12px;
    font-size: 12px;
    min-height: 34px;
    cursor: pointer;
    transition: all 0.15s ease;
}
.launcher-back:hover {
    background: #ffffff;
    border-color: #b8a2b3;
    color: #714b67;
}

.launcher-key {
    font: 10px/1.4 Consolas, Monaco, monospace;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    min-height: 20px;
    border: 1px solid #dcd5e2;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.7);
    padding: 1px 4px;
    color: #817589;
}

.launcher-heading {
    text-align: center;
    margin-bottom: 20px;
}

.launcher-heading h1 {
    font-size: 30px;
    font-weight: 700;
    color: #3d3043;
    letter-spacing: -0.65px;
    margin: 0;
}

.launcher-heading p {
    font-size: 13.5px;
    color: #887c8d;
    margin-top: 6px;
}

.launcher-search-wrap {
    max-width: 600px;
    width: 100%;
    margin: 0 auto 20px;
}

.launcher-search {
    display: flex;
    gap: 12px;
    align-items: center;
    border: 1px solid #dbd3e1;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 11px;
    padding: 0 16px;
    min-height: 50px;
    box-shadow: 0 3px 14px rgba(104, 81, 115, 0.04);
}

.launcher-search:focus-within {
    border-color: #a28b9d;
    box-shadow: 0 0 0 3px rgba(161, 132, 155, 0.15), 0 4px 20px rgba(104, 81, 115, 0.08);
}

.launcher-search input {
    width: 100%;
    min-width: 0;
    background: transparent;
    border: 0;
    outline: none;
    font-size: 14.5px;
    color: #413545;
    padding: 14px 0;
}

.launcher-filters {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
    margin: 0 0 24px;
}

.launcher-filter {
    font-size: 11.5px;
    line-height: 1.5;
    font-weight: 600;
    white-space: nowrap;
    border: 1px solid transparent;
    background: transparent;
    border-radius: 7px;
    color: #85768b;
    padding: 7px 12px;
    min-height: 32px;
    cursor: pointer;
    transition: background 0.15s;
}
.launcher-filter:hover {
    background: rgba(255, 255, 255, 0.6);
    color: #714b67;
}
.launcher-filter.active {
    background: rgba(234, 224, 235, 0.75);
    color: #714b67;
    border-color: #e4d8e5;
}

.launcher-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    column-gap: 12px;
    row-gap: 10px;
    align-content: start;
}

@media(max-width: 992px) {
    .launcher-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media(max-width: 640px) {
    .launcher-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.launcher-app {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    border: 1px solid transparent;
    border-radius: 12px;
    background: transparent;
    padding: 16px 8px 14px;
    text-align: center;
    color: #514457;
    cursor: pointer;
    transition: background 0.16s, transform 0.16s, border-color 0.16s;
    text-decoration: none;
}

.launcher-app:hover {
    background: rgba(255, 255, 255, 0.75);
    border-color: rgba(230, 223, 236, 0.8);
    transform: translateY(-3px);
    box-shadow: 0 8px 18px rgba(113, 75, 103, 0.08);
}

.launcher-app-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    position: relative;
    display: grid;
    place-items: center;
    background: linear-gradient(145deg, var(--app-gradient-start, #8f6885), var(--app-color, #714b67));
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 5px 12px rgba(113, 75, 103, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.35);
    font-size: 26px;
}

.launcher-app-title {
    display: block;
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.4;
    margin-top: 10px;
    color: #413545;
}

.launcher-app-kind {
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: #ad9faf;
    margin-top: 3px;
}

.launcher-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    border-top: 1px solid rgba(221, 212, 227, 0.4);
    margin-top: 30px;
    padding: 16px 10px 0;
    color: #a091a7;
    font-size: 10.5px;
}


/* Splash Safety Rule: NEVER block an active workspace */
.splash {
    pointer-events: none !important;
}
body:has(.page-container) .splash,
body:has(.desk-sidebar) .splash,
body:has(.layout-main-section) .splash,
body:has(#body:not(:empty)) .splash {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
}


/* ==========================================================================
   ENTERPRISE TOP MENU & 230px SIDEBAR (Matches User Design Exactly)
   ========================================================================== */
.erp-top-nav-container {
    display: flex;
    align-items: center;
    height: 100%;
    margin-left: 6px;
    margin-right: 12px;
}

.erp-top-divider {
    width: 1px;
    height: 22px;
    background: rgba(255, 255, 255, 0.28);
    margin: 0 14px 0 6px;
    flex-shrink: 0;
}

.erp-module-title {
    font-size: 15.5px !important;
    font-weight: 600 !important;
    color: #ffffff !important;
    margin-right: 16px !important;
    white-space: nowrap !important;
    letter-spacing: -0.2px !important;
}

.erp-top-links {
    height: 100%;
    display: flex;
    gap: 2px;
    align-items: center;
}

.erp-top-links button.erp-top-tab {
    height: 100%;
    border: 0;
    background: transparent;
    color: #f8eff5;
    padding: 0 12px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    position: relative;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}

.erp-top-links button.erp-top-tab:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

.erp-top-links button.erp-top-tab.active {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    font-weight: 600;
    box-shadow: inset 0 -3px 0 #ffffff;
}

/* ==========================================================================
   ENTERPRISE LEFT SIDEBAR (230px wide, #fcfcfd)
   ========================================================================== */
html[data-inclusive-theme="theme2"] .desk-sidebar,
body.inclusive-theme-v2 .desk-sidebar {
    width: 230px !important;
    min-width: 230px !important;
    max-width: 230px !important;
    background: #fcfcfd !important;
    border-right: 1px solid #e4e6eb !important;
    padding: 0 !important;
    position: relative;
}

/* Hide default Frappe workspace sidebar list when custom enterprise sidebar is present */
html[data-inclusive-theme="theme2"] .desk-sidebar > .standard-sidebar-section,
body.inclusive-theme-v2 .desk-sidebar > .standard-sidebar-section {
    display: none !important;
}

.erp-custom-sidebar {
    width: 100%;
    padding: 18px 10px 25px;
    background: #fcfcfd;
    min-height: calc(100vh - 80px);
    display: flex;
    flex-direction: column;
}

.erp-side-label {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 0 8px 14px;
    font-weight: 700;
    font-size: 13.5px;
    color: #27303d;
}

.erp-mini-icon {
    width: 28px;
    height: 28px;
    border-radius: 7px;
    background: #f3f0f4;
    display: grid;
    place-items: center;
    font-size: 13px;
    flex-shrink: 0;
}

.erp-custom-sidebar .sidebtn {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    background: transparent;
    border: 0;
    padding: 7px 8px;
    margin-bottom: 2px;
    border-radius: 6px;
    font-size: 12px;
    text-align: start;
    color: #65707c;
    min-height: 33px;
    cursor: pointer;
    transition: all 0.15s ease;
    font-weight: 500;
}

.erp-custom-sidebar .sidebtn:hover {
    background: #f0edf2 !important;
    color: #714b67 !important;
}

.erp-custom-sidebar .sidebtn.active {
    background: #ede6ed !important;
    color: #714b67 !important;
    font-weight: 700 !important;
}

.erp-custom-sidebar .sidebtn-icon {
    font-size: 12px;
    width: 16px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    opacity: 0.85;
    flex-shrink: 0;
}

.erp-custom-sidebar .sidebtn-label {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.erp-custom-sidebar .side-count {
    margin-inline-start: auto;
    font-size: 10px;
    font-weight: 600;
    color: #9b8197;
    background: rgba(113, 75, 103, 0.08);
    padding: 1px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
    flex-shrink: 0;
}

.erp-custom-sidebar .sidebtn.active .side-count {
    background: rgba(113, 75, 103, 0.16);
    color: #714b67;
}

.erp-custom-sidebar .erp-nav-group {
    margin: 16px 8px 5px;
    font-size: 9.5px;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: #9398a2;
    font-weight: 700;
}

.erp-custom-sidebar .side-foot {
    border-top: 1px solid #e4e6eb;
    padding: 14px 8px 0;
    margin-top: 22px;
    font-size: 9.5px;
    color: #9097a1;
    line-height: 1.7;
}
