@import url('/static/css/tokens.css');

* {
    box-sizing: border-box
}

body {
    margin: 0;
    font-family: var(--font);
    color: var(--ink);
    font-size: 14px;
    line-height: 1.5;
    background: var(--background)
}

button,
input,
textarea,
select {
    font: inherit
}

button,
a,
input,
select,
textarea {
    -webkit-tap-highlight-color: transparent
}

a {
    color: inherit;
    text-decoration: none
}

button {
    cursor: pointer
}

button:disabled {
    opacity: .6;
    cursor: wait
}

button,
select,
input,
textarea {
    transition: border-color var(--transition), box-shadow var(--transition), background var(--transition)
}

:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 3px
}

input,
textarea,
select {
    width: 100%;
    min-width: 0;
    border: 1px solid var(--border);
    background: var(--white);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    color: var(--ink)
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--accent);
    outline: none;
    box-shadow: 0 0 0 3px var(--accent-soft)
}

input::placeholder,
textarea::placeholder {
    color: var(--placeholder)
}

input[type=checkbox],
input[type=radio] {
    width: 16px;
    height: 16px;
    accent-color: var(--accent);
    flex-shrink: 0
}

textarea {
    resize: vertical
}

label {
    display: flex;
    flex-direction: column;
    gap: 7px;
    font-size: 12px;
    font-weight: 600;
    color: var(--muted)
}

h1,
h2,
h3,
p {
    margin-top: 0
}

h1 {
    font-size: 28px;
    line-height: 1.25;
    letter-spacing: -.85px;
    margin-bottom: 9px;
    font-weight: 650
}

h2 {
    font-size: 17px;
    letter-spacing: -.3px;
    font-weight: 650;
    margin-bottom: 6px
}

h3 {
    font-size: 14px;
    font-weight: 650;
    margin-bottom: 16px
}

p {
    margin-bottom: 12px
}

small {
    display: block;
    font-size: 11px;
    color: var(--muted);
    line-height: 1.6
}

svg {
    height: 18px;
    width: 18px;
    vertical-align: middle;
    flex-shrink: 0;
    transition: color var(--transition), stroke-width var(--transition)
}

button:hover svg,
a:hover svg {
    stroke-width: 2;
    color: var(--accent)
}

[hidden] {
    display: none !important
}

.muted {
    color: var(--muted);
    font-size: 12px
}

.strong {
    font-weight: 600
}

.required {
    color: var(--danger)
}

.eyebrow {
    display: block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.75px;
    color: var(--muted);
    margin-bottom: 10px
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--accent);
    color: var(--white);
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    padding: 10px 16px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
    box-shadow: var(--shadow-button);
    transition: background var(--transition), transform var(--transition)
}

.button:hover {
    background: var(--accent-dark);
    transform: translateY(-1px)
}

.button:hover svg {
    color: inherit
}

.button.secondary {
    background: var(--white);
    color: var(--ink);
    border-color: var(--border);
    box-shadow: none
}

.button.secondary:hover {
    border-color: var(--accent-border);
    background: var(--accent-soft)
}

.button.small {
    padding: 7px 11px;
    font-size: 11px
}

.icon-button {
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--muted);
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0
}

.icon-button:hover {
    background: var(--accent-soft);
    color: var(--accent)
}

.text-link {
    font-size: 12px;
    font-weight: 600;
    color: var(--accent);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer
}

.text-link svg {
    width: 14px;
    height: 14px
}

.actions {
    display: flex;
    gap: 9px;
    align-items: center;
    flex-wrap: wrap
}

.full-width {
    width: 100%
}

.stack {
    display: flex;
    flex-direction: column;
    gap: 17px
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px
}

.form-grid .full {
    grid-column: 1/-1
}

.check-line {
    flex-direction: row;
    align-items: center;
    font-weight: 400
}

.inline-form {
    display: flex;
    align-items: end;
    gap: 8px
}

.inline-form label {
    flex: 1
}

.inline-form select {
    width: auto
}

.panel {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    min-width: 0
}

.padded {
    padding: 24px
}

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px
}

