:root{
  --bg-main:#f8fafc;
  --bg-card:#ffffff;
  --border-soft:#e5e7eb;

  --text-main:#111827;
  --text-muted:#6b7280;

  --brand:#2563eb;
  --brand-soft:#eff6ff;

  --success:#16a34a;
  --warning:#d97706;
  --danger:#dc2626;
}

body{
  font-family:'Inter',system-ui,-apple-system,sans-serif;
  background:var(--bg-main);
  color:var(--text-main);
}

a{ color:inherit; }

/* App layout */
.app{ display:flex; min-height:100vh; }

/* Sidebar */
.sidebar{
  width:260px;
  background:#fff;
  border-right:1px solid var(--border-soft);
  padding:18px 14px;
  display:flex;
  flex-direction:column;
}
.sidebar .logo{
  padding:10px 12px;
  border-radius:14px;
  border:1px solid var(--border-soft);
  background:#fff;
  margin-bottom:14px;
}
.brand-dot{
  width:12px;height:12px;border-radius:999px;
  background:var(--brand);
  box-shadow:0 0 0 6px var(--brand-soft);
}
.sidebar a{
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 12px;
  border-radius:10px;
  text-decoration:none;
  color:var(--text-main);
  margin-bottom:6px;
}
.sidebar a:hover{
  background:#f3f4f6;
}
.sidebar a.active{
  background:var(--brand-soft);
  color:var(--brand);
}
.sidebar-section{
  margin:14px 10px 8px;
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:.08em;
  color:var(--text-muted);
}
.sidebar-spacer{ flex:1; }

/* Content */
.content{
  flex:1;
  padding:26px 28px;
}
.page-title{
  font-weight:700;
  letter-spacing:-.02em;
}
.subtle{
  color:var(--text-muted);
}

/* Card polish */
.card{
  border:1px solid var(--border-soft);
  border-radius:16px;
  box-shadow:0 1px 0 rgba(17,24,39,0.04);
}
.card-header{
  background:#fff;
  border-bottom:1px solid var(--border-soft);
  border-top-left-radius:16px!important;
  border-top-right-radius:16px!important;
}

/* Tables */
.table-wrap{
  border:1px solid var(--border-soft);
  border-radius:14px;
  overflow:hidden;
  background:#fff;
}
.table{ margin-bottom:0; }
.table thead th{
  background:#f9fafb;
  color:var(--text-muted);
  font-weight:600;
  border-bottom:1px solid var(--border-soft);
}
.table tbody tr:hover{
  background:#f8fafc;
}

/* Status pills */
.badge.status{
  padding:6px 10px;
  font-weight:600;
  border-radius:999px;
  border:1px solid transparent;
}
.status-default{ background:#f3f4f6; color:#374151; border-color:#e5e7eb; }
.status-new{ background:#eff6ff; color:#2563eb; border-color:#dbeafe; }
.status-won{ background:#ecfdf5; color:#16a34a; border-color:#bbf7d0; }
.status-lost{ background:#fef2f2; color:#dc2626; border-color:#fecaca; }

/* Forms */
.form-control, .form-select{
  border-radius:12px;
  border-color:var(--border-soft);
}
.btn{
  border-radius:12px;
}
.btn-primary{
  background:var(--brand);
  border-color:var(--brand);
}
.btn-primary:hover{
  background:#1d4ed8;
  border-color:#1d4ed8;
}
.kpi{
  border:1px solid var(--border-soft);
  border-radius:16px;
  padding:14px 16px;
  background:#fff;
}
.kpi .label{ color:var(--text-muted); font-size:12px; text-transform:uppercase; letter-spacing:.08em; }
.kpi .value{ font-size:22px; font-weight:700; }

.print-page{
  background:#fff;
  padding:28px;
  border:1px solid var(--border-soft);
  border-radius:16px;
}

@media print{
  body{ background:#fff; }
  .sidebar, .no-print{ display:none!important; }
  .content{ padding:0; }
  .print-page{ border:none; border-radius:0; padding:0; }
}
/* Ensure large edit modals scroll properly */
.modal-dialog-scrollable .modal-body {
  max-height: calc(100vh - 210px);
  overflow-y: auto;
}
