:root {
  --bg: #f4f5f8;
  --surface: #ffffff;
  --border: #e4e7ee;
  --text: #1a1d29;
  --text-muted: #6b7280;
  --brand: #1b3a5c;
  --brand-soft: #eaf0f6;
  --accent: #f26522;
  --accent-dark: #d9541c;
  --accent-soft: #fdece1;
  --green: #15803d;
  --green-soft: #e8f7ee;
  --amber: #b45309;
  --amber-soft: #fef3e2;
  --gray: #4b5563;
  --gray-soft: #eef0f2;
  --blue: #1d4ed8;
  --blue-soft: #e8effe;
  --purple: #7c3aed;
  --purple-soft: #f2ecfe;
  --red: #b91c1c;
  --red-soft: #fdeaea;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.05), 0 1px 1px rgba(16, 24, 40, 0.03);
  --shadow-md: 0 8px 20px -4px rgba(16, 24, 40, 0.10), 0 2px 6px rgba(16, 24, 40, 0.06);
  --shadow-lg: 0 24px 48px -12px rgba(16, 24, 40, 0.20), 0 8px 16px rgba(16, 24, 40, 0.08);
  --radius-sm: 9px;
  --radius: 13px;
  --radius-lg: 18px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Theme is always explicit — layouts/app.blade.php and auth/login.blade.php
   both set data-theme on <html> directly (defaulting to "light", never the
   OS prefers-color-scheme) — so only these two blocks are ever read. */
:root[data-theme="light"] {
  --bg: #f4f5f8;
  --surface: #ffffff;
  --border: #e4e7ee;
  --text: #1a1d29;
  --text-muted: #6b7280;
  --brand: #1b3a5c;
  --brand-soft: #eaf0f6;
  --accent: #f26522;
  --accent-dark: #d9541c;
  --accent-soft: #fdece1;
  --green-soft: #e8f7ee;
  --amber-soft: #fef3e2;
  --gray-soft: #eef0f2;
  --blue-soft: #e8effe;
  --purple-soft: #f2ecfe;
  --red-soft: #fdeaea;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.05), 0 1px 1px rgba(16, 24, 40, 0.03);
  --shadow-md: 0 8px 20px -4px rgba(16, 24, 40, 0.10), 0 2px 6px rgba(16, 24, 40, 0.06);
  --shadow-lg: 0 24px 48px -12px rgba(16, 24, 40, 0.20), 0 8px 16px rgba(16, 24, 40, 0.08);
}

:root[data-theme="dark"] {
  --bg: #10121a;
  --surface: #1a1e29;
  --border: #2c313e;
  --text: #edeef2;
  --text-muted: #9aa1b0;
  --brand: #6a9ac4;
  --brand-soft: #1e2f42;
  --accent: #ff8c50;
  --accent-dark: #ff6d24;
  --accent-soft: #3a2416;
  --green-soft: #10301f;
  --amber-soft: #392a10;
  --gray-soft: #262b35;
  --blue-soft: #16233a;
  --purple-soft: #27203e;
  --red-soft: #391818;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35), 0 1px 1px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 8px 24px -4px rgba(0, 0, 0, 0.45), 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 28px 56px -12px rgba(0, 0, 0, 0.6), 0 8px 20px rgba(0, 0, 0, 0.4);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}
a { color: inherit; }

/* ---------------------------------------------------------------------
   Header / navigation
   --------------------------------------------------------------------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 28px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 14px;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 5;
}
.topbar h1 { font-size: 15px; margin: 0; color: var(--text-muted); font-weight: 600; letter-spacing: 0.01em; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { height: 26px; width: auto; display: block; border-radius: 0; }

.stat-tiles { display: flex; gap: 10px; flex-wrap: wrap; }
.stat-tile {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: inherit;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 16px;
  min-width: 120px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s var(--ease), box-shadow 0.15s var(--ease), border-color 0.15s var(--ease);
}
.stat-tile:hover { border-color: var(--brand); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.stat-tile-icon {
  width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; background: var(--brand-soft); color: var(--brand);
}
.stat-tile-accent .stat-tile-icon { background: var(--accent-soft); color: var(--accent); }
.stat-tile-blue .stat-tile-icon { background: var(--blue-soft); color: var(--blue); }
.stat-tile-green .stat-tile-icon { background: var(--green-soft); color: var(--green); }
.stat-tile-purple .stat-tile-icon { background: var(--purple-soft); color: var(--purple); }
.stat-value, .stat-tile .num { font-size: 18px; font-weight: 700; display: block; letter-spacing: -0.02em; line-height: 1.15; color: var(--text); }
.stat-label, .stat-tile .label { font-size: 11px; color: var(--text-muted); white-space: nowrap; }

.tabs {
  display: flex;
  gap: 4px;
  padding: 10px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  max-width: 1300px;
  margin: 0 auto;
}
.tab-btn {
  padding: 9px 18px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.15s var(--ease), background-color 0.15s var(--ease);
}
.tab-btn:hover { color: var(--text); background: var(--bg); }
.tab-btn.active { color: #fff; background: var(--brand); box-shadow: var(--shadow-sm); }

/* ---------------------------------------------------------------------
   Layout / toolbar
   --------------------------------------------------------------------- */
main.container-fluid { padding: 22px 24px 44px; max-width: 1300px; margin: 0 auto; }

.toolbar { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; align-items: center; }
.toolbar form { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
/* Bootstrap's .form-control/.form-select default to width:100% (built for
   stacked form layouts) — this app always places them in an inline toolbar
   or a CSS-grid edit field, so undo that and let them size naturally. */
.form-control, .form-select {
  width: auto;
  padding: 8px 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.form-control:focus, .form-select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}
.toolbar input[type="search"] { flex: 1; min-width: 260px; }

/* Search-box icon + filter-select icon — small, muted, consistent across
   every module's toolbar. */
.search-box { position: relative; flex: 1; min-width: 260px; display: flex; }
.search-box > i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 13px; pointer-events: none; }
.search-box input[type="search"] { width: 100% !important; padding-left: 32px; flex: none; min-width: 0; }

.filter-group { display: inline-flex; align-items: center; gap: 6px; }
.filter-group > i { color: var(--text-muted); font-size: 13px; }

/* Multi-select filter dropdown (checkbox list + Apply/Clear) */
.filter-dropdown .dropdown-toggle { cursor: pointer; user-select: none; text-align: left; min-width: 170px; }
.filter-dropdown .dropdown-toggle::after { float: right; margin-top: 7px; }
.filter-dropdown-menu { padding: 6px; max-height: 280px; overflow-y: auto; min-width: 220px; border-radius: var(--radius-sm); box-shadow: var(--shadow-md); }
.filter-dropdown-menu .dropdown-item {
  display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 6px;
  font-size: 13px; color: var(--text); cursor: pointer;
}
.filter-dropdown-menu .dropdown-item:hover { background: var(--bg); }
.filter-dropdown-menu input[type="checkbox"] { cursor: pointer; }
.filter-dropdown-actions { display: flex; gap: 8px; padding: 8px 8px 2px; border-top: 1px solid var(--border); margin-top: 6px; }
.filter-dropdown-actions .save-btn, .filter-dropdown-actions .ghost-btn { flex: 1; text-align: center; justify-content: center; font-size: 12px; padding: 6px 10px; }

.btn, .ghost-btn {
  padding: 8px 15px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: border-color 0.15s var(--ease), color 0.15s var(--ease), box-shadow 0.15s var(--ease), transform 0.15s var(--ease);
}
.btn:hover, .ghost-btn:hover, .btn-outline-secondary:hover { border-color: var(--brand); color: var(--brand); box-shadow: var(--shadow-sm); background: var(--surface); transform: translateY(-1px); }
.btn-outline-secondary, .btn-outline-primary { border-color: var(--border); color: var(--text); background: var(--surface); }
.btn-link { color: var(--brand); font-weight: 600; text-decoration: none; border: none; background: none; }
.btn-link:hover { color: var(--accent); }
.btn-sm { font-size: 13px; padding: 8px 15px; }

.io-toolbar { align-items: center; margin-top: -4px; justify-content: flex-end; }
#io-status { font-size: 12px; color: var(--text-muted); }

/* ---------------------------------------------------------------------
   Tables
   --------------------------------------------------------------------- */
.table-wrap, .card-list-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.table-wrap { overflow-x: auto; }
.card-list-wrap { padding: 18px 20px; }
table { width: 100%; border-collapse: collapse; margin-bottom: 0; }
thead th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  white-space: nowrap;
  font-weight: 700;
}
thead tr:first-child th:first-child { border-top-left-radius: var(--radius); }
thead tr:first-child th:last-child { border-top-right-radius: var(--radius); }
.sortable a { color: var(--text-muted); text-decoration: none; }
.sortable a:hover { color: var(--brand); }
.sortable.sort-active a { color: var(--accent); }
.sort-arrow { display: inline-block; margin-left: 4px; font-size: 9px; opacity: 0.45; }
.sort-active .sort-arrow { opacity: 1; font-weight: 700; }

tbody td { padding: 13px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; font-size: 14px; color: var(--text); }
tbody tr { cursor: pointer; transition: background 0.12s var(--ease); }
.table-hover > tbody > tr:hover > * { background: var(--brand-soft); }
tbody tr:last-child td { border-bottom: none; }
.fw-semibold { font-weight: 600; }
.text-muted.small { color: var(--text-muted) !important; font-size: 12px; }
.company-name { font-weight: 600; }
.company-domain { color: var(--text-muted); font-size: 12px; }
.deal-name { font-weight: 600; }

/* ---------------------------------------------------------------------
   Badges
   --------------------------------------------------------------------- */
.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.badge-dot { width: 5px; height: 5px; border-radius: 50%; display: inline-block; }
.badge-empty { background: transparent; color: var(--text-muted); }
.badge-green { background: var(--green-soft); color: var(--green); } .badge-green .badge-dot { background: var(--green); }
.badge-amber { background: var(--amber-soft); color: var(--amber); } .badge-amber .badge-dot { background: var(--amber); }
.badge-gray { background: var(--gray-soft); color: var(--gray); } .badge-gray .badge-dot { background: var(--gray); }
.badge-blue { background: var(--blue-soft); color: var(--blue); } .badge-blue .badge-dot { background: var(--blue); }
.badge-purple { background: var(--purple-soft); color: var(--purple); } .badge-purple .badge-dot { background: var(--purple); }
.badge-red { background: var(--red-soft); color: var(--red); } .badge-red .badge-dot { background: var(--red); }

.empty-state { padding: 48px 20px; text-align: center; color: var(--text-muted); font-size: 14px; }

/* ---------------------------------------------------------------------
   Drawer (Bootstrap offcanvas)
   --------------------------------------------------------------------- */
.offcanvas-backdrop.show { background: rgba(16, 20, 30, 0.5); opacity: 1; backdrop-filter: blur(2px); }
.offcanvas {
  border-left: 1px solid var(--border) !important;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  border-top-left-radius: var(--radius-lg);
  border-bottom-left-radius: var(--radius-lg);
}
.offcanvas-header { padding: 26px 30px 0; border-bottom: none !important; }
.offcanvas-body { padding: 8px 30px 60px; }
.offcanvas-title { font-size: 22px; font-weight: 650; letter-spacing: -0.015em; color: var(--text); text-transform: none; }
.btn-close {
  font-size: 20px; opacity: 1; color: var(--text-muted); background: none;
  width: auto; height: auto; padding: 4px 8px; border-radius: var(--radius-sm);
  transition: background-color 0.15s var(--ease), color 0.15s var(--ease);
}
.btn-close:hover { color: var(--text); background: var(--bg); opacity: 1; }

h4, h5 { font-size: 22px; margin: 0 0 4px; letter-spacing: -0.015em; color: var(--text); font-weight: 650; }
.reasons-line { font-size: 12px; color: var(--text-muted); margin-top: 6px; }

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px 20px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin-bottom: 18px;
}
.field-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.field-value { font-size: 13px; margin-top: 3px; word-break: break-word; color: var(--text); }

