@font-face {
    font-family: "Pretendard";
    src: url("fonts/PretendardVariable.woff2") format("woff2");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}
:root {
    --brand: #008a47;
    --ink: #17283f;
    --muted: #59687c;
    --line: #dfe6ee;
    --bg: #f3f5f8;
    --new-ink: #155eef;
    --new-bg: #eff6ff;
    --new-line: #3b82f6;
    --active-ink: #7c3aed;
    --active-bg: #f5f0ff;
    --active-line: #a855f7;
    --complete-ink: #008a48;
    --complete-bg: #ecfdf3;
    --complete-line: #22c55e;
}
* {
    box-sizing: border-box;
}
body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font: 14px/1.6 "Pretendard",-apple-system,BlinkMacSystemFont,"Segoe UI","Malgun Gothic",sans-serif;
    letter-spacing: -.02em;
    font-size: 15px;
    word-break: keep-all;
    overflow-wrap: anywhere;
}
input,
textarea,
select {
    font: inherit;
    outline-offset: 3px;
}
button {
    font: inherit;
    outline-offset: 3px;
    cursor: pointer;
    transition: background-color .18s,border-color .18s;
}
button:disabled {
    opacity: 1;
    cursor: not-allowed;
    background: #f1f4f7;
    color: #8a96a5;
    border-color: #e2e8ef;
}
a {
    color: var(--brand);
    text-decoration: none;
}
[hidden] {
    display: none!important;
}
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
}
h2,
p {
    margin: 0;
}
h1 {
    margin: 0;
    font-size: 28px;
    letter-spacing: -.035em;
}
h3,
h4 {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
}
.primary {
    min-height: 44px;
    padding: 9px 16px;
    border-radius: 8px;
    font-weight: 600;
    white-space: nowrap;
    border: 1px solid #008a47;
    background: #008a47;
    color: white;
}
.primary:hover:not(:disabled) {
    background: #00723b;
    border-color: #00723b;
}
.secondary {
    min-height: 44px;
    padding: 9px 16px;
    border-radius: 8px;
    font-weight: 600;
    white-space: nowrap;
    border: 1px solid var(--line);
    background: white;
    color: var(--ink);
}
.secondary:hover,
.copy-phone:hover,
.pagination button:hover:not(:disabled) {
    background: #f1f5f9;
}
button:focus-visible,
a:focus-visible {
    outline: 3px solid #1c5ea6;
    outline-offset: 3px;
}
input:focus,
textarea:focus {
    outline: 2px solid #1c5ea6;
    border-color: #1c5ea6;
}
.muted {
    color: var(--muted);
    font-size: 13px;
    white-space: nowrap;
}
.topbar {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 64px;
    padding: 12px 28px;
    background: white;
    border-bottom: 1px solid var(--line);
}
.admin-header-logo {
    display: block;
    width: 64px;
    height: 32px;
    object-fit: contain;
    flex-shrink: 0;
}
.separator {
    margin: 0 12px;
    color: #bac3d0;
}
.today {
    margin-left: auto;
    font-size: 13px;
    color: var(--muted);
}
.logout-cta {
    margin-left: auto;
}
.today+.logout-cta {
    margin-left: 0;
}
.primary.logout-cta {
    background: white;
    border-color: var(--line);
    color: var(--muted);
    font-size: 13px;
    min-height: 36px;
    padding: 7px 12px;
}
.primary.logout-cta:hover {
    background: #f4f6f9;
}
.topbar>span:first-child {
    min-width: 0;
    overflow-wrap: anywhere;
}
main {
    max-width: 1440px;
    margin: auto;
    padding: 32px clamp(16px,3vw,48px) 56px;
    min-width: 0;
}
.page-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 24px;
    gap: 20px;
}
.page-heading p {
    color: var(--muted);
    margin-top: 4px;
    font-size: 14px;
    line-height: 1.7;
}
.page-heading>div {
    min-width: 0;
}
.page-heading h1 {
    font-size: 26px;
    font-weight: 800;
    line-height: 1.3;
    letter-spacing: -.04em;
    color: #17283f;
}
#refresh {
    flex-shrink: 0;
    min-width: 96px;
    font-weight: 650;
}
.page-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.export-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.export-button svg {
    width: 16px;
    height: 16px;
}
.stats {
    display: grid;
    grid-template-columns: repeat(4,minmax(0,1fr));
    gap: 0;
    border: 1px solid #e5eaf0;
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 20px;
    background: white;
    box-shadow: 0 2px 6px #17283f03;
}
.stats article {
    background: white;
    display: flex;
    flex-direction: column;
    position: relative;
    border: 0;
    border-radius: 0;
    padding: 22px 24px;
    gap: 10px;
    --stat-color: #334155;
}
.stats article>span {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
}
.stats strong {
    font-variant-numeric: tabular-nums;
    color: var(--stat-color);
    font-size: 30px;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -.035em;
}
.stats small {
    font-size: 12px;
    color: var(--muted);
}
.stats .highlight {
    border-color: #cce7d7;
    border-top-color: #008a47;
    background: white;
    --stat-color: var(--new-ink);
}
.stats article:nth-child(3) {
    border-top-color: #bd842b;
    --stat-color: var(--active-ink);
}
.stats article:nth-child(4) {
    border-top-color: #3f6ab0;
    --stat-color: var(--complete-ink);
}
.stats article+article {
    border-left: 0;
}
.stats article+article::before {
    content: "";
    position: absolute;
    left: 0;
    top: 22px;
    bottom: 22px;
    width: 1px;
    background: #edf0f4;
}
.stats article>span::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--stat-color);
    flex-shrink: 0;
}
.stats .highlight>span {
    color: #637083;
}
.stats .highlight strong {
    color: var(--stat-color);
}
.list-panel {
    position: relative;
    min-width: 0;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 20px;
}
.panel-heading {
    padding-right: 42px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    gap: 12px;
}
.panel-heading h2 {
    color: #17283f;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.4;
}
.panel-heading h2 #consultTotal {
    display: inline-block;
    background: #e8edf3;
    border-radius: 6px;
    padding: 1px 8px;
    font-size: 13px;
    color: #40546d;
    margin-left: 6px;
    vertical-align: middle;
    font-weight: 650;
}
.toolbar {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 0 20px 16px 0;
    vertical-align: middle;
}
.filters {
    display: flex;
    gap: 4px;
    flex-wrap: nowrap;
    background: #f0f3f7;
    border-radius: 8px;
    padding: 4px;
    min-width: 0;
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: thin;
}
.filter {
    min-height: 44px;
    border: 1px solid transparent;
    background: transparent;
    color: #58677b;
    border-radius: 7px;
    padding: 8px 12px;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
    font-size: 14px;
}
.filter.active {
    background: #17283f;
    color: #ffffff;
    border-color: #17283f;
    box-shadow: none;
    font-weight: 700;
}
.search {
    display: flex;
    align-items: center;
    border: 1px solid #dce3eb;
    border-radius: 8px;
    background: white;
    overflow: hidden;
    min-width: 220px;
    max-width: 100%;
    flex: 0 1 330px;
}
.search input {
    border: 0;
    padding: 12px;
    min-width: 0;
    background: transparent;
    width: 100%;
    font-size: 15px;
    outline: none;
}
.search button {
    border: 0;
    background: none;
    padding: 10px;
    font-size: 24px;
    color: #334155;
    display: grid;
    place-items: center;
    min-width: 44px;
    min-height: 46px;
}
.search button svg {
    width: 20px;
    height: 20px;
}
.search:focus-within {
    border-color: #1c5ea6;
    box-shadow: 0 0 0 3px #1c5ea61a;
}
.search-disclosure>summary {
    position: absolute;
    top: 12px;
    right: 12px;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    color: var(--muted);
    list-style: none;
}
.search-disclosure>summary::-webkit-details-marker {
    display: none;
}
.search-disclosure>summary:hover,
.search-disclosure[open]>summary {
    background: #f0f4f8;
    color: var(--ink);
}
.search-disclosure>summary:focus-visible {
    outline: 2px solid #1c5ea6;
}
.search-disclosure>summary svg {
    width: 20px;
    height: 20px;
}
.search-disclosure>summary .search-close-icon,
.search-disclosure[open]>summary .search-open-icon {
    display: none;
}
.search-disclosure[open]>summary .search-close-icon {
    display: block;
}
.search-disclosure .search {
    width: 100%;
    margin-bottom: 12px;
}
.filter.active[data-status="신규"] {
    color: var(--new-ink);
    background: var(--new-bg);
    border-color: var(--new-line);
}
.filter.active[data-status="상담 중"] {
    color: var(--active-ink);
    background: var(--active-bg);
    border-color: var(--active-line);
}
.filter.active[data-status="계약완료"] {
    color: var(--complete-ink);
    background: var(--complete-bg);
    border-color: var(--complete-line);
}
.filter.active[data-status="상담종료"] {
    color: #526174;
    background: #eef1f5;
    border-color: #d3dbe5;
}
.date-filter {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 16px;
    margin: 0 0 16px;
    padding: 0;
    vertical-align: middle;
}
.date-filter-top {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.date-filter-label {
    color: #52657d;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}
.date-preset {
    min-height: 40px;
    padding: 6px 30px 6px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
    color: var(--ink);
    font-size: 13px;
    cursor: pointer;
}
.date-preset:focus-visible {
    outline: 2px solid #1c5ea6;
    outline-offset: 2px;
}
.date-filter-bottom {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}
.date-range {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}
.date-range input {
    width: 150px;
    min-width: 0;
    min-height: 40px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #fff;
    color: var(--ink);
    font-size: 13px;
}
.date-range input:focus {
    outline: none;
    border-color: #4b83d1;
    box-shadow: 0 0 0 3px rgba(75, 131, 209, .1);
}
.date-range>span {
    color: #94a3b8;
    font-size: 13px;
}
.date-search-button {
    min-height: 40px;
    padding: 8px 18px;
    white-space: nowrap;
}
.consult-cards {
    display: grid;
    gap: 16px;
}
.management-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e3eaf2;
}
.management-tabs button {
    min-height: 42px;
    padding: 8px 16px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #61738b;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}
.management-tabs button[aria-selected="true"] {
    background: #edf3fb;
    color: #214e85;
}
.sources-view {
    padding: 4px 0 12px;
}
.sources-view h3 {
    margin: 0;
    color: #172b46;
    font-size: 18px;
}
.sources-caption {
    margin: 8px 0 18px;
    color: #64748b;
    font-size: 13px;
    line-height: 1.6;
}
.sources-help {
    line-height: 1.6;
    margin: 14px 0 0;
    font-size: 12px;
    color: #788697;
}
.source-table-heading {
    display: flex;
    justify-content: space-between;
    padding: 12px 18px;
    border: 1px solid #e1e8f1;
    border-bottom: 0;
    border-radius: 10px 10px 0 0;
    background: #f7f9fc;
    color: #65758a;
    font-size: 12px;
    font-weight: 600;
}
.source-list {
    display: grid;
    gap: 0;
    width: 100%;
    margin: 0;
    padding: 0 18px;
    border: 1px solid #e1e8f1;
    border-radius: 0 0 10px 10px;
    background: #fff;
}
.source-count-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 60px;
    border-bottom: 1px solid #edf1f6;
}
.source-count-row:last-child {
    border-bottom: 0;
}
.source-count-row dt {
    color: #334155;
    font-size: 15px;
    font-weight: 500;
}
.source-count-row dd {
    display: flex;
    align-items: baseline;
    gap: 4px;
    margin: 0;
    color: #64748b;
    font-size: 13px;
}
.source-count-row strong {
    color: #254f80;
    font-size: 21px;
    font-weight: 650;
    font-variant-numeric: tabular-nums;
}
.consult-card {
    border: 1px solid #dfe5ec;
    border-radius: 10px;
    background: white;
    overflow: hidden;
    box-shadow: none;
    --status-ink: var(--new-ink);
    --status-bg: var(--new-bg);
    --status-line: var(--new-line);
    border-left: 3px solid var(--status-line);
}
.card-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px 6px;
    align-items: flex-start;
}
.card-title {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex-wrap: wrap;
}
.card-title h2 {
    letter-spacing: -.025em;
    overflow-wrap: anywhere;
    line-height: 1.4;
    font-size: 22px;
    font-weight: 750;
    color: #14263d;
}
.source-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 8px;
    border: 1px solid #dce4ed;
    border-radius: 5px;
    background: #f3f6fa;
    color: #49627d;
    font-size: 13px;
    line-height: 1.4;
    white-space: nowrap;
}
.source-badge > span {
    color: inherit;
}
.source-badge > strong {
    color: inherit;
    font-size: inherit;
    font-weight: 600;
}
#consultPanel[data-view="sources"] .panel-heading {
    margin-bottom: 16px;
}
#consultPanel[data-view="sources"] .date-filter {
    display: flex;
    width: 100%;
    padding: 0;
    margin: 0 0 16px;
    border-radius: 0;
    background: transparent;
    justify-content: flex-start;
    box-sizing: border-box;
}
#consultPanel[data-view="sources"] .date-filter-label {
    font-size: 14px;
    color: #334155;
}
#consultPanel[data-view="sources"] .date-preset {
    min-width: 160px;
    min-height: 42px;
    padding: 8px 32px 8px 12px;
    border: 1px solid #dce4ed;
    border-radius: 8px;
    background: #fff;
    font-size: 14px;
}
#consultPanel[data-view="sources"] .sources-view {
    padding: 0;
}
#consultPanel[data-view="sources"] .sources-caption {
    margin: 0 0 12px;
    font-size: 14px;
    color: #52657d;
}
.status-badge {
    background: var(--status-bg);
    color: var(--status-ink);
    border-radius: 5px;
    padding: 5px 9px;
    font-size: 13px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    line-height: 1.4;
    white-space: nowrap;
}
.consult-card[data-state="1"] .status-badge,
.consult-card[data-state="2"] .status-badge,
.consult-card[data-state="3"] .status-badge {
    background: var(--status-bg);
    color: var(--status-ink);
}
.card-tools {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
}
.card-tools time {
    font-size: 12px;
    font-weight: 400;
    color: var(--muted);
}
.delete-consult {
    border: 0;
    color: #8a96a5;
    background: transparent;
    border-radius: 50%;
    padding: 10px;
    display: grid;
    place-items: center;
    min-width: 40px;
    min-height: 40px;
}
.delete-consult:hover {
    background: #fff0f2;
    color: #b74253;
}
.card-contact {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
    padding: 0 18px 12px;
}
.card-overview {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px 28px;
    padding: 0 18px 16px;
}
.card-overview .card-contact {
    padding: 0;
}
.card-overview .rental-details {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 24px;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    border-radius: 0;
    flex: 1 1 280px;
}
.card-overview .rental-details>div {
    display: flex;
    align-items: baseline;
    gap: 8px;
}
.card-overview .rental-details dt {
    margin: 0;
    white-space: nowrap;
    font-size: 12px;
    font-weight: 500;
    color: #718096;
}
.card-overview .rental-details dd {
    font-size: 14px;
    font-weight: 700;
    color: #22364d;
    line-height: 1.5;
}
.phone-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}
.phone-actions a {
    font-size: 17px;
    font-weight: 700;
    color: #244c79;
    font-variant-numeric: tabular-nums;
}
.copy-phone {
    display: grid;
    place-items: center;
    padding: 10px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #7b889a;
    min-width: 40px;
    min-height: 40px;
}
.copy-phone svg,
.delete-consult svg {
    width: 17px;
    height: 17px;
}
.rental-details {
    display: grid;
    grid-template-columns: minmax(0,2fr) repeat(2,minmax(0,1fr));
    gap: 16px;
    margin: 0 24px 20px;
    padding: 16px 18px;
    background: #f7f9fb;
    border: 1px solid #e9edf2;
    border-radius: 10px;
}
.rental-details div {
    min-width: 0;
}
.rental-details dt {
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 4px;
}
.rental-details dd {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    overflow-wrap: anywhere;
}
.status-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px 14px;
    background: #f8fafc;
    border-top: 1px solid #edf0f4;
}
.status-row h3 {
    flex-shrink: 0;
    color: #52657d;
    font-weight: 700;
    font-size: 12px;
}
.status-buttons {
    display: flex;
    gap: 2px;
    flex-wrap: wrap;
    padding: 3px;
    background: #f3f5f8;
    border-radius: 8px;
}
.status-buttons button {
    border: 1px solid transparent;
    border-radius: 6px;
    background: transparent;
    color: #56677a;
    padding: 9px 14px;
    font-size: 14px;
    font-weight: 500;
    min-height: 44px;
    white-space: nowrap;
}
.status-buttons button:hover {
    background: #f0f6f3;
}
.status-buttons button.selected {
    border-color: #e4e9f0;
    background: white;
    color: var(--status-ink);
    font-weight: 700;
    box-shadow: 0 1px 3px #17283f0a;
}
.received-note {
    margin: 4px 18px 16px;
    padding: 14px 16px;
    background: #f7f9fc;
    border: 1px solid #edf1f5;
    border-left: 3px solid #c5d5e8;
    border-radius: 8px;
}
.received-note h3 {
    margin-bottom: 8px;
    font-size: 12px;
    font-weight: 650;
    line-height: 1.4;
    color: #64748b;
}
.received-note p {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.7;
    color: #263b52;
}
.consult-card[data-state="1"] {
    --status-ink: var(--active-ink);
    --status-bg: var(--active-bg);
    --status-line: var(--active-line);
}
.consult-card[data-state="2"] {
    --status-ink: var(--complete-ink);
    --status-bg: var(--complete-bg);
    --status-line: var(--complete-line);
}
.consult-card[data-state="3"] {
    --status-ink: #526174;
    --status-bg: #eef1f5;
    --status-line: #d3dbe5;
}
.status-badge::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    flex-shrink: 0;
}
.status-buttons button.selected::before {
    content: "\2713";
    margin-right: 5px;
}
.consult-detail>summary {
    cursor: pointer;
    padding: 10px 18px;
    color: var(--muted);
    font-size: 13px;
    border-top: 1px solid #edf0f4;
    min-height: 44px;
}
.consult-detail>summary:focus-visible {
    outline: 2px solid #2459a1;
    outline-offset: -3px;
}
.consult-detail[open]>summary {
    background: #f8fafc;
}
.card-header .card-contact {
    padding: 8px 0 0;
    gap: 12px;
}
.card-header .card-contact time {
    color: var(--muted);
    font-size: 12px;
}
.card-header .status-row {
    border: 0;
    background: transparent;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}
