/* CarnetPro theme — auto-generated by setup_minimal_erp.py */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700;900&family=DM+Sans:wght@400;500;600;700&display=swap');

:root {
  /* Brand palette (matches carnetpro.ma + our logo SVG) */
  --cp-blue:           #2563eb;
  --cp-blue-dark:      #1e3a8a;
  --cp-blue-light:     #3b82f6;
  --cp-indigo:         #4f7cf6;
  --cp-green:          #16a34a;
  --cp-paper:          #f8fafc;
  --cp-line:           #e5e7eb;

  /* Override Frappe primary references */
  --primary:           var(--cp-blue) !important;
  --primary-color:     var(--cp-blue) !important;
  --btn-primary:       var(--cp-blue) !important;
  --brand-color:       var(--cp-blue) !important;
}

/* ── Typography ─────────────────────────────────────────── */
body, .layout-main, .layout-main-section,
input, button, select, textarea,
.form-control, .modal, .dropdown-menu {
  font-family: "DM Sans", "Cairo", -apple-system, BlinkMacSystemFont,
               "Segoe UI", Roboto, "Helvetica Neue", sans-serif !important;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5,
.page-title, .page-head .title-text {
  font-family: "Cairo", "DM Sans", sans-serif !important;
  font-weight: 700 !important;
  letter-spacing: -0.015em;
  color: #0f172a;
}

/* ── Primary buttons get the brand gradient ─────────────── */
.btn-primary,
.btn-primary:not(:disabled):not(.disabled) {
  background: linear-gradient(135deg, var(--cp-blue-light), var(--cp-blue-dark)) !important;
  border: 0 !important;
  color: #fff !important;
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.25),
              0 1px 2px rgba(0, 0, 0, 0.06) !important;
  font-weight: 600 !important;
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease !important;
}
.btn-primary:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px -2px rgba(37, 99, 235, 0.35) !important;
}
.btn-primary:active { transform: translateY(0); }

/* ── Navbar ─────────────────────────────────────────────── */
.navbar, header.navbar {
  background: #ffffff !important;
  border-bottom: 1px solid var(--cp-line) !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04) !important;
}
.navbar-brand img,
.navbar .app-logo {
  width: 28px; height: 28px;
  border-radius: 7px;
}

/* ── Sidebar ────────────────────────────────────────────── */
.desk-sidebar, .layout-side-section {
  background: var(--cp-paper) !important;
  border-right: 1px solid var(--cp-line) !important;
}
.desk-sidebar .standard-sidebar-section .standard-sidebar-item {
  border-radius: 6px;
  transition: background .15s, color .15s;
}
.desk-sidebar .standard-sidebar-item.selected,
.desk-sidebar .standard-sidebar-item:hover {
  background: rgba(37, 99, 235, 0.08) !important;
  color: var(--cp-blue) !important;
}

/* ── Workspace cards / widgets ──────────────────────────── */
.widget,
.workspace-link-card,
.shortcut-widget,
.number-card {
  border-radius: 12px !important;
  border: 1px solid var(--cp-line) !important;
  background: #fff !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04) !important;
  transition: transform .15s ease, box-shadow .15s ease !important;
}
.widget:hover,
.workspace-link-card:hover,
.shortcut-widget:hover,
.number-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px -4px rgba(15, 23, 42, .08),
              0 4px 8px -2px rgba(15, 23, 42, .04) !important;
  border-color: rgba(37, 99, 235, 0.25) !important;
}

/* ── Forms / inputs ─────────────────────────────────────── */
.form-control,
.input-with-feedback,
.awesomplete > input {
  border-radius: 8px !important;
  border-color: var(--cp-line) !important;
  transition: border-color .15s, box-shadow .15s !important;
}
.form-control:focus,
.input-with-feedback:focus {
  border-color: var(--cp-blue) !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12) !important;
}

/* ── Status badges (Paid / Partly Paid / Overdue) ───────── */
.indicator-pill, .indicator { font-weight: 600 !important; }

