/* === Proposefort 2025 (Taupe/Beige/Gray) === */
:root {
  --sidebar-w: 220px;
  --font: 'Open Sans', system-ui, -apple-system, sans-serif;

  /* Palette */
  --bg: #f7f6f4;
  --card: #ffffff;
  --border: #e7e3dd;
  --surface-muted: #f3efe8;

  /* Neutrals */
  --ink-900: #2f2d2a;
  --ink-700: #5a5753;
  --ink-500: #8c877f;

  /* Accents (no blue) */
  --accent: #b8a48b;        /* taupe */
  --accent-strong: #a79278; /* hover */
  --accent-contrast: #2f2d2a;

  /* Sidebar */
  --sidebar: #ffffff;
  --sidebar-text: #3f3b36;
  --sidebar-hover: #EFEAE3;

  /* Status */
  --success: #2ea366;
  --danger: #d24a3a;
}

/* === Base === */
html, body { height: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink-900);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.app-body{
  background:
    radial-gradient(circle at 12% 18%, rgba(243, 238, 232, 0.9), transparent 40%),
    radial-gradient(circle at 86% 12%, rgba(231, 227, 221, 0.7), transparent 35%),
    var(--bg);
}

a { color: var(--accent-strong); text-decoration: none; }
a:hover { text-decoration: underline; }

/* === Deal label pills === */
.deal-label-control {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.deal-label-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.12rem 0.55rem;
  border: 1px solid #e2e8f0;
  border-radius: 9999px;
  background: #ffffff;
  color: #6b7280;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.deal-label-pill::after {
  content: " ▾";
}

.deal-label-pill.deal-label--hot {
  border-color: #fecaca;
  background: #fef2f2;
  color: #b91c1c;
}

.deal-label-pill.deal-label--warm {
  border-color: #fde68a;
  background: #fffbeb;
  color: #b45309;
}

.deal-label-pill.deal-label--cold {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

.deal-label-pill.deal-label--none {
  border-color: #e2e8f0;
  background: #ffffff;
  color: #6b7280;
}

.deal-label-menu {
  position: absolute;
  left: 0;
  top: 100%;
  z-index: 10;
  margin-top: 0.35rem;
  min-width: 12rem;
  padding: 0.35rem;
  border-radius: 0.75rem;
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.4);
  box-shadow: 0 18px 30px rgba(15, 23, 42, 0.12);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.deal-label-option {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.12rem 0.55rem;
  border: 1px solid #e2e8f0;
  border-radius: 9999px;
  background: #ffffff;
  color: #6b7280;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.deal-label-option.deal-label--hot {
  border-color: #fecaca;
  background: #fef2f2;
  color: #b91c1c;
}

.deal-label-option.deal-label--warm {
  border-color: #fde68a;
  background: #fffbeb;
  color: #b45309;
}

.deal-label-option.deal-label--cold {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

.deal-label-option.deal-label--none {
  border-color: #e2e8f0;
  background: #ffffff;
  color: #6b7280;
}

/* === Login page === */
.login-body {
  min-height: 100vh;
  background: radial-gradient(circle at 10% 10%, rgba(224, 229, 226, 0.8), transparent 45%),
    radial-gradient(circle at 90% 0%, rgba(214, 205, 194, 0.7), transparent 40%),
    #f4f2ee;
  font-family: "Sora", var(--font);
}

.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 0.9fr);
  gap: 0;
  padding: 3rem;
}

.portal-shell .login-shell {
  grid-template-columns: minmax(0, 360px) minmax(0, 1fr);
}

.portal-shell .login-panel {
  align-items: flex-start;
}

.portal-shell .login-panel__inner {
  width: 100%;
  max-width: 720px;
  margin: 0;
  padding-top: 0.5rem;
  padding-left: 2.25rem;
}

.portal-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 1rem 0;
}

.portal-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  color: #1f2937;
}

.portal-brand__mark {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: linear-gradient(135deg, #f2c7a1, #cdb4a4);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5);
}

.portal-nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.portal-nav__link {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  color: #4b5563;
  text-decoration: none;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.35);
}