.section-heading p {
    margin: 4px 0 0
}

.section-heading h2,
.section-heading h3 {
    margin: 0
}

.separated {
    border-top: 1px solid var(--border);
    margin-top: 20px;
    padding-top: 20px
}

.badge {
    display: inline-flex;
    align-items: center;
    border-radius: 5px;
    padding: 3px 7px;
    white-space: nowrap;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .1px;
    background: var(--neutral-soft);
    color: var(--muted)
}

.badge.hot,
.badge.overdue,
.badge.lost,
.badge.invalid_spam {
    background: var(--danger-soft);
    color: var(--danger)
}

.badge.warm,
.badge.negotiation,
.badge.offer,
.badge.pending {
    background: var(--warning-soft);
    color: var(--warning)
}

.badge.cold,
.badge.new,
.badge.opened,
.badge.buy,
.badge.admin,
.badge.manager {
    background: var(--accent-soft);
    color: var(--accent)
}

.badge.qualified,
.badge.available,
.badge.won,
.badge.closed,
.badge.completed,
.badge.active {
    background: var(--success-soft);
    color: var(--success)
}

.badge.visit_scheduled,
.badge.property_shared,
.badge.agent {
    background: var(--purple-soft);
    color: var(--purple)
}

.badge.sell {
    background: var(--warning-soft);
    color: var(--warning)
}

.count-pill {
    font-size: 13px;
    letter-spacing: 0;
    background: var(--neutral-soft);
    border: 1px solid var(--border);
    border-radius: 7px;
    padding: 3px 8px;
    vertical-align: middle;
    margin-left: 6px;
    color: var(--muted)
}

.workspace {
    background: radial-gradient(ellipse at 90% 0, var(--atmosphere), transparent 50%), var(--background)
}

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--sidebar-width);
    padding: 28px 18px 0;
    border-right: 1px solid var(--border-glass);
    background: var(--surface-glass);
    backdrop-filter: blur(var(--blur));
    z-index: 30;
    display: flex;
    flex-direction: column
}

.brand {
    display: flex;
    gap: 9px;
    align-items: center;
    font-weight: 700;
    font-size: 21px;
    letter-spacing: -.6px;
    white-space: nowrap
}

.brand-symbol {
    width: 34px;
    height: 36px;
    border-radius: 9px;
    background: var(--navy);
    color: var(--white);
    display: inline-flex;
    align-items: center;
    justify-content: center
}

.brand-symbol svg {
    width: 21px;
    height: 21px
}

.brand-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent);
    margin: 9px 0 0 -4px
}

.workspace-label {
    font-size: 9px;
    letter-spacing: 1.6px;
    color: var(--muted);
    padding: 35px 12px 13px;
    font-weight: 650
}

.nav-link {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 11px 13px;
    margin: 4px 0;
    border-radius: 8px;
    font-size: 12px;
    color: var(--muted);
    transition: all var(--transition)
}

.nav-link:hover {
    background: var(--accent-soft);
    color: var(--accent)
}

.nav-link.active {
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 650;
    border: 1px solid var(--accent-border);
    padding: 10px 12px
}

.nav-link.active svg {
    stroke-width: 2
}

.nav-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent);
    margin-left: auto
}

.nav-section {
    font-size: 9px;
    letter-spacing: 1.5px;
    color: var(--muted);
    padding: 28px 12px 8px
}

.sidebar-bottom {
    margin-top: auto;
    padding-top: 25px
}

.capture-link {
    display: flex;
    gap: 8px;
    padding: 13px;
    font-size: 11px;
    color: var(--muted);
    border: 1px dashed var(--border);
    border-radius: 8px;
    margin-bottom: 20px
}

.profile {
    display: flex;
    align-items: center;
    gap: 9px;
    border-top: 1px solid var(--border);
    padding: 20px 0
}

.profile strong {
    font-size: 11px
}

.profile small {
    font-size: 9px
}

.profile form {
    margin-left: auto
}

.avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--avatar-bg);
    border: 2px solid var(--white);
    border-radius: 50%;
    width: 35px;
    height: 35px;
    color: var(--avatar-text);
    font-weight: 600;
    flex-shrink: 0
}