/* ── Login page ─────────────────────────────────────────── */
body.for-login {
  background: linear-gradient(135deg, #eef2ff 0%, #f8fafc 50%, #f0f4ff 100%) !important;
  font-family: "DM Sans", "Cairo", sans-serif !important;
}
.login-content,
.for-login .page-card {
  border-radius: 18px !important;
  border: 1px solid var(--cp-line) !important;
  box-shadow: 0 25px 50px -12px rgba(30, 58, 138, .15),
              0 8px 16px -4px rgba(30, 58, 138, .08) !important;
  padding: 2.5rem !important;
  backdrop-filter: blur(8px);
}
.for-login .page-card-head h4,
.for-login .page-card-head h3 {
  font-family: "Cairo", sans-serif !important;
  font-weight: 800 !important;
  letter-spacing: -0.02em;
}

/* ── Strip Frappe footers / "powered by" lines ─────────── */
.footer.text-muted,
.app-version,
.standard-footer-items a[href*="frappe"],
.standard-footer-items a[href*="erpnext"],
a[href*="docs.erpnext"],
.help-link [data-original-title*="Frappe"],
.about-product-section,
.frappe-card .frappe-list-help {
  display: none !important;
}

/* ── Subtle scrollbars matching the brand ──────────────── */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb {
  background: rgba(37, 99, 235, 0.2);
  border-radius: 8px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(37, 99, 235, 0.4); }

/* ── Page heads + breadcrumbs ───────────────────────────── */
.page-head {
  background: #fff !important;
  border-bottom: 1px solid var(--cp-line) !important;
}
.page-title h1, .page-title .title-text {
  color: #0f172a !important;
  font-family: "Cairo", sans-serif !important;
  font-weight: 700 !important;
}
.breadcrumb { font-size: 13px !important; }
.breadcrumb a { color: var(--cp-blue) !important; opacity: .85; }

/* ── List views (the main grid) ─────────────────────────── */
.list-row, .list-row-container, .filter-area {
  background: #fff !important;
}
.list-row:hover { background: rgba(37, 99, 235, 0.04) !important; }
.list-row-head {
  background: var(--cp-paper) !important;
  border-bottom: 1px solid var(--cp-line) !important;
  font-weight: 600;
}

/* ── Form pages ─────────────────────────────────────────── */
.form-section {
  background: #fff !important;
  border-radius: 10px !important;
  border: 1px solid var(--cp-line) !important;
  padding: 1rem 1.25rem !important;
  margin-bottom: 1rem !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .03) !important;
}
.section-head {
  font-family: "Cairo", sans-serif !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  border-bottom: 1px solid var(--cp-line) !important;
  padding-bottom: 8px !important;
  margin-bottom: 12px !important;
}

/* ── Modals ─────────────────────────────────────────────── */
.modal-content {
  border-radius: 14px !important;
  border: 1px solid var(--cp-line) !important;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, .25) !important;
}
.modal-header {
  border-bottom: 1px solid var(--cp-line) !important;
  padding: 1.25rem 1.5rem !important;
}

/* ── Indicators / badges ───────────────────────────────── */
.indicator-pill.green, .indicator.green   { background: #dcfce7 !important; color: #166534 !important; }
.indicator-pill.orange, .indicator.orange { background: #ffedd5 !important; color: #9a3412 !important; }
.indicator-pill.red, .indicator.red       { background: #fee2e2 !important; color: #991b1b !important; }
.indicator-pill.blue, .indicator.blue     { background: #dbeafe !important; color: #1e3a8a !important; }

/* ── Toolbar / action buttons in form footer ─────────────── */
.standard-actions .btn-default,
.btn-default {
  border-radius: 8px !important;
  border-color: var(--cp-line) !important;
}

/* ── Top navbar — search bar polish ─────────────────────── */
.navbar-search input,
.search-bar input,
.awesomplete > input.global-search {
  background: var(--cp-paper) !important;
  border: 1px solid var(--cp-line) !important;
  border-radius: 10px !important;
  padding: 0.45rem 0.9rem !important;
}

/* ── Notification bell ─────────────────────────────────── */
.notifications-dropdown { border-radius: 12px !important; }
