/* ============================================
   SALAY Accounting - White Label Branding
   Version 2.1 — Phase 3 Deep White-Label (Cleaned)
   ============================================ */

/* Import Inter from Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* Default Brand Colors (overridden by JS from Brand Settings) */
:root {
    --brand-primary: #666666;
    --brand-secondary: #555555;
    --brand-text: #333333;
    --brand-background: #FFFFFF;
    --sidebar-bg: #f8f9fc;
    --sidebar-text: #4a5568;
    --sidebar-active-bg: var(--brand-primary);
    --sidebar-active-text: #ffffff;
    --sidebar-hover-bg: #edf2f7;
    --card-border: #e2e8f0;
    --card-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* ============================================
   GLOBAL TYPOGRAPHY (Inter)
   ============================================ */

/* Global font override */
body,
.frappe-control,
.form-control,
.btn,
input,
select,
textarea,
.modal-content,
.page-container {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

body {
    color: var(--brand-text) !important;
}

/* Page Titles */
.page-head .page-title .title-text {
    font-family: 'Inter', sans-serif !important;
    font-weight: 700 !important;
    font-size: 20px !important;
    letter-spacing: -0.3px !important;
    color: var(--brand-text) !important;
}

/* Breadcrumbs */
.breadcrumb-container .breadcrumb,
.breadcrumb-container .breadcrumb a,
.breadcrumb-container .breadcrumb .breadcrumb-item {
    font-family: 'Inter', sans-serif !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    letter-spacing: 0.2px !important;
}

/* Form Section Headers */
.section-head,
.form-section .section-head,
.head-title .section-head {
    font-family: 'Inter', sans-serif !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    color: var(--brand-text) !important;
    letter-spacing: -0.1px !important;
    padding-bottom: 8px !important;
    border-bottom: 2px solid color-mix(in srgb, var(--brand-primary) 20%, #e2e8f0) !important;
    margin-bottom: 16px !important;
}

.section-head.collapsed {
    border-bottom: 1px solid #e2e8f0 !important;
    margin-bottom: 0 !important;
}

/* Form Field Labels */
.frappe-control .control-label,
.frappe-control label.control-label,
.form-group .control-label {
    font-family: 'Inter', sans-serif !important;
    font-size: 11.5px !important;
    font-weight: 500 !important;
    color: #64748b !important;
    letter-spacing: 0.1px !important;
    text-transform: none !important;
}

/* Form Field Values / Inputs */
.control-value,
.form-control,
.like-disabled-input,
.frappe-control .control-value {
    font-family: 'Inter', sans-serif !important;
    font-size: 13.5px !important;
    font-weight: 500 !important;
    color: var(--brand-text) !important;
}

/* Table (child table) Headers */
.frappe-control[data-fieldtype="Table"] .head-row .head-cell,
.frappe-control[data-fieldtype="Table"] .grid-heading-row .head-cell,
.form-grid .grid-heading-row .static-area {
    font-family: 'Inter', sans-serif !important;
    font-size: 11.5px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.4px !important;
    color: #64748b !important;
    background-color: color-mix(in srgb, var(--brand-primary) 4%, #f8fafc) !important;
}

/* Table Cell Values */
.frappe-control[data-fieldtype="Table"] .rows .row-data .static-area,
.form-grid .rows .static-area {
    font-family: 'Inter', sans-serif !important;
    font-size: 13px !important;
    font-weight: 400 !important;
}

/* List View — Column Headers */
.list-row-head .list-row-col,
.list-header-subject .list-row-col {
    font-family: 'Inter', sans-serif !important;
    font-size: 11.5px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.4px !important;
    color: #64748b !important;
}

/* List View — Row Items */
.list-row .list-row-col,
.list-row .list-row-col .ellipsis,
.list-row .level-left .list-row-col {
    font-family: 'Inter', sans-serif !important;
    font-size: 13.5px !important;
    font-weight: 400 !important;
}

/* List View — Bold Title Column */
.list-row .level-left .list-row-col.ellipsis:first-child .ellipsis {
    font-weight: 500 !important;
}

/* Tab headers on forms */
.form-tabs .nav-link,
.form-tabs .nav-item .nav-link {
    font-family: 'Inter', sans-serif !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    letter-spacing: 0.1px !important;
    color: #64748b !important;
    padding: 8px 16px !important;
}

.form-tabs .nav-link.active,
.form-tabs .nav-item .nav-link.active {
    font-weight: 600 !important;
    color: var(--brand-primary) !important;
    border-bottom: 2px solid var(--brand-primary) !important;
}

/* Form Sidebar Typography */
.form-sidebar .sidebar-label,
.form-sidebar .form-sidebar-item {
    font-family: 'Inter', sans-serif !important;
    font-size: 12.5px !important;
    font-weight: 500 !important;
}

.form-sidebar .sidebar-menu .sidebar-label {
    font-size: 11.5px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.4px !important;
    color: #64748b !important;
    padding: 6px 15px !important;
}

/* Modal / Dialog */
.modal-title {
    font-family: 'Inter', sans-serif !important;
    font-weight: 600 !important;
}

/* Buttons */
.btn {
    font-family: 'Inter', sans-serif !important;
    font-weight: 500 !important;
    letter-spacing: 0.1px !important;
}

.btn-primary,
.btn-primary-dark {
    font-weight: 600 !important;
}

/* Number card values */
.number-widget-box .widget-body .number {
    font-family: 'Inter', sans-serif !important;
    font-weight: 700 !important;
    letter-spacing: -0.5px !important;
}

.number-widget-box .widget-head .widget-label {
    font-family: 'Inter', sans-serif !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

/* Filter sidebar labels */
.list-filters .filter-label,
.filter-box .filter-label,
.standard-filter-section label {
    font-family: 'Inter', sans-serif !important;
    font-size: 12px !important;
    font-weight: 500 !important;
}

/* ============================================
   HIDE ALL ERPNEXT/FRAPPE BRANDING
   ============================================ */

.login-footer,
.page-card-head .indicator,
.text-muted.text-center a[href*="frappe"],
.web-footer .footer-links a[href*="frappe"],
footer a[href*="frappe.io"],
footer a[href*="erpnext.com"],
.navbar-brand img[alt*="Frappe"],
.navbar-brand img[alt*="ERPNext"],
img[src*="frappe-logo"],
img[src*="erpnext-logo"],
.version-info,
.powered-by-frappe,
[class*="frappe-brand"],
[class*="erpnext-brand"] {
    display: none !important;
}

/* ============================================
   SIDEBAR RESTYLING
   ============================================ */

/* Sidebar width + gradient */
.layout-side-section {
    min-width: 240px !important;
    max-width: 240px !important;
    flex: 0 0 240px !important;
    background: linear-gradient(180deg,
            color-mix(in srgb, var(--brand-primary) 6%, #ffffff) 0%,
            color-mix(in srgb, var(--brand-primary) 18%, #f0f1f5) 100%) !important;
}

/* Hide "PUBLIC" / "PRIVATE" section labels */
.standard-sidebar-section>.standard-sidebar-label {
    display: none !important;
}

/* Sidebar container — brand color gradient */
.desk-sidebar.list-unstyled.sidebar-menu {
    background: linear-gradient(180deg,
            color-mix(in srgb, var(--brand-primary) 6%, #ffffff) 0%,
            color-mix(in srgb, var(--brand-primary) 18%, #f0f1f5) 100%) !important;
    border-right: 2px solid color-mix(in srgb, var(--brand-primary) 25%, #e2e8f0) !important;
    padding-top: 12px !important;
}
.desk-sidebar .sidebar-item-container[item-name="Home"] {
    display: none !important;
}

/* All sidebar items */
.desk-sidebar .standard-sidebar-item a.item-anchor {
    font-family: 'Inter', sans-serif !important;
    color: var(--sidebar-text) !important;
    font-size: 13.5px !important;
    font-weight: 500 !important;
    padding: 8px 16px !important;
    border-radius: 6px !important;
    margin: 1px 8px !important;
    transition: all 0.15s ease !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

/* Sidebar hover */
.desk-sidebar .standard-sidebar-item a.item-anchor:hover {
    background-color: color-mix(in srgb, var(--brand-primary) 12%, #ffffff) !important;
    color: var(--brand-primary) !important;
    text-decoration: none !important;
}

/* Sidebar active/selected */
.desk-sidebar .sidebar-item-container.selected .standard-sidebar-item a.item-anchor,
.desk-sidebar .standard-sidebar-item.selected a.item-anchor {
    background-color: var(--sidebar-active-bg) !important;
    color: var(--sidebar-active-text) !important;
    font-weight: 600 !important;
}

/* Sidebar icons */
.desk-sidebar .sidebar-item-icon .icon {
    opacity: 0.6;
    width: 18px !important;
    height: 18px !important;
}

.desk-sidebar .selected .sidebar-item-icon .icon,
.desk-sidebar .sidebar-item-container.selected .sidebar-item-icon .icon {
    opacity: 1;
}

/* Hide drag handles */
.desk-sidebar .sidebar-item-control .drag-handle {
    display: none !important;
}

/* Sub-items (Dettes, Créances, Rapports financiers) */
.desk-sidebar .sidebar-item-container[item-parent] .item-anchor {
    padding-left: 40px !important;
    font-size: 12.5px !important;
}

/* Sidebar item labels — prevent truncation */
.desk-sidebar .sidebar-item-label {
    font-family: 'Inter', sans-serif !important;
    font-size: 13.5px !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: unset !important;
}

/* Sidebar overlay wrapper — brand gradient */
.list-sidebar.overlay-sidebar {
    background: linear-gradient(180deg,
            color-mix(in srgb, var(--brand-primary) 6%, #ffffff) 0%,
            color-mix(in srgb, var(--brand-primary) 18%, #f0f1f5) 100%) !important;
}

/* SALAY sub-menu items (inside Frappe's nested-container) */
.salay-submenu {
    padding: 2px 0 4px 0;
}

.salay-submenu-item {
    font-family: 'Inter', sans-serif !important;
    display: block !important;
    padding: 5px 16px 5px 46px !important;
    font-size: 12.5px !important;
    color: var(--sidebar-text) !important;
    text-decoration: none !important;
    transition: all 0.15s ease !important;
    border-radius: 4px !important;
    margin: 0 8px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.salay-submenu-item:hover {
    background-color: color-mix(in srgb, var(--brand-primary) 12%, #ffffff) !important;
    color: var(--brand-primary) !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: unset !important;
    word-break: break-word !important;
}

/* SALAY drop icon for sub-menu toggle */
.salay-drop-icon {
    color: var(--sidebar-text) !important;
}

.salay-drop-icon:hover {
    color: var(--brand-primary) !important;
    opacity: 1 !important;
}

/* Remove sidebar left border/bar */
.desk-sidebar .sidebar-item-container .sidebar-child-item,
.desk-sidebar .nested-container {
    border-left: none !important;
}

/* ============================================
   SHORTCUT WIDGET CARDS — CLEAN DESIGN
   ============================================ */

/* Card container */
.shortcut-widget-box {
    background: #ffffff !important;
    border: 1px solid var(--card-border) !important;
    border-radius: 8px !important;
    padding: 12px 14px !important;
    box-shadow: var(--card-shadow) !important;
    transition: all 0.2s ease !important;
    overflow: hidden !important;
    min-height: 48px !important;
}

.shortcut-widget-box:hover {
    border-color: var(--brand-primary) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
    transform: translateY(-1px);
}

/* Widget head — stack label and badge vertically */
.shortcut-widget-box .widget-head {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 4px !important;
    overflow: hidden !important;
}

/* Label */
.shortcut-widget-box .widget-head .widget-label {
    font-family: 'Inter', sans-serif !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: var(--brand-text) !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    width: 100% !important;
    order: 1 !important;
}

/* Badge / indicator — small subtle tag below label */
.shortcut-widget-box .widget-head .widget-control {
    order: 2 !important;
    flex-shrink: 0 !important;
    width: 100% !important;
}

.shortcut-widget-box .widget-head .widget-control .indicator-pill {
    font-family: 'Inter', sans-serif !important;
    font-size: 10px !important;
    font-weight: 600 !important;
    padding: 1px 8px !important;
    border-radius: 4px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 100% !important;
    display: inline-block !important;
    line-height: 1.6 !important;
    letter-spacing: 0.2px !important;
}

/* Hide the external link arrow SVG to clean up */
.shortcut-widget-box .widget-head .widget-control svg.es-icon {
    display: none !important;
}

/* Body and footer — hide if empty */
.shortcut-widget-box .widget-body:empty,
.shortcut-widget-box .widget-footer:empty {
    display: none !important;
}

/* ============================================
   NAVBAR
   ============================================ */

.navbar {
    background-color: var(--brand-primary) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
}

.navbar .navbar-nav .nav-link,
.navbar .nav-item .nav-link {
    font-family: 'Inter', sans-serif !important;
    color: rgba(255, 255, 255, 0.9) !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    letter-spacing: 0.1px !important;
}

.navbar .navbar-nav .nav-link:hover,
.navbar .nav-item .nav-link:hover {
    color: #ffffff !important;
}

/* Search bar */
.navbar .search-bar input,
.navbar #navbar-search {
    background: rgba(255, 255, 255, 0.15) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
    border-radius: 6px !important;
}

.navbar .search-bar input::placeholder,
.navbar #navbar-search::placeholder {
    color: rgba(255, 255, 255, 0.6) !important;
}

/* Navbar brand text */
.navbar-brand-title {
    font-family: 'Inter', sans-serif !important;
    font-size: 0 !important;
}

.navbar-brand-title::after {
    content: "SALAY" !important;
    font-family: 'Inter', sans-serif !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    letter-spacing: 0.5px !important;
}

/* Navbar logo */
.navbar img.app-logo {
    max-height: 36px !important;
    width: auto !important;
    object-fit: contain !important;
}

/* ============================================
   LOGIN PAGE
   ============================================ */

/* Hide Home navbar on login page */
body[data-path="login"] .navbar.navbar-light {
    display: none !important;
}

/* Background */
body.for-login {
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%) !important;
    background-attachment: fixed !important;
}

body.for-login.has-login-bg {
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}

/* Header — constrained to card width */
body[data-path="login"] .page-card-head,
body.for-login .page-card-head {
    max-width: 440px !important;
    margin: 40px auto 0 auto !important;
    background: #ffffff !important;
    border-bottom: 3px solid var(--brand-primary) !important;
    border-radius: 12px 12px 0 0 !important;
    padding: 32px 24px 20px !important;
    text-align: center !important;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.06) !important;
    position: relative !important;
    z-index: 2 !important;
}

/* Card — flush with header */
body[data-path="login"] .page-card,
body.for-login .page-card {
    max-width: 440px !important;
    margin: 0 auto 40px auto !important;
    border-radius: 0 0 12px 12px !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1) !important;
    border: none !important;
    position: relative !important;
    z-index: 1 !important;
}

body[data-path="login"] .page-card-body,
body.for-login .page-card-body {
    padding: 28px 32px 36px !important;
    background: #ffffff !important;
    border-radius: 0 0 12px 12px !important;
}

/* Logo */
body[data-path="login"] .page-card-head img.app-logo,
body.for-login .page-card-head img.app-logo {
    width: 180px !important;
    height: auto !important;
    max-height: 80px !important;
    object-fit: contain !important;
    margin: 0 auto 12px !important;
    display: block !important;
    background: #ffffff !important;
}

/* Title */
body[data-path="login"] .page-card-head h4,
body.for-login .page-card-head h4 {
    font-family: 'Inter', sans-serif !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    color: var(--brand-text) !important;
    margin: 0 !important;
    letter-spacing: -0.2px !important;
}

.page-card-head p {
    color: rgba(255, 255, 255, 0.9) !important;
    margin-top: 10px !important;
    font-size: 14px !important;
}

/* Hide full-width line */
body[data-path="login"] .page-card-head hr,
body.for-login .page-card-head hr,
body[data-path="login"] .page-card-head+hr,
body.for-login .page-card-head+hr,
body[data-path="login"] .page-card-head~.separator,
body[data-path="login"] .page-card-head~hr,
body.for-login .page-card-head~.separator,
body.for-login .page-card-head~hr {
    display: none !important;
}

body[data-path="login"] .page-card-head::after,
body.for-login .page-card-head::after {
    display: none !important;
}

/* Login inputs */
.page-card-body,
.page-card-body label,
.page-card-body input {
    font-family: 'Inter', sans-serif !important;
}

/* Login buttons */
.btn-primary,
.btn-login {
    background-color: var(--brand-primary) !important;
    border-color: var(--brand-primary) !important;
    border-radius: 6px !important;
    padding: 10px !important;
    font-weight: 600 !important;
}

.btn-primary:hover,
.btn-login:hover {
    background-color: var(--brand-secondary) !important;
    border-color: var(--brand-secondary) !important;
}

.for-login a {
    color: var(--brand-primary) !important;
}

.for-login a:hover {
    color: var(--brand-secondary) !important;
}

.btn-login-with-email-link,
.social-logins .login-divider,
.social-logins .login-with-email-link {
    display: none !important;
}

/* ============================================
   PRIMARY BUTTONS THROUGHOUT APP
   ============================================ */

.btn-primary:not(.btn-login) {
    background-color: var(--brand-primary) !important;
    border-color: var(--brand-primary) !important;
    border-radius: 6px !important;
}

.btn-primary:not(.btn-login):hover {
    background-color: var(--brand-secondary) !important;
    border-color: var(--brand-secondary) !important;
}

/* ============================================
   FORM SIDEBAR POLISH
   ============================================ */

.form-sidebar {
    background: linear-gradient(180deg, #f8f9fc 0%, #f1f3f8 100%) !important;
    border-right: 1px solid var(--card-border) !important;
    padding-top: 8px !important;
}

.form-sidebar .form-assignments,
.form-sidebar .form-attachments,
.form-sidebar .form-tags,
.form-sidebar .form-shared,
.form-sidebar .form-reviews,
.form-sidebar .followed-by-section {
    padding: 4px 0 !important;
    border-bottom: 1px solid #e8ecf1 !important;
}

/* Follow button */
.form-sidebar .like-action-btn,
.form-sidebar .follow-action-btn,
.form-sidebar .btn-follow {
    font-size: 11px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

/* Sidebar metadata */
.form-sidebar .sidebar-stats,
.form-sidebar .comment-box .text-muted,
.form-sidebar .form-footer .text-muted {
    font-size: 11.5px !important;
    color: #94a3b8 !important;
    line-height: 1.5 !important;
}

/* Checkbox styling */
.frappe-control[data-fieldtype="Check"] label {
    font-size: 13px !important;
    font-weight: 400 !important;
    color: var(--brand-text) !important;
}

.frappe-control[data-fieldtype="Check"] .checkbox .input-with-feedback {
    accent-color: var(--brand-primary) !important;
}

/* Description text */
.frappe-control .help-box,
.frappe-control .description {
    font-size: 11.5px !important;
    color: #94a3b8 !important;
    line-height: 1.4 !important;
}

/* Table download button */
.grid-footer .btn-secondary,
.grid-footer .grid-download {
    font-size: 12px !important;
    font-weight: 500 !important;
    border-radius: 6px !important;
}

/* Total/currency fields */
.frappe-control[data-fieldtype="Currency"] .control-value,
.frappe-control[data-fieldtype="Float"] .control-value {
    font-weight: 600 !important;
    font-size: 14px !important;
}

/* ============================================
   LIST VIEW POLISH
   ============================================ */

/* Filter sidebar */
.list-filters,
.filter-sidebar {
    background: linear-gradient(180deg, #f8f9fc 0%, #f1f3f8 100%) !important;
    border-right: 1px solid var(--card-border) !important;
}

/* Filter heading */
.list-sidebar .sidebar-section .filter-label,
.list-sidebar h6,
.list-sidebar .list-sidebar-section .sidebar-label {
    font-family: 'Inter', sans-serif !important;
    font-size: 11.5px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.4px !important;
    color: #64748b !important;
}

/* Filter links */
.list-sidebar a,
.list-sidebar .btn-link,
.list-sidebar .edit-filter,
.list-sidebar .save-filter {
    font-family: 'Inter', sans-serif !important;
    font-size: 12.5px !important;
    font-weight: 500 !important;
    color: #64748b !important;
    transition: color 0.15s ease !important;
}

.list-sidebar a:hover,
.list-sidebar .btn-link:hover {
    color: var(--brand-primary) !important;
}

/* Row hover */
.list-row:hover {
    background-color: color-mix(in srgb, var(--brand-primary) 4%, #ffffff) !important;
    transition: background-color 0.15s ease !important;
}

/* Filter inputs */
.list-row-head .list-header-filter input,
.list-row-head input.input-xs {
    border-radius: 4px !important;
    border: 1px solid #e2e8f0 !important;
    font-size: 12px !important;
    padding: 4px 8px !important;
}

.list-row-head .list-header-filter input:focus,
.list-row-head input.input-xs:focus {
    border-color: var(--brand-primary) !important;
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand-primary) 15%, transparent) !important;
}

/* Row borders */
.list-row {
    border-bottom: 1px solid #f1f5f9 !important;
}

/* Status indicators */
.list-row .indicator-pill {
    font-size: 11.5px !important;
    font-weight: 600 !important;
    letter-spacing: 0.2px !important;
}

/* ============================================
   B24: HELP MENU & TOOLTIPS CLEANUP
   ============================================ */

/* Hide ERPNext/Frappe help links and tooltips */
.navbar .help-links a[href*="erpnext.com"],
.navbar .help-links a[href*="frappe.io"],
.navbar .help-links a[href*="frappecloud.com"],
.navbar .help-links a[href*="discuss.erpnext.com"],
.navbar .help-links a[href*="discuss.frappe.io"],
.navbar .help-links a[href*="github.com/frappe"],
.navbar .help-links a[href*="github.com/erpnext"],
.navbar .help-links a[href*="school.erpnext.com"] {
    display: none !important;
}

/* Hide ERPNext onboarding help tooltips */
.popover[data-name*="setup"],
.popover .onboarding-tooltip,
.tooltip-content a[href*="erpnext.com"],
.tooltip-content a[href*="frappe.io"],
.help-text a[href*="erpnext.com"],
.help-text a[href*="frappe.io"],
.description a[href*="erpnext.com"],
.description a[href*="frappe.io"],
.frappe-control .help-box a[href*="erpnext.com"],
.frappe-control .help-box a[href*="frappe.io"] {
    display: none !important;
}

/* Block Frappe "About" modal (Modèle Frappe) */
.modal.about-frappe,
.modal[data-page-name="about"],
.modal .modal-dialog:has(.modal-title:is([data-original-title*="Frappe"])) {
    display: none !important;
}

/* Hide Raccourcis clavier menu item */
.navbar .dropdown-menu a[onclick*="show_keyboard_shortcuts"],
.navbar .dropdown-menu a[data-action="show_quick_actions"] {
    display: none !important;
}

/* Style the cleaned help dropdown */
.navbar .dropdown-menu .help-links {
    font-family: 'Inter', sans-serif !important;
}

.navbar .dropdown-menu .help-links a {
    font-family: 'Inter', sans-serif !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    color: var(--brand-text) !important;
    padding: 6px 16px !important;
}

.navbar .dropdown-menu .help-links a:hover {
    color: var(--brand-primary) !important;
    background-color: color-mix(in srgb, var(--brand-primary) 6%, #ffffff) !important;
}

/* ============================================
   B25: ERROR PAGES — CSS FALLBACK
   ============================================ */

/* Hide Frappe branding on built-in error pages */
.page-container[data-page="error"] .footer-links,
.page-container[data-page="error"] a[href*="frappe"],
.page-container[data-page="error"] a[href*="erpnext"],
.page-container[data-page="not-found"] .footer-links,
.page-container[data-page="not-found"] a[href*="frappe"],
.page-container[data-page="not-found"] a[href*="erpnext"],
body.error-page .footer-links,
body.error-page a[href*="frappe.io"],
body.error-page a[href*="erpnext.com"],
.web-footer a[href*="frappe"],
.web-footer a[href*="erpnext"] {
    display: none !important;
}

/* Restyle Frappe's default error page if our template doesn't load */
.page-container[data-page="error"],
.page-container[data-page="not-found"],
body.error-page .main-section {
    font-family: 'Inter', -apple-system, sans-serif !important;
}

.page-container[data-page="error"] h1,
.page-container[data-page="not-found"] h1,
body.error-page h1 {
    font-family: 'Inter', sans-serif !important;
    font-weight: 700 !important;
    color: var(--brand-text, #333333) !important;
}

.page-container[data-page="error"] .btn-primary,
.page-container[data-page="not-found"] .btn-primary,
body.error-page .btn-primary {
    background-color: var(--brand-primary, #FF4433) !important;
    border-color: var(--brand-primary, #FF4433) !important;
    border-radius: 8px !important;
    font-family: 'Inter', sans-serif !important;
    font-weight: 500 !important;
}

/* ============================================
   B23: HIDE SETUP WIZARD / ONBOARDING
   ============================================ */

/* Nuclear hide — all ERPNext onboarding/wizard elements */
.setup-wizard-slide,
.setup-wizard,
.setup-wizard-dialog,
.onboarding-widget-box,
.onboarding-widget,
.widget-group[data-widget-type="onboarding"],
.codex-editor [data-type="onboarding"],
.ce-block [data-type="onboarding"],
.widget-group .onboarding-steps-wrapper,
.widget-group .onboarding-step,
.erpnext-onboarding,
.setup-wizard-message,
[data-page-name="setup-wizard"],
.page-container[data-page="setup-wizard"],
.onboarding-steps,
.btn-setup-wizard,
.setup-progress,
/* "Let's begin your journey" / "Premiers pas" banner */
.workspace-empty-state,
.empty-state[data-setup],
.onboarding-help-card {
    display: none !important;
}

/* ============================================
   B29-B5: QUICK ACTIONS BAR
   ============================================
   Two sections: Create (brand) and View (neutral).
   Merged Dashboard home page.
   Design: B23-style branded premium card.
   ============================================ */

.salay-quick-actions {
    background: linear-gradient(135deg,
            color-mix(in srgb, var(--brand-primary, #FF4433) 6%, #ffffff) 0%,
            color-mix(in srgb, var(--brand-primary, #FF4433) 2%, #ffffff) 100%) !important;
    border: 1px solid color-mix(in srgb, var(--brand-primary, #FF4433) 15%, #e2e8f0) !important;
    border-left: 4px solid var(--brand-primary, #FF4433) !important;
    border-radius: 10px !important;
    padding: 20px 22px !important;
    margin: 20px 0 !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04) !important;
}

/* --- Section containers (Create / View) --- */
.salay-quick-actions .salay-qa-section {
    margin-bottom: 14px !important;
}

.salay-quick-actions .salay-qa-section:last-child {
    margin-bottom: 0 !important;
}

.salay-quick-actions .salay-qa-section-label {
    font-size: 11px !important;
    font-weight: 700 !important;
    color: #94a3b8 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.8px !important;
    margin-bottom: 8px !important;
    padding-left: 2px !important;
}

/* --- Grid layout --- */
.salay-quick-actions .salay-qa-grid {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
}

/* --- Shared action item style --- */
.salay-quick-actions .salay-qa-item {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 8px 14px !important;
    border-radius: 8px !important;
    text-decoration: none !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    transition: all 0.15s ease !important;
    white-space: nowrap !important;
    line-height: 1.3 !important;
}

.salay-quick-actions .salay-qa-icon {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    width: 28px !important;
    height: 28px !important;
    border-radius: 7px !important;
}

.salay-quick-actions .salay-qa-icon svg {
    width: 14px !important;
    height: 14px !important;
}

/* --- Emoji icons for create actions --- */
.salay-quick-actions .salay-qa-emoji {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    width: 32px !important;
    height: 32px !important;
    border-radius: 8px !important;
    background: color-mix(in srgb, var(--brand-primary, #FF4433) 8%, #ffffff) !important;
    font-size: 16px !important;
    line-height: 1 !important;
}

/* --- Create actions: brand-accented --- */
.salay-quick-actions .salay-qa-create {
    background: #ffffff !important;
    border: 1px solid color-mix(in srgb, var(--brand-primary, #FF4433) 20%, #e2e8f0) !important;
    color: color-mix(in srgb, var(--brand-primary, #FF4433) 80%, #1e293b) !important;
}

.salay-quick-actions .salay-qa-create .salay-qa-icon {
    background: color-mix(in srgb, var(--brand-primary, #FF4433) 12%, #ffffff) !important;
    color: var(--brand-primary, #FF4433) !important;
}

.salay-quick-actions .salay-qa-create:hover {
    background: color-mix(in srgb, var(--brand-primary, #FF4433) 5%, #ffffff) !important;
    border-color: color-mix(in srgb, var(--brand-primary, #FF4433) 50%, #e2e8f0) !important;
    color: var(--brand-primary, #FF4433) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 3px 10px color-mix(in srgb, var(--brand-primary, #FF4433) 12%, transparent) !important;
    text-decoration: none !important;
}

/* --- View actions: neutral with icon circle --- */
.salay-quick-actions .salay-qa-view {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    color: #475569 !important;
}

.salay-quick-actions .salay-qa-view .salay-qa-icon {
    background: #f1f5f9 !important;
    color: #64748b !important;
}

.salay-quick-actions .salay-qa-view:hover {
    background: #f8fafc !important;
    border-color: #cbd5e1 !important;
    color: #334155 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06) !important;
    text-decoration: none !important;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .sidebar-toggle-btn::after,
    .sidebar-toggle-btn [title]::after {
            display: none !important;
            content: none !important;
        }
    
    .sidebar-toggle-btn .tooltip {
            display: none !important;
        }
    .salay-quick-actions {
        padding: 14px 14px 14px 18px !important;
        margin: 12px 0 !important;
    }

    .salay-quick-actions .salay-qa-section {
        margin-bottom: 10px !important;
    }

    .salay-quick-actions .salay-qa-grid {
        gap: 6px !important;
    }

    .salay-quick-actions .salay-qa-item {
        padding: 6px 10px !important;
        font-size: 12px !important;
    }

    .salay-quick-actions .salay-qa-icon {
        width: 22px !important;
        height: 22px !important;
        border-radius: 5px !important;
    }

    .salay-quick-actions .salay-qa-icon svg {
        width: 12px !important;
        height: 12px !important;
    }

    .salay-quick-actions .salay-qa-emoji {
        width: 26px !important;
        height: 26px !important;
        border-radius: 6px !important;
        font-size: 14px !important;
    }
}

/* ============================================
   RESPONSIVE — MOBILE
   ============================================ */

@media (max-width: 768px) {

    /* Login page */
    .app-logo,
    .for-login .app-logo {
        width: 150px !important;
        height: 60px !important;
    }

    .page-card {
        margin: 20px 15px !important;
        max-width: 100% !important;
    }

    body[data-path="login"] .page-card-head,
    body.for-login .page-card-head {
        max-width: 100% !important;
        margin: 20px 15px 0 15px !important;
        border-radius: 8px 8px 0 0 !important;
    }

    /* Reset sidebar for mobile */
    .layout-side-section {
        min-width: unset !important;
        max-width: unset !important;
        flex: unset !important;
        position: unset !important;
        height: unset !important;
        box-shadow: unset !important;
        background: linear-gradient(180deg,
                color-mix(in srgb, var(--brand-primary) 6%, #ffffff) 0%,
                color-mix(in srgb, var(--brand-primary) 18%, #f0f1f5) 100%) !important;
    }

    .desk-sidebar.list-unstyled.sidebar-menu {
        background: linear-gradient(180deg,
                color-mix(in srgb, var(--brand-primary) 6%, #ffffff) 0%,
                color-mix(in srgb, var(--brand-primary) 18%, #f0f1f5) 100%) !important;
    }

    /* Prevent text truncation */
    .widget-group .widget-head .widget-label,
    .widget-group .links-section-header,
    .widget-group .link-item a,
    .widget-group .widget-links .link-content a {
        white-space: normal !important;
        overflow: visible !important;
        text-overflow: unset !important;
        word-break: break-word !important;
    }

    /* Shortcuts — stack vertically */
    .shortcut-widget-box {
        min-width: 100% !important;
    }

    /* Navbar */
    .navbar {
        padding: 4px 8px !important;
    }

    .navbar img.app-logo {
        max-height: 28px !important;
    }

    /* Fix page title truncation on mobile */
    .page-head .page-title .title-text {
        font-size: 16px !important;
        max-width: calc(100vw - 160px) !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    /* Sidebar sub-items — shorter labels, no truncation */
    .salay-submenu-item {
        white-space: normal !important;
        overflow: visible !important;
        text-overflow: unset !important;
        word-break: break-word !important;
        padding: 5px 12px 5px 40px !important;
        font-size: 12px !important;
        line-height: 1.4 !important;
    }

    /* Sidebar module labels — prevent truncation */
    .desk-sidebar .sidebar-item-label {
        font-size: 12.5px !important;
        white-space: normal !important;
        overflow: visible !important;
        text-overflow: unset !important;
        line-height: 1.3 !important;
    }

    /* Sidebar width on mobile overlay */
    .layout-side-section.overlay-sidebar,
    .list-sidebar.overlay-sidebar {
        min-width: 220px !important;
        max-width: 75vw !important;
    }
}

/* ============================================
   INSTANT UI OVERRIDES (prevents flash before JS loads)
   ============================================ */

/* Search bar placeholder — hide default text via narrow width trick isn't reliable,
   so we use CSS to style it immediately while JS replaces the text */

/* Hide help menu items before JS cleanup runs */
.navbar .dropdown-menu a[href*="erpnext.com"],
.navbar .dropdown-menu a[href*="frappe.io"],
.navbar .dropdown-menu a[href*="frappecloud.com"],
.navbar .dropdown-menu a[href*="discuss."],
.navbar .dropdown-menu a[href*="github.com/frappe"],
.navbar .dropdown-menu a[href*="github.com/erpnext"],
.navbar .dropdown-menu a[href*="school.erpnext"] {
    display: none !important;
}

/* Hide onboarding/setup wizard elements immediately */
.onboarding-widget-box,
.onboarding-widget,
[data-widget-type="onboarding"],
.onboarding-steps-wrapper,
.setup-wizard-slide,
.setup-wizard-dialog,
.erpnext-onboarding,
.setup-wizard-message {
    display: none !important;
}

/* Hide "Powered by ERPNext" footer immediately */
.footer-powered,
.website-footer .powered,
[id*="powered-by-erpnext"],
.erpnext-footer {
    display: none !important;
}

/* ============================================
   PHASE B: UI/UX POLISH
   ============================================ */

/* Hide execution time on reports (developer detail) */
.page-form .execution-time,
.report-footer .execution-time,
[class*="execution-time"] {
    display: none !important;
}

/* Hide portal newsletter signup footer */
.website-footer .footer-subscribe,
.web-footer .newsletter-wrapper,
footer .email-subscribe,
footer input[placeholder*="email"],
footer .btn[onclick*="newsletter"] {
    display: none !important;
}

/* Hide update modal */
.app-update-available {
    display: none !important;
}

/* Hide "Gérer les applications tierces" on profile page */
.user-settings .third-party-apps,
.my-account-section:has(a[href*="third-party"]),
.my-account-section:has(.manage-third-party) {
    display: none !important;
}
/* Hide third-party apps section on user profile */
.frappe-control[data-fieldname="third_party_apps"] {
    display: none !important;
}

/* Back button on form/list pages */
.salay-back-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 32px !important;
    height: 32px !important;
    border-radius: 8px !important;
    color: var(--brand-primary, #FF4433) !important;
    background: color-mix(in srgb, var(--brand-primary, #FF4433) 8%, #ffffff) !important;
    border: 1px solid color-mix(in srgb, var(--brand-primary, #FF4433) 15%, #e2e8f0) !important;
    cursor: pointer !important;
    margin-right: 8px !important;
    flex-shrink: 0 !important;
    transition: background 0.2s !important;
    text-decoration: none !important;
    position: relative !important;
    top: 1px !important;
}

.salay-back-btn:hover {
    background: color-mix(in srgb, var(--brand-primary, #FF4433) 15%, #ffffff) !important;
    text-decoration: none !important;
    color: var(--brand-primary, #FF4433) !important;
}

/* ============================================
   B29-B6: EMPTY CHART BRANDED STATES
   ============================================
   Replaces Frappe's default empty chart displays
   with a branded SALAY empty state.

   Architecture:
   - CSS: instant visual (background, layout, icon)
   - JS:  injects translated text via __() into
          .salay-empty-text element (added by JS)
   - JS:  adds .salay-empty-chart class to activate
          styling on Pattern 2 (empty rendered SVG)

   Detection is structural (DOM state), never
   text-matching. Safe across Frappe upgrades.
   ============================================ */

/* --- Shared branded container for both patterns --- */
/* Pattern 1: Frappe's visible "no data" loading state */
/* Pattern 2: JS-flagged via .salay-empty-chart class  */
.widget-body .chart-loading-state:not([style*="display: none"]):not([style*="display:none"]),
.widget-body .salay-empty-chart {
    /* Hide original Frappe text without destroying element */
    font-size: 0 !important;
    color: transparent !important;

    /* Branded container layout */
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0 !important;
    min-height: 200px !important;
    height: 240px !important;
    padding: 20px !important;
    text-align: center !important;
    background: linear-gradient(180deg,
            color-mix(in srgb, var(--brand-primary, #FF4433) 3%, #ffffff) 0%,
            color-mix(in srgb, var(--brand-primary, #FF4433) 6%, #f8fafc) 100%) !important;
    border-radius: 8px !important;
    border: 1px dashed color-mix(in srgb, var(--brand-primary, #FF4433) 20%, #e2e8f0) !important;
}

/* --- SVG bar-chart icon (brand-colored, instant via CSS) --- */
.widget-body .chart-loading-state:not([style*="display: none"]):not([style*="display:none"])::before,
.widget-body .salay-empty-chart::before {
    content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 24 24' fill='none' stroke='%23FF4433' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' opacity='0.4'%3E%3Cline x1='18' y1='20' x2='18' y2='10'/%3E%3Cline x1='12' y1='20' x2='12' y2='4'/%3E%3Cline x1='6' y1='20' x2='6' y2='14'/%3E%3C/svg%3E");
    display: block !important;
    margin-bottom: 12px !important;
}

/* --- JS-injected translated text container --- */
.salay-empty-text {
    font-size: 13px !important;
    line-height: 1.6 !important;
    color: var(--text-muted, #64748b) !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
    max-width: 280px !important;
    text-align: center !important;
}

.salay-empty-text .salay-empty-title {
    font-size: 14px !important;
    font-weight: 500 !important;
    color: color-mix(in srgb, var(--brand-primary, #FF4433) 70%, #334155) !important;
    margin-bottom: 4px !important;
    display: block !important;
}

.salay-empty-text .salay-empty-subtitle {
    font-size: 12px !important;
    color: var(--text-muted, #94a3b8) !important;
    display: block !important;
}

/* --- Hide chart-container when JS flags widget as empty (Pattern 2) --- */
.widget-body:has(.salay-empty-chart) .chart-container {
    display: none !important;
}

/* --- Responsive --- */
@media (max-width: 768px) {

    .widget-body .chart-loading-state:not([style*="display: none"]):not([style*="display:none"]),
    .widget-body .salay-empty-chart {
        height: 180px !important;
        min-height: 160px !important;
        padding: 16px !important;
    }

    .widget-body .chart-loading-state:not([style*="display: none"]):not([style*="display:none"])::before,
    .widget-body .salay-empty-chart::before {
        content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 24 24' fill='none' stroke='%23FF4433' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' opacity='0.4'%3E%3Cline x1='18' y1='20' x2='18' y2='10'/%3E%3Cline x1='12' y1='20' x2='12' y2='4'/%3E%3Cline x1='6' y1='20' x2='6' y2='14'/%3E%3C/svg%3E");
        margin-bottom: 8px !important;
    }

    .salay-empty-text .salay-empty-title {
        font-size: 13px !important;
    }

    .salay-empty-text .salay-empty-subtitle {
        font-size: 11px !important;
    }
}

/* ============================================
   B30-FL: FORM & LIST PAGE REDESIGN — Level 1 (CSS Polish)
   ============================================
   Makes forms and lists feel like SALAY, not ERPNext.
   - Cleaner page headers with brand accent
   - Improved form layout and field grouping
   - Better list view with branded interactions
   - Prominent action buttons
   - Mobile-optimized form experience
   ============================================ */

/* --- Page Header: Clean, branded bar --- */
.page-head {
    background: #ffffff !important;
    border-bottom: 1px solid #e2e8f0 !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04) !important;
}

/* Subtle brand accent line under page header */
.page-head::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg,
            var(--brand-primary, #FF4433) 0%,
            color-mix(in srgb, var(--brand-primary, #FF4433) 30%, transparent) 60%,
            transparent 100%);
}

/* --- Form: Cleaner layout --- */
.form-page .form-layout {
    background: #ffffff !important;
    border-radius: 8px !important;
    border: 1px solid #e8ecf1 !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03) !important;
    margin-top: 8px !important;
}

/* Form field focus state — brand color ring */
.form-control:focus,
.frappe-control .input-with-feedback:focus,
.frappe-control input:focus,
.frappe-control select:focus,
.frappe-control textarea:focus {
    border-color: var(--brand-primary, #FF4433) !important;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-primary, #FF4433) 12%, transparent) !important;
    outline: none !important;
}

/* Link field (autocomplete) highlight */
.frappe-control[data-fieldtype="Link"] .link-btn .btn-open {
    color: var(--brand-primary, #FF4433) !important;
}

/* --- Form action buttons: More prominent --- */
.form-page .page-head .page-actions .btn-primary-dark,
.form-page .page-head .page-actions .btn-primary {
    background: var(--brand-primary, #FF4433) !important;
    border-color: var(--brand-primary, #FF4433) !important;
    border-radius: 6px !important;
    font-weight: 600 !important;
    font-size: 13px !important;
    padding: 6px 16px !important;
    box-shadow: 0 1px 3px color-mix(in srgb, var(--brand-primary, #FF4433) 25%, transparent) !important;
    transition: all 0.15s ease !important;
}

.form-page .page-head .page-actions .btn-primary-dark:hover,
.form-page .page-head .page-actions .btn-primary:hover {
    background: var(--brand-secondary, #cc3629) !important;
    border-color: var(--brand-secondary, #cc3629) !important;
    box-shadow: 0 2px 6px color-mix(in srgb, var(--brand-primary, #FF4433) 30%, transparent) !important;
    transform: translateY(-1px) !important;
}

/* Secondary action buttons (Amend, Duplicate, etc.) */
.form-page .page-head .page-actions .btn-secondary,
.form-page .page-head .page-actions .btn-default {
    border-radius: 6px !important;
    font-weight: 500 !important;
    border-color: #e2e8f0 !important;
    transition: all 0.15s ease !important;
}

.form-page .page-head .page-actions .btn-secondary:hover,
.form-page .page-head .page-actions .btn-default:hover {
    border-color: var(--brand-primary, #FF4433) !important;
    color: var(--brand-primary, #FF4433) !important;
    background: color-mix(in srgb, var(--brand-primary, #FF4433) 4%, #ffffff) !important;
}

/* --- Document status banner: Prominent, branded --- */
.form-page .page-head .indicator-pill {
    font-family: 'Inter', sans-serif !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    letter-spacing: 0.5px !important;
    padding: 3px 10px !important;
    border-radius: 5px !important;
    text-transform: uppercase !important;
}

/* Submitted status — green */
.form-page .page-head .indicator-pill.blue {
    background: #ecfdf5 !important;
    color: #065f46 !important;
    border: 1px solid #a7f3d0 !important;
}

/* Draft status — amber */
.form-page .page-head .indicator-pill.red {
    background: #fef3c7 !important;
    color: #92400e !important;
    border: 1px solid #fcd34d !important;
}

/* Cancelled status — grey */
.form-page .page-head .indicator-pill.grey {
    background: #f1f5f9 !important;
    color: #64748b !important;
    border: 1px solid #e2e8f0 !important;
}

/* --- List View: Cleaner rows and interactions --- */

/* List header — cleaner look */
.list-row-head {
    background: color-mix(in srgb, var(--brand-primary, #FF4433) 3%, #f8fafc) !important;
    border-bottom: 2px solid color-mix(in srgb, var(--brand-primary, #FF4433) 15%, #e2e8f0) !important;
}

/* List rows — subtle brand hover */
.list-row:hover {
    background-color: color-mix(in srgb, var(--brand-primary, #FF4433) 3%, #ffffff) !important;
    border-left: 3px solid var(--brand-primary, #FF4433) !important;
}

/* List row subject (title column) — clickable feel */
.list-row .level-left .list-row-col.ellipsis .ellipsis {
    transition: color 0.15s ease !important;
}

.list-row:hover .level-left .list-row-col.ellipsis .ellipsis {
    color: var(--brand-primary, #FF4433) !important;
}

/* List action buttons (new, refresh) */
.list-page .page-head .page-actions .btn-primary {
    background: var(--brand-primary, #FF4433) !important;
    border-color: var(--brand-primary, #FF4433) !important;
    border-radius: 6px !important;
    font-weight: 600 !important;
    box-shadow: 0 1px 3px color-mix(in srgb, var(--brand-primary, #FF4433) 20%, transparent) !important;
}

.list-page .page-head .page-actions .btn-primary:hover {
    background: var(--brand-secondary, #cc3629) !important;
    transform: translateY(-1px) !important;
}

/* --- Breadcrumbs: Branded trail --- */
.breadcrumb-container .breadcrumb .breadcrumb-item a {
    color: #94a3b8 !important;
    transition: color 0.15s ease !important;
}

.breadcrumb-container .breadcrumb .breadcrumb-item a:hover {
    color: var(--brand-primary, #FF4433) !important;
}

.breadcrumb-container .breadcrumb .breadcrumb-item.active {
    color: var(--brand-text, #1e293b) !important;
    font-weight: 600 !important;
}

/* --- Comment/Activity section: Cleaner --- */
.form-footer .comment-box .mention-input-field .ql-editor {
    border-radius: 6px !important;
    border: 1px solid #e2e8f0 !important;
    font-family: 'Inter', sans-serif !important;
    font-size: 13px !important;
}

.form-footer .comment-box .mention-input-field .ql-editor:focus-within {
    border-color: var(--brand-primary, #FF4433) !important;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-primary, #FF4433) 10%, transparent) !important;
}

/* Timeline items */
.form-footer .timeline-item {
    border-bottom: 1px solid #f1f5f9 !important;
}

/* --- Empty state for lists: Branded --- */
.no-result-area,
.msg-box {
    font-family: 'Inter', -apple-system, sans-serif !important;
}

.no-result-area .msg-box .no-result-message,
.msg-box .msg-box-title {
    font-size: 15px !important;
    font-weight: 600 !important;
    color: var(--brand-text, #333) !important;
}

.no-result-area .msg-box p,
.msg-box .msg-box-subtitle {
    font-size: 13px !important;
    color: #94a3b8 !important;
}

/* Empty state icon — brand tint */
.no-result-area .msg-box svg,
.msg-box svg {
    color: color-mix(in srgb, var(--brand-primary, #FF4433) 40%, #94a3b8) !important;
}

/* --- Mobile form improvements --- */
@media (max-width: 768px) {
    .form-page .form-layout {
        margin-top: 4px !important;
        border-radius: 0 !important;
        border-left: none !important;
        border-right: none !important;
    }

    /* Larger touch targets for form fields */
    .form-control,
    .frappe-control input,
    .frappe-control select {
        min-height: 40px !important;
        font-size: 14px !important;
    }

    /* Action buttons on mobile */
    .form-page .page-head .page-actions .btn-primary-dark,
    .form-page .page-head .page-actions .btn-primary {
        padding: 8px 14px !important;
        font-size: 13px !important;
    }

    /* List rows — larger touch target */
    .list-row {
        padding: 10px 12px !important;
        min-height: 48px !important;
    }

    /* Page header accent — thinner on mobile */
    .page-head::after {
        height: 2px;
    }
}