/* Black Zero ERP theme: clean, light, modern. Loaded on desk (app_include_css) and login/web (web_include_css). */
:root, [data-theme="light"] {
  --bz-accent: #4f46e5; --bz-accent-600: #4338ca; --bz-accent-50: #eef2ff; --bz-accent-100: #e0e7ff;
  --primary: #4f46e5; --primary-color: #4f46e5;
  --bg-color: #f5f6fa; --fg-color: #ffffff; --card-bg: #ffffff; --navbar-bg: rgba(255,255,255,.88);
  --control-bg: #f3f4f9; --subtle-fg: #f3f4f9; --sidebar-select-color: #eef2ff;
  --border-color: #e7e9f1; --dark-border-color: #d9dce8;
  --text-color: #1e2235; --heading-color: #111428; --text-muted: #5b6178; --text-light: #8389a0;
  --border-radius: 8px; --border-radius-md: 10px; --border-radius-lg: 14px; --border-radius-full: 999px;
  --shadow-sm: 0 1px 2px rgba(17,20,40,.05);
  --shadow-base: 0 1px 3px rgba(17,20,40,.06), 0 4px 12px rgba(17,20,40,.05);
  --shadow-md: 0 4px 16px rgba(17,20,40,.08);
  --shadow-lg: 0 12px 36px rgba(17,20,40,.14);
  --btn-height: 32px;
}
body { background: var(--bg-color); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }

/* Navbar and page header */
.navbar { background: var(--navbar-bg) !important; backdrop-filter: saturate(160%) blur(10px); border-bottom: 1px solid var(--border-color); box-shadow: none; }
.page-head { background: rgba(255,255,255,.9); backdrop-filter: saturate(160%) blur(10px); border-bottom: 1px solid var(--border-color); }
.page-head .page-title .title-text { font-weight: 650; letter-spacing: -.01em; color: var(--heading-color); }
.search-bar .form-control, .search-bar input { background: var(--control-bg); border-radius: 10px; }

