:root {
  color-scheme: light;
  --blue: #5268ed;
  --blue-dark: #4058df;
  --ink: #202532;
  --muted: #7c8494;
  --line: #e4e8f0;
  --page: #f0f3f8;
  --lavender: #e8edff;
  --green: #30a854;
  --amber: #df991e;
  font-family: Inter, "Segoe UI", "Microsoft YaHei", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--page); font-size: 14px; }
button, input, select { font: inherit; }
button { cursor: pointer; }
.hero {
  min-height: 134px; padding: 25px 32px; color: #fff;
  background: linear-gradient(112deg, #4d67eb 0%, #6551ce 100%);
  display: flex; align-items: center; justify-content: space-between;
}
.hero h1 { margin: 0 0 7px; font-size: 27px; line-height: 1.2; font-weight: 750; letter-spacing: .2px; }
.hero p { margin: 4px 0; color: rgba(255,255,255,.82); font-size: 14px; }
.hero .version-line { font-size: 12px; color: rgba(255,255,255,.7); }
.hero-mark { border: 1px solid rgba(255,255,255,.25); color: rgba(255,255,255,.45); border-radius: 12px; padding: 8px 12px; font-size: 13px; letter-spacing: 2px; }
.tabs { display: flex; align-items: center; gap: 12px; padding: 12px 24px; min-height: 68px; background: #fff; border-bottom: 1px solid var(--line); }
.tab { min-width: 124px; height: 44px; border: 0; border-radius: 9px; background: transparent; color: #4e5564; font-size: 16px; transition: .15s ease; }
.tab:hover { background: #f3f5fb; }
.tab.active { color: #fff; background: var(--blue); box-shadow: 0 4px 10px rgba(71,97,227,.18); }
.page { padding: 22px 24px 36px; min-height: calc(100vh - 202px); }
.metric-grid { display: grid; grid-template-columns: repeat(6, minmax(135px, 1fr)); gap: 16px; margin-bottom: 22px; }
.metric-card { min-height: 116px; padding: 17px 14px 13px; border: 1px solid #edf0f5; border-radius: 12px; background: #fff; box-shadow: 0 4px 12px rgba(28,39,70,.07); text-align: center; }
.metric-value { color: var(--blue); font-size: 30px; font-weight: 750; line-height: 1.25; }
.metric-value.green { color: var(--green); }
.metric-value.amber { color: var(--amber); }
.metric-label { margin-top: 7px; color: #687080; font-size: 14px; }
.toolbar { min-height: 54px; display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.toolbar-spacer { flex: 1; }
.btn, .field, .select {
  min-height: 38px; border: 1px solid #dfe4ec; border-radius: 8px; background: #fff; color: #394152;
}
.btn { padding: 0 15px; transition: background .15s ease, border-color .15s ease, transform .15s ease; }
.btn:hover { border-color: #aebcf8; background: #f7f8ff; }
.btn:active { transform: translateY(1px); }
.btn.primary { border-color: var(--blue); color: #fff; background: var(--blue); }
.btn.primary:hover { border-color: var(--blue-dark); background: var(--blue-dark); }
.btn.subtle { color: #657087; }
.week-label { min-width: 212px; font-weight: 650; font-size: 15px; }
.auto-state { color: #737d8b; font-size: 13px; white-space: nowrap; }
.auto-state::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; background: #b8bfcb; }
.auto-state.on::before { background: #2db56a; box-shadow: 0 0 0 3px #dcf5e7; }
.field, .select { padding: 0 12px; outline: none; }
.field:focus, .select:focus { border-color: #8095ff; box-shadow: 0 0 0 3px rgba(82,104,237,.12); }
.filter-input { flex: 1; min-width: 220px; }
.select { min-width: 142px; }
.workspace { overflow: hidden; }
.table-wrap { overflow: auto; border: 1px solid #e4e8f0; border-radius: 10px; background: #fff; box-shadow: 0 3px 10px rgba(31,44,75,.04); }
table { width: 100%; border-collapse: collapse; }
th { background: #e8edff; color: #30394b; font-weight: 700; text-align: left; }
th, td { padding: 12px 14px; border-bottom: 1px solid #e6e9ef; vertical-align: top; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fafbff; }
.schedule-wrap { overflow: auto; border: 1px solid #e4e8f0; border-radius: 10px; background: #fff; }
.schedule-table { min-width: 1060px; table-layout: fixed; }
.schedule-table th { height: 68px; text-align: center; vertical-align: middle; }
.schedule-table th:first-child { width: 190px; }
.schedule-table td { height: 136px; padding: 8px; border-right: 1px solid #e7eaf0; }
.schedule-table td:first-child { padding: 14px; vertical-align: middle; }
.staff { display: flex; align-items: center; gap: 12px; }
.avatar { width: 42px; height: 42px; display: grid; place-items: center; color: #fff; border-radius: 50%; background: var(--blue); font-size: 18px; font-weight: 700; }
.staff-name { font-size: 15px; font-weight: 700; }
.day-name { font-size: 16px; font-weight: 750; }
.day-date { margin-top: 4px; color: #7d8797; font-size: 12px; font-weight: 450; }
.schedule-card { display: block; width: 100%; margin: 3px 0 5px; padding: 9px 10px; border: 0; border-left: 4px solid var(--blue); border-radius: 7px; background: var(--lavender); text-align: left; color: #28334b; cursor: pointer; }
.schedule-card:hover { background: #dce5ff; }
.schedule-title { overflow: hidden; display: block; margin-bottom: 4px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.schedule-meta { display: block; overflow: hidden; color: #69748a; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.day-empty { padding: 14px 0; color: #c1c7d1; text-align: center; }
.day-total { padding: 2px 5px 5px; color: #6b7482; text-align: right; font-size: 12px; }
.person-cell { background: #fbfcff; }
.status { display: inline-flex; align-items: center; padding: 4px 9px; border-radius: 20px; color: #278a4b; background: #e8f7ed; font-size: 12px; white-space: nowrap; }
.status.pending { color: #a66b11; background: #fff4dc; }
.status.inprogress { color: #3658c9; background: #eaf0ff; }
.hours { font-weight: 650; white-space: nowrap; }
.product-line { max-width: 470px; color: #5d6676; line-height: 1.7; }
.subtle-text { color: var(--muted); }
.table-title { padding: 16px 18px; font-size: 15px; font-weight: 700; background: #fff; border-bottom: 1px solid var(--line); }
.usage-meter { min-width: 150px; }
.meter-track { height: 8px; margin: 5px 0; border-radius: 99px; background: #edf0f5; overflow: hidden; }
.meter-fill { height: 100%; border-radius: inherit; background: linear-gradient(90deg,#617cf3,#54b9e9); }
.empty-state { padding: 42px 20px; color: #8a93a2; text-align: center; }
.modal-backdrop { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 22px; background: rgba(23,30,48,.42); }
.modal-backdrop.hidden { display: none; }
.modal { width: min(590px, 100%); max-height: min(92vh, 850px); overflow: auto; padding: 22px 24px; border-radius: 13px; background: #fff; box-shadow: 0 20px 60px rgba(22,32,58,.25); }
.modal h2 { margin: 0 0 18px; font-size: 19px; }
.form-grid { display: grid; gap: 13px; }
.form-field { display: grid; gap: 6px; color: #4e5768; font-size: 13px; font-weight: 600; }
.form-field input, .form-field select { width: 100%; height: 38px; border: 1px solid #dfe4ec; border-radius: 7px; padding: 0 10px; color: #30394b; background: #fff; font-size: 14px; font-weight: 400; outline: none; }
.form-field input:focus, .form-field select:focus { border-color: #8095ff; box-shadow: 0 0 0 3px rgba(82,104,237,.12); }
.estimate-box { display: flex; justify-content: space-between; padding: 10px 12px; border-radius: 7px; color: #58647b; background: #f3f5fb; }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 19px; }
.detail-list { display: grid; grid-template-columns: 120px 1fr; gap: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.detail-list dt, .detail-list dd { margin: 0; padding: 11px 13px; border-bottom: 1px solid var(--line); }
.detail-list dt { color: #778193; background: #f8f9fc; }
.detail-list dd { font-weight: 550; overflow-wrap: anywhere; }
.detail-list dt:nth-last-of-type(1), .detail-list dd:last-child { border-bottom: 0; }
.toast { position: fixed; z-index: 30; left: 50%; bottom: 24px; transform: translate(-50%, 18px); opacity: 0; pointer-events: none; padding: 10px 16px; border-radius: 8px; color: #fff; background: #263149; box-shadow: 0 8px 26px rgba(0,0,0,.18); transition: .2s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 1280px) {
  .metric-grid { grid-template-columns: repeat(3, minmax(125px, 1fr)); }
  .hero-mark { display: none; }
}
@media (max-width: 760px) {
  .hero { padding: 20px 18px; min-height: 124px; }
  .hero h1 { font-size: 22px; }
  .hero p { font-size: 12px; }
  .tabs { padding: 9px 12px; gap: 4px; overflow-x: auto; }
  .tab { flex: 0 0 auto; min-width: 102px; height: 40px; font-size: 14px; }
  .page { padding: 14px 12px 28px; }
  .metric-grid { grid-template-columns: repeat(2, minmax(115px, 1fr)); gap: 10px; }
  .metric-card { min-height: 94px; }
  .metric-value { font-size: 25px; }
  .toolbar { gap: 8px; }
  .toolbar-spacer { display: none; }
  .week-label { min-width: 100%; order: 3; }
  .filter-input { min-width: 100%; }
  .select { flex: 1; min-width: 120px; }
  th, td { padding: 10px; }
  .modal { padding: 19px 17px; }
}