.card-header .status-row h3 {
    font-size: 12px;
}
.card-header .status-buttons button {
    min-height: 36px;
    padding: 7px 10px;
    font-size: 12px;
}
.card-header .delete-consult {
    min-height: 36px;
}
.consult-card>.rental-details {
    margin: 8px 18px 12px;
}
.consult-card>.received-note {
    margin: 4px 18px 16px;
    padding: 14px 16px;
    border: 1px solid #edf1f5;
    border-left: 3px solid #c5d5e8;
}
.consult-card>.received-note p {
    font-size: 14px;
}
.admin-notes {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 16px;
    padding: 20px 24px 24px;
}
.admin-notes>h3 {
    grid-column: 1/-1;
    color: #344861;
    font-size: 13px;
    font-weight: 700;
}
.author-notes {
    min-width: 0;
    padding: 16px;
    background: #f8fafc;
    border: 1px solid #e7edf3;
    border-radius: 8px;
}
.author-notes h4 {
    margin-bottom: 12px;
    font-size: 14px;
    font-weight: 700;
    color: #263b52;
}
.owner h4 span {
    color: #16a34a;
}
.manager h4 span {
    color: #2563eb;
}
.no-memo {
    font-size: 13px;
    color: #647184;
    margin-bottom: 12px;
}
.memo {
    background: white;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 12px;
}
.memo-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}
.memo-header time {
    font-size: 12px;
    color: var(--muted);
}
.memo-header button {
    border: 0;
    background: none;
    color: #52667b;
    font-size: 12px;
    padding: 3px 6px;
    min-height: 36px;
}
.memo-header .danger-text {
    color: #b74253;
}
.memo-content {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    font-size: 14px;
    line-height: 1.7;
}
.memo-add {
    display: flex;
    align-items: stretch;
    gap: 8px;
}
.memo-add textarea,
.memo-edit textarea {
    width: 100%;
    min-width: 0;
    min-height: 72px;
    resize: vertical;
    border: 1px solid #dce3eb;
    border-radius: 8px;
    padding: 11px;
    color: var(--ink);
    background: white;
    font-size: 14px;
}
.memo-add textarea::placeholder {
    color: #8590a0;
}
.memo-add .primary {
    min-width: 58px;
    flex-shrink: 0;
    padding: 8px 12px;
    align-self: flex-end;
    min-height: 44px;
}
.memo-edit>div {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}
.memo-edit button {
    padding: 6px 12px;
    font-size: 13px;
}
.empty {
    text-align: center;
    color: #59687c;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    background: white;
    border: 0;
    padding: 32px 16px;
}
.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0 0;
    color: var(--muted);
    font-size: 13px;
    gap: 12px;
    flex-wrap: wrap;
}
.pagination button {
    border: 1px solid var(--line);
    background: white;
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 13px;
    min-height: 44px;
    margin: 0;
    white-space: nowrap;
}
.empty-icon {
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: #eaf0f6;
    color: #536b87;
    margin-bottom: 4px;
    display: none;
}
.empty-icon svg {
    width: 26px;
    height: 26px;
}
.empty strong {
    color: #334155;
    font-size: 15px;
    font-weight: 500;
}
.empty p {
    font-size: 14px;
    line-height: 1.7;
    word-break: keep-all;
}
.pagination>div {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}
.error {
    color: #b74253;
    font-size: 13px;
}
.error:empty {
    display: none;
}
.load-error {
    color: #b74253;
    padding: 16px;
    background: #fff2f2;
    border: 1px solid #f1d3d3;
    border-radius: 8px;
    margin-top: 16px;
    font-size: 14px;
}
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    max-width: calc(100% - 30px);
    background: #17283f;
    color: white;
    padding: 13px 22px;
    border-radius: 10px;
    box-shadow: 0 6px 24px #17283f26;
    z-index: 10;
}
.admin-login-logo {
    display: block;
    width: 104px;
    height: 52px;
    object-fit: contain;
    flex-shrink: 0;
}
.login-screen {
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: radial-gradient(ellipse at 50% 0,#e6f6ed,transparent 60%);
}
.login-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 28px;
}
.login-brand b {
    color: var(--brand);
}
.login-card {
    width: 420px;
    max-width: 100%;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 34px;
    background: white;
    box-shadow: 0 12px 48px #17283f08;
}
.login-card h1 {
    font-size: 26px;
    margin: 0 0 24px;
}
.login-card label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin: 18px 0 8px;
}
.login-card input {
    width: 100%;
    padding: 12px;
    border: 1px solid #dce3eb;
    border-radius: 9px;
}
.login-card .error {
    margin: 12px 0;
}
.login-card .primary {
    width: 100%;
    margin-top: 22px;
    min-height: 48px;
}
.login-card small {
    display: block;
    text-align: center;
    color: var(--muted);
    margin-top: 22px;
    font-size: 12px;
}
@media (max-width: 760px) {
    .admin-header-logo {
        width: 44px;
        height: 22px;
    }
    .topbar {
        padding: 12px 14px;
        gap: 10px;
        font-size: 12px;
        min-height: 60px;
    }
    .separator {
        margin: 0 5px;
    }
    .today {
        display: none;
    }
    .today+.logout-cta {
        margin-left: auto;
    }
    .primary.logout-cta {
        font-size: 12px;
        padding: 6px 10px;
        flex-shrink: 0;
        min-height: 40px;
    }
    .topbar>span:first-child {
        flex: 1;
        line-height: 1.5;
    }
    main {
        padding: 14px 12px 32px;
    }
    .page-heading {
        gap: 12px;
        align-items: center;
        margin-bottom: 12px;
    }
    .page-heading h1 {
        font-size: 23px;
        font-weight: 700;
    }
    .page-heading p {
        line-height: 1.65;
        word-break: keep-all;
    }
    #refresh {
        min-width: 76px;
        min-height: 36px;
        padding: 6px 10px;
        font-size: 13px;
    }
    .page-actions {
        gap: 6px;
    }
    .export-button {
        min-height: 36px;
        padding: 6px 10px;
        font-size: 13px;
    }
    .stats {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        margin-bottom: 16px;
    }
    .stats article {
        padding: 10px 4px;
        gap: 4px;
        text-align: center;
    }
    .stats article>span {
        justify-content: center;
        gap: 4px;
        white-space: nowrap;
    }
    .stats strong {
        font-size: 23px;
        overflow-wrap: anywhere;
    }
    .stats article+article::before {
        top: 18px;
        bottom: 18px;
    }
    .stats article>span::before {
        width: 4px;
        height: 4px;
    }
    .toolbar {
        display: flex;
        margin-right: 0;
        flex-direction: column;
        align-items: stretch;
        margin-bottom: 8px;
        gap: 8px;
    }
    .filter {
        flex: 1;
        padding: 8px 2px;
        min-height: 40px;
        font-size: 12px;
        border: 0;
        border-bottom: 2px solid transparent;
        border-radius: 0;
    }
    .filter.active {
        background: transparent;
        color: var(--ink);
        border-color: var(--ink);
    }
    .filter.active[data-status] {
        background: transparent;
        border-color: currentColor;
    }
    .search input {
        font-size: 16px;
        padding: 9px 10px;
    }
    .panel-heading h2 {
        font-size: 16px;
    }
    .list-panel {
        padding: 0;
        background: transparent;
        border: 0;
        border-radius: 0;
    }
    .search-disclosure>summary {
        top: -2px;
        right: 0;
    }
    .panel-heading {
        gap: 8px;
        min-height: 36px;
        margin-bottom: 8px;
    }
    .panel-heading h2 span {
        margin-left: 3px;
    }
    .panel-heading .muted {
        font-size: 12px;
    }
    .filters {
        width: 100%;
        gap: 0;
        padding: 0;
        background: transparent;
        border-radius: 0;
        border-bottom: 1px solid #dfe6ee;
    }
    .search {
        flex: none;
        min-width: 0;
        width: 100%;
    }
    .date-filter {
        gap: 8px;
        margin: 0 0 10px;
        width: 100%;
        justify-content: flex-end;
    }
    .date-filter-top {
        gap: 8px;
    }
    .date-preset {
        min-height: 32px;
        padding: 4px 24px 4px 6px;
        border: 0;
        background: transparent;
        font-size: 12px;
    }
    .date-filter-bottom {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 8px;
        width: 100%;
    }
    .date-range {
        width: 100%;
        gap: 5px;
    }
    .date-range input {
        flex: 1;
        width: 0;
        padding: 8px 5px;
        font-size: 16px;
    }
    .date-search-button {
        padding: 8px 12px;
    }
    .card-header {
        display: grid;
        grid-template-columns: max-content minmax(0, 1fr) auto;
        gap: 8px;
        padding: 16px 18px 6px;
        align-items: start;
    }
    .card-title {
        display: contents;
    }
    .card-title h2 {
        font-size: 20px;
        min-width: 0;
        grid-column: 1 / 3;
        grid-row: 1;
    }
    .card-title .status-badge {
        grid-column: 1;
        grid-row: 2;
        align-self: center;
        justify-self: start;
    }
    .card-title .source-badge {
        grid-column: 2 / -1;
        grid-row: 2;
        justify-self: start;
        align-self: center;
        max-width: 100%;
        white-space: normal;
        overflow-wrap: anywhere;
    }
    .status-badge {
        padding: 4px 6px;
        font-size: 12px;
    }
    .source-badge {
        padding: 3px 5px;
        font-size: 12px;
    }
    .card-tools {
        grid-column: 3;
        grid-row: 1;
        gap: 2px;
        align-self: start;
        justify-self: end;
        align-items: center;
    }
    .card-tools time {
        font-size: 10px;
        color: #7b889a;
        white-space: nowrap;
    }
    .card-tools .delete-consult {
        width: 28px;
        min-width: 28px;
        min-height: 28px;
        height: 28px;
        padding: 6px;
    }
    .card-contact {
        padding: 0 14px 8px;
    }
    .card-overview {
        display: block;
        padding: 0 18px 18px;
    }
    .card-overview .rental-details {
        gap: 8px 18px;
        margin-top: 10px;
    }
    .card-overview .rental-details>.rental-product {
        flex-basis: 100%;
    }
    .card-overview .rental-details>div {
        gap: 6px;
    }
    .card-overview .rental-details dt {
        font-size: 11px;
    }
    .card-overview .rental-details dd {
        font-size: 13px;
        font-weight: 500;
    }
    .phone-actions a {
        font-size: 16px;
    }
    .rental-details {
        grid-template-columns: minmax(0, 2fr) repeat(2, minmax(0, 1fr));
        gap: 8px;
        margin: 0 14px 16px;
        padding: 12px;
        border: 0;
    }
    .rental-product {
        grid-column: auto;
    }
    .status-row {
        gap: 8px;
        background: transparent;
    }
    .status-row h3 {
        margin: 0;
        font-size: 11px;
        font-weight: 400;
        color: #708095;
    }
    .status-buttons {
        display: grid;
        grid-template-columns: repeat(4,minmax(0,1fr));
        flex: 1;
        min-width: 0;
        padding: 0;
        background: transparent;
    }
    .status-buttons button {
        padding: 8px 2px;
        font-size: 12px;
        min-height: 40px;
        border: 0;
    }
    .status-buttons button.selected {
        background: var(--status-bg);
        box-shadow: none;
    }
    .status-buttons button.selected::before {
        display: none;
    }
    .received-note h3 {
        margin-bottom: 10px;
        font-size: 14px;
        font-weight: 700;
    }
    .received-note p,
    .memo-content {
        line-height: 1.9;
    }
    .phone-actions {
        gap: 8px;
        flex-wrap: wrap;
    }
    .consult-detail>summary {
        padding: 14px 18px;
        font-size: 14px;
        font-weight: 700;
        color: #334155;
    }
    .card-header .status-row {
        flex: 1;
        min-width: 0;
    }
    .card-header .status-buttons {
        display: grid;
        grid-template-columns: repeat(2, minmax(0,1fr));
        width: 100%;
    }
    .card-header .status-buttons button {
        white-space: normal;
    }
    .consult-card>.rental-details {
        margin: 4px 14px 16px;
    }
    .consult-card>.received-note {
        margin: 4px 14px 14px;
        padding: 12px 14px;
    }
    .admin-notes {
        grid-template-columns: 1fr;
        padding: 16px 12px;
        gap: 12px;
    }
    .author-notes {
        padding: 12px;
    }
    .memo-header {
        flex-wrap: wrap;
    }
    .memo-add textarea,
    .memo-edit textarea,
    .login-card input {
        font-size: 16px;
    }
    .memo-add {
        flex-wrap: wrap;
    }
    .memo-add .primary {
        margin-left: auto;
        min-width: 72px;
    }
    .pagination {
        gap: 8px;
    }
    .pagination button {
        padding: 8px 10px;
    }
    .login-card {
        padding: 26px 22px;
    }
    .management-tabs {
        margin-bottom: 16px;
        padding-bottom: 8px;
    }
    .management-tabs button {
        min-height: 40px;
        padding: 8px 14px;
        font-size: 14px;
    }
    #consultPanel[data-view="sources"] .panel-heading {
        margin-bottom: 12px;
        min-height: 28px;
    }
    #consultPanel[data-view="sources"] .date-filter {
        margin-bottom: 14px;
        gap: 10px;
    }
    #consultPanel[data-view="sources"] .date-filter-top {
        width: 100%;
        flex-wrap: nowrap;
        gap: 12px;
    }
    #consultPanel[data-view="sources"] .date-filter-label {
        font-size: 13px;
    }
    #consultPanel[data-view="sources"] .date-preset {
        flex: 1;
        min-width: 0;
        font-size: 16px;
    }
    #consultPanel[data-view="sources"] .sources-caption {
        margin-bottom: 10px;
        font-size: 13px;
    }
    .source-table-heading {
        padding: 11px 14px;
    }
    .source-list {
        padding: 0 14px;
    }
    .source-count-row {
        min-height: 56px;
        gap: 12px;
    }
    .source-count-row dt {
        font-size: 14px;
    }
    .source-count-row strong {
        font-size: 20px;
    }
    .sources-help {
        margin-top: 10px;
        line-height: 1.7;
    }
}
@media (prefers-reduced-motion: reduce) {
    button {
        transition: none;
    }
}