/* Buttons */
.btn { border-radius: var(--border-radius); font-weight: 550; transition: background .15s, box-shadow .15s, transform .05s; }
.btn:active { transform: translateY(1px); }
.btn-primary, .btn-primary-light { border: 0; }
.btn-primary { background: linear-gradient(180deg, #5b53ee, #4f46e5); color: #fff; box-shadow: 0 1px 2px rgba(79,70,229,.4), inset 0 1px 0 rgba(255,255,255,.18); }
.btn-primary:hover, .btn-primary:focus { background: linear-gradient(180deg, #4f46e5, #4338ca); color: #fff; }
.btn-default, .btn-secondary { background: #fff; border: 1px solid var(--border-color); box-shadow: var(--shadow-sm); color: var(--text-color); }
.btn-default:hover, .btn-secondary:hover { background: #f8f9fd; border-color: var(--dark-border-color); }
.btn-primary-light { background: var(--bz-accent-50); color: var(--bz-accent-600); }
.btn-danger { border: 0; }

/* Inputs */
.form-control, .awesomplete input, select.form-control { border-radius: var(--border-radius); background: var(--control-bg); border: 1px solid transparent; transition: border-color .15s, box-shadow .15s, background .15s; }
.form-control:focus, .awesomplete input:focus { background: #fff; border-color: var(--bz-accent); box-shadow: 0 0 0 3px rgba(79,70,229,.15); }
.form-control[disabled], .form-control[readonly] { background: #f7f8fc; }
.control-label, .form-group .control-label { color: var(--text-muted); font-weight: 550; }

/* Forms */
.form-layout .form-page { background: transparent; border: 0; box-shadow: none; }
.form-layout .form-section, .form-layout .form-dashboard-section { background: #fff; border: 1px solid var(--border-color); border-radius: var(--border-radius-lg); box-shadow: var(--shadow-sm); margin-bottom: 14px; overflow: visible; }
.form-layout .section-head { font-weight: 650; color: var(--heading-color); }
.form-tabs-list .nav-link.active { color: var(--bz-accent-600); border-bottom-color: var(--bz-accent); font-weight: 650; }
.grid-heading-row, .grid-heading-row .grid-row { background: #fafbff; }
.form-grid, .grid-body, .form-grid-container .form-grid { border-radius: var(--border-radius-md); border-color: var(--border-color); }

/* Lists, reports */
.frappe-list .result, .frappe-list .list-paging-area, .report-wrapper, .dt-scrollable { border-radius: var(--border-radius-lg); }
.frappe-list .result { background: #fff; border: 1px solid var(--border-color); box-shadow: var(--shadow-sm); overflow: hidden; }
.list-row-head { background: #fafbff !important; color: var(--text-light); text-transform: uppercase; font-size: 11px; font-weight: 650; letter-spacing: .05em; }
.list-row { transition: background .12s; }
.list-row:hover { background: var(--bz-accent-50); }
.list-row-container:hover { background: var(--bz-accent-50); }
.datatable .dt-header .dt-cell { background: #fafbff; color: var(--text-light); text-transform: uppercase; font-size: 11px; font-weight: 650; letter-spacing: .04em; }
.datatable .dt-row:hover .dt-cell { background: var(--bz-accent-50); }
.standard-filter-section .form-control { background: #fff; border: 1px solid var(--border-color); }

/* Status pills */
.indicator-pill, .indicator-pill-right, .indicator-pill-no-margin { border-radius: 999px; font-weight: 600; letter-spacing: .01em; }

/* Sidebars */
.layout-side-section .sidebar-section .standard-sidebar-item, .desk-sidebar .standard-sidebar-item, .sidebar-item-container .standard-sidebar-item { border-radius: var(--border-radius); transition: background .12s; }
.desk-sidebar .standard-sidebar-item.selected, .sidebar-item-container.selected .standard-sidebar-item, .standard-sidebar-item.selected { background: var(--bz-accent-50); color: var(--bz-accent-600); font-weight: 650; }
.list-sidebar .list-link.selected, .list-sidebar .group-by-field.selected { background: var(--bz-accent-50); border-radius: var(--border-radius); }

/* Workspace and dashboard widgets */
.widget { border-radius: var(--border-radius-lg); border: 1px solid var(--border-color); background: #fff; box-shadow: var(--shadow-sm); transition: box-shadow .18s, transform .18s; }
.widget:hover { box-shadow: var(--shadow-md); }
.shortcut-widget-box:hover, .number-widget-box:hover, .links-widget-box:hover { transform: translateY(-1px); }
.widget .widget-title { font-weight: 650; color: var(--heading-color); }
.widget .link-item a:hover { color: var(--bz-accent-600); }

/* Dialogs, dropdowns, toasts */
.modal-content { border: 0; border-radius: 16px; box-shadow: var(--shadow-lg); }
.modal-header { border-bottom: 1px solid var(--border-color); }
.modal-footer { border-top: 1px solid var(--border-color); }
.dropdown-menu { border: 1px solid var(--border-color); border-radius: var(--border-radius-md); box-shadow: var(--shadow-md); padding: 6px; }
.dropdown-menu .dropdown-item, .dropdown-menu .dropdown-item:hover { border-radius: 6px; }
.dropdown-menu .dropdown-item:hover { background: var(--bz-accent-50); }
.desk-alert, .alert-container .desk-alert { border-radius: var(--border-radius-md); box-shadow: var(--shadow-md); border: 1px solid var(--border-color); }
.msgprint table { border-radius: var(--border-radius-md); }

/* Scrollbars and selection */
* { scrollbar-width: thin; scrollbar-color: #cfd3e3 transparent; }
::selection { background: rgba(79,70,229,.2); }
a { transition: color .12s; }

/* Login and website pages */
body[data-path="login"], body.login-page, .for-login, .for-forgot, .for-signup, .for-email-login, .for-login-with-email-link { background: radial-gradient(1200px 600px at 10% -10%, #e0e7ff 0%, transparent 60%), radial-gradient(900px 500px at 100% 0%, #ede9fe 0%, transparent 55%), #f5f6fa; }
.page-card, .login-content.page-card { border: 0; border-radius: 20px; box-shadow: var(--shadow-lg); background: #fff; padding: 32px 36px; }
.page-card .page-card-head h4, .page-card-head h4 { font-weight: 700; letter-spacing: -.01em; color: var(--heading-color); }
.page-card .btn-login, .page-card .btn-primary, .btn-login { height: 42px; border-radius: 10px; font-size: 14px; }
.page-card .form-control, .login-content .form-control { height: 42px; background: #f3f4f9; border-radius: 10px; }
.page-card .form-control:focus { background: #fff; }
.login-content .sign-up-message, .login-content .forgot-password-message { color: var(--text-muted); }

/* v16 espresso buttons and sidebar: stronger selectors */
.es-button { border-radius: var(--border-radius); font-weight: 550; }
.es-button.primary-action, .es-button.btn-primary, .btn.btn-primary, button.btn-primary { background: linear-gradient(180deg, #5b53ee, #4f46e5) !important; color: #fff !important; border: 0 !important; box-shadow: 0 1px 2px rgba(79,70,229,.4), inset 0 1px 0 rgba(255,255,255,.18) !important; }
.es-button.primary-action:hover, .btn.btn-primary:hover, button.btn-primary:hover { background: linear-gradient(180deg, #4f46e5, #4338ca) !important; }
.page-actions .es-button:not(.primary-action):not(.icon-btn):not(.btn-primary), .widget-control .es-button { background: #fff; border: 1px solid var(--border-color); box-shadow: var(--shadow-sm); }
.standard-sidebar-item.active-sidebar { background: var(--bz-accent-50) !important; color: var(--bz-accent-600) !important; font-weight: 650; }
.standard-sidebar-item.active-sidebar .sidebar-item-label { color: var(--bz-accent-600) !important; }
.standard-sidebar-item { border-radius: 8px; }
.standard-sidebar-item:hover:not(.active-sidebar) { background: #f1f3fa; }
.dock-item.active { background: var(--bz-accent-50); border-radius: 10px; }

/* Form card spacing */
.form-layout .form-section.card-section { margin: 0 16px 14px; padding: 4px 16px; }
.form-tabs-list { padding: 0 16px; }
.form-tab-content { margin-top: 14px; }
.form-dashboard-section { margin: 0 16px 14px; }
.list-row-head .level-right, .list-row-head .list-count { background: transparent !important; }

/* Login: full-page background and primary button */
html:has(.page-card) { background: radial-gradient(1200px 600px at 10% -10%, #e0e7ff 0%, transparent 60%), radial-gradient(900px 500px at 100% 0%, #ede9fe 0%, transparent 55%), #f5f6fa; background-attachment: fixed; min-height: 100%; }
body:has(.page-card), .for-login, .for-forgot, .for-signup, .for-email-login, .for-login-with-email-link { background: transparent !important; }
.page-card .es-button.w-full:not(.btn-forgot):not(.btn-login-with-email-link) { background: linear-gradient(180deg, #5b53ee, #4f46e5) !important; color: #fff !important; border: 0 !important; height: 42px; border-radius: 10px; font-size: 14px; box-shadow: 0 1px 2px rgba(79,70,229,.4), inset 0 1px 0 rgba(255,255,255,.18) !important; }
.page-card .es-button.w-full:not(.btn-forgot):not(.btn-login-with-email-link):hover { background: linear-gradient(180deg, #4f46e5, #4338ca) !important; }
.page-card .es-button.btn-login-with-email-link, .page-card .btn-login-with-email-link { height: 42px; border-radius: 10px; }

/* Dialog buttons (Confirm, Yes/No, Submit...): primary is blue with white text */
.es-button.btn-modal-primary, .modal .btn-modal-primary, .modal-footer .es-button.btn-primary { background: linear-gradient(180deg, #5b53ee, #4f46e5) !important; color: #fff !important; border: 0 !important; box-shadow: 0 1px 2px rgba(79,70,229,.4), inset 0 1px 0 rgba(255,255,255,.18) !important; min-width: 64px; }
.es-button.btn-modal-primary:hover, .modal .btn-modal-primary:hover { background: linear-gradient(180deg, #4f46e5, #4338ca) !important; }
.es-button.btn-modal-secondary, .modal .btn-modal-secondary { background: #fff !important; color: var(--text-color) !important; border: 1px solid var(--border-color) !important; }
/* any other primary-styled button must keep its white text on a blue background */
.es-button[class*="primary"]:not(.btn-modal-secondary):not(.icon-btn) { color: #fff; }


/* Onboarding steps (Get your books ready etc.): first button = blue action, others = light */
.onboarding-step .es-button { background: linear-gradient(180deg, #5b53ee, #4f46e5) !important; color: #fff !important; border: 0 !important; box-shadow: 0 1px 2px rgba(79,70,229,.4), inset 0 1px 0 rgba(255,255,255,.18) !important; }
.onboarding-step .es-button:not(:first-child) { background: #fff !important; color: var(--text-color) !important; border: 1px solid var(--border-color) !important; box-shadow: var(--shadow-sm) !important; }
