:root { color-scheme: light; font-family: Inter, "Segoe UI", Arial, sans-serif; color: #172033; background: #f4f6fa; }
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
button, input, select { font: inherit; }
button { cursor: pointer; }
.shell { min-height: 100vh; display: grid; grid-template-columns: 240px 1fr; }
.sidebar { background: #14213d; color: #fff; padding: 28px 18px; display: flex; flex-direction: column; }
.brand { display: flex; gap: 10px; align-items: center; margin-bottom: 36px; }
.brand span { background: #2f80ed; padding: 9px 8px; border-radius: 9px; font-weight: 700; }
.brand strong { font-size: 18px; }
nav { display: grid; gap: 8px; }
.nav-item { border: 0; text-align: left; color: #d7deeb; background: transparent; padding: 12px 14px; border-radius: 9px; }
.nav-item.active, .nav-item:hover { background: #243556; color: #fff; }
.privacy { margin-top: auto; color: #aeb9ce; font-size: 12px; line-height: 1.5; }
main { padding: 28px 38px 60px; max-width: 1180px; width: 100%; }
header { display: flex; justify-content: space-between; gap: 24px; align-items: center; margin-bottom: 24px; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 6px; font-size: 28px; }
header p, .panel > p { color: #647087; }
#user-chip { padding: 10px 14px; border-radius: 999px; background: #e7effc; color: #174d9b; font-size: 14px; }
.user-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.user-actions button { white-space: nowrap; }
.history-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 18px 0; }
.history-summary > div { background: #f4f7fc; border: 1px solid #e1e7f1; border-radius: 14px; padding: 14px 16px; }
.history-summary span { display: block; color: #647087; font-size: 13px; margin-bottom: 4px; }
.history-summary strong { font-size: 24px; color: #15213c; }
.history-filters { display: grid; grid-template-columns: minmax(220px, 2fr) minmax(160px, 1fr) minmax(160px, 1fr); gap: 12px; margin-bottom: 18px; }
.history-filters label { margin: 0; }
.status-pill { display: inline-block; border-radius: 999px; padding: 5px 9px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.status-pill.synced { color: #19723c; background: #e6f6ec; }
.status-pill.pending { color: #8a5a00; background: #fff2cf; }
.panel { background: #fff; border: 1px solid #e2e7f0; border-radius: 14px; padding: 24px; box-shadow: 0 8px 22px rgba(28, 43, 71, .05); }
.login-panel { max-width: 520px; margin: 70px auto; }
form label { display: grid; gap: 7px; font-weight: 600; color: #354158; }
input, select { min-height: 44px; border: 1px solid #cfd7e5; border-radius: 9px; padding: 10px 12px; background: #fff; color: #172033; }
input:focus, select:focus { outline: 3px solid rgba(47,128,237,.18); border-color: #2f80ed; }
#login-form { display: grid; gap: 16px; }
button { border: 1px solid #cbd4e2; border-radius: 9px; padding: 10px 15px; background: #fff; color: #25324a; }
button.primary { border-color: #256fd1; background: #2f80ed; color: #fff; font-weight: 600; }
button:disabled { cursor: not-allowed; opacity: .5; }
.hint { margin-top: 18px; font-size: 13px; color: #69758b; }
.link-button { border: 0; padding: 0; color: #246bc1; background: transparent; }
.error { color: #b42318; margin: 14px 0 0; }
.steps { display: flex; gap: 24px; color: #8a94a6; margin: 0 0 15px; font-size: 14px; }
.drive-status { margin-bottom: 15px; padding: 10px 13px; border-radius: 9px; background: #eef3fb; color: #34445f; font-size: 13px; }
.drive-status.ready { background: #eef9f1; color: #17643a; }
.steps .active { color: #246bc1; font-weight: 700; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.wide { grid-column: 1 / -1; }
.file-picker { border: 2px dashed #cbd5e4; padding: 24px; border-radius: 12px; text-align: center; cursor: pointer; }
.file-picker.dragging { border-color: #2f80ed; background: #f1f6fe; }
.file-picker input { position: absolute; opacity: 0; pointer-events: none; }
.file-picker span { font-weight: 400; color: #68758b; }
.file-picker strong { display: block; margin-top: 9px; color: #1e5fae; overflow-wrap: anywhere; }
.action-row { display: flex; justify-content: flex-end; gap: 12px; }
.correction-banner { display: flex; justify-content: space-between; gap: 16px; align-items: center; padding: 14px; border-radius: 9px; background: #fff7e7; color: #754c0b; }
.correction-banner[hidden] { display: none; }
.correction-banner span { display: block; margin-top: 4px; font-size: 13px; }
.preview, .success { margin-top: 18px; }
.preview dl { display: grid; gap: 12px; margin-bottom: 0; }
.preview dl div { padding: 12px 14px; background: #f5f7fb; border-radius: 9px; }
.preview dt { color: #67738a; font-size: 13px; }
.preview dd { margin: 5px 0 0; font-weight: 600; overflow-wrap: anywhere; }
.classification-note { color: #8a5a10 !important; margin: 14px 0 0; }
.success { border-color: #a7d7ba; background: #f2fbf5; }
.success h2 { color: #187444; }
.section-heading { display: flex; justify-content: space-between; align-items: start; gap: 20px; }
.section-heading p { color: #68758b; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; border-bottom: 1px solid #e6eaf1; padding: 12px 10px; vertical-align: top; }
th { color: #69758b; font-size: 13px; }
td { overflow-wrap: anywhere; }
.empty { text-align: center; margin: 25px 0 5px; color: #7a8495; }
.file-detail { margin-top: 18px; }
.detail-list { display: grid; gap: 10px; }
.detail-list div { background: #f5f7fb; padding: 11px 13px; border-radius: 8px; }
.detail-list dt { color: #69758b; font-size: 13px; }
.detail-list dd { margin: 4px 0 0; overflow-wrap: anywhere; }
.content-preview { margin: 16px 0; min-height: 80px; background: #f5f7fb; border-radius: 10px; display: grid; place-items: center; overflow: hidden; }
.content-preview iframe { width: 100%; height: 420px; border: 0; }
.content-preview img { max-width: 100%; max-height: 480px; display: block; }
.button-link { display: inline-flex; align-items: center; text-decoration: none; border: 1px solid #cbd4e2; border-radius: 9px; padding: 10px 15px; color: #25324a; background: #fff; }
@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { padding: 16px; }
  .brand { margin-bottom: 12px; }
  .privacy { display: none; }
  nav { grid-template-columns: 1fr 1fr; }
  main { padding: 22px 16px 40px; }
  header { align-items: flex-start; }
  .form-grid { grid-template-columns: 1fr; }
  .wide { grid-column: auto; }
  .action-row { flex-direction: column; }
  .history-summary, .history-filters { grid-template-columns: 1fr; }
}