.small-avatar {
    width: 31px;
    height: 31px;
    font-size: 11px
}

.main-shell {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column
}

.topbar {
    height: 73px;
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 0 32px;
    border-bottom: 1px solid var(--border-glass);
    background: var(--surface-glass);
    backdrop-filter: blur(var(--blur));
    position: sticky;
    top: 0;
    z-index: 20
}

.global-search {
    display: flex;
    align-items: center;
    gap: 9px;
    max-width: 430px;
    flex: 1;
    color: var(--muted)
}

.global-search input {
    border: 0;
    background: transparent;
    font-size: 12px;
    padding: 8px 0;
    box-shadow: none
}

.global-search kbd {
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 11px;
    padding: 1px 5px;
    color: var(--placeholder)
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-left: auto
}

.date-label {
    font-size: 11px;
    color: var(--muted)
}

.notification-button {
    position: relative;
    border-right: 1px solid var(--border);
    border-radius: 0;
    padding-right: 15px;
    width: 40px
}

.notification-count {
    position: absolute;
    top: 0;
    right: 10px;
    background: var(--accent);
    color: var(--white);
    font-size: 8px;
    border-radius: 10px;
    min-width: 13px;
    padding: 0 3px
}

.main-content {
    padding: 32px;
    max-width: 1800px;
    width: 100%;
    margin: auto;
    flex: 1
}

.page-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 25px
}

.page-heading p {
    color: var(--muted);
    font-size: 12px;
    margin: 0
}

.page-heading .eyebrow {
    margin-bottom: 8px;
    font-size: 9px
}

.workspace-footer {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 20px 32px;
    color: var(--placeholder);
    font-size: 10px
}

.dashboard-filters {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 22px;
    flex-wrap: wrap
}

.dashboard-filters>span {
    display: flex;
    gap: 8px;
    align-items: center;
    color: var(--muted);
    font-size: 11px;
    margin-right: 8px
}

.dashboard-filters select {
    width: auto;
    font-size: 11px;
    padding: 8px 10px
}

.dashboard-filters label {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    font-weight: 400
}

.dashboard-filters input {
    font-size: 11px;
    width: 135px;
    padding: 7px 8px
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 24px
}

.metric-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 17px 18px;
    box-shadow: var(--shadow-card)
}

.metric-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: var(--muted);
    font-size: 11px
}

.metric-label svg {
    width: 16px;
    height: 16px;
    color: var(--placeholder)
}

.metric-card>strong {
    font-size: 28px;
    font-weight: 650;
    display: block;
    letter-spacing: -1px;
    margin: 9px 0 6px;
    line-height: 1.2
}

.metric-caption {
    font-size: 9px;
    color: var(--muted);
    display: flex;
    justify-content: space-between;
    align-items: center
}

.metric-caption svg {
    width: 12px;
    height: 12px
}

.metric-card.highlight {
    background: linear-gradient(130deg, var(--navy), var(--navy-light));
    border-color: var(--navy);
    color: var(--white)
}

.metric-card.highlight .metric-label,
.metric-card.highlight .metric-caption,
.metric-card.highlight svg {
    color: var(--on-navy)
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 22px;
    margin-bottom: 24px
}

.funnel {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 28px
}

.funnel-row {
    display: grid;
    grid-template-columns: 85px 1fr 30px;
    align-items: center;
    gap: 15px;
    font-size: 11px
}

.funnel-row>span {
    color: var(--muted)
}

.funnel-row strong {
    text-align: right;
    font-size: 12px
}

.funnel-track {
    height: 16px;
    border-radius: 4px;
    background: var(--neutral-soft);
    overflow: hidden
}

.funnel-bar {
    height: 100%;
    border-radius: 4px;
    background: var(--accent);
    min-width: 0
}

.funnel-row:nth-child(2) .funnel-bar {
    opacity: .85
}

.funnel-row:nth-child(3) .funnel-bar {
    opacity: .72
}

.funnel-row:nth-child(4) .funnel-bar {
    opacity: .6
}

