/*!*************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[14].oneOf[12].use[2]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[14].oneOf[12].use[3]!./app/globals.css ***!
  \*************************************************************************************************************************************************************************************************************************************************************/
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Noto+Sans+Arabic:wght@400;500;600&display=swap');

:root {
  --brand: #F63234;
  --brand-dark: #C81E28;
  --brand-grad: linear-gradient(135deg, #EC4244 0%, #E63234 45%, #CE2329 100%);
  /* neutral ramp — airy light theme */
  --line: #ECEEF1;
  --line-2: #F2F4F6;
  --ink: #15171C;
  --ink-2: #1F2024;
  --muted: #7C828C;
  --canvas: #F4F6F9;
  --surface: #FFFFFF;
  --surface-grad: #FFFFFF;
  --sidebar: #FFFFFF;
  --brand-tint: #FDECEC;
  --radius: 18px;
  --ease-spring: cubic-bezier(.16, 1, .3, 1);
  --ease-out: cubic-bezier(.21, .6, .35, 1);
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .04);
  --shadow-md: 0 4px 12px rgba(16, 24, 40, .06), 0 2px 6px rgba(16, 24, 40, .04);
  --shadow-lg: 0 18px 44px rgba(16, 24, 40, .12), 0 6px 16px rgba(16, 24, 40, .06);
  --shadow-brand: 0 8px 22px rgba(230, 50, 52, .30);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background:
    radial-gradient(1200px 600px at 100% -12%, rgba(230, 50, 52, .045), transparent 56%),
    radial-gradient(900px 520px at -10% 112%, rgba(230, 50, 52, .025), transparent 55%),
    var(--canvas);
  background-attachment: fixed;
  color: var(--ink-2);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  letter-spacing: -0.005em;
}