.target-box { background: var(--brand-soft); border-radius: var(--radius-sm); padding: 14px 18px; margin-bottom: 20px; font-size: 13px; border: 1px solid var(--border); }
.journey-box {
  background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm); padding: 16px 18px; margin-bottom: 20px; font-size: 13px; box-shadow: var(--shadow-sm);
}

.related-card, .timeline-item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 13px 17px;
  margin-bottom: 12px;
  font-size: 14px;
  transition: box-shadow 0.15s var(--ease), border-color 0.15s var(--ease), transform 0.15s var(--ease);
}
.related-card[data-open-record], .timeline-item[data-open-record] { cursor: pointer; }
.related-card[data-open-record]:hover, .timeline-item[data-open-record]:hover { box-shadow: var(--shadow-md); border-color: var(--brand); transform: translateY(-1px); }
.notes-block {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 11px 13px; font-size: 12px; white-space: pre-wrap; margin-bottom: 8px; max-height: 220px; overflow-y: auto;
}

.section-title {
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--text-muted); margin: 24px 0 9px; display: flex; align-items: center; gap: 8px;
}
.section-title-with-action { justify-content: space-between; }
.section-add-btn { text-transform: none; letter-spacing: normal; font-size: 12px; font-weight: 500; padding: 4px 10px; margin-left: auto; }
.count-chip { background: var(--gray-soft); color: var(--gray); border-radius: 999px; padding: 1px 8px; font-size: 11px; font-weight: 700; }