.funnel-row:nth-child(5) .funnel-bar {
    opacity: .5
}

.funnel-row:nth-child(6) .funnel-bar {
    background: var(--success)
}

.chart-note {
    font-size: 10px;
    color: var(--muted);
    margin: 22px 0 0
}

.chart-container {
    height: 230px;
    position: relative
}

.work-item {
    display: flex;
    gap: 12px;
    align-items: center;
    border-bottom: 1px solid var(--border-light);
    padding: 15px 0
}

.work-item:last-child {
    border-bottom: 0
}

.work-item strong {
    font-size: 12px;
    font-weight: 600
}

.work-item small {
    margin-top: 3px
}

.work-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    border-radius: 9px;
    background: var(--accent-soft);
    color: var(--accent);
    flex-shrink: 0
}

.work-icon.overdue {
    background: var(--danger-soft);
    color: var(--danger)
}

.work-date {
    margin-left: auto;
    text-align: right;
    font-size: 10px;
    color: var(--muted);
    white-space: nowrap
}

.danger-text {
    color: var(--danger)
}

.calendar-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 38px;
    background: var(--neutral-soft);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 5px;
    color: var(--muted);
    font-size: 9px;
    line-height: 1.3;
    flex-shrink: 0
}

.calendar-date b {
    font-size: 17px;
    font-weight: 600;
    color: var(--ink)
}

.report-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
    margin-bottom: 24px
}

.report-metrics h2 {
    font-size: 24px
}

.summary-row {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-light);
    padding: 8px 0;
    font-size: 12px
}

.table-scroll {
    overflow-x: auto
}

table {
    width: 100%;
    border-collapse: collapse;
    white-space: nowrap;
    font-size: 12px
}

th {
    padding: 13px 18px;
    font-size: 10px;
    text-align: left;
    font-weight: 600;
    letter-spacing: .3px;
    color: var(--muted);
    background: var(--table-head);
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border)
}

td {
    padding: 16px 18px;
    border-bottom: 1px solid var(--border-light)
}

td small {
    margin-top: 4px;
    font-size: 10px
}

tr:last-child td {
    border-bottom: 0
}

tbody tr:hover {
    background: var(--table-hover)
}

td a:hover {
    color: var(--accent)
}

.filters {
    padding: 19px;
    display: flex;
    align-items: center;
    gap: 9px;
    flex-wrap: wrap
}

.filters select {
    width: auto;
    max-width: 160px;
    font-size: 11px;
    padding: 9px
}

.search-field {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 7px;
    flex: 1;
    min-width: 180px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 7px;
    padding-left: 10px
}

.search-field input {
    border: 0;
    box-shadow: none;
    font-size: 11px
}

.search-field svg {
    width: 16px;
    height: 16px
}

.advanced-filters {
    width: 100%;
    font-size: 11px;
    color: var(--muted)
}

.advanced-filters summary {
    cursor: pointer
}

.advanced-filters .form-grid {
    grid-template-columns: repeat(4, 1fr);
    padding-top: 16px
}

.bulk-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    border-top: 1px solid var(--border);
    background: var(--table-head);
    flex-wrap: wrap
}

.bulk-bar select,
.bulk-bar input {
    width: auto;
    font-size: 11px
}

.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-top: 1px solid var(--border-light);
    font-size: 11px;
    color: var(--muted)
}

.pagination>div {
    display: flex;
    gap: 8px
}

.empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--muted)
}

.empty>svg {
    width: 27px;
    height: 27px;
    color: var(--placeholder);
    margin-bottom: 13px
}

.empty h3 {
    color: var(--ink);
    margin: 0 0 8px
}

.empty p {
    font-size: 12px;
    margin: 0
}

.breadcrumb {
    display: flex;
    gap: 7px;
    align-items: center;
    color: var(--muted);
    font-size: 11px;
    margin-bottom: 20px
}

.breadcrumb svg {
    width: 14px;
    height: 14px
}

.heading-badges {
    display: flex;
    gap: 7px;
    margin-bottom: 10px
}