.portal-nav__link:hover,
.portal-nav__link:focus {
  color: #1f2937;
  border-color: rgba(31, 41, 55, 0.08);
  background: rgba(255, 255, 255, 0.7);
}

.portal-nav__link.is-active {
  color: #1f2937;
  font-weight: 600;
  background: #ffffff;
  border-color: rgba(31, 41, 55, 0.12);
}

.portal-nav__link--button {
  width: 100%;
  border: none;
  background: none;
  text-align: left;
}

.portal-visual {
  position: relative;
  border-radius: 1.5rem;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(24, 32, 28, 0.18);
  min-height: 260px;
}

.portal-visual__image {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(120deg, rgba(22, 28, 25, 0.25), rgba(22, 28, 25, 0)),
    url("/storage/img/foto-login.jpg");
  background-size: cover;
  background-position: center;
  transform: scale(1.02);
  animation: loginFloat 1.2s ease-out both;
}

.login-visual {
  position: relative;
  border-radius: 2rem;
  overflow: hidden;
  box-shadow: 0 30px 60px rgba(24, 32, 28, 0.2);
  margin-right: 2rem;
}

.login-visual__image {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(120deg, rgba(22, 28, 25, 0.25), rgba(22, 28, 25, 0)),
    url("/storage/img/foto-login.jpg");
  background-size: cover;
  background-position: center;
  transform: scale(1.02);
  animation: loginFloat 1.2s ease-out both;
}

.login-visual__credit {
  position: absolute;
  left: 1.5rem;
  bottom: 1.5rem;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  background: rgba(24, 28, 26, 0.55);
  color: #f5f4f1;
  font-size: 0.7rem;
  letter-spacing: 0.02em;
}

.login-panel {
  display: flex;
  align-items: center;
}

.login-panel__inner {
  width: min(420px, 100%);
  margin: 0 auto;
  padding: 0.5rem 0;
  animation: loginRise 0.9s ease-out both;
}

.login-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
  font-weight: 600;
  color: #1f2422;
}

.login-brand__mark {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  background: conic-gradient(from 210deg, #f0c47c, #e1b5b5, #c5b1d7, #9cc7e4, #a3d7c6, #f0c47c);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.5);
}

.login-title {
  font-size: 1.8rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: #1d1f1d;
}

.login-subtitle {
  color: #676562;
  margin-bottom: 2rem;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.login-field .form-control {
  border-radius: 0.9rem;
  border: 1px solid #e2e0dc;
  background: #f7f7f6;
  padding: 0.85rem 1rem;
}

.login-field .form-control:focus {
  border-color: #0d6efd;
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

.login-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.login-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
  user-select: none;
  color: #4c4a47;
  font-size: 0.95rem;
}

.login-switch__input {
  display: none;
}

.login-switch__track {
  width: 44px;
  height: 24px;
  border-radius: 999px;
  background: #e0ded9;
  position: relative;
  transition: background 0.2s ease;
}

.login-switch__track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s ease;
}

.login-switch__input:checked + .login-switch__track {
  background: #0d6efd;
}

.login-switch__input:checked + .login-switch__track::after {
  transform: translateX(20px);
}

.login-link {
  color: #0d6efd;
  font-weight: 500;
}

.login-submit {
  margin-top: 0.4rem;
  border-radius: 0.9rem;
  padding: 0.85rem 1rem;
  font-weight: 600;
}

.login-divider {
  margin: 2rem 0 1.5rem;
  text-align: center;
  position: relative;
  color: #8a8782;
  font-size: 0.9rem;
}

.login-divider::before,
.login-divider::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 40%;
  height: 1px;
  background: #e4e1dc;
}

.login-divider::before {
  left: 0;
}

.login-divider::after {
  right: 0;
}

.login-provider {
  border-radius: 0.9rem;
  padding: 0.85rem 1rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.login-reset {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.login-reset__hint {
  margin: -0.5rem 0 0;
  color: #6f6b66;
  font-size: 0.92rem;
}

.login-provider__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #ffffff;
  color: #1f1f1f;
  font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1);
}