.sub-muted { color: var(--text-muted); font-size: 13px; margin-bottom: 16px; }
.drawer-title-with-action { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.drawer-title-with-action .ghost-btn { margin-left: 0; font-size: 12px; }
.drawer-actions { display: flex; align-items: center; gap: 10px; margin: 6px 0 10px; }
.drawer-actions .edit-trigger { margin: 0; }
.edit-trigger { margin: 6px 0 10px; }

.related-card-title { font-weight: 700; font-size: 14px; }
.related-card-link { font-size: 12px; color: var(--brand); font-weight: 600; margin-top: 8px; }
.related-card .info-grid { margin: 8px 0 0; background: transparent; border: none; padding: 0; }

.timeline-item { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.timeline-item .tl-main { flex: 1; }
.timeline-item .tl-dates { color: var(--text-muted); font-size: 12px; }

.dup-actions { display: flex; gap: 8px; }

.journey-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.journey-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); min-width: 110px; }
.journey-value { font-weight: 600; }
.journey-block { margin-top: 10px; }
.journey-block-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); margin-bottom: 4px; }
.journey-text { line-height: 1.5; color: var(--text); }
.journey-bullets { margin: 0; padding-left: 20px; line-height: 1.6; }
.journey-bullets li { margin-bottom: 4px; }