.detail-layout {
    display: grid;
    grid-template-columns: 270px minmax(0, 1fr);
    gap: 22px
}

.detail-sidebar,
.detail-main {
    display: flex;
    flex-direction: column;
    gap: 22px;
    min-width: 0
}

.info-list {
    margin: 0 0 20px
}

.info-list dt {
    color: var(--muted);
    font-size: 10px;
    margin-top: 15px
}

.info-list dd {
    margin: 4px 0 0;
    font-size: 12px;
    overflow-wrap: anywhere
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 20px 0 0
}

.detail-grid dt {
    color: var(--muted);
    font-size: 11px;
    margin-bottom: 5px;
    text-transform: capitalize
}

.detail-grid dd {
    margin: 0;
    font-size: 12px;
    overflow-wrap: anywhere
}

.stage-history {
    list-style: none;
    padding: 0 0 0 10px;
    margin: 0;
    border-left: 1px solid var(--accent-border)
}

.stage-history li {
    position: relative;
    padding: 0 0 18px 12px;
    font-size: 10px
}

.stage-history li::before {
    content: '';
    position: absolute;
    left: -14px;
    top: 4px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent)
}

.stage-history small {
    font-size: 9px
}

.tabs {
    display: flex;
    gap: 8px;
    padding: 0 20px;
    border-bottom: 1px solid var(--border);
    overflow-x: auto
}

.tabs button {
    background: none;
    border: 0;
    border-bottom: 2px solid transparent;
    color: var(--muted);
    padding: 17px 8px;
    font-size: 11px;
    white-space: nowrap
}

.tabs button.active {
    border-color: var(--accent);
    color: var(--accent);
    font-weight: 600
}

.timeline {
    list-style: none;
    margin: 24px 0 0;
    padding: 0
}

.timeline li {
    display: grid;
    grid-template-columns: 30px 1fr;
    gap: 14px;
    position: relative;
    padding-bottom: 26px
}

.timeline li:not(:last-child)::before {
    content: '';
    position: absolute;
    left: 14px;
    top: 30px;
    bottom: 0;
    width: 1px;
    background: var(--border)
}

.timeline-marker {
    border: 1px solid var(--border);
    background: var(--white);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    z-index: 1
}

.timeline-marker svg {
    width: 13px;
    height: 13px
}

.timeline-heading {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-size: 11px;
    align-items: center;
    margin: 5px 0 7px
}

.timeline-heading time {
    color: var(--muted);
    font-size: 10px;
    font-weight: 400
}

.timeline p {
    font-size: 12px;
    color: var(--muted);
    white-space: pre-line;
    overflow-wrap: anywhere;
    margin-bottom: 6px
}

.timeline small {
    font-size: 10px
}

.record-row {
    padding: 18px 0;
    border-bottom: 1px solid var(--border)
}

.record-row strong {
    font-size: 12px;
    margin-right: 8px
}

.record-row p {
    font-size: 12px;
    margin: 7px 0
}

.compact-form {
    padding: 18px;
    background: var(--table-head);
    border-radius: 8px;
    margin-top: 12px
}

.match-row {
    display: flex;
    gap: 14px;
    align-items: center;
    padding: 18px 0;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap
}

.match-row>div {
    flex: 1;
    font-size: 12px;
    min-width: 140px
}

.match-row small {
    margin-top: 5px
}

.match-row .inline-form select {
    font-size: 10px;
    padding: 7px;
    max-width: 115px
}

.match-score {
    color: var(--success);
    font-size: 11px;
    font-weight: 600
}

.operation-record {
    padding: 15px 0;
    border-bottom: 1px solid var(--border)
}

.operation-record .record-row {
    border: 0;
    padding-top: 8px
}

.property-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    padding: 0 20px 20px
}

.property-card {
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    transition: box-shadow var(--transition), transform var(--transition)
}

.property-card:hover {
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-2px)
}

.property-visual {
    height: 150px;
    background: linear-gradient(145deg, var(--property-bg), var(--neutral-soft));
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative
}

.property-visual>svg {
    width: 65px;
    height: 65px;
    stroke-width: .8;
    color: var(--property-ink)
}