::placeholder { color: #A6ACB3; }
::selection { background: rgba(230, 50, 52, .18); color: var(--ink-2); }

input, select, button { font-family: inherit; }
.ar { font-family: 'Noto Sans Arabic', 'Inter', sans-serif; }

input, select {
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
input:focus, select:focus {
  outline: none;
  border-color: var(--brand) !important;
  box-shadow: 0 0 0 3.5px rgba(230, 50, 52, .14);
}

/* unify every text control: consistent radius + soft depth + hover */
input:not([type="checkbox"]):not([type="radio"]),
select {
  border-radius: 10px !important;
  box-shadow: var(--shadow-sm);
}
input:not([type="checkbox"]):not([type="radio"]):not([readonly]):hover,
select:hover { border-color: #C7CBD1; }

/* ---------- branded checkbox (replaces the OS-native accent tick) ---------- */
input[type="checkbox"] {
  appearance: none; -webkit-appearance: none; -moz-appearance: none;
  flex: none;
  border: 1.5px solid #CBD0D7;
  border-radius: 5px;
  background: #fff;
  cursor: pointer;
  display: inline-grid;
  place-content: center;
  vertical-align: middle;
  transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
}
input[type="checkbox"]:hover { border-color: var(--brand); }
input[type="checkbox"]:checked {
  border-color: var(--brand);
  background-color: var(--brand);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
  background-size: 74%;
  background-position: center;
  background-repeat: no-repeat;
}
input[type="checkbox"]:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3.5px rgba(230, 50, 52, .18);
}

button {
  transition: background .18s ease, box-shadow .2s var(--ease-out),
    transform .14s var(--ease-out), border-color .18s ease, color .18s ease, filter .18s ease;
}
button:active { transform: translateY(1px) scale(.99); }

a:focus-visible, button:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid rgba(230, 50, 52, .55);
  outline-offset: 2px;
}

/* ---------- scrollbars ---------- */
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-thumb {
  background: #D3D7DD; border-radius: 7px;
  border: 3px solid transparent; background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: #BFC4CC; background-clip: padding-box; }

/* ---------- keyframes ---------- */
@keyframes reveal { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes revealScale { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes ovIn { from { opacity: 0; -webkit-backdrop-filter: blur(0); backdrop-filter: blur(0); } to { opacity: 1; -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); } }
@keyframes mdIn { from { opacity: 0; transform: translateY(22px) scale(.965); } to { opacity: 1; transform: none; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes toastIn { 0% { opacity: 0; transform: translateY(26px) scale(.9); } 60% { transform: translateY(-3px) scale(1.01); } 100% { opacity: 1; transform: none; } }
@keyframes pulseRing {
  0% { box-shadow: 0 0 0 0 rgba(230, 50, 52, .42); }
  70% { box-shadow: 0 0 0 9px rgba(230, 50, 52, 0); }
  100% { box-shadow: 0 0 0 0 rgba(230, 50, 52, 0); }
}
@keyframes sheen { 0% { transform: translateX(-130%) skewX(-18deg); } 60%, 100% { transform: translateX(330%) skewX(-18deg); } }
@keyframes spinIn { from { opacity: 0; transform: rotate(-90deg) scale(.6); } to { opacity: 1; transform: none; } }
@keyframes drawerIn { from { transform: translateX(100%); } to { transform: none; } }
@keyframes dotBlink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }

/* ---------- AI assistant drawer ---------- */
.aidrawer { animation: drawerIn .34s var(--ease-spring) both; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: #9AA0A6; display: inline-block; animation: dotBlink 1.2s infinite; }

/* ---------- entrance choreography ---------- */
.reveal { animation: reveal .55s var(--ease-out) both; }
.reveal-scale { animation: revealScale .5s var(--ease-out) both; }

/* ---------- surfaces / cards / rows ---------- */
.surface {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 8px 24px rgba(16, 24, 40, .045);
}

/* unified gradient brand button */
.btn-primary { background: var(--brand-grad) !important; box-shadow: var(--shadow-brand) !important; }
.btn-primary:hover { filter: saturate(1.05) brightness(.97); }

.lift { transition: box-shadow .26s var(--ease-out), transform .26s var(--ease-out), border-color .22s ease; will-change: transform; }
.lift:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(16, 24, 40, .10); border-color: #E2E5EA; }

.kpi-card { position: relative; overflow: hidden; }
.kpi-card::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, .55) 50%, transparent 70%);
  transform: translateX(-130%); transition: none; pointer-events: none; opacity: 0;
}
.kpi-card:hover::before { animation: sheen 1.1s var(--ease-out); opacity: 1; }
.kpi-icon { transition: transform .3s var(--ease-spring); }
.kpi-card:hover .kpi-icon { transform: scale(1.1) rotate(-4deg); }

.rowh { transition: background .16s ease, box-shadow .2s ease; }
.rowh:hover { background: #FBFBFC; box-shadow: inset 3px 0 0 var(--brand); }

/* ---------- overlay / modal / toast ---------- */
.ov { animation: ovIn .26s ease both; -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.md { animation: mdIn .44s var(--ease-spring) both; }
.toast { animation: toastIn .5s var(--ease-spring) both; }
.step-anim { animation: fadeUp .34s var(--ease-out) both; }

/* ---------- sidebar nav ---------- */
.nav-item { position: relative; overflow: hidden; }
.nav-item::before {
  content: ""; position: absolute; left: 0; top: 50%; height: 0; width: 3px;
  background: var(--brand); border-radius: 0 3px 3px 0;
  transform: translateY(-50%); transition: height .28s var(--ease-spring);
}
.nav-item:not(.active):hover { background: #F3F4F6 !important; color: #1F2024 !important; }
.nav-item:not(.active):hover::before { height: 18px; }

/* ---------- primary button sheen ---------- */
.btn-shine { position: relative; overflow: hidden; }
.btn-shine > * { position: relative; z-index: 1; }
.btn-shine::after {
  content: ""; position: absolute; top: 0; left: 0; width: 45%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .35), transparent);
  transform: translateX(-130%) skewX(-18deg); pointer-events: none;
}
.btn-shine:hover::after { animation: sheen 1s var(--ease-out); }

/* ---------- stepper active pulse ---------- */
.step-pulse { animation: pulseRing 2.1s ease-out infinite; }

.seg { transition: all .18s var(--ease-out); }

/* ---------- native select (custom chevron) ---------- */
.sel {
  width: 100%; height: 44px; border: 1px solid #E4E6EA; border-radius: 10px;
  font-size: 14px; font-weight: 400; color: #1F2024; background: #fff; cursor: pointer;
  appearance: none; -webkit-appearance: none; -moz-appearance: none;
  box-shadow: var(--shadow-sm);
  transition: border-color .18s ease, box-shadow .18s ease;
}
.sel:hover { border-color: #C7CBD1; }
.sel:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3.5px rgba(230, 50, 52, .14);
}
.sel option { color: #1F2024; }

/* ---------- custom dropdown ---------- */
.dd-btn {
  width: 100%; height: 44px; display: flex; align-items: center; gap: 8px;
  border: 1px solid #E4E6EA; border-radius: 10px; background: #fff;
  padding: 0 12px 0 13px; font-size: 14px; color: #1F2024; cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: border-color .18s ease, box-shadow .18s ease;
}
.dd-btn:hover { border-color: #C7CBD1; }
.dd-btn[data-open="true"] { border-color: var(--brand); box-shadow: 0 0 0 3.5px rgba(230, 50, 52, .14); }
.dd-menu {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 70;
  background: #fff; border: 1px solid #ECEEF1; border-radius: 12px; padding: 6px;
  box-shadow: 0 18px 44px rgba(16, 24, 40, .16); max-height: 264px; overflow-y: auto;
  animation: ddIn .16s var(--ease-out);
}
@keyframes ddIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.dd-opt {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 11px; border-radius: 8px; font-size: 13.5px; color: #3A3F47;
  cursor: pointer; transition: background .12s ease, color .12s ease;
}
.dd-opt:hover { background: #F4F5F7; }
.dd-opt[data-sel="true"] { background: var(--brand-tint); color: var(--brand); font-weight: 600; }

/* ---------- dashboard layout ---------- */
.page-pad { overflow-x: clip; }
.dash-3 { display: grid; grid-template-columns: 1.12fr 1fr 1.12fr; grid-gap: 18px; gap: 18px; margin-bottom: 18px; }
.dash-2 { display: grid; grid-template-columns: 1fr 1.3fr; grid-gap: 18px; gap: 18px; margin-bottom: 18px; }
.gauge-grid { display: grid; grid-template-columns: repeat(2, 1fr); grid-gap: 10px; gap: 10px; place-items: center; }
.dash-card {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 8px 24px rgba(16, 24, 40, .045);
  transition: box-shadow .24s var(--ease-out), border-color .2s ease, transform .24s var(--ease-out);
}
.dash-3 > .dash-card, .dash-2 > .dash-card { overflow: hidden; }
.dash-card:hover { box-shadow: 0 16px 40px rgba(16, 24, 40, .10); border-color: #E2E5EA; transform: translateY(-2px); }

/* dashboard overview (contracts / invoices sections) */
.ov-split { display: grid; grid-template-columns: 300px 1fr; grid-gap: 16px; gap: 16px; margin-bottom: 18px; }
.ov-kpi { display: grid; grid-template-columns: repeat(2, 1fr); grid-gap: 16px; gap: 16px; }

/* sites sub-tab strip — hide the horizontal scrollbar but keep it scrollable */
.subtab-bar { scrollbar-width: none; }
.subtab-bar::-webkit-scrollbar { display: none; }

/* consistent radius for modal footer actions */
.modal-foot button { border-radius: 10px !important; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
.app-overlay { display: none; }
.hamburger { display: none; }

@media (max-width: 1200px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .card-grid { grid-template-columns: repeat(3, 1fr) !important; }
}

@media (max-width: 1024px) {
  .dash-3 { grid-template-columns: 1fr 1fr !important; }
  .bi-grid { grid-template-columns: 1fr !important; gap: 26px !important; }
  .bi-divider { display: none !important; }
  .card-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .feat-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .ov-split { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .app-sidebar {
    position: fixed !important; left: 0; top: 0; z-index: 60;
    transform: translateX(-106%); transition: transform .36s var(--ease-spring);
    box-shadow: 0 24px 70px rgba(0, 0, 0, .45);
  }
  .app-sidebar.open { transform: none; }
  .app-overlay {
    display: block; position: fixed; inset: 0; z-index: 55;
    background: rgba(10, 12, 16, .5); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
    animation: ovIn .25s ease both;
  }
  .hamburger { display: flex !important; }
  .dash-3, .dash-2 { grid-template-columns: 1fr !important; }
  .dash-card { padding: 16px 16px !important; }
  body { overflow-x: hidden; }
  .crumb-hide { display: none !important; }
  .page-pad { padding: 18px 16px 40px !important; }
  .topbar { padding: 0 14px !important; gap: 10px !important; }
  .topbar-search { width: auto !important; flex: 1 1; min-width: 0; }
  .card-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .feat-grid { grid-template-columns: 1fr 1fr !important; }
  .modal-wrap { padding: 0 !important; }
  .modal-shell {
    max-width: 100% !important; width: 100% !important;
    height: 100% !important; max-height: 100% !important; border-radius: 0 !important;
  }
  .modal-head, .modal-foot, .stepper-wrap, .modal-body { padding-left: 16px !important; padding-right: 16px !important; }
  .stepper-scroll { overflow-x: auto; padding-bottom: 4px; }
  .grid-2, .grid-3, .step3-top { grid-template-columns: 1fr !important; }
  .title-row { flex-direction: column; align-items: stretch !important; }
  .add-btn { width: 100%; justify-content: center; }
  .toolbar-row { flex-direction: column; align-items: stretch !important; gap: 12px !important; }
  .toolbar-row > div { justify-content: space-between; }
  .subtab-bar { padding-left: 16px !important; padding-right: 16px !important; }
  /* stack the title-row action buttons (Ask AI / New … / Download) full-width */
  .title-actions { width: 100%; }
  .title-actions > button { width: 100%; justify-content: center; }
}

@media (max-width: 540px) {
  .kpi-grid { grid-template-columns: 1fr 1fr !important; }
  .ov-kpi { grid-template-columns: 1fr !important; }
  .card-grid { grid-template-columns: 1fr !important; }
  .feat-grid { grid-template-columns: 1fr !important; }
  .step-label { display: none !important; }
  .modal-foot { flex-wrap: wrap; }
  .pager-row { flex-wrap: wrap; justify-content: space-between !important; gap: 12px !important; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

