:root {
    --navy: #0d1c46;
    --navy-2: #172a59;
    --orange: #fa6d13;
    --orange-dark: #df5706;
    --blue: #0b6cb5;
    --ink: #172033;
    --muted: #667085;
    --line: #e4e8f0;
    --surface: #ffffff;
    --canvas: #f5f7fb;
    --success: #18864b;
    --danger: #c53d46;
    --warning: #c26b12;
    --shadow: 0 12px 35px rgba(13, 28, 70, .08);
    --radius: 14px;
}

* { box-sizing: border-box; }
html { font-size: 16px; }
body {
    margin: 0;
    color: var(--ink);
    background: var(--canvas);
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.icon { flex: none; display: block; }
.app-shell { min-height: 100vh; }
.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 30;
    width: 248px;
    display: flex;
    flex-direction: column;
    padding: 26px 18px 18px;
    color: #eaf0ff;
    background: var(--navy);
}
.brand { display: flex; align-items: center; gap: 11px; padding: 0 10px 28px; font-size: 1.06rem; font-weight: 750; letter-spacing: -.02em; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; color: #fff; background: var(--orange); font-size: 1.1rem; font-weight: 850; }
.nav-label { margin: 8px 11px 8px; color: #8492b8; font-size: .72rem; font-weight: 750; letter-spacing: .11em; }
.main-nav { display: grid; gap: 5px; }
.nav-item { display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 0 12px; border-radius: 10px; color: #b8c2df; font-size: .93rem; font-weight: 600; transition: .18s ease; }
.nav-item:hover { color: #fff; background: rgba(255,255,255,.07); }
.nav-item.active { color: #fff; background: rgba(250,109,19,.17); box-shadow: inset 3px 0 var(--orange); }
.nav-badge { min-width: 23px; margin-left: auto; padding: 2px 7px; border-radius: 100px; color: #fff; background: var(--orange); font-size: .68rem; font-weight: 800; text-align: center; }
.sidebar-user { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 14px 9px 4px; border-top: 1px solid rgba(255,255,255,.11); }
.avatar { display: grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 50%; color: var(--navy); background: #dbe5ff; font-size: .79rem; font-weight: 800; }
.avatar.small { width: 34px; height: 34px; }
.user-meta { display: grid; min-width: 0; line-height: 1.25; }
.user-meta strong { overflow: hidden; font-size: .85rem; text-overflow: ellipsis; white-space: nowrap; }
.user-meta span { color: #8997bd; font-size: .74rem; }
.user-meta:hover strong { color: #fff; }
.main-content { margin-left: 248px; min-height: 100vh; padding: 36px 42px 64px; }
.mobile-topbar, .sidebar-backdrop { display: none; }
.page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 26px; }
.page-title { margin: 0; color: var(--navy); font-size: clamp(1.55rem, 2.6vw, 2rem); line-height: 1.2; letter-spacing: -.035em; }
.page-kicker { margin: 5px 0 0; color: var(--muted); font-size: .91rem; }
.header-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 16px; border: 1px solid transparent; border-radius: 10px; font-size: .88rem; font-weight: 700; transition: .17s ease; }
.button-primary { color: #fff; background: var(--orange); box-shadow: 0 7px 17px rgba(250,109,19,.2); }
.button-primary:hover { background: var(--orange-dark); transform: translateY(-1px); }
.button-secondary { color: var(--navy); background: #fff; border-color: var(--line); }
.button-secondary:hover { border-color: #bdc7d9; background: #fbfcfe; }
.button-danger { color: var(--danger); background: #fff4f4; border-color: #f2cfd2; }
.button-small { min-height: 36px; padding: 0 12px; font-size: .82rem; }
.icon-button { display: inline-grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 10px; color: var(--navy); background: transparent; }
.icon-button:hover { background: #edf1f8; }
.icon-button.subtle { margin-left: auto; color: #9da9c9; }
.icon-button.subtle:hover { color: #fff; background: rgba(255,255,255,.08); }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.metric { position: relative; overflow: hidden; padding: 18px 19px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 3px 15px rgba(13,28,70,.03); }
.metric::after { content: ''; position: absolute; right: -25px; bottom: -38px; width: 85px; height: 85px; border-radius: 50%; background: rgba(11,108,181,.06); }
.metric-label { display: block; margin-bottom: 8px; color: var(--muted); font-size: .78rem; font-weight: 650; }
.metric-value { color: var(--navy); font-size: 1.65rem; font-weight: 800; line-height: 1; letter-spacing: -.04em; }
.metric-detail { display: block; margin-top: 7px; color: #8a93a5; font-size: .72rem; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.panel-header { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.panel-title { margin: 0; color: var(--navy); font-size: 1rem; font-weight: 760; }
.panel-body { padding: 20px; }
.filters { display: grid; grid-template-columns: minmax(230px, 1.5fr) repeat(3, minmax(150px, .65fr)) auto; gap: 10px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.search-box { position: relative; }
.search-box .icon { position: absolute; top: 50%; left: 13px; color: #8d96aa; transform: translateY(-50%); pointer-events: none; }
.search-box input { padding-left: 42px; }
.form-control { width: 100%; min-height: 42px; padding: 9px 12px; color: var(--ink); border: 1px solid #d8deea; border-radius: 9px; outline: none; background: #fff; transition: .16s ease; }
.form-control:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(11,108,181,.1); }
textarea.form-control { min-height: 118px; resize: vertical; }
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: .86rem; }
.data-table th { padding: 11px 16px; color: #7a8498; background: #fafbfc; font-size: .7rem; font-weight: 750; letter-spacing: .055em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.data-table td { padding: 14px 16px; border-top: 1px solid #edf0f5; vertical-align: middle; }
.data-table tbody tr { transition: background .14s ease; }
.data-table tbody tr:hover { background: #fbfcff; }
.contact-cell { display: flex; align-items: center; gap: 11px; min-width: 190px; }
.contact-avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; color: var(--blue); background: #eaf5fd; font-size: .72rem; font-weight: 800; }
.contact-copy { display: grid; line-height: 1.3; }
.contact-copy strong { color: var(--navy); font-size: .88rem; }
.contact-copy span { color: var(--muted); font-size: .75rem; }
.status-badge { display: inline-flex; align-items: center; min-height: 27px; padding: 4px 9px; border-radius: 100px; font-size: .73rem; font-weight: 730; white-space: nowrap; }
.status-new { color: #075c9a; background: #e8f4fd; }
.status-contacted { color: #6551a0; background: #f0edfb; }
.status-qualified { color: #865600; background: #fff3d8; }
.status-meeting { color: #915018; background: #ffeadb; }
.status-proposal { color: #2d5b8a; background: #e8eff7; }
.status-won { color: #11683a; background: #e5f5eb; }
.status-lost { color: #9a3139; background: #fbeaec; }
.status-neutral { color: #596273; background: #eef0f4; }
.link-cell { color: var(--blue); font-weight: 650; }
.muted { color: var(--muted); }
.empty-state { padding: 52px 24px; text-align: center; }
.empty-icon { display: grid; place-items: center; width: 58px; height: 58px; margin: 0 auto 15px; border-radius: 18px; color: var(--blue); background: #eef6fc; }
.empty-state h3 { margin: 0 0 6px; color: var(--navy); font-size: 1rem; }
.empty-state p { max-width: 440px; margin: 0 auto; color: var(--muted); font-size: .86rem; }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: .8rem; }
.pagination-actions { display: flex; gap: 7px; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(280px, .8fr); gap: 18px; align-items: start; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field { display: grid; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label, .field-label { color: #3b4557; font-size: .78rem; font-weight: 700; }
.field-hint { margin: 0; color: #8992a4; font-size: .74rem; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.detail-card { padding: 20px; }
.detail-name { margin: 0; color: var(--navy); font-size: 1.35rem; letter-spacing: -.025em; }
.detail-company { margin: 3px 0 18px; color: var(--muted); font-size: .88rem; }
.detail-list { display: grid; gap: 13px; }
.detail-item { display: flex; align-items: flex-start; gap: 10px; color: #455064; font-size: .83rem; word-break: break-word; }
.detail-item .icon { margin-top: 1px; color: #8791a6; }
.note-list, .activity-list { display: grid; gap: 0; }
.note { padding: 16px 0; border-bottom: 1px solid var(--line); }
.note:last-child { border-bottom: 0; }
.note-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 7px; color: var(--muted); font-size: .74rem; }
.note-head strong { color: var(--navy); font-size: .78rem; }
.note p { margin: 0; color: #3d4759; font-size: .84rem; white-space: pre-wrap; }
.tabs { display: flex; gap: 18px; padding: 0 20px; border-bottom: 1px solid var(--line); }
.tab { padding: 15px 2px 12px; border-bottom: 2px solid transparent; color: var(--muted); font-size: .83rem; font-weight: 700; }
.tab.active { color: var(--navy); border-color: var(--orange); }
.flash { margin: 0 0 18px; padding: 13px 16px; border-radius: 10px; font-size: .84rem; font-weight: 620; }
.flash-success { color: #17643a; background: #e8f6ed; border: 1px solid #c5e9d2; }
.flash-error { color: #91333a; background: #fdecee; border: 1px solid #f4cdd1; }
.flash-info { color: #17598c; background: #eaf5fc; border: 1px solid #c7e4f6; }
.checkbox-row { display: flex; align-items: flex-start; gap: 9px; }
.checkbox-row input { width: 17px; height: 17px; margin: 2px 0 0; accent-color: var(--orange); }
.checkbox-row label { color: #4e586a; font-size: .82rem; }
.cards-list { display: grid; gap: 12px; }
.list-card { display: flex; align-items: center; gap: 14px; padding: 16px 17px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.list-card-main { min-width: 0; flex: 1; }
.list-card-main strong { display: block; color: var(--navy); font-size: .9rem; }
.list-card-main span { display: block; overflow: hidden; color: var(--muted); font-size: .76rem; text-overflow: ellipsis; white-space: nowrap; }
.code-block { position: relative; overflow-x: auto; padding: 16px; border-radius: 11px; color: #dce5ff; background: #101c3d; font: .76rem/1.65 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre; }
.modal { position: fixed; inset: 0; z-index: 60; display: none; align-items: center; justify-content: center; padding: 22px; background: rgba(6,14,35,.58); }
.modal.open { display: flex; }
.modal-card { width: min(560px, 100%); max-height: 90vh; overflow-y: auto; border-radius: 16px; background: #fff; box-shadow: 0 28px 70px rgba(0,0,0,.22); }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; color: var(--navy); font-size: 1.05rem; }
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 85% 15%, rgba(11,108,181,.18), transparent 25%), var(--navy); }
.login-card { width: min(440px, 100%); padding: 34px; border-radius: 20px; background: #fff; box-shadow: 0 28px 80px rgba(0,0,0,.2); }
.login-brand { display: flex; align-items: center; gap: 11px; margin-bottom: 28px; color: var(--navy); font-weight: 800; }
.login-card h1 { margin: 0; color: var(--navy); font-size: 1.7rem; letter-spacing: -.035em; }
.login-card > p { margin: 7px 0 24px; color: var(--muted); font-size: .88rem; }
.login-form { display: grid; gap: 15px; }
.login-form .button { margin-top: 6px; }
.install-card { width: min(760px, 100%); }
.install-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.install-section { grid-column: 1 / -1; margin: 9px 0 -2px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--navy); font-size: .8rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.page-error { max-width: 540px; margin: 80px auto; padding: 30px; text-align: center; }
.nowrap { white-space: nowrap; }
.notification-list { display: grid; }
.notification-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: 13px; padding: 17px 20px; border-bottom: 1px solid var(--line); }
.notification-item:last-child { border-bottom: 0; }
.notification-item.unread { background: #fffaf6; }
.notification-dot { width: 9px; height: 9px; margin-top: 6px; border-radius: 50%; background: #c7ceda; }
.notification-item.unread .notification-dot { background: var(--orange); box-shadow: 0 0 0 4px rgba(250,109,19,.11); }
.notification-copy strong { display: block; color: var(--navy); font-size: .88rem; }
.notification-copy p { margin: 3px 0 5px; color: #4f5a6d; font-size: .82rem; }
.notification-copy span { color: var(--muted); font-size: .73rem; }
.security-note { padding: 14px 16px; border: 1px solid #cfe2f1; border-radius: 11px; color: #31546f; background: #f1f8fd; font-size: .8rem; }

@media (max-width: 1180px) {
    .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .filters { grid-template-columns: 1.4fr 1fr 1fr; }
    .filters .filter-assignee { display: none; }
}

@media (max-width: 900px) {
    .sidebar { transform: translateX(-100%); transition: transform .22s ease; }
    .sidebar.open { transform: translateX(0); }
    .sidebar-backdrop { position: fixed; inset: 0; z-index: 25; background: rgba(7,14,34,.4); }
    .sidebar-backdrop.open { display: block; }
    .mobile-topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; height: 64px; padding: 0 18px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.94); backdrop-filter: blur(10px); }
    .mobile-topbar .brand { padding: 0; font-size: .95rem; }
    .mobile-topbar .brand-mark { width: 30px; height: 30px; border-radius: 9px; font-size: .95rem; }
    .main-content { margin-left: 0; padding: 26px 20px 50px; }
    .grid-2 { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
    .page-header { align-items: stretch; flex-direction: column; gap: 15px; }
    .header-actions .button { flex: 1; }
    .metrics { grid-template-columns: 1fr 1fr; gap: 10px; }
    .metric { padding: 15px; }
    .metric-value { font-size: 1.4rem; }
    .filters { grid-template-columns: 1fr 1fr; }
    .filters .search-box { grid-column: 1 / -1; }
    .filters .button { width: 100%; }
    .form-grid { grid-template-columns: 1fr; }
    .field.full { grid-column: auto; }
    .panel-header { align-items: flex-start; }
    .panel-body { padding: 17px; }
    .install-grid { grid-template-columns: 1fr; }
    .install-section { grid-column: auto; }
    .login-card { padding: 27px 22px; }
}

@media (max-width: 430px) {
    .main-content { padding-inline: 14px; }
    .mobile-topbar { padding-inline: 12px; }
    .mobile-topbar .brand span:last-child { display: none; }
    .filters { grid-template-columns: 1fr; }
    .filters .search-box { grid-column: auto; }
    .metric-detail { display: none; }
    .form-actions { flex-direction: column-reverse; }
    .form-actions .button { width: 100%; }
}

/* Dashboard 2026 */
:root {
    --canvas: #f7f8fc;
    --ink: #10182d;
    --muted: #69738a;
    --line: #e5e9f1;
    --shadow: 0 8px 30px rgba(13, 28, 70, .055);
    --radius: 13px;
}

.sidebar {
    width: 244px;
    padding: 26px 12px 18px;
    background: #081d4c;
    box-shadow: 12px 0 35px rgba(8, 29, 76, .07);
}
.brand { padding: 0 7px 38px; font-size: 1.18rem; }
.brand-mark {
    width: 37px;
    height: 37px;
    border-radius: 9px;
    background: var(--orange);
    box-shadow: 0 8px 20px rgba(250, 109, 19, .22);
}
.nav-label { margin: 0 13px 10px; color: #7083b0; font-size: .61rem; letter-spacing: .12em; }
.main-nav { gap: 6px; }
.nav-item {
    min-height: 51px;
    padding: 0 15px;
    border-radius: 9px;
    color: #d5ddef;
    font-size: .9rem;
}
.nav-item.active {
    background: rgba(71, 102, 179, .25);
    box-shadow: inset 3px 0 var(--orange);
}
.sidebar-user { margin-inline: 7px; }
.main-content { margin-left: 244px; padding: 28px 30px 54px; }

.dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
}
.dashboard-header h1 { margin: 0; color: var(--navy); font-size: 1.55rem; line-height: 1.22; letter-spacing: -.035em; }
.dashboard-header p { margin: 5px 0 0; color: #73809a; font-size: .8rem; }
.dashboard-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; }
.top-search {
    position: relative;
    display: flex;
    align-items: center;
    width: min(310px, 27vw);
    height: 44px;
    color: #76839c;
}
.top-search .icon { position: absolute; left: 14px; pointer-events: none; }
.top-search input {
    width: 100%;
    height: 100%;
    padding: 0 14px 0 43px;
    border: 1px solid #dce2ec;
    border-radius: 9px;
    outline: none;
    color: var(--ink);
    background: #fff;
    font-size: .78rem;
    transition: .18s ease;
}
.top-search input:focus { border-color: #8caed1; box-shadow: 0 0 0 3px rgba(11, 108, 181, .08); }
.top-notification {
    position: relative;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    color: var(--navy);
    border-radius: 10px;
}
.top-notification:hover { background: #eef2f8; }
.top-notification span {
    position: absolute;
    top: 0;
    right: 0;
    display: grid;
    place-items: center;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border: 2px solid var(--canvas);
    border-radius: 20px;
    color: #fff;
    background: var(--orange);
    font-size: .58rem;
    font-weight: 800;
}
.button-dark { color: #fff; background: var(--navy); }
.button-dark:hover { background: #172c60; transform: translateY(-1px); }
.dashboard-actions .button { min-height: 44px; padding-inline: 15px; font-size: .78rem; }

.metrics { gap: 18px; margin-bottom: 20px; }
.metric {
    display: flex;
    align-items: center;
    gap: 17px;
    min-height: 116px;
    padding: 20px;
    border-color: #e2e7f0;
    border-radius: 12px;
    box-shadow: 0 5px 18px rgba(13, 28, 70, .04);
}
.metric::after { display: none; }
.metric-icon {
    display: grid;
    place-items: center;
    flex: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
}
.metric-blue .metric-icon { color: #1859d1; background: #edf3ff; }
.metric-green .metric-icon { color: #25893e; background: #ecf8ef; }
.metric-orange .metric-icon { color: #eb6715; background: #fff0e5; }
.metric-success .metric-icon { color: #299143; background: #edf8ef; }
.metric-label { margin: 0 0 2px; color: #1b2338; font-size: .78rem; font-weight: 600; }
.metric-value { display: block; font-size: 1.65rem; line-height: 1.13; }
.metric-orange .metric-value { color: #e13838; }
.metric-detail { margin-top: 3px; font-size: .69rem; }

.pipeline-panel { margin-bottom: 17px; padding: 17px; }
.section-heading, .panel-topline, .rail-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.section-heading { margin-bottom: 14px; }
.section-heading h2, .panel-topline h2, .rail-heading h2 { margin: 0; color: #151d31; font-size: .86rem; font-weight: 760; }
.section-heading > span { color: #8a94a8; font-size: .69rem; }
.pipeline {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    overflow: hidden;
    border: 1px solid #dfe5ee;
    border-radius: 8px;
    background: #fff;
}
.pipeline-stage {
    position: relative;
    display: grid;
    justify-items: center;
    gap: 3px;
    min-height: 67px;
    padding: 13px 7px 11px;
    border-right: 1px solid #e2e7ef;
    color: var(--navy);
    background: #fff;
    text-align: center;
    transition: background .16s ease;
}
.pipeline-stage:last-child { border-right: 0; }
.pipeline-stage:hover { background: #fafbfe; }
.pipeline-stage::after { content: ''; position: absolute; inset: auto 0 0; height: 3px; background: currentColor; }
.pipeline-stage span { font-size: .67rem; font-weight: 620; white-space: nowrap; }
.pipeline-stage strong { font-size: .9rem; }
.pipeline-stage.status-new { color: #075cc7; }
.pipeline-stage.status-contacted { color: #7351cf; }
.pipeline-stage.status-qualified { color: #d38a00; }
.pipeline-stage.status-meeting { color: #de5f18; }
.pipeline-stage.status-proposal { color: #2364a7; }
.pipeline-stage.status-won { color: #27813a; }
.pipeline-stage.status-lost { color: #cf3038; }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1fr) 304px; gap: 17px; align-items: start; }
.contacts-panel { min-width: 0; overflow: hidden; }
.panel-topline { padding: 16px 18px 12px; }
.panel-topline h2 { font-size: .9rem; }
.panel-topline p { margin: 3px 0 0; color: #8a94a8; font-size: .68rem; }
.small-link { display: inline-flex; align-items: center; gap: 6px; color: #175fa5; font-size: .72rem; font-weight: 700; }
.contacts-panel .filters {
    grid-template-columns: minmax(190px, 1.3fr) repeat(3, minmax(120px, .72fr)) 42px;
    padding: 0 18px 14px;
    border-bottom: 0;
}
.contacts-panel .form-control { min-height: 40px; border-color: #dfe4ed; border-radius: 8px; font-size: .73rem; }
.icon-filter {
    display: grid;
    place-items: center;
    width: 42px;
    height: 40px;
    padding: 0;
    color: #53617a;
    border: 1px solid #dfe4ed;
    border-radius: 8px;
    background: #fff;
}
.icon-filter:hover { color: var(--blue); border-color: #aabbd0; background: #f8fafd; }
.contacts-panel .data-table th { padding: 10px 13px; background: #f9fafc; font-size: .61rem; letter-spacing: .045em; }
.contacts-panel .data-table td { padding: 12px 13px; font-size: .72rem; }
.contacts-panel .contact-avatar { width: 32px; height: 32px; border-radius: 50%; }
.contacts-panel .contact-copy strong { font-size: .75rem; }
.contacts-panel .contact-copy span, .contacts-panel .muted { font-size: .67rem; }
.contacts-panel .status-badge { min-height: 24px; padding: 3px 8px; font-size: .64rem; }
.contacts-panel .pagination { padding: 13px 17px; font-size: .7rem; }
.followup-list-panel { max-width: 1200px; }
.back-link { display: inline-block; margin-bottom: 8px; color: var(--blue); font-size: .75rem; font-weight: 700; }

.dashboard-rail { display: grid; gap: 17px; }
.rail-panel { overflow: hidden; }
.rail-heading { padding: 17px 17px 13px; }
.rail-heading h2 { font-size: .82rem; }
.rail-heading a { color: #075eb7; font-size: .67rem; font-weight: 750; }
.followup-item {
    display: grid;
    grid-template-columns: 38px 37px minmax(0, 1fr) 28px;
    align-items: center;
    gap: 8px;
    margin: 0 14px;
    padding: 11px 2px;
    border-top: 1px solid #edf0f5;
}
.followup-item:hover .followup-person strong { color: var(--blue); }
.followup-item time {
    display: grid;
    place-items: center;
    width: 38px;
    height: 43px;
    border: 1px solid #e0e5ed;
    border-radius: 7px;
    line-height: 1;
}
.followup-item time span { color: #77839a; font-size: .49rem; font-weight: 750; }
.followup-item time strong { color: var(--navy); font-size: .79rem; }
.followup-hour { color: #273148; font-size: .67rem; }
.followup-person { display: grid; min-width: 0; line-height: 1.3; }
.followup-person strong, .followup-person small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.followup-person strong { color: #20283b; font-size: .69rem; }
.followup-person small { color: #8590a4; font-size: .59rem; }
.mini-avatar { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 50%; color: #195f9b; background: #e9f2fb; font-size: .52rem; font-weight: 800; }
.rail-empty { padding: 23px 17px; color: var(--muted); font-size: .72rem; }
.preview-notice {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    margin: 0 14px;
    padding: 12px 2px;
    border-top: 1px solid #edf0f5;
}
.notice-symbol { display: grid; place-items: center; width: 35px; height: 35px; border-radius: 8px; }
.notice-symbol.danger { color: #e4363f; background: #fff0f1; }
.notice-symbol.warning { color: #ee7318; background: #fff4e8; }
.preview-notice > span:nth-child(2) { display: grid; min-width: 0; line-height: 1.3; }
.preview-notice strong, .preview-notice small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.preview-notice strong { color: #222b40; font-size: .67rem; }
.preview-notice small { color: #8892a5; font-size: .58rem; }
.preview-notice > .icon { color: #7c879c; }

@media (max-width: 1320px) {
    .desktop-action { display: none; }
    .dashboard-grid { grid-template-columns: minmax(0, 1fr) 280px; }
    .contacts-panel .filters { grid-template-columns: minmax(180px, 1.2fr) repeat(2, minmax(120px, .7fr)) 42px; }
    .contacts-panel .filter-assignee { display: none; }
}

@media (max-width: 1120px) {
    .dashboard-header { align-items: flex-start; }
    .dashboard-actions { flex-wrap: wrap; }
    .top-search { width: 260px; }
    .dashboard-grid { grid-template-columns: 1fr; }
    .dashboard-rail { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
    .main-content { margin-left: 0; padding: 24px 20px 50px; }
    .dashboard-header { margin-top: 3px; }
    .pipeline { overflow-x: auto; grid-template-columns: repeat(7, minmax(125px, 1fr)); }
}

@media (max-width: 720px) {
    .dashboard-header { flex-direction: column; }
    .dashboard-actions { width: 100%; justify-content: flex-start; }
    .top-search { order: 3; width: 100%; }
    .dashboard-actions .button-primary { flex: 1; }
    .metrics { grid-template-columns: 1fr 1fr; }
    .metric { min-height: 105px; padding: 15px; gap: 12px; }
    .metric-icon { width: 43px; height: 43px; }
    .contacts-panel .filters { grid-template-columns: 1fr 1fr; }
    .contacts-panel .search-box { grid-column: 1 / -1; }
    .contacts-panel .icon-filter { width: 100%; }
    .dashboard-rail { grid-template-columns: 1fr; }
}

@media (max-width: 460px) {
    .main-content { padding-inline: 13px; }
    .dashboard-header h1 { font-size: 1.35rem; }
    .metrics { gap: 9px; }
    .metric { min-height: 98px; padding: 13px 10px; }
    .metric-icon { width: 38px; height: 38px; }
    .metric-label { font-size: .68rem; }
    .metric-value { font-size: 1.35rem; }
    .contacts-panel .filters { grid-template-columns: 1fr; }
    .contacts-panel .search-box { grid-column: auto; }
    .panel-topline { align-items: flex-start; }
}