.login-footer {
  margin-top: 2rem;
  text-align: center;
  color: #6a6865;
}

@media (max-width: 991px) {
  .login-shell {
    grid-template-columns: 1fr;
    padding: 2rem;
    gap: 2rem;
  }

  .portal-shell .login-shell {
    grid-template-columns: 1fr;
  }

  .portal-sidebar {
    gap: 1rem;
  }

  .portal-visual {
    min-height: 220px;
  }

  .login-visual {
    min-height: 260px;
    margin-right: 0;
  }

  .login-panel {
    align-items: flex-start;
  }
}

@media (max-width: 575px) {
  .login-shell {
    padding: 1.5rem;
  }

  .login-row {
    flex-direction: column;
    align-items: flex-start;
  }
}

@keyframes loginRise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes loginFloat {
  from {
    opacity: 0;
    transform: scale(1.05);
  }
  to {
    opacity: 1;
    transform: scale(1.02);
  }
}

/* === Confetti === */
.confetti-burst{
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 2000;
}
.confetti-piece{
  position: absolute;
  top: -12px;
  opacity: 0.95;
  animation-name: confetti-fall;
  animation-timing-function: ease-out;
  animation-fill-mode: forwards;
  border-radius: 2px;
}
@keyframes confetti-fall{
  0% { transform: translateY(0) translateX(0) rotate(0deg); opacity: 0.95; }
  100% { transform: translateY(110vh) translateX(var(--drift, 0px)) rotate(var(--spin, 540deg)); opacity: 0; }
}

/* === Deal owner pills === */
.deal-owner-control {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.deal-owner-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.12rem 0.55rem;
  border: 1px solid #e2e8f0;
  border-radius: 9999px;
  background: #ffffff;
  color: #3f3b36;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.deal-owner-pill::after {
  content: " ▾";
}

.deal-owner-menu {
  position: absolute;
  left: 0;
  top: 100%;
  z-index: 10;
  margin-top: 0.35rem;
  min-width: 12rem;
  max-height: 16rem;
  overflow-y: auto;
  padding: 0.35rem;
  border-radius: 0.75rem;
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.4);
  box-shadow: 0 18px 30px rgba(15, 23, 42, 0.12);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.deal-owner-option {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.12rem 0.55rem;
  border: 1px solid #e2e8f0;
  border-radius: 9999px;
  background: #ffffff;
  color: #3f3b36;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* === Layout === */
.app-shell {
  min-height: 100vh;
  background: transparent;
  gap: 0;
  padding: 0;
}
.app-main{
  gap: .5rem;
  height: 100vh;
  overflow: hidden;
}
.app-topbar{
  position: sticky;
  top: 0;
  z-index: 20;
}
.app-content{
  flex: 1 1 auto;
  overflow: auto;
}
.app-container{
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0 1.5rem;
}

/* === Sidebar === */
.app-sidebar {
  width: var(--sidebar-w);
  background: var(--surface-muted);
  border-right: 1px solid var(--border);
  color: var(--sidebar-text);
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  padding: 1rem 0.75rem;
  border-radius: 0;
  box-shadow: none;
}
.sidebar-collapsed .app-sidebar{
  width: 72px;
  padding: 0.85rem 0.6rem;
}
.sidebar-collapsed .app-sidebar .brand-text,
.sidebar-collapsed .app-sidebar .nav-link span,
.sidebar-collapsed .app-sidebar .nav-link .badge{
  display: none;
}
.sidebar-collapsed .app-sidebar .nav-link{
  justify-content: center;
  padding: 0.55rem;
}
.sidebar-collapsed .app-sidebar .nav-link i{
  font-size: 1.1rem;
}
.sidebar-collapsed .app-sidebar .text-secondary{
  display: none !important;
}
.sidebar-collapsed .app-shell{
  gap: 1rem;
}
.app-main{
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  background: var(--bg);
}
.sidebar-collapsed .app-main{
  margin-left: 72px;
}

.brand-link:hover { text-decoration: none; }
.app-sidebar .brand-dot{
  width: 28px; height: 28px; border-radius: 8px;
  display: grid; place-items: center;
  font-weight: 700; font-size: 0.9rem;
  background: var(--accent); color: #fff;
}
.app-sidebar .brand-text{ font-weight: 700; color: var(--sidebar-text); }

.app-sidebar .nav-link{
  font-size: 0.92rem;
  padding: 0.48rem 0.75rem;
  border-radius: 0.7rem;
  color: var(--sidebar-text);
  transition: background .15s ease, color .15s ease;
  font-weight: 600;
}
.app-sidebar .nav-link i{ font-size: 1rem; }
.app-sidebar .nav-link:hover{ background: var(--sidebar-hover); color: var(--sidebar-text); text-decoration: none;}
.app-sidebar .nav-link.active{
  background: var(--sidebar-hover);
  font-weight: 700;
  color: var(--sidebar-text);
  box-shadow: inset 0 0 0 1px var(--border);
}
.app-sidebar .text-secondary{ color: var(--ink-500) !important; }

/* === Topbar === */
.app-topbar {
  background: var(--surface-muted);
  min-height: 70px;
  height: 70px;
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 1030;
  border-bottom: 1px solid rgba(231, 227, 221, 0.7);
}
.app-topbar .app-container{
  padding: 0 1.5rem;
  height: 100%;
}
.topbar-card{
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  min-height: 70px;
  height: 100%;
  box-shadow: none;
}
.notif-btn{
  color: var(--ink-700);
}
.search-wrap {
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  height: 36px;
  padding: 0 0.75rem;
  gap: 0.5rem;
  min-width: 260px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7);
}
.search-wrap input{
  background: transparent;
  border: none;
  outline: none;
  font-size: .9rem;
}
.app-topbar .btn{
  padding: 0.35rem 0.7rem;
  font-size: 0.9rem;
  border-radius: 0.7rem;
}
.app-topbar .btn.btn-primary{
  padding: 0.4rem 0.85rem;
}
.app-topbar .btn-link{
  padding: 0.35rem 0.5rem;
}

