:root {
    --ink: #203a34;
    --muted: #7d8883;
    --green: #185744;
    --green-light: #e9f1ec;
    --border: #e6e9e4;
    --canvas: #f7f8f5;
    --white: #fff;
    font-family: "Pretendard", "Noto Sans KR", "Malgun Gothic", sans-serif;
    color: var(--ink);
    font-size: 15px;
    font-synthesis: none;
}

.signup-layout {
    max-width: 800px;
}

.signup-layout > .brand {
    margin-bottom: 40px;
}

.checkbox-field {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #55664c;
    font-size: 14px;
}

.checkbox-field input[type="checkbox"] {
    width: 18px;
    min-height: 18px;
    height: 18px;
    accent-color: var(--green);
}

.registration-status {
    margin-top: 24px;
}

.review-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: 25px;
}

.status-PENDING {
    background: #fff1e2;
    color: #95672c;
}

.status-APPROVED {
    background: #e8f3e8;
    color: #43754a;
}

.status-REJECTED,
.danger {
    background: #fbece8;
    color: #a35343;
}

.review-entry {
    border-top: 1px solid var(--border);
    padding: 16px 0;
}

.review-entry > span,
.review-entry time {
    margin-right: 12px;
    font-size: 13px;
}

.review-entry p {
    margin: 8px 0 0;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--canvas);
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

button,
a,
input,
select,
textarea {
    -webkit-tap-highlight-color: transparent;
}

button,
select {
    cursor: pointer;
}

:focus-visible {
    outline: 3px solid #8bba9c;
    outline-offset: 3px;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    font-size: 30px;
    letter-spacing: -1.2px;
    line-height: 1.4;
    margin-bottom: 8px;
}

h2 {
    font-size: 18px;
    letter-spacing: -0.4px;
    margin-bottom: 22px;
}

h3 {
    font-size: 17px;
}

small {
    font-size: 13px;
}

.muted,
.page-heading p {
    color: var(--muted);
}

.eyebrow {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 10px;
    color: #83968c;
}

.sidebar {
    background: #fff;
    width: 232px;
    position: fixed;
    inset: 0 auto 0 0;
    border-right: 1px solid var(--border);
    padding: 34px 20px 20px;
    display: flex;
    flex-direction: column;
    z-index: 5;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -1px;
}

.brand small {
    display: block;
    font-size: 10px;
    letter-spacing: 3px;
    color: #7b8d83;
    margin-top: -2px;
}

.brand-symbol {
    width: 44px;
    height: 44px;
    background: var(--green);
    color: #fff;
    border-radius: 13px 13px 4px 13px;
    font-size: 27px;
    text-align: center;
    line-height: 44px;
    letter-spacing: -4px;
    padding-right: 3px;
}

.brand-symbol span {
    font-size: 19px;
}

.workspace-label {
    margin: 46px 14px 12px;
    color: #9ba39e;
    font-size: 12px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 13px 16px;
    margin: 5px 0;
    border-radius: 8px;
    color: #738279;
    font-weight: 600;
}

.nav-link span {
    width: 20px;
    font-size: 23px;
    line-height: 1;
    text-align: center;
}

.nav-link.active {
    color: var(--green);
    background: #eaf1eb;
}

.nav-link:hover {
    background: #f1f5ef;
}

.sidebar-bottom {
    margin-top: auto;
    display: flex;
    gap: 10px;
    align-items: center;
    border-top: 1px solid var(--border);
    padding-top: 22px;
    font-size: 13px;
    font-weight: 600;
}

.sidebar-bottom small {
    display: block;
    color: #8a968d;
    font-size: 11px;
    font-weight: 400;
}

.mini-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #e9ede5;
    text-align: center;
    line-height: 36px;
}

.logout {
    border: 0;
    background: transparent;
    color: #8d998f;
    padding: 8px;
    font-size: 23px;
}

.app-shell {
    margin-left: 232px;
}

.topbar {
    height: 72px;
    padding: 0 42px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.8);
    border-bottom: 1px solid var(--border);
    font-size: 12px;
    color: #829085;
}

.topbar div span {
    margin: 0 14px;
    color: #c4cec6;
}

.today-label {
    background: #f3f5ef;
    padding: 5px 12px;
    border-radius: 30px;
}

main {
    max-width: 1560px;
    margin: 0 auto;
    padding: 36px 42px;
}

.page-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 26px;
}

.page-heading p {
    margin-bottom: 0;
    font-size: 14px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid transparent;
    border-radius: 7px;
    padding: 11px 20px;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    transition: background 0.15s;
    min-height: 43px;
}

.primary {
    color: #fff;
    background: var(--green);
}

.primary:hover {
    background: #103e30;
}

.button.delete-button {
    color: #fff;
    background: #b42332;
    border-color: #b42332;
}

.button.delete-button:hover {
    background: #901c28;
    border-color: #901c28;
}

.button.delete-button:focus-visible {
    outline: 3px solid #f4a3ab;
    outline-offset: 3px;
}

.secondary {
    background: #fff;
    border-color: #d9e1d9;
    color: #45634f;
}

.secondary:hover,
.subtle:hover {
    background: #eef3ec;
}

.subtle {
    background: #f6f8f3;
    color: #798579;
    border-color: var(--border);
}

