/* PubliTaxi OS — panel. Tokens base en ../shared/base.css */
:root { --sidebar: 252px; }
body { background: var(--canvas); font-size: 14px; line-height: 1.45; }
button, input, select, textarea { font: inherit; }
svg { display: block; width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Gate de acceso */
.gate { position: fixed; inset: 0; z-index: 500; display: grid; place-items: center; padding: 20px; background: radial-gradient(circle at 20% 0%, rgba(255,196,0,.14), transparent 30rem), #090b0f; }
.gate-card { display: grid; gap: 12px; width: min(380px, 100%); padding: 32px; border: 1px solid rgba(255,255,255,.12); border-radius: var(--radius-lg); background: rgba(255,255,255,.04); color: #fff; text-align: center; }
.gate-card img { width: 150px; margin: 0 auto 6px; }
.gate-card h1 { margin: 0 0 10px; font-size: 1.7rem; letter-spacing: -.04em; }
.gate-card label { display: grid; gap: 6px; text-align: left; font-size: .82rem; font-weight: 700; color: rgba(255,255,255,.75); }
.gate-card input { min-height: 46px; padding: 10px 12px; border: 1px solid rgba(255,255,255,.2); border-radius: 10px; background: rgba(255,255,255,.08); color: #fff; }
.gate-error { margin: 0; color: #ff8d94; font-size: .82rem; }
.gate-card > a { margin-top: 6px; color: rgba(255,255,255,.55); font-size: .8rem; }
.gate-card > a:hover { color: #fff; }

.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 50; width: var(--sidebar); display: flex; flex-direction: column; padding: 20px 14px 14px; border-right: 1px solid #ececef; background: #fff; }
.sidebar-brand { display: flex; align-items: center; justify-content: space-between; min-height: 46px; padding: 0 7px 0 10px; margin-bottom: 25px; }
.brand-lockup { display: flex; align-items: center; gap: 11px; }
.brand-lockup > span:last-child { display: flex; align-items: baseline; gap: 7px; }
.brand-lockup strong { font-size: 20px; letter-spacing: -.75px; }
.brand-lockup strong span { color: var(--yellow-strong); }
.brand-lockup small { color: #878a92; font-weight: 800; font-size: 10px; letter-spacing: .1em; }
.brand-mark { position: relative; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--yellow); box-shadow: inset 0 -2px 0 rgba(0,0,0,.12); }
.brand-mark::before { content: "P"; color: #111; font-weight: 900; font-size: 18px; font-style: italic; }
.brand-mark i { position: absolute; left: 8px; right: 8px; bottom: 5px; height: 3px; border-radius: 2px; background: #111; }
.sidebar-close { display: none; }
.main-nav { display: flex; flex-direction: column; gap: 3px; overflow-y: auto; padding-bottom: 12px; }
.main-nav p { margin: 15px 11px 7px; color: #a1a3aa; text-transform: uppercase; font-size: 10px; font-weight: 800; letter-spacing: .12em; }
.main-nav p:first-child { margin-top: 0; }
.main-nav a { position: relative; display: flex; align-items: center; gap: 12px; min-height: 43px; padding: 0 12px; border-radius: 11px; color: #5e616a; font-weight: 650; transition: .18s ease; }
.main-nav a:hover { color: var(--ink); background: #f7f7f8; }
.main-nav a.active { color: var(--ink); background: var(--yellow-soft); }
.main-nav a.active::before { content: ""; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 4px; border-radius: 0 4px 4px 0; background: var(--yellow); }
.main-nav a em { margin-left: auto; min-width: 22px; padding: 2px 6px; border-radius: 999px; background: #f0f0f2; color: #777a82; font-size: 11px; font-style: normal; text-align: center; }
.main-nav a.active em { background: var(--yellow); color: #171717; }
.sidebar-footer { margin-top: auto; border-top: 1px solid var(--line); padding: 15px 5px 0; }
.city-status { display: flex; align-items: center; gap: 10px; padding: 7px 5px 13px; }
.city-status > span { width: 9px; height: 9px; border-radius: 50%; background: #2db670; box-shadow: 0 0 0 5px #e8f8ef; }
.city-status div { display: flex; flex-direction: column; }
.city-status strong { font-size: 12px; }
.city-status small { color: var(--muted); font-size: 10px; }
.public-link { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 39px; border-radius: 10px; color: var(--muted); font-weight: 650; }
.public-link:hover { background: #f5f5f6; color: var(--ink); }
.public-link svg { width: 16px; height: 16px; }

.workspace { min-height: 100vh; margin-left: var(--sidebar); }
.topbar { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; height: 74px; padding: 0 28px; border-bottom: 1px solid rgba(226,227,232,.9); background: rgba(255,255,255,.92); backdrop-filter: blur(18px); }
.menu-toggle { display: none; margin-right: 8px; }
.global-search { position: relative; display: flex; align-items: center; width: min(410px, 42vw); }
.global-search > svg { position: absolute; left: 14px; z-index: 1; color: #898c94; width: 18px; }
.global-search input { width: 100%; height: 42px; padding: 0 58px 0 42px; border: 1px solid #e5e6e9; border-radius: 11px; outline: none; background: #f8f8f9; color: var(--ink); }
.global-search input:focus { background: #fff; border-color: #c9a700; box-shadow: 0 0 0 3px rgba(255,196,0,.18); }
.global-search kbd { position: absolute; right: 9px; padding: 3px 7px; border: 1px solid #dedfe3; border-radius: 6px; background: #fff; color: #8b8e96; font-family: inherit; font-size: 11px; }
.search-results { position: absolute; top: 49px; left: 0; right: 0; max-height: 360px; overflow: auto; padding: 7px; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: var(--shadow); }
.search-result { display: flex; align-items: center; gap: 11px; width: 100%; padding: 10px; border: 0; border-radius: 9px; background: transparent; text-align: left; cursor: pointer; }
.search-result:hover { background: #f6f6f7; }
.search-result > span:first-child { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: var(--yellow-soft); }
.search-result div { display: flex; flex-direction: column; min-width: 0; }
.search-result strong, .search-result small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-result small { color: var(--muted); }
.topbar-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.icon-button { position: relative; display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 1px solid var(--line); border-radius: 11px; background: #fff; cursor: pointer; }
.icon-button:hover { background: #f7f7f8; }
.notification-button i { position: absolute; right: 7px; top: 7px; width: 7px; height: 7px; border: 2px solid #fff; border-radius: 50%; background: #df3c46; }
.profile-button { display: flex; align-items: center; gap: 10px; margin-left: 4px; padding: 4px 8px 4px 4px; border: 0; border-radius: 12px; background: transparent; cursor: pointer; }
.profile-button:hover { background: #f5f5f6; }
.profile-button > span:first-child { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--ink); color: #fff; font-size: 12px; font-weight: 800; }
.profile-copy { display: flex; flex-direction: column; text-align: left; }
.profile-copy strong { font-size: 12px; }
.profile-copy small { color: var(--muted); font-size: 10px; }
.profile-button > svg { width: 15px; color: var(--muted); }
.popover { position: fixed; z-index: 70; right: 25px; top: 66px; width: min(370px, calc(100vw - 30px)); padding: 8px; border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: var(--shadow); }
.popover-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 8px 12px; }
.popover-head strong { font-size: 15px; }
.popover-head button { border: 0; background: transparent; color: #8a7000; font-size: 12px; font-weight: 700; cursor: pointer; }
.notification-row { display: flex; align-items: flex-start; gap: 11px; width: 100%; padding: 10px 8px; border: 0; border-radius: 11px; background: transparent; text-align: left; cursor: pointer; }
.notification-row:hover { background: #f7f7f8; }
.notification-row > span:last-child { display: flex; flex-direction: column; }
.notification-row small { margin-top: 2px; color: var(--muted); }
.notification-icon { display: grid; place-items: center; flex: 0 0 34px; width: 34px; height: 34px; border-radius: 10px; }
.notification-icon svg { width: 16px; }
.notification-icon.warning { background: var(--warning-bg); color: var(--warning); }
.notification-icon.danger { background: var(--danger-bg); color: var(--danger); }
.notification-icon.info { background: var(--info-bg); color: var(--info); }

main { padding: 30px 32px 50px; }
#view-root { max-width: 1480px; margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.page-title-block { min-width: 0; }
.breadcrumb { display: flex; align-items: center; gap: 7px; margin-bottom: 8px; color: #999ca4; font-size: 12px; font-weight: 650; }
.breadcrumb span:last-child { color: #666972; }
h1 { margin: 0; font-size: clamp(26px, 3vw, 34px); line-height: 1.12; letter-spacing: -.035em; }
.page-subtitle { margin: 7px 0 0; color: var(--muted); font-size: 14px; }
.head-actions { display: flex; align-items: center; gap: 9px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 15px; border: 1px solid transparent; border-radius: 11px; font-weight: 750; cursor: pointer; transition: .16s ease; }
.button svg { width: 17px; height: 17px; }
.button-primary { background: var(--yellow); border-color: var(--yellow); color: #161616; box-shadow: inset 0 -2px 0 rgba(0,0,0,.1); }
.button-primary:hover { background: #ffda1b; transform: translateY(-1px); }
.button-secondary { background: #fff; border-color: var(--line); color: #3d4047; }
.button-secondary:hover { background: #f7f7f8; }
.button-dark { background: var(--ink); color: #fff; }
.button-danger { background: var(--danger-bg); color: var(--danger); border-color: #ffd9dc; }
.button-small { min-height: 34px; padding: 0 11px; font-size: 12px; border-radius: 9px; }

.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi-card { position: relative; min-width: 0; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 2px 2px rgba(20,21,24,.02); overflow: hidden; }
.kpi-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.kpi-label { color: var(--muted); font-weight: 650; }
.kpi-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: #f3f3f4; color: #5e6168; }
.kpi-icon.yellow { background: var(--yellow-soft); color: #7c6500; }
.kpi-icon.red { background: var(--danger-bg); color: var(--danger); }
.kpi-icon.blue { background: var(--info-bg); color: var(--info); }
.kpi-value { display: flex; align-items: baseline; gap: 8px; margin: 13px 0 4px; font-size: 28px; font-weight: 830; letter-spacing: -.04em; }
.kpi-trend { color: var(--success); font-size: 11px; font-weight: 750; letter-spacing: 0; }
.kpi-trend.down { color: var(--danger); }
.kpi-foot { color: #93969e; font-size: 12px; }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(280px, .75fr); gap: 17px; }
.stack { display: grid; gap: 17px; align-content: start; }
.panel { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 2px 2px rgba(20,21,24,.02); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.panel-title { margin: 0; font-size: 16px; letter-spacing: -.015em; }
.panel-subtitle { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.panel-link { display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; color: #806900; font-size: 12px; font-weight: 750; cursor: pointer; }
.panel-link svg { width: 14px; }
.attention-list { display: grid; padding: 8px; }
.attention-item { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 12px; padding: 11px; border-radius: 11px; background: transparent; text-align: left; border: 0; cursor: pointer; }
.attention-item:hover { background: #f8f8f9; }
.attention-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; }
.attention-icon svg { width: 17px; }
.attention-icon.red { background: var(--danger-bg); color: var(--danger); }
.attention-icon.yellow { background: var(--warning-bg); color: var(--warning); }
.attention-icon.blue { background: var(--info-bg); color: var(--info); }
.attention-copy { min-width: 0; display: flex; flex-direction: column; }
.attention-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.attention-copy small { margin-top: 2px; color: var(--muted); }
.attention-count { display: grid; place-items: center; min-width: 26px; height: 26px; padding: 0 7px; border-radius: 999px; background: #f0f0f2; font-size: 11px; font-weight: 800; }
.activity-list { display: grid; padding: 9px 19px 16px; }
.activity-row { position: relative; display: grid; grid-template-columns: 22px 1fr; gap: 10px; padding: 9px 0; }
.activity-row:not(:last-child)::after { content: ""; position: absolute; left: 6px; top: 26px; bottom: -8px; width: 1px; background: #e7e8eb; }
.activity-dot { position: relative; z-index: 1; width: 13px; height: 13px; margin-top: 3px; border: 3px solid #fff; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 0 1px #d6d7db; }
.activity-copy { display: flex; flex-direction: column; }
.activity-copy span { color: #4f525a; font-size: 12px; }
.activity-copy strong { color: var(--ink); }
.activity-copy small { margin-top: 2px; color: #9a9da4; font-size: 11px; }

.filters-bar { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; padding: 13px; margin-bottom: 14px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.filter-search { position: relative; flex: 1 1 250px; min-width: 210px; }
.filter-search svg { position: absolute; top: 11px; left: 12px; width: 17px; color: #91949b; }
.filter-search input { width: 100%; height: 40px; padding: 0 12px 0 38px; border: 1px solid var(--line); border-radius: 10px; outline: none; background: #fafafa; }
.filter-search input:focus, .filter-select:focus { border-color: #c8a900; box-shadow: 0 0 0 3px rgba(255,196,0,.15); background: #fff; }
.filter-select { height: 40px; min-width: 145px; padding: 0 34px 0 11px; border: 1px solid var(--line); border-radius: 10px; outline: none; background: #fafafa; color: #4b4e55; cursor: pointer; }
.view-toggle { display: flex; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: #f7f7f8; }
.view-toggle button { display: grid; place-items: center; width: 31px; height: 31px; padding: 0; border: 0; border-radius: 7px; background: transparent; color: #8a8d94; cursor: pointer; }
.view-toggle button.active { background: #fff; color: #1d1e21; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.view-toggle svg { width: 16px; }

.data-card { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; overflow: hidden; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { padding: 11px 15px; border-bottom: 1px solid var(--line); background: #fafafa; color: #777a82; font-size: 11px; font-weight: 780; letter-spacing: .025em; text-align: left; text-transform: uppercase; white-space: nowrap; }
td { padding: 14px 15px; border-bottom: 1px solid #efeff1; color: #4e5159; vertical-align: middle; }
tbody tr { cursor: pointer; transition: .14s ease; }
tbody tr:hover { background: #fffdf2; }
tbody tr:last-child td { border-bottom: 0; }
.cell-title { color: var(--ink); font-weight: 720; white-space: nowrap; }
.cell-subtitle { display: block; margin-top: 2px; color: #999ca3; font-size: 11px; white-space: nowrap; }
.entity-cell { display: flex; align-items: center; gap: 10px; min-width: 170px; }
.avatar { display: grid; place-items: center; flex: 0 0 35px; width: 35px; height: 35px; border-radius: 10px; background: #eeeef0; color: #51545b; font-size: 11px; font-weight: 800; }
.avatar.yellow { background: var(--yellow-soft); color: #705d00; }
.avatar.dark { background: var(--ink); color: #fff; }
.avatar.blue { background: var(--info-bg); color: var(--info); }
.status { display: inline-flex; align-items: center; gap: 6px; min-height: 26px; padding: 0 9px; border-radius: 999px; background: #f0f1f2; color: #62656c; font-size: 11px; font-weight: 750; white-space: nowrap; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status.active, .status.approved, .status.paid, .status.available, .status.won { background: var(--success-bg); color: var(--success); }
.status.pending, .status.design, .status.waiting, .status.install, .status.due, .status.contacted, .status.qualified { background: var(--warning-bg); color: var(--warning); }
.status.cancelled, .status.rejected, .status.overdue, .status.blocked, .status.lost { background: var(--danger-bg); color: var(--danger); }
.status.lead, .status.scheduled, .status.sent, .status.new { background: var(--info-bg); color: var(--info); }
.status.finished, .status.unavailable { background: #f0f1f2; color: #70737b; }
.row-action { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: #777a82; cursor: pointer; }
.row-action:hover { background: #f4f4f5; color: #222; }
.row-action svg { width: 17px; }
.table-footer { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 13px 15px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.pagination { display: flex; gap: 5px; }
.pagination button { display: grid; place-items: center; min-width: 32px; height: 32px; padding: 0 7px; border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer; }
.pagination button.active { background: var(--ink); color: #fff; border-color: var(--ink); }

.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.entity-card { padding: 17px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; cursor: pointer; transition: .18s ease; }
.entity-card:hover { border-color: #d8be30; transform: translateY(-2px); box-shadow: var(--shadow); }
.entity-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.entity-card-main { display: flex; gap: 11px; }
.entity-card h3 { margin: 0; font-size: 14px; }
.entity-card p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.entity-card-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding-top: 15px; margin-top: 14px; border-top: 1px solid var(--line); }
.entity-card-meta span { display: flex; flex-direction: column; color: #9699a1; font-size: 10px; text-transform: uppercase; letter-spacing: .04em; }
.entity-card-meta strong { margin-top: 3px; color: #33353a; font-size: 12px; text-transform: none; letter-spacing: 0; }

.progress { width: 100%; height: 7px; overflow: hidden; border-radius: 999px; background: #ececef; }
.progress > span { display: block; height: 100%; border-radius: inherit; background: var(--yellow); }
.money { color: var(--ink); font-weight: 750; white-space: nowrap; }
.negative { color: var(--danger); }
.positive { color: var(--success); }
.empty-state { display: grid; place-items: center; min-height: 270px; padding: 40px; text-align: center; }
.empty-state span { display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 12px; border-radius: 15px; background: var(--yellow-soft); color: #776000; }
.empty-state h3 { margin: 0; }
.empty-state p { max-width: 360px; margin: 6px 0 15px; color: var(--muted); }

.campaign-stage { display: flex; align-items: center; gap: 4px; min-width: 210px; }
.campaign-stage span { flex: 1; height: 5px; border-radius: 99px; background: #e9e9ec; }
.campaign-stage span.done { background: var(--yellow); }
.campaign-stage small { min-width: 28px; margin-left: 5px; color: var(--muted); font-size: 10px; }

.evidence-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; }
.evidence-grid { display: grid; grid-template-columns: repeat(3, minmax(180px, 1fr)); gap: 13px; }
.evidence-card { border: 1px solid var(--line); border-radius: 14px; background: #fff; overflow: hidden; cursor: pointer; transition: .18s; }
.evidence-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.evidence-photo { position: relative; aspect-ratio: 4/3; overflow: hidden; background: linear-gradient(145deg,#29323c,#101113); }
.evidence-photo::before { content: ""; position: absolute; inset: 18% 8% 16%; border-radius: 50% 50% 12% 12%; background: #f1c40f; opacity: .9; transform: perspective(200px) rotateX(15deg); }
.evidence-photo::after { content: "TAXI"; position: absolute; left: 35%; right: 12%; bottom: 22%; display: grid; place-items: center; height: 27%; border: 2px solid rgba(255,255,255,.8); background: #1b1b1d; color: #fff; font-size: 11px; font-weight: 900; letter-spacing: .12em; }
.evidence-photo .photo-label { position: absolute; left: 10px; top: 10px; z-index: 2; padding: 4px 8px; border-radius: 999px; background: rgba(255,255,255,.9); font-size: 10px; font-weight: 800; }
.evidence-card-body { padding: 13px; }
.evidence-card-body h3 { margin: 0; font-size: 13px; }
.evidence-card-body p { margin: 3px 0 10px; color: var(--muted); font-size: 11px; }
.evidence-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.review-panel { position: sticky; top: 89px; align-self: start; border: 1px solid var(--line); border-radius: 15px; background: #fff; overflow: hidden; }
.review-photo { aspect-ratio: 4/3; }
.review-body { padding: 17px; }
.review-body h3 { margin: 0 0 3px; }
.review-body > p { margin: 0 0 15px; color: var(--muted); }
.review-info { display: grid; gap: 9px; padding: 13px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.info-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; color: var(--muted); }
.info-row strong { color: #393b41; text-align: right; }
.review-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.review-actions .button:last-child { grid-column: 1/-1; }

.pipeline { display: grid; grid-template-columns: repeat(6, minmax(210px, 1fr)); gap: 11px; overflow-x: auto; padding: 1px 1px 12px; }
.pipeline-column { min-height: 450px; padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: #f3f3f4; }
.pipeline-head { display: flex; align-items: center; justify-content: space-between; padding: 2px 2px 11px; }
.pipeline-head > span { display: flex; align-items: center; gap: 7px; font-weight: 760; }
.pipeline-head i { width: 8px; height: 8px; border-radius: 50%; background: #8f9299; }
.pipeline-head strong { display: grid; place-items: center; min-width: 23px; height: 23px; border-radius: 7px; background: #fff; font-size: 10px; }
.lead-card { padding: 12px; margin-bottom: 8px; border: 1px solid #e5e6e8; border-radius: 11px; background: #fff; cursor: pointer; box-shadow: 0 1px 2px rgba(0,0,0,.025); }
.lead-card:hover { border-color: #d4b929; }
.lead-card-top { display: flex; justify-content: space-between; gap: 8px; }
.lead-card h3 { margin: 0; font-size: 12px; }
.lead-card p { margin: 3px 0 10px; color: var(--muted); font-size: 11px; }
.source-badge { display: inline-flex; align-items: center; gap: 5px; color: #777a82; font-size: 10px; font-weight: 700; }
.source-badge svg { width: 13px; }
.lead-card time { color: #a1a4ab; font-size: 9px; }
.priority { width: 7px; height: 7px; border-radius: 50%; background: var(--danger); }

.settings-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 16px; }
.settings-nav { align-self: start; padding: 8px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.settings-nav button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 41px; padding: 0 11px; border: 0; border-radius: 9px; background: transparent; color: #686b73; text-align: left; font-weight: 650; cursor: pointer; }
.settings-nav button.active { background: var(--yellow-soft); color: var(--ink); }
.settings-nav svg { width: 17px; }
.settings-panel { padding: 21px; }
.settings-panel h2 { margin: 0; font-size: 18px; }
.settings-panel > p { margin: 5px 0 21px; color: var(--muted); }
.form-section { padding: 17px 0; border-top: 1px solid var(--line); }
.form-section:first-of-type { border-top: 0; padding-top: 0; }
.form-section h3 { margin: 0 0 12px; font-size: 14px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1/-1; }
.field label { color: #555860; font-size: 12px; font-weight: 720; }
.field input, .field select, .field textarea { width: 100%; min-height: 42px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 10px; outline: none; background: #fff; color: var(--ink); }
.field textarea { min-height: 84px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: #c3a300; box-shadow: 0 0 0 3px rgba(255,196,0,.16); }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 13px 0; border-top: 1px solid var(--line); }
.switch-row:first-child { border-top: 0; }
.switch-row div { display: flex; flex-direction: column; }
.switch-row small { margin-top: 2px; color: var(--muted); }
.switch { position: relative; flex: 0 0 43px; width: 43px; height: 24px; padding: 0; border: 0; border-radius: 99px; background: #d9dade; cursor: pointer; }
.switch::after { content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.18); transition: .2s; }
.switch.on { background: var(--yellow); }
.switch.on::after { transform: translateX(19px); }

.drawer-backdrop { position: fixed; inset: 0; z-index: 80; background: rgba(13,14,17,.26); backdrop-filter: blur(2px); }
.detail-drawer { position: fixed; z-index: 90; top: 0; right: 0; width: min(540px, 100vw); height: 100vh; overflow-y: auto; background: #fff; box-shadow: -18px 0 50px rgba(17,18,21,.14); transform: translateX(102%); transition: transform .25s ease; }
.detail-drawer.open { transform: translateX(0); }
.drawer-header { position: sticky; top: 0; z-index: 2; display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; padding: 21px 23px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.95); backdrop-filter: blur(12px); }
.drawer-kicker { display: block; margin-bottom: 4px; color: #979aa1; font-size: 10px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.drawer-header h2 { margin: 0; font-size: 20px; }
.drawer-close { flex: 0 0 auto; }
.drawer-body { padding: 21px 23px 40px; }
.drawer-hero { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 18px; }
.drawer-identity { display: flex; align-items: center; gap: 12px; }
.drawer-identity .avatar { width: 44px; height: 44px; flex-basis: 44px; }
.drawer-identity h3 { margin: 0; }
.drawer-identity p { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.drawer-tabs { display: flex; gap: 3px; padding: 4px; margin-bottom: 17px; border-radius: 11px; background: #f3f3f4; overflow-x: auto; }
.drawer-tabs button { flex: 1; min-width: max-content; padding: 8px 10px; border: 0; border-radius: 8px; background: transparent; color: #73767e; font-size: 11px; font-weight: 730; cursor: pointer; }
.drawer-tabs button.active { background: #fff; color: #222; box-shadow: 0 1px 4px rgba(0,0,0,.07); }
.detail-section { padding: 15px 0; border-top: 1px solid var(--line); }
.detail-section:first-of-type { border-top: 0; }
.detail-section h4 { margin: 0 0 11px; font-size: 13px; }
.detail-list { display: grid; gap: 10px; }
.detail-row { display: grid; grid-template-columns: 145px 1fr; gap: 12px; color: var(--muted); font-size: 12px; }
.detail-row strong { color: #34363c; font-weight: 680; }
.mini-list { display: grid; gap: 8px; }
.mini-list > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 11px; border: 1px solid var(--line); border-radius: 10px; }
.mini-list p { margin: 0; font-size: 12px; font-weight: 690; }
.mini-list small { display: block; margin-top: 2px; color: var(--muted); }
.timeline { display: grid; gap: 12px; }
.timeline-item { display: grid; grid-template-columns: 22px 1fr; gap: 9px; }
.timeline-item > span { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--yellow-soft); color: #776000; }
.timeline-item svg { width: 12px; }
.timeline-item p { margin: 0; font-size: 12px; }
.timeline-item small { color: var(--muted); }

.modal-backdrop { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(10,11,13,.43); backdrop-filter: blur(3px); }
.modal { width: min(780px, 100%); max-height: calc(100vh - 40px); overflow-y: auto; border-radius: 18px; background: #fff; box-shadow: 0 25px 80px rgba(0,0,0,.22); }
.modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; padding: 22px 23px; border-bottom: 1px solid var(--line); }
.modal-header h2 { margin: 0; font-size: 20px; }
.modal-header p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.modal-body { padding: 22px 23px; }
.modal-footer { display: flex; align-items: center; justify-content: flex-end; gap: 9px; padding: 16px 23px; border-top: 1px solid var(--line); background: #fafafa; }
.modal-steps { display: flex; gap: 8px; margin-bottom: 20px; }
.modal-step { flex: 1; }
.modal-step span { display: block; height: 4px; border-radius: 99px; background: #e8e8eb; }
.modal-step.done span, .modal-step.current span { background: var(--yellow); }
.modal-step small { display: block; margin-top: 6px; color: #8d9098; font-size: 10px; font-weight: 700; }

.toast-region { position: fixed; z-index: 140; right: 20px; bottom: 20px; display: grid; gap: 8px; width: min(360px, calc(100vw - 30px)); }
.toast { display: flex; align-items: center; gap: 11px; padding: 13px 14px; border: 1px solid #dedfe2; border-radius: 12px; background: #17181b; color: #fff; box-shadow: var(--shadow); animation: toast-in .25s ease both; }
.toast > span { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--yellow); color: #111; }
.toast svg { width: 15px; }
.toast p { margin: 0; font-size: 12px; font-weight: 650; }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } }

@media (max-width: 1150px) {
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .card-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .evidence-layout { grid-template-columns: 1fr; }
  .review-panel { position: static; }
}

@media (max-width: 860px) {
  :root { --sidebar: 266px; }
  .sidebar { transform: translateX(-102%); transition: transform .22s ease; box-shadow: 15px 0 50px rgba(0,0,0,.14); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-close, .menu-toggle { display: grid; }
  .sidebar-overlay { position: fixed; inset: 0; z-index: 45; background: rgba(8,9,11,.34); opacity: 0; pointer-events: none; transition: opacity .2s; }
  .sidebar-overlay.open { opacity: 1; pointer-events: auto; }
  .workspace { margin-left: 0; }
  .topbar { padding: 0 16px; }
  main { padding: 24px 18px 45px; }
  .global-search { width: min(390px, 55vw); }
  .profile-copy, .profile-button > svg, .global-search kbd { display: none; }
  .profile-button { padding-right: 4px; }
  .evidence-grid { grid-template-columns: repeat(2, minmax(160px,1fr)); }
}

@media (max-width: 620px) {
  body { font-size: 14px; }
  .topbar { height: 66px; gap: 3px; padding: 0 11px; }
  .global-search { flex: 1; width: auto; }
  .global-search input { height: 40px; padding-right: 10px; }
  .topbar-actions { gap: 3px; }
  #quick-add, .profile-button { display: none; }
  main { padding: 20px 13px 38px; }
  .page-head { align-items: flex-start; flex-direction: column; margin-bottom: 18px; }
  .head-actions { width: 100%; }
  .head-actions .button { flex: 1; }
  .kpi-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
  .kpi-card { padding: 15px; }
  .kpi-icon { width: 33px; height: 33px; }
  .kpi-value { font-size: 23px; }
  .kpi-foot { font-size: 10px; }
  .card-grid, .evidence-grid { grid-template-columns: 1fr; }
  .filters-bar { align-items: stretch; }
  .filter-search, .filter-select { flex: 1 1 100%; width: 100%; }
  .filters-bar .view-toggle { margin-left: auto; }
  .table-wrap { margin-right: -1px; }
  th, td { padding: 12px; }
  .table-footer { align-items: flex-start; flex-direction: column; }
  .settings-layout { grid-template-columns: 1fr; }
  .settings-nav { display: flex; overflow-x: auto; }
  .settings-nav button { flex: 0 0 auto; width: auto; }
  .form-grid { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
  .review-actions { grid-template-columns: 1fr; }
  .review-actions .button:last-child { grid-column: auto; }
  .modal-backdrop { padding: 0; align-items: end; }
  .modal { width: 100%; max-height: 92vh; border-radius: 18px 18px 0 0; }
  .modal-body, .modal-header { padding-left: 17px; padding-right: 17px; }
  .modal-footer { padding: 13px 17px; }
  .detail-row { grid-template-columns: 115px 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