/* === Typography === */
.page-title { font-size: 1.3rem; font-weight: 800; margin: 0; color: var(--ink-900); }
h1, h2, h3, h4, h5, h6 { color: var(--ink-900); }
.eyebrow{
  letter-spacing: .16em;
  font-size: .68rem;
  font-weight: 700;
  color: var(--ink-500);
}
.page-subtitle{
  color: var(--ink-700);
  font-size: .95rem;
  margin-top: .25rem;
}
.page-header-card{
  background: #fff;
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: 1.25rem 1.25rem 0 0;
  padding: 1.25rem 1.5rem;
  box-shadow: none;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.app-content{
  background: #fff;
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 1.25rem 1.25rem;
  box-shadow: none;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

/* === Cards & helpers === */
.card{
  border: 1px solid var(--border);
  border-radius: 1rem;
  box-shadow: 0 12px 32px rgba(0,0,0,.05);
}
.card-header{ border-bottom: 1px solid var(--border); }
.card-footer{ border-top: 1px solid var(--border); }
.table-responsive{
  border: 1px solid var(--border);
  border-radius: 0.9rem;
  background: #fff;
  overflow: hidden;
}
.table{
  margin-bottom: 0;
  border-color: var(--border);
}
.table > :not(caption) > * > *{
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
}
.table thead th{
  background: var(--surface-muted);
  color: var(--ink-700);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: none;
}
.table tbody tr:hover{
  background: rgba(184,164,139,0.08);
}
.table tbody tr:last-child > *{
  border-bottom: none;
}
.kpi {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 1px 2px rgba(0,0,0,.03);
}
.kpi h6 { color: var(--ink-500); font-size: .85rem; margin-bottom: .25rem; }
.kpi .kpi-value { font-size: 1.5rem; font-weight: 700; }
.kpi .kpi-sub { font-size: .85rem; }
.text-success-soft{ color: var(--success); }
.text-danger-soft{ color: var(--danger); }

/* === Buttons (override Bootstrap primary to taupe) === */
.btn-primary{
  --bs-btn-color: #fff;
  --bs-btn-bg: var(--accent);
  --bs-btn-border-color: var(--accent);
  --bs-btn-hover-bg: var(--accent-strong);
  --bs-btn-hover-border-color: var(--accent-strong);
  --bs-btn-focus-shadow-rgb: 184,164,139;
  --bs-btn-active-bg: var(--accent-strong);
  --bs-btn-active-border-color: var(--accent-strong);
}
.btn-outline-secondary{
  --bs-btn-color: var(--ink-700);
  --bs-btn-border-color: var(--border);
  --bs-btn-hover-color: var(--accent-contrast);
  --bs-btn-hover-bg: var(--sidebar-hover);
  --bs-btn-hover-border-color: var(--border);
  --bs-btn-active-bg: var(--sidebar-hover);
  --bs-btn-active-border-color: var(--border);
}
.btn{
  border-radius: 0.85rem;
  font-weight: 700;
  padding: 0.58rem 1.05rem;
  letter-spacing: 0.01em;
}
.btn:focus-visible{
  box-shadow: 0 0 0 0.16rem rgba(184,164,139,.35);
}
.btn-sm{
  border-radius: 0.75rem;
  padding: 0.35rem 0.75rem;
}
.btn-light{
  background: var(--surface-muted);
  border: 1px solid var(--border);
  color: var(--ink-700);
}
.btn-light:hover{
  background: #fff;
  color: var(--accent-contrast);
  border-color: var(--accent);
}
.btn-link{
  color: var(--accent-strong);
  font-weight: 700;
}
.btn-link:hover{
  color: var(--accent-contrast);
}
.form-control,
.form-select{
  border-radius: 0.75rem;
  border-color: var(--border);
  background-color: #fff;
}
.form-control:focus,
.form-select:focus{
  border-color: var(--accent);
  box-shadow: 0 0 0 0.15rem rgba(184,164,139,.25);
}
.stream-pills{
  gap: 0.5rem;
}
.stream-pills .btn{
  border-radius: 999px;
  padding: 0.55rem 1rem;
}
.stream-pills .btn-check:checked + .btn{
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 6px 16px rgba(0,0,0,.08);
}
.stream-pills .btn:hover{
  border-color: var(--accent-strong);
}
.badge.bg-secondary-subtle{
  background: var(--surface-muted) !important;
  color: var(--ink-700) !important;
  border: 1px solid var(--border);
}
.deal-board{
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
}
.deal-column{
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 1rem;
  box-shadow: 0 12px 32px rgba(0,0,0,.05);
  display: flex;
  flex-direction: column;
  flex: 0 0 280px;
  min-height: 260px;
  max-height: 70vh;
}
.deal-column__header{
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: #fff;
  border-top-left-radius: 1rem;
  border-top-right-radius: 1rem;
}
.deal-column__body{
  padding: 0.75rem;
  padding-bottom: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0;
  min-height: 200px;
  overflow-y: auto;
}
.deal-card{
  border: 0;
  border-bottom: 1px solid rgba(15,23,42,.08);
  border-radius: 0;
  padding: 0.45rem 0.6rem;
  background: #fff;
  box-shadow: none;
  cursor: grab;
}
.deal-card:hover{
  background: #f8fafc;
}
.deal-card .small{
  line-height: 1.2;
}
.deal-card__date{
  display: none;
}
.deal-card--project{
  border-left: 0;
}
.deal-card--recurring{
  border-left: 0;
  background: #fff;
}
.deal-card.dragging{
  opacity: 0.7;
  box-shadow: 0 4px 12px rgba(0,0,0,.08);
}
[data-dropzone].drag-over{
  outline: 2px dashed var(--accent);
  border-radius: 0.35rem;
  min-height: 120px;
}
.deal-board--compact{
  gap: 0.75rem;
}
.deal-board--compact .deal-column{
  max-height: 60vh;
  flex-basis: 280px;
}
.deal-board--compact .deal-column__header{
  padding: 0.5rem 0.75rem;
}
.deal-board--compact .deal-column__body{
  padding: 0.5rem;
  gap: 0.5rem;
}
.deal-board--compact .deal-card{
  padding: 0.5rem;
}
.deal-board--compact .deal-card__meta{
  display: none;
}
.deal-board--compact .deal-card__contact{
  display: none;
}
.company-lookup-dropdown{
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 20;
}
.company-lookup-dropdown .list-group-item{
  border: none;
  border-bottom: 1px solid var(--border);
}
.company-lookup-dropdown .list-group-item:last-child{
  border-bottom: none;
}
.company-lookup-spinner{
  display: none;
}
.forecast-chart-wrap{
  position: relative;
  height: 240px;
}
.forecast-chart-wrap--large{
  height: 460px;
}

/* === Avatar === */
.avatar{
  width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center; background: #efede9;
  font-weight: 700; color: var(--ink-700); user-select: none;
}

/* === Footer === */
.app-footer{
  background: transparent;
  padding: 0.25rem 0 0.5rem;
  color: var(--ink-500);
}
.app-footer .app-container{
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0.5rem 0 0.75rem;
  box-shadow: none;
}

/* === Responsive Sidebar === */
.sidebar-backdrop{ display: none; }
@media (max-width: 991.98px){
  .app-sidebar{
    position: fixed;
    left: -100%;
    z-index: 1030;
    transition: left .25s ease-in-out;
    height: 100dvh;
    top: 0;
    width: min(85vw, 280px);
    overflow-y: auto;
    padding: 0.75rem 0.65rem;
  }
  .app-main{
    margin-left: 0;
    height: auto;
    min-height: 100dvh;
    overflow: visible;
  }
  .app-container{
    padding: 0 1rem;
  }
  .app-sidebar.show{ left: 0; }
  .sidebar-backdrop.show{
    display: block; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 1020;
  }
  .search-wrap{ min-width: 0; width: 100%; }
  .app-sidebar .brand-text{
    font-size: 0.9rem;
  }
  .app-sidebar .nav-link{
    font-size: 0.86rem;
    padding: 0.4rem 0.6rem;
    border-radius: 0.6rem;
  }
  .app-sidebar .nav-link i{
    font-size: 0.95rem;
  }
  .app-sidebar .btn{
    padding: 0.38rem 0.65rem;
    font-size: 0.85rem;
  }
  .app-sidebar .search-wrap{
    height: 32px;
    padding: 0 0.6rem;
  }
  .app-sidebar .search-wrap input{
    font-size: 0.85rem;
  }
  .app-sidebar .sidebar-brand{
    display: none;
  }
  .sidebar-collapsed .app-sidebar{
    width: min(85vw, 280px);
    left: -100%;
  }
  .sidebar-collapsed .app-sidebar.show{
    left: 0;
  }
  .app-topbar{
    height: auto;
    min-height: 0;
  }
  .topbar-card{
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    padding: 0.5rem 0;
    height: auto;
  }
  .topbar-card > .d-flex{
    width: 100%;
    justify-content: space-between;
  }
  .topbar-card > .topbar-row{
    flex-wrap: nowrap;
  }
  .topbar-card > .d-flex:last-child{
    gap: 0.4rem;
  }
  .app-topbar .btn{
    font-size: 0.85rem;
  }
}

/* === Public quote view === */
.public-quote-shell{
  display:flex;
  gap:2rem;
  padding:2rem 2rem 8rem;
  background:var(--surface-muted);
  min-height:100vh;
}
.public-quote-sidebar{
  width:260px;
  background:#fff;
  border:1px solid var(--border);
  border-radius:1rem;
  padding:1.5rem;
  position:sticky;
  top:2rem;
  align-self:flex-start;
  max-height:calc(100vh - 4rem);
  overflow:auto;
}
.public-quote-sidebar-header img{
  max-height:52px;
}
.public-quote-nav .nav-link{
  border-radius:.75rem;
  color:var(--ink-700);
  padding:.55rem .75rem;
  text-decoration:none;
  transition:background .2s ease, color .2s ease;
}
.public-quote-nav .nav-link .badge{
  font-weight:600;
  font-size:.7rem;
}
.public-quote-nav .nav-link.active,
.public-quote-nav .nav-link:hover{
  background:var(--sidebar-hover);
  color:var(--accent-contrast);
}
.public-quote-main{
  flex:1;
  display:flex;
  flex-direction:column;
}

/* === Template preview === */
.template-preview,
.template-preview__frame{
  box-sizing: border-box;
}

.template-preview{
  width: 100%;
  max-width: 100%;
  max-height: min(75vh, 900px);
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: var(--surface-muted);
  display: flex;
  align-items: stretch;
  justify-content: center;
  overflow: hidden;
}

.template-preview__frame{
  width: 100%;
  height: 100%;
  border: none;
  background: var(--card);
  border-radius: calc(1rem - 4px);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.02);
}

@media (max-width: 991.98px){
  .template-preview{
    max-height: none;
  }
}
.public-quote-header{
  background:#fff;
  border:1px solid var(--border);
  border-radius:1rem;
  padding:1.5rem;
}
.public-quote-logo{
  max-height:60px;
  width:auto;
}
.public-quote-pages .public-quote-page{
  border-radius:1.5rem;
  border:1px solid var(--border);
  background:#fff;
  padding:1.25rem;
  box-shadow:0 10px 35px rgba(15,23,42,.08);
}
.public-quote-page-frame{
  background:#fff;
  border-radius:1rem;
  overflow:hidden;
}
.public-quote-page-content{
  padding:2rem;
  height:100%;
}
.quote-page-preview{
  background:#fff;
  border:1px solid var(--border);
  border-radius:1rem;
  padding:1.25rem;
  box-shadow:0 10px 30px rgba(0,0,0,.05);
  overflow:auto;
  min-height:240px;
}
.quote-page-preview *{
  max-width:100%;
}
.quote-page-preview img{
  max-width:100%;
  height:auto;
  display:block;
}
.public-quote-actions{
  position:fixed;
  left:0;
  right:0;
  bottom:0;
  padding:1.25rem 0;
  z-index:1050;
}
.public-pricing-page .table{
  margin-bottom:1.5rem;
}
.signature-pad{
  position:relative;
  padding:1rem;
}
.signature-pad canvas{
  width:100%;
  height:200px;
  background:#fff;
  border-radius:.75rem;
  border:1px dashed var(--border);
}
.signature-pad .signature-clear-btn{
  position:absolute;
  top:.75rem;
  right:.75rem;
}
.quote-stepper .nav-link{
  font-weight:600;
  border-radius:999px;
}
.quote-stepper .nav-link:not(.active){
  background:var(--surface-muted);
  color:var(--ink-700);
}
.quote-stepper .nav-link.active{
  background:var(--accent);
  color:#fff;
}
@media (max-width: 991.98px){
  .public-quote-shell{
    flex-direction:column;
    padding:1.5rem 1rem 10rem;
  }
  .public-quote-sidebar{
    position:relative;
    width:100%;
    max-height:none;
  }
  .public-quote-header{
    padding:1.25rem;
  }
  .public-quote-page-content{
    padding:1.5rem;
  }
}

.quote-item-card{
  border-radius:.75rem;
}

.template-raw{
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1rem 1.25rem;
  background: var(--surface-muted);
}

.template-raw summary{
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  list-style: none;
  gap: 0.75rem;
  font-weight: 600;
  color: var(--ink-700);
}

.template-raw summary::-webkit-details-marker{
  display: none;
}

.template-raw__summary i{
  transition: transform .2s ease;
}

.template-raw[open] .template-raw__summary i{
  transform: rotate(180deg);
}

.template-raw__content{
  max-height: 420px;
  overflow: auto;
  padding: 1.25rem;
  background: inherit;
  border-radius: 0.65rem;
  border: 1px solid rgba(0,0,0,0.05);
}

.template-raw__code{
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.5;
  min-width: max-content;
}