.property-visual .badge {
    position: absolute;
    top: 13px;
    left: 13px;
    border: 1px solid var(--white)
}

.property-visual>span:last-child {
    position: absolute;
    bottom: 12px;
    right: 12px;
    font-size: 9px;
    color: var(--muted);
    letter-spacing: 1px
}

.property-info {
    padding: 18px
}

.property-info h3 {
    margin: 8px 0;
    font-size: 14px
}

.property-price {
    font-size: 16px;
    font-weight: 650
}

.property-specs {
    display: flex;
    gap: 17px;
    font-size: 10px;
    color: var(--muted);
    margin-top: 16px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border)
}

.property-specs svg {
    width: 14px;
    height: 14px;
    margin-right: 3px
}

.property-owner {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: var(--muted);
    padding-top: 13px
}

.notification-row {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px 10px;
    border-bottom: 1px solid var(--border)
}

.notification-row>div {
    flex: 1;
    font-size: 12px
}

.notification-row.unread {
    background: var(--table-hover)
}

.notification-row small {
    margin-top: 5px
}

dialog {
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: 28px;
    background: var(--modal-glass);
    backdrop-filter: blur(var(--blur));
    color: var(--ink);
    box-shadow: var(--shadow-modal);
    width: 480px;
    max-width: calc(100vw - 30px);
    max-height: 90vh;
    overflow: auto
}

dialog::backdrop {
    background: var(--overlay);
    backdrop-filter: blur(3px)
}

.dialog-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px
}

.dialog-heading h2 {
    margin: 0
}

.alert {
    border: 1px solid var(--danger-border);
    background: var(--danger-soft);
    color: var(--danger);
    font-size: 12px;
    padding: 12px 15px;
    border-radius: 8px;
    margin: 18px 0
}

#toast {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translate(-50%, 15px);
    padding: 12px 22px;
    background: var(--navy);
    color: var(--white);
    border-radius: 9px;
    box-shadow: var(--shadow-modal);
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: all var(--transition);
    font-size: 12px
}

#toast.visible {
    opacity: 1;
    transform: translate(-50%, 0)
}

.public-body {
    min-height: 100vh;
    background: radial-gradient(ellipse at 20% 0, var(--atmosphere), transparent 60%), var(--background)
}

.public-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1280px;
    margin: auto;
    padding: 28px 40px
}

.public-main {
    padding: 35px 30px 60px
}

.login-layout {
    max-width: 1100px;
    margin: 70px auto;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 90px;
    align-items: center
}

.login-story h1 {
    font-size: 48px;
    line-height: 1.2;
    letter-spacing: -2px;
    font-weight: 600;
    margin: 22px 0
}

.login-story h1 span,
.enquiry-heading h1 span {
    color: var(--accent)
}

.login-story p {
    font-size: 15px;
    line-height: 1.8;
    color: var(--muted);
    max-width: 400px
}

.story-line {
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--muted);
    font-size: 11px;
    margin-top: 35px
}

.story-line svg {
    color: var(--accent)
}

.login-card {
    padding: 35px
}

.login-card>.brand-symbol {
    margin-bottom: 23px
}

.login-card h2 {
    font-size: 24px;
    margin-bottom: 8px
}

.login-card form {
    margin-top: 28px
}

.login-help {
    font-size: 10px;
    color: var(--muted);
    text-align: center;
    margin: 22px 0 0
}

.enquiry-heading {
    text-align: center;
    margin: 0 auto 35px
}

.enquiry-heading h1 {
    font-size: 36px;
    letter-spacing: -1.3px;
    margin: 17px 0
}

.enquiry-heading p {
    font-size: 13px;
    color: var(--muted)
}

.enquiry-panel {
    max-width: 760px;
    margin: auto;
    padding: 30px 36px
}

.steps {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
    padding-bottom: 25px;
    margin-bottom: 28px
}

.steps span {
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--placeholder);
    font-size: 11px
}

.steps b {
    font-weight: 500
}

.steps .current {
    color: var(--accent)
}

