:root {
  --primary: #0b68f7;
  --primary-700: #0754d1;
  --primary-50: #eef6ff;
  --navy: #0b1f4d;
  --navy-2: #102a63;
  --text: #10224f;
  --text-2: #536487;
  --text-3: #8290aa;
  --surface: #ffffff;
  --surface-2: #f8faff;
  --surface-3: #f2f6fd;
  --border: #e3e9f3;
  --border-strong: #d5deec;
  --success: #16be72;
  --success-50: #eafaf2;
  --warning: #f5a300;
  --warning-50: #fff7e5;
  --danger: #ff4d63;
  --danger-50: #fff0f2;
  --purple: #7457f5;
  --purple-50: #f1edff;
  --cyan: #0f9ca6;
  --shadow: 0 12px 36px rgba(16, 38, 82, 0.06);
  --shadow-sm: 0 4px 16px rgba(16, 38, 82, 0.05);
  --radius-xl: 18px;
  --radius-lg: 14px;
  --radius-md: 10px;
  --sidebar-width: 220px;
  --topbar-height: 94px;
  --font: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

[data-theme="dark"] {
  --text: #eaf0ff;
  --text-2: #aebada;
  --text-3: #7f8bac;
  --surface: #111a2f;
  --surface-2: #0c1427;
  --surface-3: #17233b;
  --border: #263553;
  --border-strong: #334563;
  --navy: #f1f5ff;
  --navy-2: #dfe8ff;
  --shadow: 0 12px 36px rgba(0, 0, 0, 0.2);
  --shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.18);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  background: var(--surface-2);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
img, svg, canvas { display: block; max-width: 100%; }
button { color: inherit; }

.app-shell { min-height: 100vh; }
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-width);
  background: var(--surface);
  border-right: 1px solid var(--border);
  z-index: 80;
  display: flex;
  flex-direction: column;
  transition: transform .24s ease, width .24s ease;
}
.sidebar-brand {
  height: 72px;
  display: flex;
  align-items: center;
  padding: 0 22px;
  border-bottom: 1px solid transparent;
}
.sidebar-brand img { width: 145px; }
.sidebar-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 2px 10px 16px;
  scrollbar-width: thin;
}
.nav-section { margin-top: 10px; }
.nav-label {
  padding: 10px 12px 7px;
  color: var(--text-3);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.nav-item {
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 12px;
  margin: 2px 0;
  border-radius: 9px;
  color: var(--text);
  font-size: 13px;
  transition: background .2s ease, color .2s ease, transform .2s ease;
  cursor: pointer;
}
.nav-item:hover { background: var(--surface-3); transform: translateX(2px); }
.nav-item.active {
  color: #fff;
  background: linear-gradient(135deg, #0a64ef, #1978ff);
  box-shadow: 0 8px 16px rgba(11, 104, 247, .18);
}
.nav-item.soft-active {
  color: var(--primary);
  background: var(--primary-50);
  font-weight: 600;
}
.nav-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.nav-arrow { margin-left: auto; width: 14px; height: 14px; }
.subnav {
  margin: 2px 0 8px;
  background: linear-gradient(180deg, rgba(11,104,247,.035), transparent);
  border-radius: 10px;
  padding: 3px;
}
.subnav a {
  display: block;
  padding: 7px 12px 7px 34px;
  color: var(--text-2);
  font-size: 12px;
  border-radius: 7px;
}
.subnav a:hover, .subnav a.active { background: rgba(11,104,247,.07); color: var(--primary); font-weight: 600; }
.sidebar-promo {
  margin: 8px 15px 14px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: linear-gradient(160deg, var(--surface), var(--surface-2));
  box-shadow: var(--shadow-sm);
}
.sidebar-promo strong { display: block; font-size: 12px; margin-bottom: 6px; }
.sidebar-promo p { margin: 0 0 12px; color: var(--text-2); font-size: 11px; }
.sidebar-footer {
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-3);
  font-size: 11px;
  border-top: 1px solid var(--border);
}

.main-shell { margin-left: var(--sidebar-width); min-height: 100vh; }
.topbar {
  height: var(--topbar-height);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 50;
}
.topbar-inner {
  width: 100%;
  padding: 0 28px;
  display: flex;
  align-items: center;
  gap: 22px;
}
.page-heading { min-width: 280px; }
.page-heading h1 { margin: 0; font-size: 23px; letter-spacing: -.02em; color: var(--navy); }
.page-heading p { margin: 4px 0 0; color: var(--text-2); font-size: 13px; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.search-trigger {
  width: 235px;
  height: 48px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 11px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  color: var(--text-3);
  cursor: pointer;
}
.search-trigger svg { width: 18px; }
.icon-button {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  display: grid;
  place-items: center;
  cursor: pointer;
  position: relative;
}
.icon-button:hover { background: var(--surface-3); }
.icon-button svg { width: 21px; height: 21px; stroke: var(--text-2); fill: none; stroke-width: 1.8; }
.notification-count {
  position: absolute;
  top: 1px;
  right: 0;
  min-width: 17px;
  height: 17px;
  border-radius: 20px;
  background: var(--danger);
  color: #fff;
  font-size: 9px;
  display: grid;
  place-items: center;
  border: 2px solid var(--surface);
}
.profile-button {
  min-width: 188px;
  height: 56px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  display: flex;
  align-items: center;
  padding: 0 12px;
  gap: 10px;
  cursor: pointer;
}
.avatar {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(145deg, #2a3d67, #8b9ab8);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.75);
}
.avatar.sm { width: 30px; height: 30px; flex-basis: 30px; font-size: 11px; }
.avatar.xs { width: 24px; height: 24px; flex-basis: 24px; font-size: 9px; }
.profile-copy { text-align: left; line-height: 1.2; flex: 1; }
.profile-copy strong { display: block; font-size: 12px; }
.profile-copy span { color: var(--text-2); font-size: 10px; }

.content { padding: 22px 28px 38px; }
.content.compact { padding-top: 16px; }
.content-max { max-width: 1680px; margin: 0 auto; }
.page-tools { display: flex; align-items: center; justify-content: flex-end; gap: 9px; margin-bottom: 13px; }

.btn {
  min-height: 38px;
  border-radius: 9px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 14px;
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
  transition: transform .17s ease, box-shadow .17s ease, border-color .17s ease, background .17s ease;
}
.btn:hover { transform: translateY(-1px); border-color: #b8c7df; box-shadow: var(--shadow-sm); }
.btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.btn-primary { color: #fff; background: linear-gradient(135deg, #0b65ef, #1678ff); border-color: transparent; box-shadow: 0 9px 18px rgba(11,104,247,.18); }
.btn-primary:hover { box-shadow: 0 12px 22px rgba(11,104,247,.25); }
.btn-ghost { background: transparent; }
.btn-soft { color: var(--primary); background: var(--primary-50); border-color: rgba(11,104,247,.14); }
.btn-danger { color: var(--danger); background: var(--danger-50); border-color: rgba(255,77,99,.16); }
.btn-sm { min-height: 34px; padding: 7px 11px; font-size: 11px; }
.btn-block { width: 100%; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.card-head {
  min-height: 50px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.card-head h2, .card-head h3 { margin: 0; font-size: 14px; color: var(--navy); }
.card-body { padding: 16px; }
.muted { color: var(--text-2); }
.muted-2 { color: var(--text-3); }
.small { font-size: 12px; }
.tiny { font-size: 10px; }

.pill, .status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 25px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}
.pill.blue, .status-pill.blue { color: var(--primary); background: var(--primary-50); }
.pill.green, .status-pill.green { color: #0b9c5a; background: var(--success-50); }
.pill.orange, .status-pill.orange { color: #c97d00; background: var(--warning-50); }
.pill.red, .status-pill.red { color: var(--danger); background: var(--danger-50); }
.pill.purple, .status-pill.purple { color: var(--purple); background: var(--purple-50); }

/* Dashboard */
.metric-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.metric-card { min-height: 160px; padding: 22px 18px; }
.metric-top { display: flex; gap: 16px; align-items: center; }
.metric-icon {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
}
.metric-icon svg { width: 25px; height: 25px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.metric-icon.blue { color: var(--primary); background: var(--primary-50); }
.metric-icon.green { color: var(--success); background: var(--success-50); }
.metric-icon.purple { color: var(--purple); background: var(--purple-50); }
.metric-icon.orange { color: var(--warning); background: var(--warning-50); }
.metric-icon.red { color: var(--danger); background: var(--danger-50); }
.metric-name { color: var(--text-2); font-size: 11px; margin-bottom: 7px; }
.metric-value { font-size: 25px; line-height: 1; font-weight: 700; color: var(--navy); letter-spacing: -.02em; }
.metric-trend { margin-top: 19px; font-size: 12px; font-weight: 600; }
.metric-trend.up { color: var(--success); }
.metric-trend.down { color: var(--danger); }
.metric-sub { margin-top: 9px; color: var(--text-2); font-size: 11px; }

.dashboard-grid { display: grid; grid-template-columns: 1.45fr 1.16fr 1fr; gap: 12px; margin-top: 12px; }
.dashboard-grid.bottom { grid-template-columns: 1.35fr 1.08fr 1.05fr; }
.panel { min-height: 305px; overflow: hidden; }
.panel .card-body { padding-top: 8px; }
.select-mini {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  border-radius: 8px;
  height: 30px;
  padding: 0 9px;
  font-size: 10px;
}
.chart-wrap { position: relative; height: 235px; }
.chart-wrap canvas { width: 100% !important; height: 100% !important; }
.chart-legend { display: flex; gap: 18px; font-size: 10px; color: var(--text-2); margin: 4px 0 5px 47px; }
.legend-dot { width: 6px; height: 6px; display: inline-block; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.donut-grid { display: grid; grid-template-columns: 1fr 1.04fr; align-items: center; min-height: 232px; }
.donut-wrap { position: relative; height: 200px; }
.donut-center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; pointer-events: none; }
.donut-center strong { font-size: 22px; color: var(--navy); }
.donut-center span { font-size: 10px; color: var(--text-2); }
.legend-list { display: grid; gap: 18px; }
.legend-row { display: grid; grid-template-columns: 10px 1fr auto auto; align-items: center; gap: 8px; font-size: 11px; }
.legend-row .dot { width: 8px; height: 8px; border-radius: 50%; }
.legend-row strong { font-size: 12px; }

.task-list, .activity-list, .project-list, .source-list { display: grid; gap: 13px; }
.task-row { display: grid; grid-template-columns: 8px 1fr auto; gap: 11px; align-items: start; padding: 3px 0; }
.task-row .dot { width: 7px; height: 7px; border-radius: 50%; margin-top: 5px; }
.task-row strong { display: block; font-size: 12px; margin-bottom: 2px; }
.task-row span { display: block; color: var(--text-2); font-size: 10px; }
.project-row { display: grid; grid-template-columns: 34px minmax(130px, 1fr) auto minmax(120px, .75fr) 38px; align-items: center; gap: 10px; }
.project-logo { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-size: 18px; }
.project-copy strong { display: block; font-size: 11px; }
.project-copy span { display: block; color: var(--text-2); font-size: 9px; margin-top: 2px; }
.progress { height: 6px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.progress span { display: block; height: 100%; border-radius: inherit; background: var(--primary); }
.progress.green span { background: var(--success); }
.progress.orange span { background: var(--warning); }
.progress.red span { background: var(--danger); }
.progress-label { font-size: 9px; color: var(--text-2); margin-bottom: 5px; }
.source-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.source-row strong { font-size: 11px; }
.source-value { font-size: 12px; font-weight: 700; }
.source-progress { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 31px; align-items: center; gap: 8px; }
.activity-row { display: grid; grid-template-columns: 28px 1fr; gap: 10px; position: relative; }
.activity-row:not(:last-child)::after { content: ""; position: absolute; left: 13px; top: 29px; bottom: -12px; width: 1px; background: var(--border); }
.activity-icon { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; color: #fff; z-index: 1; }
.activity-icon svg { width: 15px; height: 15px; stroke: currentColor; fill: none; }
.activity-copy { padding-top: 1px; }
.activity-copy strong { font-size: 10.5px; }
.activity-copy span { display: block; color: var(--text-2); font-size: 9.5px; margin-top: 2px; }

/* Detail page */
.detail-topbar { height: 96px; }
.detail-topbar .topbar-inner { align-items: center; }
.detail-title-wrap { display: flex; align-items: flex-start; gap: 12px; min-width: 0; }
.back-button { margin-top: 3px; width: 34px; height: 34px; }
.breadcrumbs { color: var(--text-2); font-size: 11px; margin-bottom: 6px; }
.detail-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.detail-title h1 { margin: 0; font-size: 21px; color: var(--navy); }
.detail-meta { color: var(--text-2); font-size: 12px; margin-top: 3px; }
.detail-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.vertical-separator { width: 1px; height: 36px; background: var(--border); margin: 0 5px; }

.quote-layout { display: grid; grid-template-columns: minmax(0, 1fr) 285px; gap: 16px; align-items: start; }
.quote-main { min-width: 0; }
.quote-info-strip { display: grid; grid-template-columns: 1.25fr 1.25fr 1fr .78fr .55fr; min-height: 135px; padding: 18px 20px; }
.info-cell { padding: 0 20px; border-right: 1px solid var(--border); min-width: 0; }
.info-cell:first-child { padding-left: 0; }
.info-cell:last-child { border-right: 0; padding-right: 0; }
.info-label { font-size: 10px; color: var(--text-2); margin-bottom: 11px; }
.info-person { display: flex; gap: 10px; align-items: flex-start; }
.company-mark { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--border); display: grid; place-items: center; color: var(--primary); background: var(--surface); }
.company-mark svg { width: 22px; height: 22px; fill: var(--primary); }
.info-value { font-size: 12px; min-width: 0; }
.info-value strong { display: block; color: var(--navy); margin-bottom: 4px; }
.info-value span, .info-value a { display: block; color: var(--text-2); font-size: 11px; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.probability { margin-top: 12px; }
.probability .progress { margin-top: 8px; }

.tab-card { margin-top: 16px; overflow: hidden; }
.tabs { display: flex; gap: 4px; padding: 0 12px; border-bottom: 1px solid var(--border); overflow-x: auto; }
.tab-button { border: 0; background: transparent; padding: 15px 13px 13px; color: var(--text-2); font-size: 11px; cursor: pointer; white-space: nowrap; border-bottom: 2px solid transparent; }
.tab-button.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.tab-content-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 16px 10px; gap: 12px; }
.tab-content-head h3 { margin: 0; font-size: 13px; }
.inline-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.table-wrap { overflow-x: auto; padding: 0 16px 16px; }
.data-table { width: 100%; border-collapse: collapse; min-width: 820px; }
.data-table th { height: 38px; background: var(--surface-2); color: var(--text-2); font-size: 10px; font-weight: 500; text-align: left; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.data-table th:first-child { border-left: 1px solid var(--border); border-radius: 8px 0 0 0; padding-left: 14px; }
.data-table th:last-child { border-right: 1px solid var(--border); border-radius: 0 8px 0 0; }
.data-table td { padding: 13px 10px; border-bottom: 1px solid var(--border); font-size: 11px; vertical-align: middle; }
.data-table td:first-child { padding-left: 14px; border-left: 1px solid var(--border); }
.data-table td:last-child { border-right: 1px solid var(--border); }
.item-name { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--navy); }
.item-icon { width: 30px; height: 30px; flex: 0 0 30px; border-radius: 7px; display: grid; place-items: center; color: #fff; }
.item-icon svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.7; }
.item-description { color: var(--text-2); max-width: 240px; }
.row-menu { width: 30px; height: 30px; border: 0; background: transparent; border-radius: 7px; cursor: pointer; }
.row-menu:hover { background: var(--surface-3); }
.add-row-zone { margin-top: 10px; min-height: 46px; border: 1px dashed #9fc2ff; background: rgba(11,104,247,.018); border-radius: 7px; display: flex; align-items: center; justify-content: center; color: var(--primary); font-size: 11px; cursor: pointer; }
.add-row-zone:hover { background: rgba(11,104,247,.05); }

.quote-bottom-grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: 16px; margin-top: 16px; }
.timeline-card, .notes-card { min-height: 195px; padding: 15px; }
.timeline-card h3, .notes-card h3 { margin: 0 0 18px; font-size: 13px; }
.timeline { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; margin-top: 24px; }
.timeline-step { position: relative; text-align: center; padding-top: 23px; min-width: 0; }
.timeline-step::before { content: ""; position: absolute; left: 0; right: 0; top: 8px; height: 2px; background: var(--border); }
.timeline-step:first-child::before { left: 50%; }
.timeline-step:last-child::before { right: 50%; }
.timeline-dot { position: absolute; width: 18px; height: 18px; top: 0; left: calc(50% - 9px); border-radius: 50%; background: #7080a6; border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--border); color: #fff; display: grid; place-items: center; font-size: 8px; z-index: 1; }
.timeline-step.active .timeline-dot { background: var(--primary); }
.timeline-step strong { display: block; font-size: 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.timeline-step span { display: block; color: var(--text-2); font-size: 8.5px; margin-top: 4px; }
.notes-list { margin: 0; padding-left: 18px; color: var(--text-2); font-size: 10px; display: grid; gap: 10px; }
.notes-list li::marker { color: var(--primary); }

.quote-aside { display: grid; gap: 14px; }
.summary-card { border: 0; background: linear-gradient(145deg, #0a2f72, #003e94); color: #fff; box-shadow: 0 14px 30px rgba(4, 51, 117, .2); }
.summary-card .card-body { padding: 19px 16px 17px; }
.summary-card h3 { margin: 0 0 17px; font-size: 15px; }
.summary-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 0; font-size: 11px; color: rgba(255,255,255,.82); }
.summary-row strong { color: #fff; font-size: 11px; }
.summary-row.discount strong { color: #43e39b; }
.summary-divider { border-top: 1px solid rgba(255,255,255,.15); margin: 3px 0; }
.summary-total { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding-top: 13px; margin-top: 4px; border-top: 1px solid rgba(255,255,255,.15); }
.summary-total span { font-size: 11px; }
.summary-total strong { font-size: 22px; }
.aside-card { padding: 15px 13px; }
.aside-card h3 { margin: 0 0 13px; font-size: 13px; }
.form-select, .form-input, .form-textarea {
  width: 100%;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  border-radius: 8px;
  min-height: 38px;
  padding: 8px 11px;
  outline: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(11,104,247,.1); }
.form-textarea { resize: vertical; min-height: 90px; }
.status-flow { display: grid; grid-template-columns: repeat(5, 1fr); margin-top: 19px; }
.status-node { text-align: center; position: relative; padding-top: 24px; color: var(--text-2); font-size: 8px; }
.status-node::before { content: ""; position: absolute; left: 0; right: 0; top: 8px; height: 2px; background: var(--border); }
.status-node:first-child::before { left: 50%; }
.status-node:last-child::before { right: 50%; }
.status-node i { position: absolute; top: 0; left: calc(50% - 8px); width: 16px; height: 16px; border-radius: 50%; background: #7382a3; border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--border); z-index: 1; }
.status-node.active { color: var(--primary); font-weight: 600; }
.status-node.active i { background: var(--primary); }
.key-value-list { display: grid; gap: 10px; }
.key-value-row { display: flex; justify-content: space-between; gap: 10px; font-size: 10px; color: var(--text-2); }
.key-value-row strong { color: var(--text); text-align: right; font-weight: 500; }
.quick-list { display: grid; gap: 10px; }
.quick-action { display: flex; align-items: center; gap: 9px; color: var(--primary); font-size: 11px; cursor: pointer; }
.quick-action svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 1.7; }
.quick-action.danger { color: var(--danger); }

/* list pages */
.section-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.section-header h1 { margin: 0; font-size: 24px; }
.section-header p { margin: 5px 0 0; color: var(--text-2); }
.filters-card { padding: 14px; display: grid; grid-template-columns: 1.5fr repeat(3, minmax(140px, .55fr)) auto; gap: 10px; margin-bottom: 14px; }
.search-field { position: relative; }
.search-field svg { position: absolute; left: 12px; top: 11px; width: 16px; height: 16px; stroke: var(--text-3); fill: none; }
.search-field input { padding-left: 38px; }
.list-card { overflow: hidden; }
.list-card .data-table { min-width: 980px; }
.list-card .table-wrap { padding: 0; }
.list-card .data-table th:first-child, .list-card .data-table td:first-child { border-left: 0; padding-left: 18px; }
.list-card .data-table th:last-child, .list-card .data-table td:last-child { border-right: 0; padding-right: 18px; }
.customer-cell { display: flex; align-items: center; gap: 10px; }
.pagination { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-top: 1px solid var(--border); color: var(--text-2); font-size: 11px; }
.page-buttons { display: flex; gap: 5px; }
.page-btn { width: 32px; height: 32px; border: 1px solid var(--border); background: var(--surface); border-radius: 7px; display: grid; place-items: center; cursor: pointer; }
.page-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* modal, dropdowns, command */
.dropdown { position: relative; }
.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 210px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 11px;
  box-shadow: var(--shadow);
  padding: 7px;
  display: none;
  z-index: 120;
}
.dropdown.open .dropdown-menu { display: block; animation: pop .15s ease; }
.dropdown-item { width: 100%; border: 0; background: transparent; color: var(--text); display: flex; align-items: center; gap: 9px; padding: 9px 10px; border-radius: 7px; cursor: pointer; text-align: left; font-size: 11px; }
.dropdown-item:hover { background: var(--surface-3); }
.dropdown-item svg { width: 15px; height: 15px; stroke: currentColor; fill: none; }
.dropdown-item.danger { color: var(--danger); }

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 15, 38, .48);
  backdrop-filter: blur(3px);
  z-index: 300;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-backdrop.open { display: flex; }
.modal {
  width: min(560px, 100%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 30px 70px rgba(4, 18, 48, .25);
  animation: modalIn .2s ease;
}
.modal-head { min-height: 58px; padding: 0 18px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--border); }
.modal-head h3 { margin: 0; font-size: 15px; }
.modal-body { padding: 18px; }
.modal-footer { padding: 14px 18px; display: flex; justify-content: flex-end; gap: 8px; border-top: 1px solid var(--border); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.form-group { display: grid; gap: 6px; }
.form-group.full { grid-column: 1 / -1; }
.form-group label { font-size: 10px; color: var(--text-2); font-weight: 600; }

.command-dialog { width: min(620px, 100%); align-self: flex-start; margin-top: 10vh; }
.command-input { display: flex; align-items: center; gap: 10px; padding: 12px 15px; border-bottom: 1px solid var(--border); }
.command-input svg { width: 20px; stroke: var(--text-3); fill: none; }
.command-input input { flex: 1; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 14px; }
.command-results { padding: 8px; max-height: 330px; overflow-y: auto; }
.command-result { display: flex; align-items: center; gap: 11px; padding: 10px; border-radius: 8px; cursor: pointer; }
.command-result:hover { background: var(--surface-3); }
.command-result .result-icon { width: 30px; height: 30px; border-radius: 8px; background: var(--primary-50); color: var(--primary); display: grid; place-items: center; }
.command-result strong { display: block; font-size: 11px; }
.command-result span { display: block; color: var(--text-2); font-size: 9px; margin-top: 2px; }
.command-kbd { margin-left: auto; border: 1px solid var(--border); background: var(--surface-2); border-radius: 5px; padding: 2px 6px; font-size: 9px; color: var(--text-3); }

.toast-stack { position: fixed; right: 22px; bottom: 22px; z-index: 500; display: grid; gap: 8px; }
.toast { min-width: 280px; max-width: 380px; padding: 12px 14px; border-radius: 10px; background: var(--navy); color: var(--surface); box-shadow: var(--shadow); display: flex; align-items: center; gap: 9px; animation: toastIn .22s ease; }
.toast.success { background: #087847; color: #fff; }
.toast.error { background: #a5293d; color: #fff; }
.toast svg { width: 17px; height: 17px; stroke: currentColor; fill: none; }

.mobile-menu { display: none; }
.hide { display: none !important; }

@keyframes pop { from { transform: translateY(-5px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes modalIn { from { transform: translateY(10px) scale(.985); opacity: 0; } to { transform: translateY(0) scale(1); opacity: 1; } }
@keyframes toastIn { from { transform: translateX(20px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

@media (max-width: 1320px) {
  .metric-grid { grid-template-columns: repeat(3, 1fr); }
  .dashboard-grid, .dashboard-grid.bottom { grid-template-columns: 1fr 1fr; }
  .dashboard-grid .panel:last-child, .dashboard-grid.bottom .panel:last-child { grid-column: 1 / -1; }
  .quote-layout { grid-template-columns: 1fr 270px; }
  .quote-info-strip { grid-template-columns: 1.2fr 1.2fr 1fr; row-gap: 20px; }
  .info-cell:nth-child(3) { border-right: 0; }
  .info-cell:nth-child(4), .info-cell:nth-child(5) { grid-column: span 1; }
}

@media (max-width: 1080px) {
  :root { --sidebar-width: 200px; }
  .topbar-inner, .content { padding-left: 20px; padding-right: 20px; }
  .search-trigger { width: 190px; }
  .profile-button { min-width: 150px; }
  .quote-layout { grid-template-columns: 1fr; }
  .quote-aside { grid-template-columns: repeat(2, 1fr); }
  .summary-card { grid-row: span 2; }
  .filters-card { grid-template-columns: 1fr 1fr 1fr; }
  .filters-card .search-field { grid-column: span 2; }
}

@media (max-width: 860px) {
  :root { --sidebar-width: 220px; --topbar-height: auto; }
  .sidebar { transform: translateX(-100%); box-shadow: 20px 0 50px rgba(0,0,0,.18); }
  body.sidebar-open .sidebar { transform: translateX(0); }
  body.sidebar-open::after { content: ""; position: fixed; inset: 0; background: rgba(5, 15, 38, .42); z-index: 70; }
  .main-shell { margin-left: 0; }
  .topbar { min-height: 78px; }
  .topbar-inner { padding-top: 11px; padding-bottom: 11px; flex-wrap: wrap; gap: 11px; }
  .mobile-menu { display: grid; }
  .page-heading { min-width: 0; flex: 1; }
  .page-heading h1 { font-size: 20px; }
  .page-heading p { display: none; }
  .topbar-actions { margin-left: 0; width: 100%; }
  .search-trigger { flex: 1; width: auto; }
  .profile-button { min-width: 0; width: 52px; padding: 0 8px; }
  .profile-copy, .profile-button > svg { display: none; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid, .dashboard-grid.bottom { grid-template-columns: 1fr; }
  .dashboard-grid .panel:last-child, .dashboard-grid.bottom .panel:last-child { grid-column: auto; }
  .quote-bottom-grid { grid-template-columns: 1fr; }
  .detail-topbar .topbar-inner { flex-wrap: nowrap; overflow-x: auto; }
  .detail-title-wrap { flex: 1; }
  .detail-actions .btn span { display: none; }
  .detail-actions .btn { width: 38px; padding: 0; }
  .detail-actions .profile-button { display: none; }
  .quote-info-strip { grid-template-columns: 1fr 1fr; }
  .info-cell { border-right: 0; border-bottom: 1px solid var(--border); padding: 0 12px 14px 0; }
  .info-cell:nth-last-child(-n+2) { border-bottom: 0; }
  .quote-aside { grid-template-columns: 1fr 1fr; }
  .filters-card { grid-template-columns: 1fr 1fr; }
  .filters-card .search-field { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
  .content { padding: 15px 12px 28px; }
  .topbar-inner { padding-left: 12px; padding-right: 12px; }
  .metric-grid { grid-template-columns: 1fr; }
  .metric-card { min-height: 135px; }
  .dashboard-grid { margin-top: 10px; }
  .donut-grid { grid-template-columns: 1fr; }
  .project-row { grid-template-columns: 34px 1fr auto; }
  .project-row > :nth-child(4), .project-row > :nth-child(5) { grid-column: 2 / -1; }
  .quote-info-strip { grid-template-columns: 1fr; padding: 15px; }
  .info-cell, .info-cell:first-child, .info-cell:last-child { padding: 0 0 14px; margin-bottom: 14px; border-bottom: 1px solid var(--border); }
  .info-cell:last-child { border-bottom: 0; margin-bottom: 0; }
  .tab-content-head { align-items: flex-start; flex-direction: column; }
  .quote-aside { grid-template-columns: 1fr; }
  .summary-card { grid-row: auto; }
  .timeline { overflow-x: auto; grid-template-columns: repeat(5, minmax(90px, 1fr)); padding-bottom: 8px; }
  .filters-card { grid-template-columns: 1fr; }
  .filters-card .search-field { grid-column: auto; }
  .section-header { flex-direction: column; }
  .form-grid { grid-template-columns: 1fr; }
  .form-group.full { grid-column: auto; }
  .toast-stack { right: 12px; left: 12px; bottom: 12px; }
  .toast { min-width: 0; width: 100%; }
}

@media print {
  .sidebar, .topbar, .page-tools, .detail-actions, .quote-aside .aside-card, .tab-card .tabs, .inline-actions, .add-row-zone, .row-menu { display: none !important; }
  body, .main-shell, .content { background: #fff !important; margin: 0 !important; padding: 0 !important; }
  .quote-layout { display: block; }
  .card { box-shadow: none; border-color: #dce3ec; break-inside: avoid; }
  .quote-aside { display: block; margin-top: 14px; }
  .summary-card { color: #111; background: #f3f6fb !important; border: 1px solid #dce3ec; box-shadow: none; }
  .summary-card * { color: #111 !important; }
  .tab-panel { display: none !important; }
  #panel-content { display: block !important; }
}
.quick-action {
  border: 0;
  background: transparent;
  padding: 0;
  text-align: left;
  font-family: inherit;
}

/* ── Ürün kataloğu ── */
.sector-hero {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 18px;
  margin-bottom: 18px;
}

.sector-hero-copy {
  padding: 28px 30px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #0b1f4d 0%, #12356f 55%, #0b68f7 100%);
  color: #fff;
  box-shadow: var(--shadow);
}

.sector-hero-copy .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: rgba(255,255,255,.72);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.sector-hero-copy h2 {
  margin: 0 0 12px;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.12;
  color: #fff;
}

.sector-hero-copy p {
  margin: 0;
  max-width: 620px;
  color: rgba(255,255,255,.82);
  font-size: 14px;
  line-height: 1.65;
}

.sector-hero-stats {
  display: grid;
  gap: 12px;
}

.sector-stat {
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.sector-stat strong {
  display: block;
  margin-bottom: 4px;
  font-size: 24px;
  color: var(--navy);
}

.sector-stat span {
  color: var(--text-2);
  font-size: 12px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.product-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.product-card:hover {
  transform: translateY(-3px);
  border-color: rgba(11,104,247,.28);
  box-shadow: var(--shadow);
}

.product-card-head {
  padding: 22px 22px 0;
}

.product-icon {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  margin-bottom: 16px;
  border-radius: 14px;
  color: #fff;
}

.product-icon svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  fill: none;
}

.product-icon.blue { background: linear-gradient(135deg, #0b68f7, #3d8dff); }
.product-icon.navy { background: linear-gradient(135deg, #0b1f4d, #274777); }
.product-icon.green { background: linear-gradient(135deg, #0d9a5c, #16be72); }
.product-icon.purple { background: linear-gradient(135deg, #5a3fd6, #7b61ff); }

.product-card-head h3 {
  margin: 0 0 8px;
  font-size: 22px;
  color: var(--navy);
}

.product-card-head p {
  margin: 0;
  color: var(--text-2);
  font-size: 13px;
  line-height: 1.6;
}

.product-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}

.product-tag {
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--primary-50);
  color: var(--primary);
  font-size: 11px;
  font-weight: 700;
}

.product-card-body {
  flex: 1;
  padding: 18px 22px;
}

.feature-checklist {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.feature-checklist li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--text-2);
  font-size: 12px;
  line-height: 1.5;
}

.feature-checklist li svg {
  width: 16px;
  height: 16px;
  flex: none;
  margin-top: 1px;
  stroke: var(--success);
}

.product-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 22px 22px;
  border-top: 1px solid var(--border);
}

.product-price {
  display: grid;
  gap: 2px;
}

.product-price small {
  color: var(--text-3);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.product-price strong {
  color: var(--navy);
  font-size: 20px;
}

.bundle-card {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 0;
  border: 1px solid rgba(11,104,247,.22);
  background: linear-gradient(180deg, rgba(11,104,247,.05), var(--surface));
}

.bundle-card .product-card-head,
.bundle-card .product-card-body {
  grid-column: 1;
}

.bundle-card .bundle-visual {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: stretch;
}

.bundle-card .product-card-foot {
  grid-column: 1 / -1;
  margin: 0 22px 22px;
  padding: 16px 0 0;
  border-top: 1px solid var(--border);
}

.bundle-card .product-card-body {
  padding-top: 22px;
}

.bundle-visual {
  display: grid;
  place-items: center;
  padding: 24px;
  border-left: 1px solid var(--border);
  background: radial-gradient(circle at 30% 20%, rgba(11,104,247,.12), transparent 55%), var(--surface-2);
}

.bundle-stack {
  display: grid;
  gap: 10px;
  width: min(100%, 280px);
}

.bundle-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  font-size: 12px;
  font-weight: 700;
  color: var(--navy);
}

.compare-table-wrap { overflow: auto; }

.compare-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}

.compare-table th,
.compare-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  font-size: 12px;
}

.compare-table th {
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.compare-table td:first-child {
  color: var(--navy);
  font-weight: 700;
}

.compare-yes { color: var(--success); font-weight: 800; }
.compare-no { color: var(--text-3); }

.product-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 16px;
  align-items: start;
}

.product-main { display: grid; gap: 16px; }

.product-preview {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.product-preview-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}

.product-preview-bar i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #d5dee8;
}

.product-preview-bar i:nth-child(1) { background: #ff5f57; }
.product-preview-bar i:nth-child(2) { background: #febc2e; }
.product-preview-bar i:nth-child(3) { background: #28c840; }

.product-preview-body {
  padding: 22px;
  background: linear-gradient(180deg, #f7faff, #fff);
}

.preview-mock {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 14px;
  min-height: 260px;
}

.preview-sidebar {
  display: grid;
  gap: 8px;
  align-content: start;
  padding: 12px;
  border-radius: 12px;
  background: #0b1f4d;
}

.preview-sidebar span {
  height: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.18);
}

.preview-sidebar span:first-child {
  width: 70%;
  height: 12px;
  margin-bottom: 6px;
  background: rgba(255,255,255,.42);
}

.preview-content {
  display: grid;
  gap: 10px;
  align-content: start;
}

.preview-line {
  height: 10px;
  border-radius: 999px;
  background: #e5edf7;
}

.preview-line.w60 { width: 60%; }
.preview-line.w80 { width: 80%; }
.preview-line.w40 { width: 40%; }

.preview-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 8px;
}

.preview-card {
  height: 64px;
  border-radius: 10px;
  border: 1px solid #dbe5f2;
  background: #fff;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.pricing-card {
  position: relative;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.pricing-card.featured {
  border-color: rgba(11,104,247,.35);
  box-shadow: 0 16px 40px rgba(11,104,247,.12);
}

.pricing-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
}

.pricing-card h4 {
  margin: 0 0 6px;
  font-size: 18px;
  color: var(--navy);
}

.pricing-card .price {
  margin: 12px 0 16px;
  font-size: 28px;
  font-weight: 800;
  color: var(--navy);
}

.pricing-card .price small {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-3);
}

.pricing-card ul {
  display: grid;
  gap: 8px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
}

.pricing-card li {
  display: flex;
  gap: 8px;
  color: var(--text-2);
  font-size: 12px;
}

.pricing-card li::before {
  content: "✓";
  color: var(--success);
  font-weight: 800;
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.module-card {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-2);
}

.module-card strong {
  display: block;
  margin-bottom: 6px;
  color: var(--navy);
  font-size: 13px;
}

.module-card p {
  margin: 0;
  color: var(--text-2);
  font-size: 12px;
  line-height: 1.55;
}

.product-aside { display: grid; gap: 12px; }

.product-summary-card {
  padding: 20px;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, #0b1f4d, #12356f);
  color: #fff;
}

.product-summary-card h3 {
  margin: 0 0 8px;
  color: #fff;
  font-size: 18px;
}

.product-summary-card p {
  margin: 0 0 16px;
  color: rgba(255,255,255,.78);
  font-size: 12px;
  line-height: 1.6;
}

.product-kpi-list {
  display: grid;
  gap: 10px;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}

.product-kpi-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255,255,255,.12);
  font-size: 12px;
}

.product-kpi-list li span { color: rgba(255,255,255,.68); }
.product-kpi-list li strong { color: #fff; }

.faq-grid {
  display: grid;
  gap: 10px;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  overflow: hidden;
}

.faq-question {
  display: flex;
  width: 100%;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
}

.faq-answer {
  display: none;
  padding: 0 16px 14px;
  color: var(--text-2);
  font-size: 12px;
  line-height: 1.6;
}

.faq-item.is-open .faq-answer { display: block; }

@media (max-width: 1080px) {
  .sector-hero, .product-grid, .bundle-card, .product-layout, .pricing-grid, .module-grid {
    grid-template-columns: 1fr;
  }

  .bundle-visual { border-left: 0; border-top: 1px solid var(--border); }
  .product-aside { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .product-aside, .preview-mock, .preview-cards { grid-template-columns: 1fr; }
  .product-card-foot { flex-direction: column; align-items: stretch; }
}
