:root {
      --bg: #f5f8f7;
      --surface: #ffffff;
      --surface-soft: #f0f6f4;
      --text: #20312d;
      --muted: #71807b;
      --line: #e3ebe7;
      --primary: #177b68;
      --primary-dark: #116454;
      --primary-soft: #e4f3ee;
      --warning: #a96c16;
      --warning-soft: #fff4df;
      --shadow: 0 10px 30px rgba(30, 70, 58, .06);
      --radius: 18px;
    }
    * { box-sizing: border-box; }
    body {
      margin: 0;
      color: var(--text);
      background: var(--bg);
      font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
      line-height: 1.5;
    }
    button, input { font: inherit; }
    button { cursor: pointer; }
    .app { min-height: 100vh; }
    .topbar {
      height: 72px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 0 max(24px, calc((100vw - 1180px) / 2));
      background: rgba(255,255,255,.88);
      border-bottom: 1px solid var(--line);
      position: sticky;
      top: 0;
      z-index: 5;
      backdrop-filter: blur(12px);
    }
    .brand { display: flex; align-items: center; gap: 11px; font-weight: 760; letter-spacing: -.5px; font-size: 20px; }
    .brand-mark {
      width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center;
      color: white; background: var(--primary); font-size: 21px; font-weight: 500;
    }
    .top-right { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; }
    .avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-dark); font-weight: 700; }
    .layout { max-width: 1180px; margin: 0 auto; padding: 32px 24px 60px; display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 34px; }
    .sidebar { padding-top: 8px; }
    .nav-label { color: #9aa7a2; text-transform: uppercase; letter-spacing: 1.2px; font-size: 10px; font-weight: 750; padding: 0 12px; margin: 12px 0 10px; }
    .nav { display: grid; gap: 5px; }
    .nav button {
      display: flex; gap: 12px; align-items: center; width: 100%; border: 0; background: transparent;
      color: #61716b; text-align: left; border-radius: 12px; padding: 11px 13px; font-size: 14px; font-weight: 600;
    }
    .nav button:hover { background: #edf4f1; color: var(--text); }
    .nav button.active { background: var(--primary-soft); color: var(--primary-dark); }
    .nav-icon { width: 20px; text-align: center; font-size: 17px; }
    .side-note { margin: 34px 5px 0; background: #edf4f1; border: 1px solid #e3ece7; border-radius: 15px; padding: 14px; color: #63736d; font-size: 12px; }
    .side-note strong { display: block; color: var(--text); font-size: 13px; margin-bottom: 5px; }
    main { min-width: 0; }
    .page { display: none; animation: appear .18s ease-out; }
    .page.active { display: block; }
    @keyframes appear { from { opacity: .55; transform: translateY(4px); } to { opacity: 1; transform: none; } }
    .eyebrow { font-size: 12px; font-weight: 700; color: var(--primary); letter-spacing: .3px; margin-bottom: 5px; }
    h1 { margin: 0; font-size: clamp(27px, 4vw, 34px); letter-spacing: -1.1px; line-height: 1.2; }
    .subheading { color: var(--muted); margin: 9px 0 0; font-size: 14px; }
    .header-row { display: flex; justify-content: space-between; align-items: end; gap: 18px; margin-bottom: 26px; }
    .primary-btn, .secondary-btn {
      display: inline-flex; align-items: center; justify-content: center; gap: 9px; border-radius: 12px;
      padding: 12px 17px; font-weight: 700; font-size: 13px; transition: .15s ease;
    }
    .primary-btn { color: white; background: var(--primary); border: 1px solid var(--primary); box-shadow: 0 4px 10px rgba(23,123,104,.14); }
    .primary-btn:hover { background: var(--primary-dark); transform: translateY(-1px); }
    .secondary-btn { background: white; border: 1px solid var(--line); color: var(--text); }
    .secondary-btn:hover { background: var(--surface-soft); }
    .card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
    .upload-card { padding: 22px; margin-bottom: 22px; }
    .upload-card-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
    h2 { margin: 0; font-size: 17px; letter-spacing: -.3px; }
    .small-muted { color: var(--muted); font-size: 12px; }
    .dropzone {
      border: 1.5px dashed #b9d4ca; border-radius: 15px; background: #f8fbfa; padding: 28px 18px;
      text-align: center; transition: .15s ease;
    }
    .dropzone.dragover { border-color: var(--primary); background: var(--primary-soft); }
    .upload-icon { width: 49px; height: 49px; margin: 0 auto 12px; border-radius: 15px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); font-size: 24px; }
    .dropzone strong { display: block; font-size: 15px; margin-bottom: 5px; }
    .dropzone p { color: var(--muted); font-size: 12px; margin: 0 0 15px; }
    .file-hint { color: #98a49f; font-size: 11px; margin-top: 12px; }
    .selected-file { display: none; margin-top: 14px; border: 1px solid var(--line); background: white; padding: 12px 14px; border-radius: 12px; align-items: center; justify-content: space-between; gap: 10px; text-align: left; }
    .selected-file.visible { display: flex; }
    .file-info { min-width: 0; display: flex; gap: 10px; align-items: center; }
    .selected-file-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
    .upload-submit-btn { padding: 9px 13px; font-size: 12px; white-space: nowrap; }
    .upload-submit-btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
    .file-badge { width: 35px; height: 35px; display: grid; place-items: center; background: #f0f3ff; border-radius: 10px; color: #596bb0; }
    .file-name { font-size: 12px; font-weight: 700; overflow-wrap: anywhere; }
    .file-size { color: var(--muted); font-size: 11px; }
    .remove-file { border: 0; background: transparent; color: var(--muted); font-size: 20px; padding: 4px 8px; }
    .notice { display: flex; gap: 9px; align-items: flex-start; background: #f7f9f8; border: 1px solid var(--line); padding: 11px 13px; border-radius: 12px; color: #697872; font-size: 11px; margin-top: 15px; }
    .notice b { color: #465750; }
    .section-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 27px 0 13px; }
    .empty-card { padding: 25px; display: flex; align-items: center; gap: 16px; }
    .empty-icon { width: 48px; height: 48px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 14px; background: #f1f5f3; color: #83938c; font-size: 22px; }
    .empty-card strong { font-size: 13px; display: block; margin-bottom: 3px; }
    .empty-card p { color: var(--muted); font-size: 12px; margin: 0; }
    .steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 20px; }
    .step { padding: 15px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.65); }
    .step-num { color: var(--primary); font-size: 11px; font-weight: 800; margin-bottom: 8px; }
    .step strong { display: block; font-size: 12px; margin-bottom: 4px; }
    .step p { color: var(--muted); font-size: 11px; margin: 0; }
    .content-card { padding: 22px; }
    .empty-large { text-align: center; padding: 48px 20px; }
    .empty-large .upload-icon { width: 58px; height: 58px; font-size: 27px; }
    .empty-large h2 { font-size: 18px; margin-bottom: 7px; }
    .empty-large p { max-width: 390px; margin: 0 auto 18px; color: var(--muted); font-size: 13px; }
    .reports-section-head { margin-top: 0; }
    .reports-toolbar { display: flex; align-items: center; gap: 12px; }
    .reports-toolbar .secondary-btn { padding: 8px 12px; font-size: 12px; }
    .reports-message { margin-bottom: 14px; color: var(--muted); font-size: 13px; }
    .reports-error { color: #9b3d32; background: #fff8f6; border-color: #f0d7d2; }
    .reports-list { display: grid; gap: 12px; }
    .report-card { padding: 18px 20px; }
    .report-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
    .report-file { min-width: 0; display: flex; align-items: center; gap: 12px; }
    .report-file-name { min-width: 0; display: grid; gap: 3px; }
    .report-file-name strong { font-size: 13px; overflow-wrap: anywhere; }
    .report-file-name span { color: var(--muted); font-size: 11px; }
    .report-card-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
    .report-delete-btn { border: 1px solid #efd7d3; border-radius: 9px; background: #fff; color: #a04439; padding: 5px 10px; font-size: 11px; font-weight: 700; }
    .report-delete-btn:hover { background: #fff5f3; }
    .report-delete-btn:disabled { opacity: .55; cursor: wait; }
    .report-status { flex: 0 0 auto; display: inline-flex; align-items: center; border-radius: 999px; padding: 5px 9px; background: #f0f3f2; color: #63716b; font-size: 10px; font-weight: 750; }
    .report-status.is-draft { background: var(--warning-soft); color: #8b5c17; }
    .report-status.is-approved { background: var(--primary-soft); color: var(--primary-dark); }
    .report-details { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; border-top: 1px solid var(--line); margin-top: 15px; padding-top: 13px; }
    .report-detail { min-width: 0; display: grid; gap: 3px; }
    .report-detail span { color: var(--muted); font-size: 10px; }
    .report-detail strong { font-size: 11px; font-weight: 650; overflow-wrap: anywhere; }
    .profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 18px; }
    .profile-field { padding: 15px; border: 1px solid var(--line); border-radius: 13px; }
    .profile-field span { display: block; font-size: 11px; color: var(--muted); margin-bottom: 5px; }
    .profile-field strong { font-size: 13px; font-weight: 650; }
    .prototype-tag { display: inline-flex; align-items: center; gap: 6px; background: var(--warning-soft); color: #8b5c17; padding: 6px 9px; border-radius: 999px; font-size: 10px; font-weight: 750; }
    .toast { position: fixed; bottom: 22px; left: 50%; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; background: #20312d; color: white; border-radius: 12px; padding: 11px 16px; font-size: 12px; box-shadow: var(--shadow); transition: .2s ease; z-index: 20; max-width: calc(100vw - 30px); }
    .toast.show { opacity: 1; transform: translate(-50%, 0); }
    .mobile-nav { display: none; }
    @media (max-width: 760px) {
      .topbar { height: 62px; padding: 0 17px; }
      .top-right .user-label { display: none; }
      .layout { display: block; padding: 25px 16px 95px; }
      .sidebar { display: none; }
      .header-row { align-items: flex-start; flex-direction: column; }
      .header-row .primary-btn { width: 100%; }
      .upload-card { padding: 16px; }
      .steps { grid-template-columns: 1fr; }
      .step { display: flex; align-items: flex-start; gap: 12px; }
      .step-num { min-width: 24px; margin: 1px 0 0; }
      .profile-grid { grid-template-columns: 1fr; }
      .mobile-nav { position: fixed; bottom: 0; left: 0; right: 0; display: grid; grid-template-columns: repeat(4, 1fr); background: rgba(255,255,255,.96); border-top: 1px solid var(--line); padding: 8px 5px calc(8px + env(safe-area-inset-bottom)); z-index: 10; backdrop-filter: blur(12px); }
      .mobile-nav button { border: 0; background: transparent; color: #829089; display: grid; justify-items: center; gap: 3px; font-size: 10px; padding: 4px 2px; }
      .mobile-nav button.active { color: var(--primary); font-weight: 750; }
      .mobile-nav .nav-icon { font-size: 18px; }
      .empty-card { align-items: flex-start; padding: 17px; }
      .report-card { padding: 15px; }
      .report-card-header { flex-direction: column; }
      .report-status { align-self: flex-start; }
      .report-details { grid-template-columns: 1fr 1fr; }
    }
