:root {
  color-scheme: light;
  --paper: #f4f6f2;
  --white: #fff;
  --ink: #1d2925;
  --muted: #78827d;
  --line: #e6e9e3;
  --green: #184e43;
  --green-2: #e8f1ec;
  --gold: #d0a861;
  --blue: #477a9f;
  --blue-soft: #eaf2f7;
  --red: #b94a48;
  --red-soft: #fbefed;
  --shadow: 0 16px 40px rgba(28, 48, 39, .07);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: var(--paper); color: var(--ink); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.auth-screen { min-height: 100dvh; display: grid; place-items: center; padding: 28px 18px; background: radial-gradient(ellipse at 50% 0%, #e6eee6 0, var(--paper) 55%); }
.auth-card { width: min(100%, 430px); padding: 42px; border: 1px solid rgba(220, 226, 218, .8); border-radius: 24px; background: rgba(255,255,255,.92); box-shadow: var(--shadow); }
.brand-mark { width: 52px; height: 52px; display: grid; place-items: center; margin-bottom: 24px; border-radius: 16px; background: var(--green); color: #f5f4ea; font-size: 34px; line-height: 1; font-weight: 300; }
.eyebrow { margin: 0 0 9px; color: var(--green); font-size: 10px; font-weight: 800; letter-spacing: .13em; }
.auth-card h1 { margin: 0; font-size: clamp(29px, 5vw, 37px); letter-spacing: -.05em; }
.auth-intro { margin: 11px 0 28px; color: var(--muted); line-height: 1.55; }
.login-form { display: grid; gap: 10px; }
.login-form label, .field { font-size: 13px; font-weight: 650; }
.login-form input, .field input, .field select, .field textarea, .filter-row select, .search-wrap input { width: 100%; min-height: 46px; border: 1px solid var(--line); border-radius: 10px; outline: 0; background: white; color: var(--ink); }
.login-form input, .field input, .field select, .field textarea { padding: 11px 13px; }
.field textarea { resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { border-color: #83a79a !important; box-shadow: 0 0 0 3px rgba(24,78,67,.09); }
.button { display: inline-flex; min-height: 45px; align-items: center; justify-content: center; gap: 8px; padding: 0 17px; border: 1px solid transparent; border-radius: 10px; font-size: 13px; font-weight: 700; transition: transform .16s, background .16s, border-color .16s; }
.button:hover { transform: translateY(-1px); }
.button-primary { background: var(--green); color: white; }
.button-primary:hover { background: #103f35; }
.button-secondary { border-color: var(--line); background: white; color: var(--ink); }
.button-secondary:hover { border-color: #bdc9c0; }
.button-wide { width: 100%; margin-top: 6px; }
.button-small { min-height: 38px; padding: 0 13px; font-size: 12px; }
.form-message { min-height: 20px; margin: 10px 0 0; color: var(--green); font-size: 12px; line-height: 1.45; }
.form-message.error { color: var(--red); }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 17px 0 5px; color: #9aa39d; font-size: 11px; }
.auth-divider::before, .auth-divider::after { height: 1px; flex: 1; background: var(--line); content: ""; }
.auth-footnote { margin: 14px 0 0; color: #8b948e; font-size: 11px; line-height: 1.45; text-align: center; }

.app-shell { display: flex; min-height: 100dvh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 20; display: flex; width: 238px; flex-direction: column; padding: 25px 16px 18px; border-right: 1px solid var(--line); background: #fbfcfa; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 10px; color: var(--ink); font-size: 14px; font-weight: 750; letter-spacing: -.02em; text-decoration: none; }
.brand-mark.small { width: 36px; height: 36px; margin: 0; border-radius: 11px; font-size: 26px; }
.main-nav { display: grid; gap: 5px; margin-top: 48px; }
.nav-link { display: flex; width: 100%; min-height: 43px; align-items: center; gap: 12px; padding: 0 12px; border: 0; border-radius: 9px; background: transparent; color: #66716b; text-align: left; font-size: 13px; font-weight: 620; }
.nav-link:hover { background: #f0f3ef; color: var(--green); }
.nav-link.active { background: var(--green-2); color: var(--green); }
.nav-icon { width: 18px; color: #77827c; text-align: center; font-size: 16px; }
.nav-link.active .nav-icon { color: var(--green); }
.nav-count { margin-left: auto; color: #809087; font-size: 11px; }
.sidebar-bottom { margin-top: auto; }
.account-chip { display: flex; align-items: center; gap: 10px; padding: 12px 9px; border-top: 1px solid var(--line); }
.avatar { display: grid; width: 34px; height: 34px; flex: 0 0 auto; place-items: center; border-radius: 50%; background: #e6eee8; color: var(--green); font-size: 13px; font-weight: 800; }
.account-copy { display: grid; gap: 2px; min-width: 0; }
.account-copy strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.account-copy small { color: var(--muted); font-size: 10px; }
.signout { margin-top: 7px; }
.main-column { width: calc(100% - 238px); min-height: 100dvh; margin-left: 238px; }
.topbar { position: sticky; top: 0; z-index: 10; display: flex; height: 68px; align-items: center; justify-content: space-between; padding: 0 35px; border-bottom: 1px solid var(--line); background: rgba(250,251,249,.9); backdrop-filter: blur(14px); }
.breadcrumbs { display: flex; align-items: center; gap: 10px; color: #87918a; font-size: 12px; }
.breadcrumbs strong { color: var(--ink); font-weight: 700; }
.crumb-separator { color: #c2c9c2; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.demo-badge { padding: 7px 9px; border: 1px solid #eddbb7; border-radius: 20px; background: #fff8e9; color: #8e6e35; font-size: 9px; font-weight: 800; letter-spacing: .08em; }
.content { width: min(100%, 1400px); margin: 0 auto; padding: 37px 38px 56px; }
.welcome-row, .page-heading { display: flex; align-items: end; justify-content: space-between; gap: 22px; margin-bottom: 26px; }
.welcome-row h1, .page-heading h1 { margin: 0; font-size: clamp(27px, 4vw, 35px); letter-spacing: -.05em; }
.welcome-row .muted, .page-heading .muted { margin: 8px 0 0; }
.muted { color: var(--muted); font-size: 13px; line-height: 1.55; }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat-card { min-height: 120px; padding: 19px 20px; border: 1px solid var(--line); border-radius: 14px; background: white; }
.stat-top { display: flex; align-items: center; justify-content: space-between; color: #758079; font-size: 11px; }
.stat-icon { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 9px; background: var(--green-2); color: var(--green); font-size: 15px; }
.stat-value { margin-top: 10px; font-size: 29px; font-weight: 750; letter-spacing: -.06em; }
.stat-hint { margin-top: 2px; color: #8d9690; font-size: 10px; }
.overview-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(290px, .9fr); gap: 16px; }
.panel { border: 1px solid var(--line); border-radius: 14px; background: white; }
.request-panel, .calendar-panel { min-width: 0; padding: 22px; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.panel-heading .eyebrow { margin-bottom: 6px; }
.panel-heading h2, .calendar-toolbar h2 { margin: 0; font-size: 17px; letter-spacing: -.035em; }
.text-button { padding: 6px 0; border: 0; background: transparent; color: var(--green); font-size: 11px; font-weight: 720; white-space: nowrap; }
.text-button span { margin-left: 3px; }
.request-list { display: grid; }
.request-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; align-items: start; padding: 14px 0; border-top: 1px solid #eef0ec; }
.request-row:first-child { border-top: 0; }
.request-main { min-width: 0; }
.request-title { overflow: hidden; margin: 0; color: var(--ink); font-size: 13px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.text-like { padding: 0; border: 0; background: transparent; text-align: left; }
.text-like:hover { color: var(--green); }
.request-meta { display: flex; flex-wrap: wrap; gap: 6px 11px; margin-top: 6px; color: #8a938e; font-size: 10px; }
.request-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: end; gap: 5px; }
.priority, .status-pill, .type-pill { display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; border-radius: 99px; font-size: 9px; font-weight: 750; white-space: nowrap; }
.priority::before { width: 5px; height: 5px; border-radius: 50%; background: currentColor; content: ""; }
.priority-low { background: #f0f2ef; color: #7a847e; }
.priority-normal { background: #edf2eb; color: #56705f; }
.priority-high { background: #fff2df; color: #a56d25; }
.priority-urgent { background: var(--red-soft); color: var(--red); }
.status-pill { background: #f0f2ef; color: #66716b; }
.status-new { background: #edf4ee; color: #36734e; }
.status-scheduled { background: var(--blue-soft); color: #477a9f; }
.status-in_progress { background: #fff2df; color: #9a6d2b; }
.status-completed { background: #f0f2ef; color: #78827c; }
.status-rejected { background: var(--red-soft); color: var(--red); }
.type-pill.repair { background: #e9f2ec; color: #3e7651; }
.type-pill.purchase { background: #edf3f7; color: #527b9a; }
.empty-state { padding: 30px 12px; color: #929b95; text-align: center; font-size: 12px; line-height: 1.55; }
.upcoming-list { display: grid; gap: 10px; }
.upcoming-item { display: grid; grid-template-columns: 45px 1fr; gap: 11px; align-items: center; padding: 11px; border-radius: 10px; background: #f7f9f6; }
.date-block { display: grid; place-items: center; padding: 6px 4px; border-radius: 8px; background: white; color: var(--green); }
.date-block strong { font-size: 16px; line-height: 1; }
.date-block small { margin-top: 4px; color: #7f8a82; font-size: 8px; font-weight: 750; text-transform: uppercase; }
.upcoming-copy { min-width: 0; }
.upcoming-copy strong { display: block; overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.upcoming-copy span { display: block; margin-top: 4px; color: #8b948e; font-size: 10px; }

.page-heading { align-items: center; margin-bottom: 22px; }
.filter-row { display: flex; gap: 10px; margin-bottom: 13px; }
.search-wrap { display: flex; min-width: 220px; flex: 1; align-items: center; gap: 8px; padding-left: 13px; border: 1px solid var(--line); border-radius: 10px; background: white; color: #919b94; }
.search-wrap input { min-height: 43px; padding: 0 12px 0 0; border: 0; box-shadow: none; }
.filter-row select { width: auto; min-width: 160px; min-height: 43px; padding: 0 13px; font-size: 12px; }
.request-table { overflow: hidden; }
.table-head, .table-row { display: grid; grid-template-columns: minmax(190px, 1.4fr) minmax(105px, .65fr) minmax(110px, .7fr) minmax(100px, .65fr) minmax(155px, .9fr); gap: 12px; align-items: center; padding: 13px 17px; }
.table-head { background: #f8f9f7; color: #87918a; font-size: 9px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.table-row { min-height: 67px; border-top: 1px solid #edf0ec; font-size: 11px; }
.table-title { min-width: 0; }
.table-title strong { display: block; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.table-title small { display: block; margin-top: 5px; color: #8b948e; font-size: 10px; }
.inline-select { max-width: 120px; min-height: 31px; padding: 0 7px; border: 1px solid var(--line); border-radius: 7px; background: white; color: #59665e; font-size: 10px; }
.table-actions { display: flex; justify-content: end; gap: 6px; }
.icon-button { display: inline-grid; width: 37px; height: 37px; flex: 0 0 auto; place-items: center; border: 1px solid var(--line); border-radius: 9px; background: white; color: #58665d; font-size: 18px; }
.icon-button:hover { border-color: #b9c9bd; color: var(--green); }
.mobile-menu { display: none; }

.calendar-large { padding: 22px; }
.calendar-toolbar { display: flex; align-items: center; gap: 8px; }
.calendar-toolbar h2 { min-width: 165px; margin: 0 8px; text-align: center; }
.calendar-toolbar .button { margin-left: auto; }
.calendar-legend { display: flex; gap: 15px; margin: 17px 0 9px; color: #77827b; font-size: 10px; }
.calendar-legend span { display: flex; align-items: center; gap: 6px; }
.legend-dot { width: 7px; height: 7px; border-radius: 50%; }
.legend-dot.green { background: #7da688; }
.legend-dot.blue { background: #78a1bd; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); overflow: hidden; border: 1px solid var(--line); border-radius: 10px; }
.weekday { padding: 12px 7px; background: #f8f9f7; color: #87918a; text-align: center; font-size: 9px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.calendar-day { position: relative; min-height: 112px; padding: 8px; border-top: 1px solid var(--line); border-right: 1px solid var(--line); background: white; }
.calendar-day:nth-child(7n) { border-right: 0; }
.calendar-day.outside-month { background: #fbfcfa; color: #b7beb8; }
.day-number { display: inline-grid; width: 25px; height: 25px; place-items: center; border-radius: 50%; color: #526058; font-size: 10px; }
.calendar-day.today .day-number { background: var(--green); color: white; font-weight: 750; }
.calendar-events { display: grid; gap: 4px; margin-top: 4px; }
.calendar-event { overflow: hidden; padding: 4px 6px; border-left: 2px solid #7da688; border-radius: 4px; background: #edf5ef; color: #43664d; text-overflow: ellipsis; white-space: nowrap; font-size: 9px; }
.calendar-event.purchase { border-color: #78a1bd; background: #eef5f8; color: #4b728d; }
.calendar-event.shared { border-color: #d0a861; background: #fbf5e9; color: #82683c; }
.calendar-event time { margin-right: 4px; font-weight: 750; }
.calendar-event-more { padding: 2px 4px; color: #78827c; font-size: 8px; }

.modal { width: min(calc(100vw - 28px), 650px); max-width: none; max-height: min(90dvh, 900px); padding: 0; border: 0; border-radius: 18px; background: transparent; color: var(--ink); box-shadow: var(--shadow); }
.modal::backdrop { background: rgba(22, 38, 31, .46); backdrop-filter: blur(3px); }
.modal-card { display: grid; gap: 17px; padding: 25px; border: 1px solid rgba(255,255,255,.7); border-radius: 18px; background: white; }
.compact-modal { width: min(calc(100vw - 28px), 520px); margin: 0 auto; }
.modal-heading { display: flex; align-items: start; justify-content: space-between; gap: 15px; }
.modal-heading h2 { margin: 0; font-size: 21px; letter-spacing: -.04em; }
.modal-heading .eyebrow { margin-bottom: 6px; }
.modal-heading .icon-button { width: 31px; height: 31px; border: 0; background: #f3f5f2; font-size: 20px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: grid; align-content: start; gap: 7px; color: #435149; }
.field small { color: #909a93; font-size: 10px; font-weight: 450; }
.field-full { grid-column: 1 / -1; }
.file-input { display: flex; min-height: 45px; align-items: center; gap: 10px; overflow: hidden; padding: 0 12px; border: 1px dashed #cbd5cc; border-radius: 9px; background: #fafbf9; color: #68766d; font-size: 11px; font-weight: 550; }
.file-input input { min-height: 0; width: 88px; padding: 0; border: 0; border-radius: 0; font-size: 10px; box-shadow: none; }
.consent-row { display: flex; align-items: start; gap: 9px; color: #6f7a73; font-size: 11px; line-height: 1.45; }
.consent-row input { margin-top: 1px; accent-color: var(--green); }
.modal-actions { display: flex; justify-content: end; gap: 8px; padding-top: 4px; }
.schedule-request-name { margin: -4px 0 0; color: #708078; font-size: 12px; }
.detail-description { color: #66716a; font-size: 13px; line-height: 1.6; white-space: pre-wrap; }
.detail-photo { width: 100%; max-height: 320px; border-radius: 10px; object-fit: cover; background: #f1f3f0; }
.detail-info { display: flex; flex-wrap: wrap; gap: 8px; }
.detail-label { color: #8b948e; font-size: 10px; }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 40; max-width: min(390px, calc(100vw - 32px)); padding: 12px 16px; border: 1px solid #d5e0d7; border-radius: 11px; background: #fafffb; color: var(--green); box-shadow: var(--shadow); font-size: 12px; opacity: 0; pointer-events: none; transform: translateY(8px); transition: opacity .2s, transform .2s; }
.toast.show { opacity: 1; transform: translateY(0); }
.toast.error { border-color: #edd4d1; background: #fff9f8; color: var(--red); }

@media (max-width: 1050px) {
  .content { padding-right: 24px; padding-left: 24px; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .overview-grid { grid-template-columns: 1fr; }
  .table-head, .table-row { grid-template-columns: minmax(160px, 1.3fr) minmax(90px, .6fr) minmax(100px, .7fr) minmax(90px, .6fr) minmax(120px, .8fr); gap: 8px; padding-right: 12px; padding-left: 12px; }
}
@media (max-width: 720px) {
  .sidebar { width: 250px; transform: translateX(-105%); transition: transform .2s ease; box-shadow: 16px 0 40px rgba(20,40,30,.1); }
  .sidebar.open { transform: translateX(0); }
  .main-column { width: 100%; margin-left: 0; }
  .topbar { height: 60px; padding: 0 14px; }
  .mobile-menu { display: inline-grid; width: 33px; height: 33px; border: 0; background: transparent; font-size: 17px; }
  .breadcrumbs { gap: 6px; margin-right: auto; margin-left: 7px; font-size: 10px; }
  .breadcrumbs span:first-child { display: none; }
  .crumb-separator { display: none; }
  .topbar-actions { gap: 7px; }
  .topbar .button { min-height: 35px; padding: 0 10px; font-size: 10px; }
  .demo-badge { padding: 6px; font-size: 8px; }
  .content { padding: 25px 15px 40px; }
  .welcome-row, .page-heading { align-items: start; }
  .welcome-row { flex-direction: column; }
  .welcome-row .button { width: 100%; }
  .page-heading { flex-direction: column; }
  .page-heading .button { width: 100%; }
  .stat-grid { gap: 9px; margin-bottom: 12px; }
  .stat-card { min-height: 103px; padding: 13px; }
  .stat-top { font-size: 10px; }
  .stat-icon { width: 26px; height: 26px; }
  .stat-value { margin-top: 9px; font-size: 25px; }
  .request-panel, .calendar-panel { padding: 16px 13px; }
  .panel-heading { align-items: start; }
  .panel-heading h2 { font-size: 15px; }
  .text-button { font-size: 9px; }
  .request-row { grid-template-columns: minmax(0,1fr); gap: 8px; }
  .request-actions { justify-content: start; }
  .filter-row { flex-direction: column; }
  .filter-row select { width: 100%; }
  .table-head { display: none; }
  .table-row { grid-template-columns: minmax(0,1fr) auto; gap: 9px; padding: 14px; }
  .table-row > :nth-child(2), .table-row > :nth-child(4) { display: none; }
  .table-row > :nth-child(3) { justify-self: start; }
  .table-actions { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
  .calendar-large { padding: 13px 9px; }
  .calendar-toolbar { gap: 5px; }
  .calendar-toolbar .icon-button { width: 31px; height: 31px; }
  .calendar-toolbar h2 { min-width: auto; flex: 1; margin: 0; font-size: 14px; }
  .calendar-toolbar .button { min-height: 31px; padding: 0 8px; font-size: 9px; }
  .weekday { padding: 9px 2px; font-size: 7px; }
  .calendar-day { min-height: 76px; padding: 4px 3px; }
  .day-number { width: 21px; height: 21px; font-size: 9px; }
  .calendar-event { padding: 3px; font-size: 7px; }
  .calendar-event time { display: none; }
  .calendar-legend { margin-top: 12px; }
  .auth-card { padding: 29px 22px; }
  .modal-card { gap: 14px; padding: 19px 16px; }
  .modal-heading h2 { font-size: 18px; }
  .form-grid { gap: 11px; }
  .field { font-size: 11px; }
  .field input, .field select, .field textarea { font-size: 12px; }
}
@media (max-width: 420px) {
  .topbar .button span { display: none; }
  .welcome-row h1, .page-heading h1 { font-size: 28px; }
  .stat-top { align-items: start; }
  .stat-top span:first-child { max-width: 88px; line-height: 1.3; }
  .form-grid { grid-template-columns: 1fr; }
  .field-full { grid-column: auto; }
}