.enquiry-panel h2 {
    font-size: 21px;
    margin-bottom: 12px
}

.enquiry-panel .form-grid {
    margin-top: 24px
}

.choice-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin: 25px 0
}

.choice {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 24px;
    position: relative;
    cursor: pointer;
    gap: 7px
}

.choice:has(input:checked) {
    border-color: var(--accent);
    background: var(--accent-soft);
    box-shadow: 0 0 0 1px var(--accent)
}

.choice input {
    position: absolute;
    right: 18px;
    top: 18px
}

.choice svg {
    width: 26px;
    height: 26px;
    color: var(--accent);
    margin-bottom: 16px
}

.choice strong {
    font-size: 15px;
    color: var(--ink)
}

.choice span {
    font-weight: 400;
    font-size: 11px
}

.wizard-footer {
    display: flex;
    align-items: center;
    gap: 12px;
    border-top: 1px solid var(--border);
    padding-top: 23px;
    margin-top: 15px
}

.wizard-footer #step-next,
.wizard-footer #step-submit {
    margin-left: auto
}

.wizard-footer #step-count {
    font-size: 11px
}

.privacy-note {
    font-size: 11px;
    color: var(--muted);
    margin-top: 25px
}

.public-footnote {
    text-align: center;
    font-size: 11px;
    color: var(--muted);
    margin-top: 24px
}

.narrow {
    max-width: 620px;
    margin: 60px auto;
    padding: 40px
}

.narrow p {
    color: var(--muted)
}

.success-panel {
    text-align: center
}

.success-icon {
    background: var(--success-soft);
    color: var(--success);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    margin: 0 auto 25px
}

.success-icon svg {
    width: 28px;
    height: 28px
}

.reference {
    background: var(--table-head);
    padding: 15px;
    border: 1px solid var(--border);
    border-radius: 8px;
    margin: 24px 0
}

.scrim {
    display: none
}

#menu-toggle {
    display: none
}

@media(min-width:1600px) {
    .main-content {
        padding: 40px
    }

    .metric-card {
        padding: 22px
    }

    .metric-card>strong {
        font-size: 34px
    }
}

@media(max-width:1200px) {
    :root {
        --sidebar-width: 205px
    }

    .sidebar {
        padding-left: 12px;
        padding-right: 12px
    }

    .main-content {
        padding: 25px
    }

    .topbar {
        padding: 0 25px
    }

    .metrics-grid {
        gap: 10px
    }

    .metric-card {
        padding: 13px
    }

    .metric-label {
        font-size: 10px
    }

    .metric-label svg {
        display: none
    }

    .metric-caption {
        font-size: 8px
    }

    .dashboard-grid {
        gap: 16px
    }

    .padded {
        padding: 20px
    }

    .property-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr))
    }

    .detail-layout {
        grid-template-columns: 240px minmax(0, 1fr);
        gap: 16px
    }

    .detail-sidebar .padded {
        padding: 17px
    }

    .topbar-right {
        gap: 12px
    }

    .date-label {
        display: none
    }
}

@media(max-width:1000px) {
    .dashboard-grid {
        grid-template-columns: 1fr
    }

    .metrics-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr))
    }

    .detail-layout {
        grid-template-columns: 1fr
    }

    .detail-sidebar {
        display: grid;
        grid-template-columns: 1fr 1fr
    }

    .detail-sidebar>section:last-child {
        display: none
    }

    .advanced-filters .form-grid {
        grid-template-columns: repeat(2, 1fr)
    }

    .page-heading {
        align-items: flex-start
    }

    .page-heading>.actions {
        justify-content: flex-end
    }

    .login-layout {
        gap: 40px;
        margin: 35px auto
    }

    .login-story h1 {
        font-size: 39px
    }

    .metrics-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr))
    }

    .report-metrics {
        gap: 12px
    }

    .report-metrics h2 {
        font-size: 19px
    }
}