.target-box .target-title { font-weight: 700; margin-bottom: 6px; }
.target-box ul { margin: 6px 0 0; padding-left: 18px; }
.target-box li { margin-bottom: 2px; }

/* ---------------------------------------------------------------------
   Contact/lead card list rows — a shared CSS grid template so header +
   row columns line up, not a literal <table>.
   --------------------------------------------------------------------- */
.person-list-header, .person-row {
  display: grid;
  grid-template-columns: 18px minmax(140px, 1fr) minmax(140px, 1fr) minmax(120px, 170px) 118px 118px;
  align-items: center;
  gap: 10px;
}
.person-list-header {
  padding: 7px 15px; font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--text-muted); border-bottom: 1px solid var(--border); margin-bottom: 6px;
}
.person-list-header .sortable-col { cursor: pointer; text-decoration: none; color: inherit; }
.person-list-header .sortable-col:hover { color: var(--brand); }
.person-list-header .sortable-col.sort-active { color: var(--accent); }
.person-row {
  border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 8px; padding: 11px 15px;
  cursor: pointer; transition: box-shadow 0.15s var(--ease), border-color 0.15s var(--ease), transform 0.15s var(--ease); text-decoration: none; color: inherit;
}
.person-row:hover { box-shadow: var(--shadow-md); border-color: var(--brand); transform: translateY(-1px); }
.person-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person-title, .person-company { color: var(--text-muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person-row .badge-pill { justify-self: start; }

/* ---------------------------------------------------------------------
   Edit / create forms
   --------------------------------------------------------------------- */
.edit-form { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 16px; }
.edit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 11px 15px; }
.edit-field { display: flex; flex-direction: column; gap: 4px; font-size: 11px; color: var(--text-muted); }
.edit-field-wide { grid-column: 1 / -1; }
.edit-field .form-control, .edit-field .form-select {
  font-size: 13px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 7px;
  background: var(--surface); color: var(--text); font-family: inherit;
}
.edit-field textarea { resize: vertical; line-height: 1.5; }
.save-btn {
  padding: 9px 18px; border: none; border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--accent), var(--accent-dark)); color: white;
  font-size: 13px; font-weight: 600; cursor: pointer; box-shadow: var(--shadow-sm);
  transition: filter 0.15s var(--ease), box-shadow 0.15s var(--ease), transform 0.1s var(--ease);
}
.save-btn:hover { filter: brightness(1.06); box-shadow: var(--shadow-md); color: #fff; transform: translateY(-1px); }
.save-btn:active { transform: translateY(1px); }
.edit-status { font-size: 12px; color: var(--text-muted); }
.edit-status:empty { display: none; }

/* ---------------------------------------------------------------------
   Pagination
   --------------------------------------------------------------------- */
.pagination { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px; padding: 18px 0 4px; margin-bottom: 0; }
.page-link {
  min-width: 32px; text-align: center; padding: 6px 8px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text); font-size: 13px; box-shadow: none;
  transition: border-color 0.15s var(--ease), transform 0.15s var(--ease);
}
.page-link:hover { border-color: var(--brand); color: var(--brand); background: var(--surface); transform: translateY(-1px); }
.page-item.active .page-link { background: var(--accent); border-color: var(--accent); color: white; box-shadow: var(--shadow-sm); }
.page-item.disabled .page-link { opacity: 0.4; color: var(--text); background: var(--surface); }

