// Bilingual TH/EN strings for Initial Estate Recruit
const TRANSLATIONS = {
  en: {
    brand: "Initial Estate",
    brandSub: "HR · v0.5",
    brandTagline: "Designed for real you",
    nav: { workspace: "Workspace", more: "More", today: "Today", dashboard: "Dashboard", positions: "Positions", candidates: "Candidates", upload: "Upload resumes", pipeline: "Pipeline", audit: "Audit log", settings: "Settings", users: "Team" },
    user: { name: "Aporn Saetang", role: "HR Recruiter" },
    topbar: { search: "Search candidates, positions, notes…", new: "New", export: "Export" },
    today: {
      eyebrow: "Tuesday, May 5",
      title: "Today, Aporn",
      sub: "8 things need your attention. Sorted by urgency — the AI handles screening, you handle the human side.",
      now: "Now — today",
      nowSub: "Time-sensitive. Calls scheduled, replies waiting, interviews this afternoon.",
      high: "Worth your time",
      highSub: "Strong fits the AI surfaced overnight. Spend 5 minutes reviewing each.",
      stale: "Don’t lose them",
      staleSub: "Candidates have been waiting too long. A nudge today keeps them warm.",
      info: "Housekeeping",
      infoSub: "PDPA renewals, archives, and other compliance tasks.",
      empty: "You’re all caught up. Nice work — grab a coffee.",
      undo: "Undo",
      doneToast: "Done. Moved to history.",
      snoozedToast: "Snoozed for 4 hours.",
      kinds: {
        scheduledCall: "Scheduled call",
        interviewToday: "Interview today",
        replied: "Candidate replied",
        topFitNew: "New top fit",
        noResponse: "Follow-up overdue",
        shortlistDecision: "Shortlist decision",
        consentExpiring: "PDPA renewal",
      },
      actions: {
        callNow: "Call now",
        reschedule: "Reschedule",
        openProfile: "Open profile",
        openPrep: "Open call prep",
        sendBrief: "Send brief",
        scheduleCall: "Schedule call",
        reply: "Reply",
        review: "Review",
        reachOut: "Reach out",
        skip: "Skip",
        sendNudge: "Send nudge",
        markCold: "Mark cold",
        shortlist: "Shortlist",
        pass: "Pass",
        sendRenewal: "Send renewal",
        archive: "Archive",
        snooze: "Snooze",
        markDone: "Mark done",
      },
    },
    dash: {
      eyebrow: "Tuesday, May 5",
      title: "Good morning, Aporn",
      sub: "23 candidates have been screened by AI overnight and are waiting for your review. Three positions are running ahead of schedule.",
      uploadBtn: "Upload resumes",
      stats: { total: "Total candidates", pending: "Pending HR review", avg: "Avg fit score", short: "Shortlisted" },
      topCands: "Top candidates this week", topCandsSub: "Ranked by AI fit score across active positions",
      viewAll: "View all", positionsCol: "Active positions", positionsSub: "Open requisitions", all: "All",
      activity: "Activity", activitySub: "AI and team actions",
      cols: { candidate: "Candidate", position: "Position", fit: "Fit", status: "Status" },
      deltas: { weekly24: "+24 this week", awaitingHR: "AI screened, awaiting HR", vsLastMonth: "+3 vs last month", across12: "Across 12 positions" },
      activeTitle: "Active positions", activeSub: "Open requisitions", allBtn: "All",
      newSuffix: "new", postedPrefix: "Posted",
    },
    pos: {
      eyebrow: "Positions", title: "Open requisitions",
      sub: "Define the role first — JD, must-haves, scoring weights — and the AI will use that exact rubric on every candidate uploaded against it.",
      newBtn: "New position",
      cols: { position: "Position", dept: "Department", openings: "Openings", candidates: "Candidates", pending: "Pending", posted: "Posted" },
      reportsTo: "Reports to",
    },
    posDetail: {
      back: "Back", edit: "Edit", uploadBtn: "Upload resumes",
      tabs: { overview: "Overview", rubric: "AI scoring rubric", candidates: "Candidates" },
      jd: "Job description", kpis: "KPIs the role will be measured on",
      reqs: "Requirements", must: "Must have", nice: "Nice to have", dq: "Disqualifiers",
      glance: "At a glance", skills: "Skills", education: "Education", certs: "Certifications", emp: "Employment type",
      aiSummary: "AI screening summary", screened: "Screened", strong: "Strong fit", pending: "Pending",
      avgNote: "Average fit score for this role is",
      weights: "Scoring weights", total: "Total",
      weightsSub: "Adjust how each dimension contributes to the overall fit score. The AI re-scores all candidates against the new weights when you save.",
      saveRescore: "Save & re-score 47 candidates", reset: "Reset to defaults",
      howApplied: "How the rubric is applied",
      howSteps: [
        "AI parses the resume and extracts structured fields.",
        "Each dimension is scored 0–100 against this position's must-haves and KPIs.",
        "Weighted average produces the overall fit score.",
        "A natural-language explanation is generated for every sub-score.",
        "Disqualifiers, if present, cap the recommendation at \"Not recommended\".",
      ],
      excluded: "Excluded from scoring",
      excludedBody: "Gender, age, photo, marital status, religion, race, nationality, health.",
    },
    cands: {
      eyebrow: "Candidates", title: "Ranked by AI fit",
      subWith: (n, t) => `${n} candidates evaluated against "${t}". Open one to see the full score breakdown and AI call prep.`,
      subAll: (n) => `${n} candidates across all open positions. Open one to see the full score breakdown and AI call prep.`,
      allPositions: "All positions",
      sortFit: "Sort: Fit score", sortDate: "Sort: Date applied", filter: "Filter",
      cols: { current: "Current role", exp: "Experience", fit: "Fit score", rec: "Recommendation", applied: "Applied" },
      filters: { all: "All", strong: "Strong fit", potential: "Potential fit", weak: "Weak fit", not: "Not recommended" },
    },
    upload: {
      eyebrow: "Resume ingestion", title: "Upload & AI screen",
      sub: "Drop a folder of resumes. The AI parses each one, scores it against the position you select, and surfaces a ranked list — usually in under 90 seconds for batches of 20.",
      against: "Screen against position", mustHaves: (n) => `${n} must-haves`, kpis: (n) => `${n} KPIs`,
      drop: "Drop resumes here",
      dropSub: "PDF or DOCX · up to 50 files at once · 10 MB each",
      browse: "Browse files",
      orPaste: "or paste a folder from Drive ·",
      sample: "Use a sample batch of 6",
      thinking: "AI is screening…", done: "Screening complete", doneIn: "Done in 1m 12s",
      processing: "Processing", scored: "Scored", queued: "Queued",
      uploadMore: "Upload more", review: (n) => `Review ${n} candidates`,
      steps: [
        ["Parsing 6 resumes (PDF + DOCX)", "Extracting structured fields: name, contact, work history, education, skills…"],
        ["Cross-referencing against the JD", "Mapping each candidate's experience to must-haves and nice-to-haves."],
        ["Scoring across 6 dimensions", "Experience · Skills · Industry · Leadership · KPI · Stability"],
        ["Generating explanations & call-prep notes", "Per-score reasoning, suggested questions, salary & availability probes."],
      ],
      extracts: "What the AI extracts",
      extractRows: [
        ["Identity", "Name, contact (redactable)"],
        ["Work history", "Companies, titles, dates, gaps"],
        ["Education & certs", "Degrees, schools, licenses"],
        ["Skills", "Technical & functional"],
        ["Career signal", "Tenure pattern, progression"],
      ],
      neverTitle: "Never extracted or used in scoring",
      neverBody: "Photo, age, gender, marital status, religion, race, nationality, health. PDPA-compliant: candidate can request deletion at any time.",
    },
    cand: {
      backTo: "Back to", rankedOf: (i, n) => `${i} of ${n} ranked`,
      viewResume: "View resume", scheduleCall: "Schedule call",
      evaluating: "Evaluating against",
      applied: "Applied", source: "Source",
      tabs: { score: "AI score breakdown", compare: "Requirement match", call: "Call preparation", resume: "Resume & history" },
      overall: "Overall AI fit score",
      explanations: {
        cautious: "This candidate looks like a strong fit on the dimensions that matter most for this role — industry experience and KPI alignment. Before recommending an interview, I'd suggest you verify two things on the call: the personal-vs-team split on the THB 410M closed GMV claim, and the reasons behind three role changes in the last five years.",
        confident: "A strong candidate. Industry fit is excellent and the closed-GMV claim, if verified, exceeds the must-have. Two narrow risks to clarify on the call: tenure pattern and personal-vs-team split.",
        structured: "Strong fit. Industry: 95. Experience: 92. KPI alignment: 88. Two risks flagged (tenure, GMV attribution). Recommend verification call.",
      },
      subscores: "Sub-scores", subWeighted: "Weighted by this position's rubric",
      working: "What's working", gaps: "Gaps", risks: "Risks to verify",
      override: "HR override",
      overrideSub: "Disagree with the AI? Override the score and add a reason. Both versions stay on the record.",
      yourScore: "Your score", reason: "Reason",
      reasonPh: "e.g. Verified personal GMV split with reference, raises confidence in the experience score.",
      saveOverride: "Save override", resetBtn: "Reset",
      quick: "Quick actions",
      actions: {
        phone: ["Schedule phone screen", "Sync with HR calendar"],
        star: ["Move to shortlist", "Notify hiring manager"],
        cal: ["Schedule interview", "Pass to next stage"],
        users: ["Send to talent pool", "Keep for future roles"],
        x: ["Reject", "Sends polite rejection email"],
      },
      record: "Evaluation record",
      records: { evaluated: "Evaluated", model: "Model", jd: "JD version", resume: "Resume version", reviewer: "Reviewer" },
      audit: "View full audit trail",
      reqsTitle: "Requirements vs candidate",
      reqsSub: "Side-by-side mapping. ✓ matches, ◐ partial, ✗ missing.",
      legend: { match: "Match", partial: "Partial", miss: "Missing" },
      reqHead: "Required", foundHead: "Found in resume",
      kpiTitle: "KPI alignment", kpiSub: "How well the candidate's track record predicts the KPIs of the role",
      callSummary: "Call summary",
      suggestedQs: "Suggested phone interview questions",
      regenerate: "Regenerate", copy: "Copy to clipboard",
      verifyTitle: "Verify on the call",
      notes: "Notes (private to HR)",
      notesPh: "Capture call notes here…",
      saveNote: "Save note", addTs: "Add timestamp",
      salary: "Salary", availability: "Availability", concerns: "Concern points",
      nextStep: "Recommended next step",
      workHist: "Work history", educationT: "Education",
      compAvail: "Compensation & availability",
      salaryExp: "Salary expectation", noticePeriod: "Notice period",
      certsT: "Certifications", resumeFile: "Resume file",
    },
    fairness: {
      title: "AI assists, you decide.",
      body: "Scores are recommendations, not decisions. The model ignores name-implied gender, age, photo, nationality, religion, and marital status. Every score is explained, every override is logged.",
      learn: "How scoring works →",
    },
    rec: { "Strong fit": "Strong fit", "Potential fit": "Potential fit", "Weak fit": "Weak fit", "Not recommended": "Not recommended" },
    status: {
      "New": "New", "AI screened": "AI screened", "HR reviewed": "HR reviewed", "Call scheduled": "Call scheduled",
      "Called": "Called", "Shortlisted": "Shortlisted", "Interview scheduled": "Interview scheduled",
      "Interviewed": "Interviewed", "Rejected": "Rejected", "Offer": "Offer", "Hired": "Hired", "Talent pool": "Talent pool",
    },
    weightLabels: {
      experience: "Relevant work experience", skills: "Technical & functional skills",
      industry: "Industry / domain fit", leadership: "Leadership & management",
      kpi: "KPI alignment", stability: "Career stability",
    },
    yrs: "yrs", weight: "weight",
    pipeline: {
      eyebrow: "Pipeline", title: "Hiring pipeline",
      sub: "Drag candidates between stages, or click to open. Each column is a status; the count and average fit-score are shown at the top.",
      filterPos: "Position",
      allPositions: "All positions",
      avgFit: "avg fit",
      empty: "No candidates here yet",
      stages: {
        "AI screened": "AI screened",
        "HR reviewed": "HR reviewed",
        "Call scheduled": "Call scheduled",
        "Shortlisted": "Shortlisted",
        "Interviewed": "Interviewed",
        "Offer": "Offer",
      },
      moveTo: "Move to",
      open: "Open profile",
    },
    audit: {
      eyebrow: "Audit log",
      title: "Compliance audit trail",
      sub: "Every AI score, every override, every decision — recorded for PDPA. Filter by event type, position, or person.",
      filterAll: "All events",
      filterPosition: "Position",
      filterUser: "User",
      filterRange: "Range",
      ranges: { d7: "Last 7 days", d30: "Last 30 days", d90: "Last 90 days", all: "All time" },
      cols: { time: "Time", actor: "Actor", action: "Action", target: "Target", reason: "Reason" },
      kinds: {
        score: "AI scored",
        override: "HR override",
        edit: "Position edited",
        create: "Position created",
        upload: "Resumes uploaded",
        invite: "Teammate invited",
        delete: "Candidate deleted",
        export: "Data exported",
        login: "Signed in",
        rescore: "Re-scored",
        consent: "Consent recorded",
        stage: "Stage changed",
      },
      empty: "No events match these filters",
      exportBtn: "Export CSV",
      reasonRequired: "Override reason (required for PDPA)",
      delta: "→",
      allPositions: "All positions",
      allUsers: "All users",
    },
    posEdit: {
      newEyebrow: "New position",
      newTitle: "Create a new position",
      editEyebrow: "Edit position",
      editTitle: "Edit position",
      sub: "Define the role, KPIs, and what 'good' looks like. AI uses this to score every applicant.",
      tabs: { basics: "Basics", jd: "Job description", reqs: "Requirements", kpis: "KPIs", scoring: "Scoring weights" },
      save: "Save changes",
      publish: "Publish position",
      saved: "Saved",
      cancel: "Cancel",
      back: "Back to positions",
      basics: {
        title: "Job title",
        titleHint: "Shown on the careers page and across the workspace",
        titlePh: "e.g. Senior Sales Consultant — Luxury Residential",
        department: "Department",
        level: "Level",
        levelOpts: ["Junior", "Mid", "Senior", "Lead", "Director", "VP"],
        employmentType: "Employment type",
        employmentOpts: ["Full-time", "Contract", "Part-time"],
        location: "Location",
        reportsTo: "Reports to",
        openings: "Openings",
        openingsHint: "Number of hires you're making",
        status: "Status",
        statusOpts: { Open: "Open", Paused: "Paused", Closed: "Closed" },
      },
      jd: {
        label: "Job description",
        hint: "Plain language. AI parses this to understand the role.",
        placeholder: "Describe the role, day-to-day, and what success looks like…",
        aiAssist: "Draft with AI",
        aiAssistHint: "Generate a starting JD from the title, level, and KPIs",
        chars: "characters",
      },
      reqs: {
        mustTitle: "Must have",
        mustHint: "Hard requirements. Candidates missing these are flagged.",
        niceTitle: "Nice to have",
        niceHint: "Bonus signals. Boost the score but don't disqualify.",
        disqTitle: "Disqualifiers",
        disqHint: "Auto-reject if any of these appear in the resume.",
        addItem: "Add requirement",
        addNice: "Add nice-to-have",
        addDisq: "Add disqualifier",
        placeholder: "e.g. 5+ years in residential property sales",
        noneYet: "None yet — add your first item",
      },
      kpis: {
        title: "KPIs the role will be measured on",
        hint: "Concrete, numeric targets. AI checks the resume for evidence of each.",
        addKpi: "Add KPI",
        placeholder: "e.g. Annual closed GMV ≥ THB 350M",
      },
      scoring: {
        title: "Scoring weights",
        hint: "How much each dimension contributes to the final fit score. Must total 100%.",
        total: "Total",
        invalid: "Weights must sum to 100%",
        valid: "Looks good",
        dims: {
          experience: "Experience", skills: "Skills", industry: "Industry fit",
          leadership: "Leadership", kpi: "KPI alignment", stability: "Stability",
        },
        reset: "Reset to template",
      },
      delete: "Delete position",
      deleteHint: "Closes the position and archives all candidates",
      newPos: "New position",
      editPos: "Edit",
    },
    settings: {
      eyebrow: "Settings", title: "Workspace settings",
      sub: "Configure your team, scoring defaults, fairness controls, and integrations.",
      save: "Save changes", saved: "Saved",
      sections: {
        org: "Organisation",
        scoring: "AI scoring defaults",
        fairness: "Fairness & PDPA",
        security: "Security",
        privacy: "Privacy & data subject rights",
        notif: "Notifications",
        integrations: "Integrations",
        team: "Team & permissions",
        data: "Data retention",
        danger: "Danger zone",
      },
      security: {
        statusGood: "Your workspace is hardened",
        statusBody: "TLS 1.3 in transit, AES-256 at rest. Backups encrypted in a separate region. Last penetration test: Mar 2026.",
        twoFA: "Require 2FA for all members",
        twoFAHint: "Enforce time-based one-time passwords. Already on for admins.",
        sso: "SAML SSO (Google Workspace)",
        ssoHint: "When enabled, password login is disabled. SSO contains MFA.",
        sessionTimeout: "Auto sign-out after",
        timeout15: "15 min", timeout30: "30 min", timeout60: "1 hr", timeout480: "8 hr",
        ipAllowlist: "Restrict access to office IP ranges",
        ipHint: "Members outside these ranges must use VPN. Add ranges in CIDR notation.",
        ipPlaceholder: "203.0.113.0/24, 198.51.100.0/24",
        rateLimit: "Brute-force protection",
        rateLimitHint: "5 failed attempts → 15 min lockout. Cannot be disabled.",
        breach: "Incident response",
        breachBody: "Suspected breach? Email security@initialestate.com or call the on-call line. We will notify the PDPC and affected candidates within 72 hours per PDPA §37.",
        viewAudit: "View security audit log",
        downloadSoc: "Download SOC 2 Type II report",
      },
      privacy: {
        dsarTitle: "Data subject access requests",
        dsarBody: "Candidates can ask to see, correct, port, or delete their data. PDPA requires a response within 30 days.",
        dsarOpen: "{n} open requests",
        dsarSla: "Avg response time: 4 days",
        viewQueue: "View DSAR queue",
        consent: "Consent records",
        consentBody: "Every candidate accepts the privacy notice on application. Records are immutable and exportable.",
        consentExport: "Export consent log",
        dpa: "Data processing agreement",
        dpaBody: "Standard DPA available for download. Required for any controller-processor relationship.",
        dpaDownload: "Download DPA (PDF)",
        subprocessors: "Sub-processors",
        subprocessorsBody: "Third-party services that process candidate data on your behalf.",
        subprocessorsList: [
          { name: "Anthropic Claude API", purpose: "AI scoring & call-prep", region: "US (data not used for training)" },
          { name: "Amazon S3 (ap-southeast-1)", purpose: "Resume file storage", region: "Singapore" },
          { name: "Postmark", purpose: "Transactional email", region: "US" },
        ],
        rightToErasure: "Right to erasure (RTBF)",
        rtbfBody: "Candidate-initiated deletions are honoured within 30 days. Audit log entries are anonymised, not deleted.",
      },
      org: {
        name: "Company name", nameHint: "Shown across the workspace and on candidate emails",
        domain: "Email domain", domainHint: "We'll auto-detect colleagues from this domain",
        country: "Country", lang: "Default language", langHint: "New users will see this language by default",
        currency: "Currency", tz: "Time zone",
        logo: "Company logo", upload: "Upload logo",
      },
      scoring: {
        defaultModel: "Default model",
        modelHint: "Used to evaluate every new candidate. You can override per position.",
        autoScreen: "Auto-screen on upload",
        autoScreenHint: "Run AI screening immediately when resumes are uploaded",
        rescoreOnEdit: "Re-score when JD changes",
        rescoreHint: "Automatically re-rank existing candidates when a position's requirements are edited",
        explainLevel: "Explanation depth",
        explainShort: "Short", explainBalanced: "Balanced", explainDetailed: "Detailed",
        confidence: "Show confidence intervals",
        confidenceHint: "Display ±range alongside each score",
      },
      fairness: {
        excluded: "Excluded fields",
        excludedHint: "These fields are never extracted, displayed, or used in scoring",
        excludedItems: ["Photo", "Age", "Gender", "Marital status", "Religion", "Race / Nationality", "Health"],
        banner: "Show fairness banner on AI screens",
        bannerHint: "Reminds reviewers that AI scores are recommendations, not decisions",
        auditLog: "Log every override with reason",
        auditHint: "Required for PDPA. Cannot be disabled.",
        candidateAccess: "Allow candidates to request their data",
        accessHint: "Adds a self-service link to candidate confirmation emails",
        retention: "Auto-delete after",
        retention12: "12 months", retention24: "24 months", retention36: "36 months",
        pdpaTitle: "PDPA compliance",
        pdpaBody: "This workspace is configured for Thailand PDPA. Candidate consent is recorded on application; deletion requests are honoured within 30 days.",
      },
      notif: {
        newCandidate: "New candidate uploaded",
        strongFit: "Strong-fit candidate detected",
        weeklyDigest: "Weekly digest",
        mentions: "Comments mentioning me",
        email: "Email", inApp: "In-app",
      },
      integrations: {
        connect: "Connect", connected: "Connected", reconnect: "Reconnect",
        items: [
          { name: "Google Calendar", desc: "Schedule interviews and screen calls", status: "connected" },
          { name: "Gmail", desc: "Send candidate emails from your account", status: "connected" },
          { name: "LINE", desc: "Notify hiring managers in shared groups", status: "connect" },
          { name: "Slack", desc: "Activity feed in #hiring channel", status: "connect" },
          { name: "JobsDB", desc: "Auto-import applicants from posted jobs", status: "reconnect" },
          { name: "LinkedIn", desc: "One-click import from LinkedIn profiles", status: "connect" },
        ],
      },
      team: {
        invite: "Invite teammate", role: "Role",
        roles: { admin: "Admin", recruiter: "Recruiter", hiringManager: "Hiring manager", viewer: "Viewer" },
        members: [
          { name: "Aporn Saetang", role: "admin", email: "aporn@initialestate.com", you: true },
          { name: "Voraphan Sirikul", role: "recruiter", email: "voraphan@initialestate.com" },
          { name: "Thanakorn Liu", role: "hiringManager", email: "thanakorn@initialestate.com" },
          { name: "Mei-Lin Chen", role: "hiringManager", email: "meilin@initialestate.com" },
          { name: "Pichai Boonyarit", role: "viewer", email: "pichai@initialestate.com" },
        ],
      },
      danger: {
        export: "Export all data", exportHint: "Download a ZIP of every candidate, position, and audit log entry",
        deleteWs: "Delete workspace", deleteHint: "Permanently remove all data. This cannot be undone.",
      },
    },
  },

  th: {
    brand: "Initial Estate",
    brandSub: "HR · v0.5",
    brandTagline: "Designed for real you",
    nav: { workspace: "พื้นที่ทำงาน", more: "เพิ่มเติม", today: "วันนี้", dashboard: "แดชบอร์ด", positions: "ตำแหน่งงาน", candidates: "ผู้สมัคร", upload: "อัปโหลดเรซูเม่", pipeline: "ขั้นตอนการสรรหา", audit: "บันทึกการตรวจสอบ", settings: "ตั้งค่า", users: "ทีมงาน" },
    user: { name: "อาภรณ์ แซ่ตั้ง", role: "เจ้าหน้าที่สรรหาบุคลากร" },
    topbar: { search: "ค้นหาผู้สมัคร, ตำแหน่ง, บันทึก…", new: "สร้างใหม่", export: "ส่งออก" },
    today: {
      eyebrow: "วันอังคารที่ 5 พฤษภาคม",
      title: "วันนี้ คุณอาภรณ์",
      sub: "มี 8 เรื่องรอคุณอยู่ จัดลำดับตามความเร่งด่วน — AI จัดการคัดกรอง คุณจัดการคน",
      now: "ตอนนี้ — วันนี้",
      nowSub: "เร่งด่วน มีนัดโทร, มีข้อความตอบกลับ, มีสัมภาษณ์บ่ายนี้",
      high: "คุ้มค่ากับเวลา",
      highSub: "ผู้สมัครที่เข้าเกณฑ์สูง AI คัดกรองมาเมื่อคืน ใช้เวลา 5 นาทีต่อคน",
      stale: "อย่าปล่อยผ่าน",
      staleSub: "ผู้สมัครรอคุณนานแล้ว ส่งข้อความหาวันนี้เพื่อรักษาความสนใจ",
      info: "งานจัดการ",
      infoSub: "ต่ออายุ PDPA, จัดเก็บประวัติ, และงานไม่เร่งด่วนอื่นๆ",
      empty: "จัดการหมดแล้ว เยี่ยมมาก — ไปตักกาแฟได้เลย",
      undo: "ย้อนกลับ",
      doneToast: "เสร็จสิ้น ย้ายไปประวัติแล้ว",
      snoozedToast: "เลื่อนไป 4 ชั่วโมง",
      kinds: {
        scheduledCall: "นัดโทร",
        interviewToday: "สัมภาษณ์วันนี้",
        replied: "ผู้สมัครตอบกลับ",
        topFitNew: "ผู้สมัครเข้าเกณฑ์ใหม่",
        noResponse: "ติดตามเกินกำหนด",
        shortlistDecision: "ตัดสินใจชอร์ตลิสต์",
        consentExpiring: "ต่ออายุ PDPA",
      },
      actions: {
        callNow: "โทรเลย",
        reschedule: "เลื่อนเวลา",
        openProfile: "เปิดโปรไฟล์",
        openPrep: "เปิดบรีฟการสัมภาษณ์",
        sendBrief: "ส่งบรีฟให้ทีม",
        scheduleCall: "นัดโทร",
        reply: "ตอบกลับ",
        review: "ตรวจสอบ",
        reachOut: "ติดต่อ",
        skip: "ข้าม",
        sendNudge: "ส่งข้อความเตือน",
        markCold: "ทำเครื่องหมายไม่สนใจ",
        shortlist: "ชอร์ตลิสต์",
        pass: "ผ่าน",
        sendRenewal: "ส่งต่ออายุ",
        archive: "เก็บถาวร",
        snooze: "เลื่อน",
        markDone: "เสร็จสิ้น",
      },
    },
    dash: {
      eyebrow: "วันอังคารที่ 5 พฤษภาคม",
      title: "สวัสดีตอนเช้า, อาภรณ์",
      sub: "AI ได้คัดกรองผู้สมัคร 23 คนข้ามคืน รอให้คุณตรวจสอบ มี 3 ตำแหน่งที่ดำเนินการเร็วกว่าแผน",
      uploadBtn: "อัปโหลดเรซูเม่",
      stats: { total: "ผู้สมัครทั้งหมด", pending: "รอ HR ตรวจสอบ", avg: "คะแนนเฉลี่ย", short: "ผ่านเข้ารอบ" },
      topCands: "ผู้สมัครยอดเยี่ยมประจำสัปดาห์", topCandsSub: "จัดอันดับโดย AI ตามคะแนนความเหมาะสมในทุกตำแหน่งที่เปิดรับ",
      viewAll: "ดูทั้งหมด", positionsCol: "ตำแหน่งที่เปิดรับ", positionsSub: "ตำแหน่งที่กำลังเปิดรับ", all: "ทั้งหมด",
      activity: "กิจกรรมล่าสุด", activitySub: "AI และการกระทำของทีม",
      cols: { candidate: "ผู้สมัคร", position: "ตำแหน่ง", fit: "คะแนน", status: "สถานะ" },
      deltas: { weekly24: "+24 สัปดาห์นี้", awaitingHR: "AI คัดกรองแล้ว รอ HR", vsLastMonth: "+3 จากเดือนที่แล้ว", across12: "ใน 12 ตำแหน่ง" },
      activeTitle: "ตำแหน่งที่เปิดรับ", activeSub: "ตำแหน่งที่กำลังเปิด", allBtn: "ทั้งหมด",
      newSuffix: "ใหม่", postedPrefix: "ประกาศเมื่อ",
    },
    pos: {
      eyebrow: "ตำแหน่งงาน", title: "ตำแหน่งที่เปิดรับ",
      sub: "กำหนดตำแหน่งก่อน — JD, คุณสมบัติที่จำเป็น, น้ำหนักการให้คะแนน — แล้ว AI จะใช้เกณฑ์เดียวกันนี้กับผู้สมัครทุกคน",
      newBtn: "เพิ่มตำแหน่ง",
      cols: { position: "ตำแหน่ง", dept: "แผนก", openings: "อัตรา", candidates: "ผู้สมัคร", pending: "รอตรวจสอบ", posted: "ประกาศ" },
      reportsTo: "รายงานต่อ",
    },
    posDetail: {
      back: "ย้อนกลับ", edit: "แก้ไข", uploadBtn: "อัปโหลดเรซูเม่",
      tabs: { overview: "ภาพรวม", rubric: "เกณฑ์การให้คะแนน AI", candidates: "ผู้สมัคร" },
      jd: "รายละเอียดงาน", kpis: "KPI ที่ใช้วัดผลในตำแหน่งนี้",
      reqs: "คุณสมบัติ", must: "จำเป็นต้องมี", nice: "ถ้ามีจะดี", dq: "เกณฑ์ตัดสิทธิ์",
      glance: "สรุปย่อ", skills: "ทักษะ", education: "การศึกษา", certs: "ใบรับรอง", emp: "ประเภทการจ้าง",
      aiSummary: "สรุปการคัดกรองโดย AI", screened: "คัดกรองแล้ว", strong: "เหมาะสมมาก", pending: "รอตรวจ",
      avgNote: "คะแนนเฉลี่ยของตำแหน่งนี้คือ",
      weights: "น้ำหนักการให้คะแนน", total: "รวม",
      weightsSub: "ปรับน้ำหนักของแต่ละมิติที่ส่งผลต่อคะแนนรวม AI จะคำนวณคะแนนผู้สมัครใหม่หลังจากบันทึก",
      saveRescore: "บันทึกและคำนวณใหม่ 47 ผู้สมัคร", reset: "คืนค่าเริ่มต้น",
      howApplied: "วิธีการใช้เกณฑ์",
      howSteps: [
        "AI วิเคราะห์เรซูเม่และสกัดข้อมูลที่มีโครงสร้าง",
        "ให้คะแนน 0–100 ในแต่ละมิติ ตามคุณสมบัติจำเป็นและ KPI ของตำแหน่ง",
        "คำนวณค่าเฉลี่ยถ่วงน้ำหนักเป็นคะแนนรวม",
        "สร้างคำอธิบายเป็นภาษาธรรมชาติสำหรับทุกคะแนนย่อย",
        "หากตรงเกณฑ์ตัดสิทธิ์ ผลลัพธ์จะถูกจำกัดที่ \"ไม่แนะนำ\"",
      ],
      excluded: "ไม่นำมาใช้ในการให้คะแนน",
      excludedBody: "เพศ, อายุ, รูปถ่าย, สถานภาพสมรส, ศาสนา, เชื้อชาติ, สัญชาติ, สุขภาพ",
    },
    cands: {
      eyebrow: "ผู้สมัคร", title: "จัดอันดับโดย AI",
      subWith: (n, t) => `ผู้สมัคร ${n} คนถูกประเมินเทียบกับ "${t}" คลิกเพื่อดูรายละเอียดคะแนนและคำแนะนำในการสัมภาษณ์`,
      subAll: (n) => `ผู้สมัคร ${n} คนจากตำแหน่งที่เปิดรับทั้งหมด คลิกเพื่อดูรายละเอียดคะแนนและคำแนะนำในการสัมภาษณ์`,
      allPositions: "ทุกตำแหน่ง",
      sortFit: "เรียงตาม: คะแนน", sortDate: "เรียงตาม: วันที่สมัคร", filter: "กรอง",
      cols: { current: "ตำแหน่งปัจจุบัน", exp: "ประสบการณ์", fit: "คะแนน", rec: "คำแนะนำ", applied: "วันที่สมัคร" },
      filters: { all: "ทั้งหมด", strong: "เหมาะสมมาก", potential: "อาจเหมาะสม", weak: "เหมาะสมน้อย", not: "ไม่แนะนำ" },
    },
    upload: {
      eyebrow: "นำเข้าเรซูเม่", title: "อัปโหลดและคัดกรองด้วย AI",
      sub: "วางโฟลเดอร์เรซูเม่ AI จะวิเคราะห์, ให้คะแนนตามตำแหน่งที่เลือก, และจัดอันดับให้ — โดยทั่วไปใช้เวลาน้อยกว่า 90 วินาทีสำหรับ 20 ไฟล์",
      against: "คัดกรองสำหรับตำแหน่ง", mustHaves: (n) => `คุณสมบัติจำเป็น ${n} ข้อ`, kpis: (n) => `KPI ${n} ข้อ`,
      drop: "วางเรซูเม่ที่นี่",
      dropSub: "PDF หรือ DOCX · สูงสุด 50 ไฟล์ต่อครั้ง · ไฟล์ละไม่เกิน 10 MB",
      browse: "เลือกไฟล์",
      orPaste: "หรือวางจาก Drive ·",
      sample: "ใช้ตัวอย่าง 6 ไฟล์",
      thinking: "AI กำลังคัดกรอง…", done: "คัดกรองเสร็จสิ้น", doneIn: "เสร็จใน 1 นาที 12 วินาที",
      processing: "กำลังประมวลผล", scored: "ให้คะแนนแล้ว", queued: "อยู่ในคิว",
      uploadMore: "อัปโหลดเพิ่ม", review: (n) => `ตรวจสอบ ${n} ผู้สมัคร`,
      steps: [
        ["กำลังวิเคราะห์เรซูเม่ 6 ไฟล์ (PDF + DOCX)", "สกัดข้อมูล: ชื่อ, ติดต่อ, ประวัติงาน, การศึกษา, ทักษะ…"],
        ["เปรียบเทียบกับ JD", "จับคู่ประสบการณ์ของผู้สมัครกับคุณสมบัติจำเป็นและคุณสมบัติเสริม"],
        ["ให้คะแนน 6 มิติ", "ประสบการณ์ · ทักษะ · อุตสาหกรรม · ภาวะผู้นำ · KPI · เสถียรภาพ"],
        ["สร้างคำอธิบายและคำแนะนำการโทร", "เหตุผลของแต่ละคะแนน, คำถามแนะนำ, คำถามเงินเดือนและความพร้อม"],
      ],
      extracts: "ข้อมูลที่ AI สกัด",
      extractRows: [
        ["ข้อมูลส่วนตัว", "ชื่อ, ข้อมูลติดต่อ (ปกปิดได้)"],
        ["ประวัติการทำงาน", "บริษัท, ตำแหน่ง, วันที่, ช่วงว่าง"],
        ["การศึกษาและใบรับรอง", "ปริญญา, สถาบัน, ใบอนุญาต"],
        ["ทักษะ", "ด้านเทคนิคและการทำงาน"],
        ["สัญญาณอาชีพ", "ระยะการทำงาน, ความก้าวหน้า"],
      ],
      neverTitle: "ไม่นำมาสกัดหรือใช้ในการให้คะแนน",
      neverBody: "รูปถ่าย, อายุ, เพศ, สถานภาพสมรส, ศาสนา, เชื้อชาติ, สัญชาติ, สุขภาพ สอดคล้อง PDPA: ผู้สมัครสามารถขอให้ลบข้อมูลได้ตลอดเวลา",
    },
    cand: {
      backTo: "ย้อนกลับไป", rankedOf: (i, n) => `อันดับ ${i} จาก ${n}`,
      viewResume: "ดูเรซูเม่", scheduleCall: "นัดโทรศัพท์",
      evaluating: "ประเมินสำหรับ",
      applied: "สมัครเมื่อ", source: "ที่มา",
      tabs: { score: "รายละเอียดคะแนน AI", compare: "เปรียบเทียบคุณสมบัติ", call: "เตรียมการโทร", resume: "เรซูเม่และประวัติ" },
      overall: "คะแนนความเหมาะสมรวม",
      explanations: {
        cautious: "ผู้สมัครรายนี้ดูเหมาะสมกับมิติที่สำคัญที่สุดสำหรับตำแหน่งนี้ — ประสบการณ์ในอุตสาหกรรมและความสอดคล้องกับ KPI ก่อนแนะนำให้สัมภาษณ์ ขอแนะนำให้ตรวจสอบสองเรื่องในการโทร: สัดส่วนยอดขาย 410 ล้านบาทระหว่างส่วนตัวและทีม และเหตุผลในการเปลี่ยนงาน 3 ครั้งใน 5 ปีที่ผ่านมา",
        confident: "ผู้สมัครที่แข็งแกร่ง ความเหมาะสมในอุตสาหกรรมยอดเยี่ยม และยอดขายที่อ้าง (หากยืนยันได้) เกินคุณสมบัติที่จำเป็น มีความเสี่ยง 2 จุดที่ต้องชี้แจงในการโทร: รูปแบบระยะการทำงาน และสัดส่วนส่วนตัว/ทีม",
        structured: "เหมาะสมมาก อุตสาหกรรม: 95 ประสบการณ์: 92 KPI: 88 มี 2 ความเสี่ยงที่ระบุ (ระยะงาน, การให้เครดิตยอดขาย) แนะนำให้ตรวจสอบทางโทรศัพท์",
      },
      subscores: "คะแนนย่อย", subWeighted: "ถ่วงน้ำหนักตามเกณฑ์ของตำแหน่งนี้",
      working: "จุดแข็ง", gaps: "ช่องว่าง", risks: "ความเสี่ยงที่ต้องตรวจสอบ",
      override: "HR ปรับคะแนน",
      overrideSub: "ไม่เห็นด้วยกับ AI? ปรับคะแนนและเพิ่มเหตุผล ทั้งสองคะแนนจะถูกบันทึกไว้",
      yourScore: "คะแนนของคุณ", reason: "เหตุผล",
      reasonPh: "เช่น ตรวจสอบสัดส่วน GMV ส่วนตัวกับผู้แนะนำแล้ว เพิ่มความมั่นใจในคะแนนประสบการณ์",
      saveOverride: "บันทึกการปรับคะแนน", resetBtn: "รีเซ็ต",
      quick: "การกระทำด่วน",
      actions: {
        phone: ["นัดสัมภาษณ์ทางโทรศัพท์", "ซิงค์กับปฏิทิน HR"],
        star: ["ย้ายไปรายชื่อผ่านเข้ารอบ", "แจ้งหัวหน้างาน"],
        cal: ["นัดสัมภาษณ์", "ส่งต่อไปขั้นตอนถัดไป"],
        users: ["ส่งไปยัง Talent Pool", "เก็บไว้สำหรับตำแหน่งในอนาคต"],
        x: ["ปฏิเสธ", "ส่งอีเมลปฏิเสธอย่างสุภาพ"],
      },
      record: "บันทึกการประเมิน",
      records: { evaluated: "ประเมินเมื่อ", model: "โมเดล", jd: "เวอร์ชัน JD", resume: "เวอร์ชันเรซูเม่", reviewer: "ผู้ตรวจสอบ" },
      audit: "ดูประวัติการตรวจสอบทั้งหมด",
      reqsTitle: "คุณสมบัติที่ต้องการเทียบกับผู้สมัคร",
      reqsSub: "การจับคู่แบบเคียงข้างกัน ✓ ตรง, ◐ บางส่วน, ✗ ขาด",
      legend: { match: "ตรง", partial: "บางส่วน", miss: "ขาด" },
      reqHead: "คุณสมบัติที่ต้องการ", foundHead: "พบในเรซูเม่",
      kpiTitle: "ความสอดคล้องกับ KPI", kpiSub: "ผลงานในอดีตของผู้สมัครคาดการณ์ KPI ของตำแหน่งได้ดีเพียงใด",
      callSummary: "สรุปสำหรับการโทร",
      suggestedQs: "คำถามแนะนำสำหรับการสัมภาษณ์ทางโทรศัพท์",
      regenerate: "สร้างใหม่", copy: "คัดลอก",
      verifyTitle: "ตรวจสอบในการโทร",
      notes: "บันทึก (เฉพาะ HR)",
      notesPh: "บันทึกการสนทนาที่นี่…",
      saveNote: "บันทึก", addTs: "เพิ่มเวลา",
      salary: "เงินเดือน", availability: "ความพร้อม", concerns: "ประเด็นที่ต้องชี้แจง",
      nextStep: "ขั้นตอนถัดไปที่แนะนำ",
      workHist: "ประวัติการทำงาน", educationT: "การศึกษา",
      compAvail: "ค่าตอบแทนและความพร้อม",
      salaryExp: "เงินเดือนที่คาดหวัง", noticePeriod: "ระยะเวลาแจ้งล่วงหน้า",
      certsT: "ใบรับรอง", resumeFile: "ไฟล์เรซูเม่",
    },
    fairness: {
      title: "AI ช่วยคิด คุณตัดสินใจ",
      body: "คะแนนเป็นข้อเสนอแนะ ไม่ใช่การตัดสิน โมเดลไม่ใช้เพศ, อายุ, รูปถ่าย, สัญชาติ, ศาสนา, สถานภาพสมรส ทุกคะแนนมีคำอธิบาย ทุกการปรับมีบันทึก",
      learn: "วิธีการให้คะแนน →",
    },
    rec: { "Strong fit": "เหมาะสมมาก", "Potential fit": "อาจเหมาะสม", "Weak fit": "เหมาะสมน้อย", "Not recommended": "ไม่แนะนำ" },
    status: {
      "New": "ใหม่", "AI screened": "AI คัดกรองแล้ว", "HR reviewed": "HR ตรวจสอบแล้ว", "Call scheduled": "นัดโทรแล้ว",
      "Called": "โทรแล้ว", "Shortlisted": "ผ่านเข้ารอบ", "Interview scheduled": "นัดสัมภาษณ์",
      "Interviewed": "สัมภาษณ์แล้ว", "Rejected": "ปฏิเสธ", "Offer": "เสนองาน", "Hired": "จ้างแล้ว", "Talent pool": "Talent Pool",
    },
    weightLabels: {
      experience: "ประสบการณ์ที่เกี่ยวข้อง", skills: "ทักษะเทคนิคและการทำงาน",
      industry: "ความเหมาะสมกับอุตสาหกรรม", leadership: "ภาวะผู้นำและการจัดการ",
      kpi: "ความสอดคล้องกับ KPI", stability: "เสถียรภาพในอาชีพ",
    },
    yrs: "ปี", weight: "น้ำหนัก",
    pipeline: {
      eyebrow: "ขั้นตอนการสรรหา", title: "ขั้นตอนการสรรหาบุคลากร",
      sub: "ลากผู้สมัครระหว่างขั้นตอน หรือคลิกเพื่อเปิดดู แต่ละคอลัมน์คือสถานะ — ด้านบนแสดงจำนวนและคะแนนเฉลี่ย",
      filterPos: "ตำแหน่ง",
      allPositions: "ทุกตำแหน่ง",
      avgFit: "คะแนนเฉลี่ย",
      empty: "ยังไม่มีผู้สมัครในขั้นนี้",
      stages: {
        "AI screened": "AI คัดกรอง",
        "HR reviewed": "HR ตรวจแล้ว",
        "Call scheduled": "นัดโทร",
        "Shortlisted": "ผ่านเข้ารอบ",
        "Interviewed": "สัมภาษณ์แล้ว",
        "Offer": "เสนองาน",
      },
      moveTo: "ย้ายไป",
      open: "เปิดโปรไฟล์",
    },
    audit: {
      eyebrow: "บันทึกการตรวจสอบ",
      title: "ประวัติการตรวจสอบเพื่อปฏิบัติตามกฎ",
      sub: "ทุกคะแนน AI, ทุกการปรับ, ทุกการตัดสินใจ — บันทึกไว้ตาม PDPA กรองตามประเภท, ตำแหน่ง, หรือผู้ใช้",
      filterAll: "ทุกเหตุการณ์",
      filterPosition: "ตำแหน่ง",
      filterUser: "ผู้ใช้",
      filterRange: "ช่วงเวลา",
      ranges: { d7: "7 วันล่าสุด", d30: "30 วันล่าสุด", d90: "90 วันล่าสุด", all: "ทั้งหมด" },
      cols: { time: "เวลา", actor: "ผู้กระทำ", action: "การกระทำ", target: "เป้าหมาย", reason: "เหตุผล" },
      kinds: {
        score: "AI ให้คะแนน",
        override: "HR ปรับคะแนน",
        edit: "แก้ไขตำแหน่ง",
        create: "สร้างตำแหน่ง",
        upload: "อัปโหลดเรซูเม่",
        invite: "เชิญสมาชิก",
        delete: "ลบผู้สมัคร",
        export: "ส่งออกข้อมูล",
        login: "เข้าสู่ระบบ",
        rescore: "คำนวณคะแนนใหม่",
        consent: "บันทึกความยินยอม",
        stage: "เปลี่ยนสถานะ",
      },
      empty: "ไม่มีเหตุการณ์ตามตัวกรองนี้",
      exportBtn: "ส่งออก CSV",
      reasonRequired: "เหตุผลการปรับ (จำเป็นตาม PDPA)",
      delta: "→",
      allPositions: "ทุกตำแหน่ง",
      allUsers: "ทุกคน",
    },
    posEdit: {
      newEyebrow: "ตำแหน่งใหม่",
      newTitle: "สร้างตำแหน่งใหม่",
      editEyebrow: "แก้ไขตำแหน่ง",
      editTitle: "แก้ไขตำแหน่ง",
      sub: "กำหนดบทบาท, KPI, และความหมายของ 'ดี' — AI จะใช้สิ่งนี้ในการให้คะแนนผู้สมัครทุกคน",
      tabs: { basics: "ข้อมูลพื้นฐาน", jd: "รายละเอียดงาน", reqs: "คุณสมบัติ", kpis: "KPI", scoring: "น้ำหนักคะแนน" },
      save: "บันทึก",
      publish: "เผยแพร่ตำแหน่ง",
      saved: "บันทึกแล้ว",
      cancel: "ยกเลิก",
      back: "กลับไปยังตำแหน่งงาน",
      basics: {
        title: "ชื่อตำแหน่ง",
        titleHint: "แสดงในหน้ารับสมัครและในระบบ",
        titlePh: "เช่น ที่ปรึกษาการขายอาวุโส — ที่อยู่อาศัยระดับลักชัวรี",
        department: "แผนก",
        level: "ระดับ",
        levelOpts: ["Junior", "Mid", "Senior", "Lead", "Director", "VP"],
        employmentType: "ประเภทการจ้างงาน",
        employmentOpts: ["เต็มเวลา", "สัญญาจ้าง", "นอกเวลา"],
        location: "สถานที่",
        reportsTo: "รายงานต่อ",
        openings: "จำนวนที่เปิดรับ",
        openingsHint: "จำนวนคนที่ต้องการจ้างในตำแหน่งนี้",
        status: "สถานะ",
        statusOpts: { Open: "เปิดรับ", Paused: "หยุดชั่วคราว", Closed: "ปิดแล้ว" },
      },
      jd: {
        label: "รายละเอียดงาน",
        hint: "ภาษาเข้าใจง่าย — AI จะวิเคราะห์เพื่อเข้าใจตำแหน่ง",
        placeholder: "อธิบายตำแหน่ง, งานประจำวัน, และความสำเร็จคืออะไร…",
        aiAssist: "ร่างด้วย AI",
        aiAssistHint: "สร้าง JD เริ่มต้นจากชื่อตำแหน่ง, ระดับ, และ KPI",
        chars: "ตัวอักษร",
      },
      reqs: {
        mustTitle: "ต้องมี",
        mustHint: "คุณสมบัติบังคับ — ผู้สมัครที่ขาดรายการเหล่านี้จะถูกตั้งธง",
        niceTitle: "ถ้ามีจะดี",
        niceHint: "สัญญาณบวก — เพิ่มคะแนนแต่ไม่ตัดสิทธิ์",
        disqTitle: "เกณฑ์ตัดสิทธิ์",
        disqHint: "ปฏิเสธอัตโนมัติหากปรากฏในเรซูเม่",
        addItem: "เพิ่มคุณสมบัติ",
        addNice: "เพิ่มสิ่งที่ถ้ามีจะดี",
        addDisq: "เพิ่มเกณฑ์ตัดสิทธิ์",
        placeholder: "เช่น มีประสบการณ์ขายอสังหาริมทรัพย์ 5+ ปี",
        noneYet: "ยังไม่มี — เพิ่มรายการแรก",
      },
      kpis: {
        title: "KPI ที่ตำแหน่งนี้จะถูกวัด",
        hint: "เป้าหมายเป็นตัวเลขชัดเจน — AI จะตรวจหาหลักฐานในเรซูเม่",
        addKpi: "เพิ่ม KPI",
        placeholder: "เช่น ยอดขายรวมต่อปี ≥ 350 ล้านบาท",
      },
      scoring: {
        title: "น้ำหนักการให้คะแนน",
        hint: "แต่ละมิติมีน้ำหนักเท่าใดต่อคะแนนรวม — ต้องรวมเป็น 100%",
        total: "รวม",
        invalid: "น้ำหนักต้องรวมเป็น 100%",
        valid: "เรียบร้อย",
        dims: {
          experience: "ประสบการณ์", skills: "ทักษะ", industry: "ความเข้ากับอุตสาหกรรม",
          leadership: "ภาวะผู้นำ", kpi: "ความสอดคล้องกับ KPI", stability: "ความต่อเนื่องในงาน",
        },
        reset: "คืนค่าเริ่มต้น",
      },
      delete: "ลบตำแหน่ง",
      deleteHint: "ปิดตำแหน่งและเก็บผู้สมัครทั้งหมดเข้าคลัง",
      newPos: "ตำแหน่งใหม่",
      editPos: "แก้ไข",
    },
    settings: {
      eyebrow: "ตั้งค่า", title: "ตั้งค่าพื้นที่ทำงาน",
      sub: "กำหนดค่าทีม, ค่าเริ่มต้นการให้คะแนน, การควบคุมความเป็นธรรม, และการเชื่อมต่อ",
      save: "บันทึกการเปลี่ยนแปลง", saved: "บันทึกแล้ว",
      sections: {
        org: "ข้อมูลองค์กร",
        scoring: "ค่าเริ่มต้นการให้คะแนน AI",
        fairness: "ความเป็นธรรมและ PDPA",
        security: "ความปลอดภัย",
        privacy: "ความเป็นส่วนตัวและสิทธิเจ้าของข้อมูล",
        notif: "การแจ้งเตือน",
        integrations: "การเชื่อมต่อ",
        team: "ทีมและสิทธิ์",
        data: "การเก็บข้อมูล",
        danger: "พื้นที่อันตราย",
      },
      security: {
        statusGood: "พื้นที่ทำงานของคุณปลอดภัย",
        statusBody: "เข้ารหัส TLS 1.3 ระหว่างส่ง, AES-256 ขณะจัดเก็บ สำรองข้อมูลในภูมิภาคแยก ตรวจสอบการเจาะระบบล่าสุด: มี.ค. 2026",
        twoFA: "บังคับใช้ 2FA สำหรับสมาชิกทุกคน",
        twoFAHint: "ใช้รหัส OTP บนแอปยืนยันตัวตน — เปิดอยู่แล้วสำหรับผู้ดูแล",
        sso: "SAML SSO (Google Workspace)",
        ssoHint: "เมื่อเปิด การเข้าสู่ระบบด้วยรหัสผ่านจะถูกปิด — SSO มี MFA ในตัว",
        sessionTimeout: "ออกจากระบบอัตโนมัติหลังจาก",
        timeout15: "15 นาที", timeout30: "30 นาที", timeout60: "1 ชม.", timeout480: "8 ชม.",
        ipAllowlist: "จำกัดการเข้าถึงเฉพาะ IP ของออฟฟิศ",
        ipHint: "สมาชิกนอกช่วง IP เหล่านี้ต้องใช้ VPN ใส่ช่วง IP ในรูปแบบ CIDR",
        ipPlaceholder: "203.0.113.0/24, 198.51.100.0/24",
        rateLimit: "ป้องกันการเดารหัสผ่าน",
        rateLimitHint: "ผิด 5 ครั้ง → ล็อก 15 นาที — ไม่สามารถปิดได้",
        breach: "ตอบสนองเหตุการณ์",
        breachBody: "สงสัยว่ามีการรั่วไหล? ส่งอีเมลที่ security@initialestate.com หรือโทรสายฉุกเฉิน เราจะแจ้ง PDPC และผู้สมัครที่ได้รับผลกระทบภายใน 72 ชั่วโมง ตาม PDPA §37",
        viewAudit: "ดูบันทึกตรวจสอบความปลอดภัย",
        downloadSoc: "ดาวน์โหลดรายงาน SOC 2 Type II",
      },
      privacy: {
        dsarTitle: "คำขอเข้าถึงข้อมูลของเจ้าของข้อมูล (DSAR)",
        dsarBody: "ผู้สมัครขอดู, แก้ไข, โอนย้าย, หรือลบข้อมูลของตนได้ PDPA กำหนดให้ตอบกลับภายใน 30 วัน",
        dsarOpen: "{n} คำขอที่ค้างอยู่",
        dsarSla: "เวลาเฉลี่ยในการตอบกลับ: 4 วัน",
        viewQueue: "ดูคิว DSAR",
        consent: "บันทึกความยินยอม",
        consentBody: "ผู้สมัครทุกคนยอมรับประกาศความเป็นส่วนตัวเมื่อสมัคร — บันทึกแก้ไขไม่ได้และส่งออกได้",
        consentExport: "ส่งออกบันทึกความยินยอม",
        dpa: "ข้อตกลงประมวลผลข้อมูล (DPA)",
        dpaBody: "DPA มาตรฐานพร้อมดาวน์โหลด จำเป็นสำหรับความสัมพันธ์ผู้ควบคุม-ผู้ประมวลผลข้อมูล",
        dpaDownload: "ดาวน์โหลด DPA (PDF)",
        subprocessors: "ผู้ประมวลผลรอง",
        subprocessorsBody: "บริการของบุคคลที่สามที่ประมวลผลข้อมูลผู้สมัครในนามของคุณ",
        subprocessorsList: [
          { name: "Anthropic Claude API", purpose: "ให้คะแนน AI และเตรียมโทรศัพท์", region: "สหรัฐฯ (ข้อมูลไม่ถูกใช้ฝึกโมเดล)" },
          { name: "Amazon S3 (ap-southeast-1)", purpose: "เก็บไฟล์เรซูเม่", region: "สิงคโปร์" },
          { name: "Postmark", purpose: "อีเมลธุรกรรม", region: "สหรัฐฯ" },
        ],
        rightToErasure: "สิทธิในการลบข้อมูล (RTBF)",
        rtbfBody: "การลบที่ผู้สมัครร้องขอจะดำเนินการภายใน 30 วัน รายการในบันทึกตรวจสอบจะถูกทำให้ไม่ระบุตัวตน ไม่ลบ",
      },
      org: {
        name: "ชื่อบริษัท", nameHint: "แสดงในระบบและในอีเมลที่ส่งถึงผู้สมัคร",
        domain: "โดเมนอีเมล", domainHint: "ใช้ตรวจหาเพื่อนร่วมงานจากโดเมนนี้โดยอัตโนมัติ",
        country: "ประเทศ", lang: "ภาษาเริ่มต้น", langHint: "ผู้ใช้ใหม่จะเห็นภาษานี้เป็นค่าเริ่มต้น",
        currency: "สกุลเงิน", tz: "เขตเวลา",
        logo: "โลโก้บริษัท", upload: "อัปโหลดโลโก้",
      },
      scoring: {
        defaultModel: "โมเดลเริ่มต้น",
        modelHint: "ใช้ประเมินผู้สมัครใหม่ทุกคน สามารถกำหนดเฉพาะตำแหน่งได้",
        autoScreen: "คัดกรองอัตโนมัติเมื่ออัปโหลด",
        autoScreenHint: "เริ่มการคัดกรอง AI ทันทีเมื่ออัปโหลดเรซูเม่",
        rescoreOnEdit: "คำนวณคะแนนใหม่เมื่อ JD เปลี่ยน",
        rescoreHint: "จัดอันดับผู้สมัครใหม่อัตโนมัติเมื่อแก้ไขคุณสมบัติของตำแหน่ง",
        explainLevel: "ระดับคำอธิบาย",
        explainShort: "สั้น", explainBalanced: "พอดี", explainDetailed: "ละเอียด",
        confidence: "แสดงช่วงความมั่นใจ",
        confidenceHint: "แสดงค่า ± ข้างคะแนน",
      },
      fairness: {
        excluded: "ข้อมูลที่ไม่นำมาใช้",
        excludedHint: "ข้อมูลเหล่านี้จะไม่ถูกสกัด, แสดง, หรือใช้ในการให้คะแนน",
        excludedItems: ["รูปถ่าย", "อายุ", "เพศ", "สถานภาพสมรส", "ศาสนา", "เชื้อชาติ / สัญชาติ", "สุขภาพ"],
        banner: "แสดงแบนเนอร์ความเป็นธรรมในหน้า AI",
        bannerHint: "เตือนผู้ตรวจสอบว่าคะแนน AI เป็นเพียงข้อเสนอแนะ ไม่ใช่การตัดสินใจ",
        auditLog: "บันทึกทุกการปรับคะแนนพร้อมเหตุผล",
        auditHint: "จำเป็นสำหรับ PDPA — ไม่สามารถปิดได้",
        candidateAccess: "ให้ผู้สมัครขอเข้าถึงข้อมูลของตนได้",
        accessHint: "เพิ่มลิงก์บริการตนเองในอีเมลยืนยันการสมัคร",
        retention: "ลบอัตโนมัติหลังจาก",
        retention12: "12 เดือน", retention24: "24 เดือน", retention36: "36 เดือน",
        pdpaTitle: "การปฏิบัติตาม PDPA",
        pdpaBody: "พื้นที่ทำงานนี้ตั้งค่าตาม PDPA ของไทย บันทึกความยินยอมเมื่อสมัคร และดำเนินการตามคำขอลบภายใน 30 วัน",
      },
      notif: {
        newCandidate: "ผู้สมัครใหม่ถูกอัปโหลด",
        strongFit: "พบผู้สมัครที่เหมาะสมมาก",
        weeklyDigest: "สรุปประจำสัปดาห์",
        mentions: "ความคิดเห็นที่กล่าวถึงฉัน",
        email: "อีเมล", inApp: "ในแอป",
      },
      integrations: {
        connect: "เชื่อมต่อ", connected: "เชื่อมแล้ว", reconnect: "เชื่อมใหม่",
        items: [
          { name: "Google Calendar", desc: "นัดสัมภาษณ์และโทรคัดกรอง", status: "connected" },
          { name: "Gmail", desc: "ส่งอีเมลผู้สมัครจากบัญชีของคุณ", status: "connected" },
          { name: "LINE", desc: "แจ้งเตือนหัวหน้างานในกลุ่มที่แชร์", status: "connect" },
          { name: "Slack", desc: "ฟีดกิจกรรมในช่อง #hiring", status: "connect" },
          { name: "JobsDB", desc: "นำเข้าผู้สมัครจากประกาศงานอัตโนมัติ", status: "reconnect" },
          { name: "LinkedIn", desc: "นำเข้าจากโปรไฟล์ LinkedIn ในคลิกเดียว", status: "connect" },
        ],
      },
      team: {
        invite: "เชิญสมาชิก", role: "บทบาท",
        roles: { admin: "ผู้ดูแล", recruiter: "ผู้สรรหา", hiringManager: "หัวหน้างาน", viewer: "ผู้ดู" },
        members: [
          { name: "อาภรณ์ แซ่ตั้ง", role: "admin", email: "aporn@initialestate.com", you: true },
          { name: "วรพันธ์ ศิริกุล", role: "recruiter", email: "voraphan@initialestate.com" },
          { name: "ธนกร หลิว", role: "hiringManager", email: "thanakorn@initialestate.com" },
          { name: "เหม่ยหลิน เฉิน", role: "hiringManager", email: "meilin@initialestate.com" },
          { name: "พิชัย บุญยฤทธิ์", role: "viewer", email: "pichai@initialestate.com" },
        ],
      },
      danger: {
        export: "ส่งออกข้อมูลทั้งหมด", exportHint: "ดาวน์โหลด ZIP ของผู้สมัคร, ตำแหน่ง, และบันทึกการตรวจสอบทั้งหมด",
        deleteWs: "ลบพื้นที่ทำงาน", deleteHint: "ลบข้อมูลทั้งหมดอย่างถาวร — ไม่สามารถกู้คืนได้",
      },
    },
  },
};

// Reactive locale via context + simple subscriber
const I18nCtx = React.createContext({ locale: "en", t: TRANSLATIONS.en, setLocale: () => {} });
const useI18n = () => React.useContext(I18nCtx);

const I18nProvider = ({ children }) => {
  const [locale, setLocale] = React.useState(() => localStorage.getItem("locale") || "en");
  React.useEffect(() => {
    localStorage.setItem("locale", locale);
    document.documentElement.lang = locale;
    document.body.classList.toggle("lang-th", locale === "th");
  }, [locale]);
  const value = { locale, t: TRANSLATIONS[locale], setLocale };
  return <I18nCtx.Provider value={value}>{children}</I18nCtx.Provider>;
};

window.I18N = { TRANSLATIONS, I18nProvider, useI18n };