@media(max-width:760px) {
    .sidebar {
        transform: translateX(-100%);
        width: 240px;
        transition: transform var(--transition)
    }

    .sidebar-open .sidebar {
        transform: translateX(0)
    }

    .sidebar-open .scrim {
        display: block;
        position: fixed;
        inset: 0;
        background: var(--overlay);
        z-index: 25
    }

    .main-shell {
        margin-left: 0
    }

    .main-content {
        padding: 23px 16px
    }

    .topbar {
        padding: 0 14px;
        height: 60px;
        gap: 10px
    }

    #menu-toggle {
        display: flex
    }

    .global-search input {
        font-size: 11px
    }

    .global-search kbd {
        display: none
    }

    .topbar-right {
        gap: 8px
    }

    .page-heading {
        flex-wrap: wrap;
        margin-bottom: 22px
    }

    h1 {
        font-size: 25px
    }

    .page-heading>.button {
        font-size: 11px
    }

    .metrics-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px
    }

    .metric-card {
        padding: 17px
    }

    .metric-label {
        font-size: 11px
    }

    .metric-label svg {
        display: block
    }

    .metric-caption {
        font-size: 9px
    }

    .metric-card>strong {
        font-size: 30px
    }

    .dashboard-filters {
        gap: 8px
    }

    .dashboard-filters>span {
        width: 100%
    }

    .dashboard-filters input {
        width: 125px
    }

    .report-metrics {
        grid-template-columns: 1fr
    }

    .detail-sidebar {
        grid-template-columns: 1fr
    }

    .detail-sidebar>section:nth-child(2) {
        display: none
    }

    .info-list {
        display: grid;
        grid-template-columns: 100px 1fr;
        gap: 10px
    }

    .info-list dt,
    .info-list dd {
        margin: 0
    }

    .tabs {
        padding: 0 10px;
        gap: 0
    }

    .tabs button {
        font-size: 10px
    }

    .form-grid {
        gap: 16px
    }

    .property-grid {
        grid-template-columns: 1fr;
        padding: 0 15px 15px
    }

    .detail-grid {
        gap: 16px
    }

    .timeline-heading {
        flex-wrap: wrap;
        gap: 3px
    }

    .workspace-footer {
        padding: 20px 16px;
        flex-direction: column;
        gap: 3px
    }

    .public-header {
        padding: 20px
    }

    .public-header .brand {
        font-size: 20px
    }

    .public-main {
        padding: 20px 16px 40px
    }

    .login-layout {
        grid-template-columns: 1fr;
        gap: 25px;
        margin: 0 auto;
        max-width: 450px
    }

    .login-story h1 {
        font-size: 32px;
        margin: 13px 0
    }

    .login-story p {
        font-size: 12px
    }

    .story-line {
        display: none
    }

    .login-card {
        padding: 25px
    }

    .enquiry-heading h1 {
        font-size: 28px
    }

    .enquiry-heading p {
        font-size: 12px
    }

    .enquiry-panel {
        padding: 23px 20px
    }

    .steps b {
        display: none
    }

    .steps span {
        font-size: 12px
    }

    .choice {
        padding: 20px 14px
    }

    .choice span {
        font-size: 10px
    }

    .choice-grid {
        gap: 12px
    }

    .form-grid {
        grid-template-columns: 1fr
    }

    .narrow {
        padding: 28px 22px;
        margin: 30px auto
    }

    .bulk-bar select,
    .bulk-bar input {
        flex: 1;
        min-width: 160px
    }

    .notification-row {
        flex-wrap: wrap
    }

    .notification-row form {
        margin-left: 50px
    }

    .filters .search-field {
        flex-basis: 100%
    }

    .dashboard-filters>select {
        max-width: 160px
    }

    .chart-container {
        height: 220px
    }

    .section-heading .text-link {
        white-space: nowrap
    }

    .notification-count {
        right: 4px
    }

    .notification-button {
        padding-right: 0;
        width: 30px
    }

    .padded {
        padding: 20px
    }

    .advanced-filters .form-grid {
        grid-template-columns: 1fr
    }

    .detail-sidebar .panel:nth-child(2) {
        display: block
    }
}

@media(prefers-reduced-motion:reduce) {
    * {
        transition: none !important;
        animation: none !important
    }
}