.small {
    padding: 6px 12px;
    min-height: 32px;
    font-size: 12px;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 26px;
}

.stat-card {
    position: relative;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 22px 24px;
}

.stat-grid a.stat-card { --stat-border: color-mix(in srgb, var(--stat-accent) 25%, white); --stat-icon-bg: color-mix(in srgb, var(--stat-accent) 12%, var(--stat-bg)); }
.stat-card.revenue-card { --stat-bg: #eaf6f7; --stat-border: #c4e2e5; --stat-accent: #29666e; --stat-icon-bg: #d2ebee; }
.stat-grid .stat-card { background: var(--stat-bg, #fff); border-color: var(--stat-border, var(--border)); }
.stat-grid .stat-card > span:first-child,
.stat-grid .stat-card strong small,
.stat-grid .stat-card .revenue-caption { color: var(--stat-accent, #52645e); }
.stat-grid .stat-card .stat-icon { background: var(--stat-icon-bg, #f3f1ec); color: var(--stat-accent, #52645e); }
.stat-grid a.stat-card:hover { box-shadow: 0 4px 14px #183b2912; border-color: var(--stat-accent); }
.stat-grid a.stat-card:focus-visible { outline: 3px solid var(--stat-accent); outline-offset: 3px; }

.stat-card > span:first-child {
    font-size: 13px;
    color: #7f8b81;
}

.stat-card strong {
    display: block;
    margin-top: 10px;
    font-size: 31px;
    font-weight: 700;
    line-height: 1.2;
}

.stat-card strong small {
    font-weight: 400;
    margin-left: 7px;
    color: #8d998e;
}

.stat-icon {
    position: absolute;
    top: 23px;
    right: 20px;
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: #f3f1ec;
    color: #918a76;
    font-size: 23px;
    line-height: 34px;
    text-align: center;
}

.stat-icon.blue {
    background: #edf1fb;
    color: #8097bf;
}

.stat-icon.green {
    background: #e8f2e9;
    color: #739777;
}

.stat-icon.orange {
    background: #fcf0e5;
    color: #bd926d;
}

.panel {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 26px;
    margin-bottom: 22px;
}

.calendar-panel {
    padding: 0;
    overflow: hidden;
    margin-bottom: 12px;
}

.calendar-toolbar {
    padding: 23px 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.month-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.month-controls h2 {
    font-size: 20px;
    margin: 0 14px 0 0;
}

.icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 6px;
    width: 30px;
    height: 30px;
    font-size: 23px;
    color: #78867a;
}

.legend {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    font-size: 11px;
}

.legend span {
    background: transparent;
}

.legend span::before {
    content: "";
    display: inline-block;
    width: 7px;
    height: 7px;
    margin-right: 5px;
    background: currentColor;
    border-radius: 50%;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.weekday {
    background: #fafbf8;
    padding: 10px;
    text-align: center;
    border-top: 1px solid var(--border);
    color: #89968a;
    font-size: 12px;
}

.weekday:first-child { color: #d32f2f; }
.weekday:nth-child(7) { color: #1565c0; }

.calendar-day {
    min-height: 105px;
    padding: 8px;
    border-top: 1px solid var(--border);
    border-right: 1px solid var(--border);
    min-width: 0;
}

.calendar-day:nth-child(7n) {
    border-right: 0;
}

.calendar-day time {
    display: inline-flex;
    width: 25px;
    height: 25px;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    margin-bottom: 4px;
    color: #617061;
}

.calendar-day.outside {
    background: #fcfcfa;
}

.calendar-day.outside time {
    color: #c3c9c0;
}

.calendar-day.is-today {
    background: #f8fbf5;
    box-shadow: inset 0 0 0 2px var(--green);
}

.calendar-day.is-today time {
    background: var(--green);
    border-radius: 50%;
    color: white;
}
.calendar-day:nth-child(7n + 1) time { color: #d32f2f; }
.calendar-day:nth-child(7n) time { color: #1565c0; }
.calendar-day.outside:nth-child(7n + 1) time,
.calendar-day.outside:nth-child(7n) time { opacity: .55; }
.calendar-day.is-today:nth-child(7n + 1) time,
.calendar-day.is-today:nth-child(7n) time { background: #e3efff; box-shadow: inset 0 0 0 1px #0866e9; }

.calendar-event {
    display: block;
    padding: 5px 7px;
    border-left: 3px solid currentColor;
    border-radius: 4px;
    font-size: 11px;
    margin-bottom: 4px;
    overflow: hidden;
}

.calendar-event strong,
.calendar-event small {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.calendar-event small {
    font-size: 10px;
    opacity: 0.8;
}

.site-reserved,
.status-RESERVED,
.stat-card.stat-reserved {
    --stat-bg: #edf2fc;
    --stat-accent: #5277b4;
    background: var(--stat-bg);
    color: var(--stat-accent);
}

.site-working,
.status-WORKING,
.stat-card.stat-working {
    --stat-bg: #e8f3e8;
    --stat-accent: #4e8655;
    background: var(--stat-bg);
    color: var(--stat-accent);
}

.as-received,
.status-RECEIVED,
.stat-card.stat-as {
    --stat-bg: #fff1e2;
    --stat-accent: #b78642;
    background: var(--stat-bg);
    color: var(--stat-accent);
}

.as-working {
    background: #f1ecf9;
    color: #9171ad;
}

.status-ESTIMATING,
.stat-card.stat-estimating {
    --stat-bg: #f0f1ed;
    --stat-accent: #788572;
    background: var(--stat-bg);
    color: var(--stat-accent);
}

.site-cancelled,
.status-ESTIMATE_CANCELLED,
.status-CANCELLED,
.stat-card.stat-cancelled {
    --stat-bg: #f8e9e7;
    --stat-accent: #a34339;
    background: var(--stat-bg);
    color: var(--stat-accent);
}

.site-completed,
.as-completed,
.status-COMPLETED,
.stat-card.stat-completed {
    --stat-bg: #e8f1f1;
    --stat-accent: #4d8b88;
    background: var(--stat-bg);
    color: var(--stat-accent);
}

.site-paid,
.as-paid,
.status-PAID,
.stat-card.stat-paid {
    --stat-bg: #eff0ee;
    --stat-accent: #727971;
    background: var(--stat-bg);
    color: var(--stat-accent);
}

.reminder-note {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0 3px 28px;
    color: #8d9789;
    font-size: 12px;
}

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 22px;
}

.section-heading h2 {
    margin-bottom: 0;
}

.section-heading > span {
    font-size: 13px;
}

.count {
    color: #6b8b60;
    margin-left: 5px;
    font-size: 15px;
}

.schedule-row {
    display: flex;
    align-items: center;
    gap: 22px;
    padding: 18px 2px;
    border-top: 1px solid #f0f2ec;
    font-size: 13px;
}

.schedule-customer {
    flex: 1;
    min-width: 0;
}

.schedule-customer small {
    display: block;
    color: #899484;
    margin-top: 3px;
}

.schedule-date {
    color: #8b9587;
    font-size: 12px;
}

.badge {
    display: inline-block;
    padding: 4px 9px;
    border-radius: 5px;
    font-size: 12px;
    white-space: nowrap;
}

.badge.large {
    font-size: 14px;
    padding: 9px 18px;
}

.badge.site-status-badge {
    min-width: 160px;
    padding: 20px 30px;
    border-radius: 12px;
    font-size: 27px;
    font-weight: 700;
    line-height: 1.3;
    text-align: center;
    flex-shrink: 0;
}

@media (max-width: 640px) {
    .badge.site-status-badge {
        min-width: 130px;
        padding: 14px 22px;
        font-size: 23px;
        margin-left: auto;
    }
}

.empty-state {
    text-align: center;
    padding: 44px 20px;
    color: #8a9587;
}

.empty-state h3 {
    color: #66745e;
    margin-bottom: 7px;
}

.empty-state p {
    font-size: 13px;
}

.empty-state.compact {
    padding: 25px;
}

.empty-icon {
    display: inline-block;
    font-size: 29px;
    color: #a2b49b;
    margin-bottom: 10px;
}

.app-footer {
    text-align: center;
    color: #aab1a6;
    font-size: 11px;
    padding: 0 20px 25px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 9px;
    min-width: 0;
}

.field > span:first-child {
    font-size: 13px;
    font-weight: 600;
    color: #55664c;
}

.amount-field-heading { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 14px; }
.amount-field-heading .amount-estimate { color: var(--muted); font-size: 12px; font-weight: 400; }

.field em {
    color: #af725c;
    font-style: normal;
}

input:not([type="hidden"]),
select,
textarea {
    width: 100%;
    border: 1px solid #dfe5db;
    border-radius: 6px;
    padding: 11px 13px;
    background: #fff;
    color: var(--ink);
    min-height: 43px;
    font-size: 14px;
}

input::placeholder,
textarea::placeholder {
    color: #a6afa0;
}

textarea {
    resize: vertical;
}

input[readonly] {
    background: #f1f3ee;
    color: #929b8e;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}

.full {
    grid-column: 1 / -1;
}

.work-date-range { border: 1px solid #dfe5db; border-radius: 12px; padding: 20px; background: #fff; }
.work-date-range[hidden] { display: none; }
.range-input { position: relative; display: block; }
.range-input input[type="date"] { padding-right: 13px; }
.range-input input[type="date"]::-webkit-calendar-picker-indicator { display: none; }
.range-input-trigger { position: absolute; right: 3px; top: 3px; bottom: 3px; width: 38px; display: grid; place-items: center; border: 0; border-radius: 4px; background: #fff; color: #43536a; cursor: pointer; }
.range-input-trigger:hover { background: #edf4ff; }
.range-input-trigger:focus-visible { outline: 2px solid #0866e9; }
.range-input-popup input[type="date"] { padding-right: 44px; }
.work-date-popup { position: fixed; z-index: 1000; width: min(460px, calc(100vw - 16px)); max-height: calc(100dvh - 16px); overflow-y: auto; padding: 12px; box-shadow: 0 8px 30px #17233326; }
.range-navigation { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto minmax(0, 1fr) auto auto; align-items: center; gap: 8px; }
.range-navigation h3 { margin: 0; text-align: center; font-size: 17px; white-space: nowrap; }
.range-navigation button { white-space: nowrap; }
.range-navigation button, .range-footer button { border: 0; border-radius: 6px; background: transparent; color: #43536a; padding: 8px; cursor: pointer; }
.range-navigation button:hover, .range-footer button:hover { background: #edf4ff; }
.range-navigation button:disabled { opacity: .35; cursor: default; }
.range-months { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px; margin-top: 8px; }
.range-month h3 { display: none; text-align: center; margin: 0 0 12px; font-size: 17px; }
.range-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); row-gap: 6px; }
.range-weekday { text-align: center; font-size: 11px; color: #637086; padding: 8px 0; }
.range-grid button { display: grid; place-items: center; border: 0; border-radius: 0; padding: 0; min-width: 0; height: 40px; background: transparent; color: #172333; cursor: pointer; font-size: 13px; }
.range-grid button span { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; }
.range-grid button.range-between { background: #e3efff; }
.range-grid button.range-edge span { background: #0866e9; color: white; font-weight: 700; }
.range-grid > .range-weekday:nth-child(1),
.range-grid > button:nth-child(7n + 1) { color: #d32f2f; }
.range-grid > .range-weekday:nth-child(7),
.range-grid > button:nth-child(7n) { color: #1565c0; }
.range-grid > button.range-edge:nth-child(7n + 1) span,
.range-grid > button.range-edge:nth-child(7n) span { color: inherit; background: #dceaff; box-shadow: inset 0 0 0 2px #0866e9; }
.range-grid button[aria-current="date"] span { box-shadow: inset 0 0 0 1px #0866e9; }
.range-grid button:hover span { box-shadow: inset 0 0 0 2px #0866e9; }
.work-date-range button:focus-visible { outline: 2px solid #0866e9; outline-offset: 2px; z-index: 1; }
.range-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; font-size: 12px; color: #637086; }
.range-footer p { margin: 0; }
.range-footer button { flex-shrink: 0; }
@media (max-width: 640px) {
    .work-date-range { padding: 12px; }
    .range-months { grid-template-columns: 1fr; gap: 24px; }
    .range-navigation { grid-template-columns: repeat(5, auto); gap: 2px; }
    .range-navigation h3 { display: none; }
    .range-month h3 { display: block; }
    .range-navigation button { padding: 8px 4px; font-size: 11px; }
    .range-footer { align-items: flex-start; }
}
.work-date-popup .range-navigation { grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 2px; }
.work-date-popup .range-navigation h3 { display: block; font-size: 15px; }
.work-date-popup .range-navigation button { padding: 8px 3px; font-size: 12px; }
.work-date-popup .range-weekday { font-size: 13px; }
.work-date-popup .range-grid button { font-size: 15px; }
.work-date-popup .range-footer { font-size: 14px; }
.work-date-popup .range-months { grid-template-columns: 1fr; }
.work-date-popup .range-month h3 { display: none; }

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 22px;
}

.estimate-actions {
    flex-wrap: nowrap;
}

.estimate-action-note {
    text-align: right;
}

@media (max-width: 600px) {
    .estimate-actions {
        gap: 6px;
    }

    .estimate-actions .button {
        padding: 11px 8px;
        min-width: 0;
    }
}

.upload {
    padding: 20px;
    border: 1px dashed #cdd9c6;
    border-radius: 8px;
    background: #fafcf8;
}

.upload small {
    color: #93a088;
}

.upload input {
    border: 0;
    padding: 5px 0;
    background: transparent;
}

input::file-selector-button {
    border: 1px solid #d0dcc9;
    border-radius: 5px;
    padding: 6px 12px;
    background: white;
    color: #66775b;
    margin-right: 10px;
    cursor: pointer;
}

.work-photo-group {
    margin-top: 20px;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--canvas);
}

.work-photo-group h3 {
    margin: 0 0 16px;
}

.gallery,
.photo-preview {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 16px;
}

.gallery a {
    width: 150px;
}

.gallery img,
.photo-preview img {
    width: 150px;
    height: 110px;
    object-fit: cover;
    border-radius: 7px;
    border: 1px solid var(--border);
}

.gallery small {
    display: block;
    color: #8a9783;
    overflow-wrap: anywhere;
    font-size: 11px;
}

.filter-bar,
.inline-form {
    display: flex;
    align-items: center;
    gap: 12px;
}

.filter-bar {
    margin-bottom: 24px;
}

.filter-bar input {
    max-width: 350px;
}

.filter-bar select {
    width: 165px;
}

.text-link,
.back-link {
    color: #5f8253;
    font-size: 13px;
    white-space: nowrap;
}

.text-link:hover,
.customer-link:hover {
    text-decoration: underline;
}

.back-link {
    display: inline-block;
    margin-bottom: 12px;
}

.table-scroll {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    white-space: nowrap;
}

th {
    background: #f7f9f4;
    font-size: 12px;
    color: #929d89;
    font-weight: 500;
    padding: 13px 16px;
}

td {
    padding: 18px 16px;
    border-bottom: 1px solid #edf1e9;
    font-size: 13px;
    color: #6a7b5d;
}

.customer-link {
    color: #334e2b;
    font-weight: 700;
    font-size: 14px;
}

.address {
    display: block;
    color: #949f8b;
    max-width: 240px;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 3px;
    font-size: 12px;
}

.number {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px 30px;
    margin: 0;
}

dt {
    color: #8c9c82;
    font-size: 12px;
    margin-bottom: 5px;
}

dd {
    margin: 0;
    font-size: 14px;
    overflow-wrap: anywhere;
}

.preserve {
    white-space: pre-wrap;
}

.info-note,
.notice {
    padding: 14px 17px;
    background: #f2f6ee;
    border-radius: 7px;
    color: #7b8d6d;
    font-size: 13px;
    margin: 22px 0 0;
}

.notice {
    margin: 0 0 20px;
}

.notice.success {
    background: #e8f5e6;
    color: #447337;
}

.notice.error {
    background: #fff0e8;
    color: #a55d3a;
}

.site-overview-section {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.daily-log + .daily-log {
    margin-top: 20px;
}

.site-log-notes { display: grid; gap: 14px; }
.site-log-note { padding: 16px; border: 1px solid var(--border); border-radius: 8px; background: var(--canvas); min-width: 0; }
.site-log-note-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.site-log-note-heading h3 { margin: 0; font-size: 14px; }
.site-log-note-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin: 16px 0 0; }
.site-log-note-details > div { min-width: 0; }
.site-log-note-details > div + div { padding-left: 24px; border-left: 1px solid var(--border); }
.site-log-note-details dt { margin-bottom: 6px; font-size: 13px; font-weight: 700; color: #55664c; }
.site-log-note-details dd { margin: 0; overflow-wrap: anywhere; line-height: 1.7; }
@media (max-width: 640px) {
    .site-log-note-details { gap: 12px; }
    .site-log-note-details > div + div { padding-left: 12px; }
}

.site-work-photo-day + .site-work-photo-day {
    margin-top: 24px;
}

.daily-log-photos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
    gap: 16px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--canvas);
}

.daily-log-photo-group {
    min-width: 0;
}

.daily-log-photo-group h3 {
    margin: 0;
    font-size: 14px;
}

.log-row {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 18px 0;
    border-top: 1px solid var(--border);
}

.badge.log-in-progress {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: #fff0ce;
    color: #8a3900;
    border: 1px solid #dd8a25;
    font-weight: 800;
    white-space: nowrap;
}

.log-in-progress-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    border-radius: 50%;
    background: #a64b00;
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
}

.day-marker {
    padding: 10px 14px;
    background: #eff4ea;
    border-radius: 6px;
    color: #799367;
    font-size: 13px;
}

.log-row > span:nth-child(2) {
    flex: 1;
    min-width: 0;
}

.log-row small {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #8b9a7f;
}

.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.error-panel {
    text-align: center;
    margin: 50px auto;
    max-width: 680px;
    padding: 50px 30px;
}

.error-panel .form-actions {
    justify-content: center;
}

.skip-link {
    position: fixed;
    top: -60px;
    left: 15px;
    z-index: 10;
    background: #fff;
    padding: 10px 20px;
}

.skip-link:focus {
    top: 10px;
}

.login-layout {
    display: grid;
    grid-template-columns: 48% 52%;
    min-height: 100vh;
    padding: 0;
    max-width: none;
}

.login-story {
    background: #1b493d;
    color: white;
    padding: 44px 10%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
}

.login-story .brand-symbol {
    background: #e3edda;
    color: #294d3c;
}

.login-story .brand small {
    color: #a1b79e;
}

.story-copy {
    margin-top: 75px;
}

.story-copy h1 {
    font-size: calc(clamp(34px, calc(3.5vw + 2px), 54px) - 1px);
    font-weight: 500;
    letter-spacing: -2px;
    line-height: 1.4;
    margin: 22px 0;
}

.story-copy p {
    color: #b5c6ae;
    font-size: 15px;
    line-height: 1.9;
}

.login-story > small {
    color: #96ae8d;
    font-size: 11px;
}

.material-art {
    position: relative;
    height: 235px;
    margin-top: 40px;
}

.material-sheet {
    position: absolute;
    width: 170px;
    height: 170px;
    border-radius: 4px 4px 36px 4px;
    transform: rotate(-15deg) skew(8deg, 4deg);
    box-shadow: 12px 18px 30px #0c2b3266;
}

.sheet-one {
    left: 10px;
    top: 30px;
    background: repeating-linear-gradient(90deg, #a2896b, #b6a082 4px, #ac9475 7px);
}

.sheet-two {
    left: 76px;
    top: 15px;
    background: #b7b9a8;
}

.sheet-three {
    left: 143px;
    top: 0;
    background: linear-gradient(110deg, #dfdfd2, #f0f1e5);
}

.material-art > span {
    position: absolute;
    bottom: 0;
    left: 100px;
    font-size: 9px;
    letter-spacing: 2px;
    color: #aebba1;
}

.login-form-side {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 45px;
    background: #fbfcf8;
}

.login-card {
    width: 100%;
    max-width: 370px;
}

.login-card h2 {
    font-size: 31px;
    margin: 14px 0 10px;
}

.login-card p {
    color: #92a087;
    font-size: 13px;
    margin-bottom: 38px;
}

.login-card .field {
    margin-bottom: 20px;
}

.login-card input {
    padding: 14px;
}

.login-button {
    width: 100%;
    padding: 14px 20px;
    justify-content: space-between;
    margin-top: 10px;
}

.login-note {
    display: block;
    text-align: center;
    margin-top: 28px;
    font-size: 11px;
    color: #a5b099;
}

@media (min-width: 1600px) {
    .calendar-day {
        min-height: 125px;
    }
}

@media (max-width: 1150px) {
    .sidebar {
        width: 200px;
        padding: 30px 15px 20px;
    }

    .brand {
        font-size: 19px;
    }

    .app-shell {
        margin-left: 200px;
    }

    main {
        padding: 28px 24px;
    }

    .topbar {
        padding: 0 24px;
    }

    .stat-card {
        padding: 18px;
    }

    .stat-icon {
        display: none;
    }

    .calendar-toolbar {
        padding: 20px;
    }
}

@media (max-width: 760px) {
    .sidebar {
        position: static;
        width: 100%;
        padding: 17px 18px 0;
        border-right: 0;
        border-bottom: 1px solid var(--border);
    }

    .sidebar .brand {
        font-size: 20px;
    }

    .sidebar nav {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(68px, 1fr));
        margin-top: 18px;
        gap: 3px;
    }

    .nav-link {
        justify-content: center;
        gap: 6px;
        padding: 12px 3px;
        font-size: 13px;
        margin: 0;
        border-radius: 6px 6px 0 0;
    }

    .nav-link span {
        font-size: 18px;
        width: 16px;
    }

    .workspace-label,
    .sidebar-bottom .mini-avatar,
    .sidebar-bottom > div,
    .topbar {
        display: none;
    }

    .sidebar-bottom {
        position: absolute;
        top: 17px;
        right: 15px;
        padding: 0;
        border: 0;
    }

    .app-shell {
        margin-left: 0;
    }

    main {
        padding: 26px 16px;
    }

    h1 {
        font-size: 25px;
    }

    .page-heading {
        flex-wrap: wrap;
        gap: 16px;
    }

    .page-heading p {
        font-size: 13px;
    }

    .page-heading > .button {
        padding: 8px 14px;
        font-size: 13px;
    }

    .stat-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        margin-bottom: 20px;
    }

    .stat-card {
        padding: 17px 20px;
    }

    .stat-card strong {
        font-size: 28px;
    }

    .stat-icon {
        display: block;
        width: 29px;
        height: 29px;
        line-height: 29px;
        font-size: 20px;
        right: 15px;
    }

    .panel {
        padding: 20px 17px;
        margin-bottom: 18px;
    }

    .calendar-panel {
        padding: 0;
    }

    .calendar-toolbar {
        padding: 18px 14px;
    }

    .calendar-day {
        min-height: 72px;
        padding: 4px 2px;
    }

    .calendar-day time {
        font-size: 11px;
        width: 22px;
        height: 22px;
    }

    .calendar-event {
        font-size: 10px;
        padding: 3px 2px;
        border-left-width: 2px;
    }

    .calendar-event small {
        font-size: 9px;
    }

    .weekday {
        padding: 8px 3px;
    }

    .legend {
        gap: 10px;
        font-size: 10px;
    }

    .schedule-row {
        flex-wrap: wrap;
        gap: 8px 12px;
    }

    .schedule-customer {
        flex-basis: 55%;
    }

    .schedule-date {
        flex: 1;
    }

    .filter-bar {
        flex-wrap: wrap;
        gap: 9px;
    }

    .filter-bar input {
        max-width: none;
        flex-basis: 100%;
    }

    .filter-bar select {
        flex: 1;
    }

    .form-grid,
    .details-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .form-actions .button {
        flex: 1;
    }

    .inline-form {
        flex-wrap: wrap;
    }

    .inline-form .button {
        width: 100%;
    }

    .gallery a,
    .gallery img,
    .photo-preview img {
        width: 120px;
    }

    .section-heading {
        flex-wrap: wrap;
    }

    .login-layout {
        grid-template-columns: 1fr;
        min-height: 100svh;
    }

    .login-story {
        padding: 26px;
    }

    .story-copy {
        margin-top: 25px;
    }

    .story-copy h1 {
        font-size: 31px;
        margin: 12px 0;
    }

    .story-copy p,
    .material-art,
    .login-story > small {
        display: none;
    }

    .login-form-side {
        padding: 35px 26px;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
    }
}

.photo-selection {
    display: inline-flex;
    flex-direction: column;
    gap: 6px;
}

.photo-selection button {
    padding: 6px 12px;
    border: 1px solid #d4dce5;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
}

.entry-group-title { margin: 28px 0 12px; font-size: 21px; }
.api-test-page { max-width: 960px; margin: 36px auto; padding: 0 20px; }
.api-test-page pre, .notice code { white-space: pre-wrap; overflow-wrap: anywhere; }

.api-usage { border: 0; padding: 0; margin: 24px 0 16px; }
.api-usage legend, .api-feature-options legend { font-weight: 700; margin-bottom: 12px; }
.api-radio-options { display: flex; flex-wrap: wrap; gap: 24px; }
.api-radio-options input[type="radio"] { width: 18px; height: 18px; margin: 0; accent-color: var(--primary, #2563eb); }
.api-feature-options { display: grid; gap: 14px; margin: 0; padding: 18px 20px; border: 1px solid #dce3eb; border-radius: 12px; }
.api-feature-options:disabled { background: #f4f6f8; color: #85909e; }
.api-feature-options:disabled label { cursor: not-allowed; opacity: .65; }
.api-key-actions { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-top: 24px; padding-top: 24px; border-top: 1px solid #dce3eb; }
.api-key-actions p { margin-bottom: 0; }

.work-slides { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; border-radius: 12px; border: 1px solid #dce3eb; }
.work-slide { flex: 0 0 100%; min-width: 0; margin: 0; scroll-snap-align: start; scroll-snap-stop: always; }
.work-slide-image { display: flex; align-items: center; justify-content: center; height: clamp(240px, 48vw, 480px); background: #f1f4f8; }
.work-slide-image img { display: block; width: 100%; height: 100%; object-fit: contain; }
.work-slide-caption { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; padding: 16px 20px; color: inherit; background: #fff; }
.work-slide-caption > span:first-child { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; font-weight: 700; }
.work-slide-caption:hover { background: #f7f9fc; }
.work-slide-controls { display: flex; align-items: center; justify-content: center; gap: 20px; margin-top: 16px; }
.work-slide-controls[hidden] { display: none; }
.work-slide-controls button:disabled { opacity: .4; cursor: default; }
.work-slide-help { margin: 14px 0 0; font-size: 12px; }
.work-slides:focus-visible, .work-slide a:focus-visible { outline: 3px solid #2563eb; outline-offset: -3px; }

.revenue-card strong { font-size: calc(clamp(20px, 2vw, 30px) - 1px); flex-wrap: wrap; overflow-wrap: anywhere; }
.revenue-card > span:first-child { padding-right: 34px; }
.revenue-caption { margin: 8px 0 0; color: #7a8b91; font-size: 10px; line-height: 1.5; }

.topbar { height: auto; min-height: 94px; padding-top: 16px; padding-bottom: 16px; gap: 20px; }
.workspace-heading { min-width: 0; }
.workspace-company { display: block; font-size: calc(clamp(22px, 2.5vw, 30px) - 1px); font-weight: 800; line-height: 1.35; color: var(--ink); overflow-wrap: anywhere; }
.workspace-heading small { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
.topbar .today-label { flex-shrink: 0; }
@media (max-width: 600px) { .topbar { flex-wrap: wrap; gap: 8px; } }

.confirm-modal { width: min(440px, calc(100% - 32px)); max-height: calc(100dvh - 48px); overflow: auto; padding: 28px; border: 1px solid var(--border); border-radius: 18px; color: var(--ink); background: var(--white); box-shadow: 0 24px 80px #102c3440; }
.confirm-modal::backdrop { background: #102c3466; }
.confirm-modal h2 { margin: 0 0 14px; font-size: 21px; }
.confirm-modal p { margin: 0; color: var(--muted); white-space: pre-wrap; overflow-wrap: anywhere; }
.confirm-modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 28px; }
.confirm-modal-actions .button { min-width: 88px; }

.company-profile-photo { width: 144px; height: 144px; object-fit: cover; border-radius: 50%; display: block; margin-bottom: 16px; border: 1px solid #dbe5e0; }

.workspace-identity { display: flex; align-items: center; gap: 14px; min-width: 0; }
.profile-avatar { object-fit: cover; border-radius: 50%; flex-shrink: 0; }
.workspace-avatar { width: 56px; height: 56px; border: 1px solid var(--line); }
img.mini-avatar { display: block; }
@media (max-width: 600px) { .workspace-avatar { width: 44px; height: 44px; } .workspace-identity { gap: 10px; } }

.site-progress-bar { display: flex; list-style: none; padding: 0; margin: 20px 0 0; gap: 4px; }
.site-progress-bar li { flex: 1; min-width: 0; }
.site-progress-bar form { height: 100%; margin: 0; }
.site-progress-bar button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; width: 100%; height: 100%; min-height: 112px; padding: 14px 4px; border: 2px solid transparent; background: #edf1f0; color: #52645e; font: inherit; cursor: pointer; }
.site-progress-bar li:first-child button { border-radius: 14px 0 0 14px; }
.site-progress-bar li:last-child button { border-radius: 0 14px 14px 0; }
.site-progress-bar .is-past button { background: #cce9dd; color: #215c47; }
.site-progress-bar .is-current button { background: #23694f; color: #fff; border-color: #164732; opacity: 1; cursor: default; }
.site-progress-bar button:not(:disabled):hover { border-color: #23694f; }
.site-progress-bar button:focus-visible { outline: 3px solid #de941d; outline-offset: 3px; }
.site-progress-number { font-size: 11px; font-weight: 700; }
.site-progress-caption { font-size: 11px; }
.site-progress-bar .progress-end button { border-radius: 0 14px 14px 0; }
.site-progress-bar .site-progress-cancel { margin-left: 12px; }
.site-progress-bar .site-progress-cancel button { border-radius: 14px; background: #fce7e7; color: #aa3030; }
.site-progress-bar .site-progress-cancel button:not(:disabled):hover { border-color: #ba3535; background: #f9d5d5; }
.site-progress-bar .site-progress-cancel.is-current button { background: #b93232; border-color: #912525; color: #fff; }
@media (max-width: 600px) { .site-progress-bar { overflow-x: auto; padding-bottom: 6px; } .site-progress-bar li { min-width: 60px; } .site-progress-bar .site-progress-cancel { margin-left: 8px; } }
@media (max-width: 600px) { .site-progress { padding: 18px 12px; } .site-progress-bar { gap: 2px; } .site-progress-bar button { min-height: 100px; font-size: 11px; } .site-progress-caption { font-size: 9px; } }
.estimate-pdf-pages { background:#edf1f5; padding:16px; border-radius:8px; }
.estimate-pdf-page { max-width:900px; margin:0 auto 20px; }
.estimate-pdf-page:last-child { margin-bottom:0; }
.estimate-pdf-page img { display:block; width:100%; height:auto; background:white; border:1px solid #d6dee7; }
.estimate-pdf-page figcaption { text-align:center; padding-top:8px; color:#526277; }

html.estimate-preview-open { overflow:hidden; }
.estimate-preview-modal { width:min(1040px, calc(100% - 24px)); max-height:calc(100dvh - 32px); overflow:auto; padding:24px; border:1px solid var(--border); border-radius:16px; color:var(--ink); background:var(--white); box-shadow:0 24px 80px #102c3440; }
.estimate-preview-modal::backdrop { background:#102c3480; }
.estimate-preview-toolbar { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.estimate-preview-toolbar h2 { margin:0; font-size: 21px; }
.estimate-preview-tools { display:flex; gap:8px; }
@media(max-width:600px) { .estimate-preview-modal { padding:12px; } .estimate-preview-modal .estimate-pdf-pages { padding:6px; } }

.log-status-options { display:flex; flex-wrap:wrap; gap:10px; }
.log-status-option { display:flex; align-items:center; gap:10px; flex:1 1 220px; min-height:54px; padding:12px 14px; border:1px solid var(--border); border-radius:12px; cursor:pointer; background:#f5f7f5; font-size: 13px; font-weight:700; }
.log-status-option input[type="radio"] { width:18px; height:18px; min-height:0; flex:0 0 18px; margin:0; accent-color:#23694f; }
.log-status-option:has(input:checked) { background:#e8f3e8; border-color:#8db69e; }
.log-status-option:has(input:focus-visible) { outline:3px solid #de941d; outline-offset:2px; }
.log-status-option:has(input:disabled) { cursor:default; }

/* Dashboard groups */
.dashboard-summary { display:grid; grid-template-columns:1fr 2fr 1.25fr; gap:14px; margin-bottom:18px; align-items:start; }
.summary-estimate-column { min-width:0; display:grid; gap:12px; }
.summary-group { min-width:0; padding:14px; border:1px solid var(--border); border-radius:14px; background:#fff; }
.summary-group h2 { margin:0 0 10px; font-size:17px; }
.summary-group .stat-grid { grid-template-columns:1fr; gap:8px; margin:0; }
.summary-sites .stat-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
.summary-group .stat-card { min-width:0; min-height:54px; padding:10px 40px 10px 12px; display:flex; align-items:center; justify-content:space-between; gap:8px; }
.summary-group .stat-card > span:first-child { padding:0; overflow-wrap:anywhere; }
.summary-group .stat-card strong { margin:0; flex-shrink:0; font-size:24px; white-space:nowrap; }
.summary-group .stat-card strong small { font-size:12px; margin-left:4px; }
.summary-group .stat-icon { top:50%; transform:translateY(-50%); right:10px; width:22px; height:22px; line-height:22px; font-size:16px; }
.summary-estimate-column .dashboard-revenue { grid-template-columns:minmax(0,1fr); margin:0; }
.dashboard-revenue .revenue-card { min-width:0; padding:14px; text-align:right; }
.dashboard-revenue .revenue-card > span:first-child { display:block; padding-right:0; font-size:12px; text-align:left; }
.dashboard-revenue .revenue-card strong { margin-top:8px; font-size:clamp(18px,1.8vw,25px); }
.dashboard-revenue .revenue-card strong small { font-size:12px; }
.dashboard-revenue .revenue-caption { margin:6px 0 0; font-size:10px; }
.dashboard-revenue .stat-icon { display:none; }
@media(max-width:1100px) {
 .dashboard-summary { grid-template-columns:1.1fr 1.8fr 1.25fr; gap:10px; }
 .summary-group { padding:10px; }
 .summary-sites .stat-grid { grid-template-columns:1fr; }
}
@media(max-width:700px) {
 .dashboard-summary { grid-template-columns:1fr; }
 .summary-group .stat-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .summary-estimates .stat-grid { grid-template-columns:1fr; }
 .dashboard-revenue .revenue-card strong { font-size:24px; }
}
@media(max-width:380px) {
 .summary-group .stat-grid { grid-template-columns:1fr; }
}

.as-project-search { align-items:flex-end; }
.as-project-search .field { flex:1; min-width:200px; }
.as-project-result { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:12px 0; border-bottom:1px solid var(--border); }
.as-project-result > div { min-width:0; overflow-wrap:anywhere; }
.as-project-result p { margin:4px 0; }
.as-project-result > a { flex-shrink:0; }
@media(max-width:480px) { .as-project-result { align-items:flex-start; } .as-project-search { flex-wrap:wrap; } }
