/* Appearance adapted from crm_pizdec/public/style.css.
   Geometry and responsive behavior remain in style.css. */
:root {
  --primary: #3867f1;
  --primary-dark: #2854dc;
  --primary-light: #eef2ff;
  --primary-ring: rgba(56, 103, 241, .12);
  --bg: #f5f7fb;
  --surface: #fff;
  --surface-hover: #f6f8fb;
  --border: #e8edf4;
  --border-light: #eef2f7;
  --text: #26334e;
  --muted: #66738d;
  --danger: #d63d48;
  --danger-dark: #b92d38;
  --green: #138572;
  --green-light: #e8f8f4;
  --amber: #a76c00;
  --amber-light: #fff7e6;
  --red-light: #fff1f2;
  --blue-light: #eef2ff;
  --gray-light: #f1f4f9;
  --shadow-sm: 0 5px 16px rgba(21, 37, 69, .035);
  --shadow-md: 0 10px 30px rgba(21, 37, 69, .07);
}

body {
  font-family: "Manrope", Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 500;
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font-family: inherit; }
h1, h2, h3, .stat-value, .lead-name { color: #1a2540; }
h1, h2, h3 { letter-spacing: -.4px; }

.sidebar { color: #d5dced; background: #101b35; border-right-color: #172544; }
.sidebar-brand { border-bottom-color: rgba(236, 242, 255, .1); }
.sidebar-brand .logo-text { color: #fff; }
.sidebar-brand .logo, .login-logo-row .logo {
  background: linear-gradient(145deg, #6289ff, #315ce1);
  box-shadow: 0 8px 20px rgba(65, 105, 250, .28);
}
.sidebar .nav-section { color: #9dabc8; }
.sidebar .nav-item { position: relative; color: #afbad2; font-weight: 700; border-radius: 12px; }
.sidebar .nav-item:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.sidebar .nav-item.active {
  color: #fff;
  background: linear-gradient(100deg, rgba(82, 119, 244, .28), rgba(82, 119, 244, .17));
}
.sidebar .nav-item.active::before {
  position: absolute; left: -12px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 26px; border-radius: 0 3px 3px 0;
  background: #83a0ff; content: "";
}
.sidebar-footer { color: #e5ecfb; background: #101b35; border-top-color: rgba(236, 242, 255, .1); }
.sidebar-user-role { color: #9dabc8; }
.sidebar-footer .avatar { background: linear-gradient(145deg, #31c5ac, #2087aa); }
.sidebar-footer .btn-ghost { color: #d5dced; border-color: rgba(236, 242, 255, .16); background: rgba(255, 255, 255, .045); }
.sidebar-footer .btn-ghost:hover { color: #fff; background: rgba(255, 255, 255, .1); }

.worker-regions { display: grid; gap: 3px; border: 0; padding: 0; margin: 0; white-space: nowrap; }
.worker-regions label { display: flex; align-items: center; gap: 4px; }
.workspace-checklist { min-width: 145px; }
.workspace-checklist summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  white-space: nowrap;
}
.workspace-checklist summary::after { content: "▾"; margin-inline-start: auto; }
.workspace-checklist[open] summary::after { content: "▴"; }
.workspace-checklist summary span { color: var(--muted); font-size: 12px; }
.workspace-checklist .worker-regions { padding: 6px 10px; }
.workspace-switcher { margin: 0; min-width: 0; }
.workspace-switcher select {
  max-width: 100%;
  min-height: 34px;
  padding: 4px 10px;
  background: #fff;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
  font-size: 13px;
}
@media (max-width: 700px) {
  .topbar:has(.workspace-switcher) { flex-wrap: wrap; height: auto; }
  .workspace-switcher { order: 1; width: 100%; }
}
.topbar { background: rgba(255, 255, 255, .88); backdrop-filter: blur(18px); border-bottom-color: var(--border); }
.card, .login-card { background: #fff; border-color: var(--border); box-shadow: var(--shadow-md); }
.card-header, .card-footer { border-color: var(--border); }
.stat-card { border-color: var(--border); box-shadow: var(--shadow-sm); }
.btn { font-weight: 800; border-radius: 10px; transition: box-shadow .15s, border-color .15s, background .15s; }
.btn-primary { color: #fff; background: linear-gradient(135deg, #3867f1, #4c73ef); box-shadow: 0 7px 15px rgba(56, 103, 241, .19); }
.btn-primary:hover { background: linear-gradient(135deg, #2854dc, #3867f1); box-shadow: 0 9px 21px rgba(56, 103, 241, .26); }
.btn-ghost { color: #526079; border-color: var(--border); background: #fff; }
.btn-ghost:hover { color: var(--primary-dark); border-color: #c8d4f9; background: var(--primary-light); box-shadow: none; }
.btn-danger { color: #b92d38; border-color: #ffcdd2; background: #fff1f2; }
.btn-danger:hover { color: #fff; background: #b92d38; box-shadow: none; }
.icon-btn { color: #65718a; border-color: var(--border); border-radius: 10px; background: #fff; }
.icon-btn:hover { color: var(--primary-dark); background: var(--primary-light); }
.field input, .field select, .field textarea, .worker-region-form select, .locale-controls select {
  color: var(--text); border-color: var(--border); background: #fff; border-radius: 10px;
}
input::placeholder, textarea::placeholder { color: #77829a; }
input:focus, select:focus, textarea:focus { outline-color: rgba(56, 103, 241, .35); }
button:focus-visible, a:focus-visible { outline: 3px solid #9fb5ff; outline-offset: 2px; }
.table thead th { color: #66738d; background: #f6f8fb; }
.table tbody tr.row-active { background: #eef2ff; }
.table tbody tr.row-active:hover { background: #e3eaff; }
.table tbody tr.row-pending, .table tbody tr.row-closed { background: #fff; }
.table tbody tr.row-pending:hover, .table tbody tr.row-closed:hover { background: #f6f8fb; }
.table tbody tr.row-contract { background: #e8f8f4; }
.table tbody tr.row-contract:hover { background: #d8f2ea; }
.table tbody tr.row-meeting { background: #edf8fb; }
.table tbody tr.row-meeting:hover { background: #dcf0f6; }
.table tbody tr.row-hot, .table tbody tr.row-unavailable { background: #fff1f2; }
.table tbody tr.row-hot:hover, .table tbody tr.row-unavailable:hover { background: #ffe4e7; }
.table tbody tr.row-medium { background: #fff7e6; }
.table tbody tr.row-medium:hover { background: #ffefca; }
.table tbody tr.row-cold { background: #fefbe9; }
.table tbody tr.row-cold:hover { background: #fff4cc; }