.dup-pair-item { align-items: center; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ---------------------------------------------------------------------
   Login page
   --------------------------------------------------------------------- */
.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; background: var(--bg); }
.login-theme-toggle { position: fixed; top: 18px; right: 18px; }
.login-shell {
  display: flex;
  width: 100%;
  max-width: 760px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
}
.login-brand {
  flex: 1 1 42%;
  padding: 44px 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  color: #fff;
  background: linear-gradient(155deg, var(--brand), #0f2438);
}
.login-logo-badge {
  width: 52px; height: 52px; border-radius: var(--radius-sm); background: #fff;
  display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-sm);
}
.login-logo-badge img { max-width: 38px; max-height: 30px; width: auto; height: auto; object-fit: contain; }
.login-brand h1 { font-size: 20px; margin: 0; letter-spacing: -0.01em; }
.login-brand p { font-size: 13px; color: rgba(255, 255, 255, 0.75); margin: 0; line-height: 1.6; max-width: 260px; }
.login-form-panel { flex: 1 1 58%; padding: 44px 40px; }
.login-form-panel h2 { font-size: 21px; margin: 0 0 4px; }
.login-form-panel .sub-muted { margin-bottom: 24px; }
.login-alert {
  background: var(--red-soft); color: var(--red); border: 1px solid var(--red-soft);
  border-radius: var(--radius-sm); padding: 10px 14px; font-size: 13px; margin-bottom: 18px;
  display: flex; align-items: center; gap: 8px;
}
.login-field { margin-bottom: 18px; }
.login-field-label {
  font-size: 12px; font-weight: 600; color: var(--text-muted); text-transform: uppercase;
  letter-spacing: 0.04em; margin-bottom: 6px; display: block;
}
.login-input-group {
  display: flex; align-items: stretch; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.login-input-group:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.login-input-icon { display: flex; align-items: center; padding: 0 12px; color: var(--text-muted); font-size: 14px; }
.login-input-group input {
  flex: 1; min-width: 0; border: none; background: transparent; padding: 10px 4px 10px 0;
  font-size: 14px; color: var(--text); outline: none;
}
.login-toggle-visibility { border: none; background: transparent; color: var(--text-muted); padding: 0 12px; cursor: pointer; }
.login-toggle-visibility:hover { color: var(--text); }
.login-remember { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-muted); margin-bottom: 22px; }
.login-submit {
  width: 100%; padding: 11px 16px; border: none; border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--accent), var(--accent-dark)); color: #fff;
  font-size: 14px; font-weight: 600; cursor: pointer; box-shadow: var(--shadow-sm);
  transition: filter 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.login-submit:hover { filter: brightness(1.06); box-shadow: var(--shadow-md); }
.login-submit:active { transform: translateY(1px); }
.login-footer-note { font-size: 12px; color: var(--text-muted); text-align: center; margin-top: 22px; }

@media (max-width: 680px) {
  .login-shell { flex-direction: column; max-width: 420px; }
  .login-brand { padding: 28px 28px 20px; }
  .login-form-panel { padding: 28px 28px 34px; }
}
