/* ==========================================================================
   Cambodia HR Intelligence - Public Self-Service Submission Portal Design
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Noto+Sans+Khmer:wght@400;500;600;700&display=swap');

:root {
  --font-base: 'Plus Jakarta Sans', 'Noto Sans Khmer', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  
  --bg-page: #090d16;
  --bg-card: rgba(30, 41, 59, 0.7);
  --bg-card-solid: #1e293b;
  --bg-input: rgba(15, 23, 42, 0.85);
  
  --border-color: rgba(255, 255, 255, 0.1);
  --border-focus: #3b82f6;
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --color-primary: #2563eb;
  --color-primary-light: #60a5fa;
  --color-success: #10b981;
  --color-warning: #f59e0b;
  --color-danger: #ef4444;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-base);
  background: var(--bg-page);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(37, 99, 235, 0.15) 0%, transparent 45%),
    radial-gradient(circle at 85% 85%, rgba(139, 92, 246, 0.12) 0%, transparent 45%);
}

.portal-container {
  width: 100%;
  max-width: 680px;
  padding: 20px 16px 60px 16px;
}

/* Header */
.portal-header {
  text-align: center;
  margin-bottom: 24px;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.2), rgba(16, 185, 129, 0.15));
  border: 1px solid rgba(96, 165, 250, 0.4);
  padding: 6px 16px;
  border-radius: 30px;
  margin-bottom: 12px;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.2);
}

.brand-badge .brand-name {
  font-size: 14px;
  font-weight: 800;
  color: #60a5fa;
  letter-spacing: 0.5px;
}

.brand-badge .brand-tag {
  font-size: 12px;
  color: #94a3b8;
  font-weight: 500;
}

.portal-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #60a5fa;
  background: rgba(37, 99, 235, 0.15);
  border: 1px solid rgba(37, 99, 235, 0.35);
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 12px;
}

.portal-title {
  font-size: 24px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}

.portal-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Main Tab Switcher */
.tab-switcher {
  display: flex;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 5px;
  margin-bottom: 20px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.tab-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 14px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: inherit;
}

.tab-btn.active {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

/* Language Switcher Bar */
.lang-switcher-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 6px 12px;
  margin-bottom: 18px;
}

.lang-switcher-label {
  font-size: 12px;
  color: var(--text-secondary);
}

.lang-btn-group {
  display: flex;
  gap: 6px;
}

.btn-lang-choice {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.btn-lang-choice.active {
  background: #3b82f6;
  border-color: #3b82f6;
  color: #fff;
  font-weight: 600;
}

/* Card Box */
.form-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 18px;
  padding: 24px 20px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  animation: fadeIn 0.3s ease-out forwards;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.form-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #60a5fa;
  margin: 22px 0 14px 0;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.form-section-title:first-of-type {
  margin-top: 0;
}

.form-sublabel {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: -3px;
  margin-bottom: 8px;
  display: block;
}

.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 7px;
}

.form-label .req-star {
  color: #f87171;
  margin-left: 2px;
}

.form-label .label-tip {
  font-size: 11px;
  font-weight: 400;
  color: var(--text-muted);
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  color: #fff;
  font-size: 14px;
  padding: 12px 14px;
  outline: none;
  font-family: inherit;
  transition: all 0.2s ease;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
  background: rgba(15, 23, 42, 0.95);
}

.form-textarea {
  resize: vertical;
  min-height: 80px;
  line-height: 1.5;
}

/* Form Row (Grid) */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 520px) {
  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

/* Chips / Tags Selector */
.chip-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid var(--border-color);
  background: rgba(15, 23, 42, 0.6);
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
  transition: all 0.2s ease;
}

.chip:hover {
  border-color: rgba(96, 165, 250, 0.5);
  color: #fff;
}

.chip.active {
  background: rgba(37, 99, 235, 0.2);
  border-color: #3b82f6;
  color: #60a5fa;
  font-weight: 600;
}

/* Checkbox Chip with clear Checkmark UI */
.chip-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  background: rgba(15, 23, 42, 0.7);
  color: #cbd5e1;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.chip-check .check-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  background: rgba(15, 23, 42, 0.9);
  color: transparent;
  font-size: 12px;
  font-weight: 900;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.chip-check:hover {
  border-color: rgba(96, 165, 250, 0.5);
  background: rgba(30, 41, 59, 0.9);
  color: #fff;
}

.chip-check:hover .check-box {
  border-color: #60a5fa;
}

.chip-check.active {
  background: rgba(37, 99, 235, 0.25);
  border-color: #3b82f6;
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 2px 10px rgba(37, 99, 235, 0.25);
}

.chip-check.active .check-box {
  background: #2563eb;
  border-color: #3b82f6;
  color: #ffffff;
}

/* Radio Chip with clear Radio Button UI */
.chip-radio {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  background: rgba(15, 23, 42, 0.7);
  color: #cbd5e1;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.chip-radio .radio-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  background: rgba(15, 23, 42, 0.9);
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.chip-radio .radio-dot::after {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: transparent;
  transition: all 0.2s ease;
}

.chip-radio:hover {
  border-color: rgba(96, 165, 250, 0.5);
  background: rgba(30, 41, 59, 0.9);
  color: #fff;
}

.chip-radio:hover .radio-dot {
  border-color: #60a5fa;
}

.chip-radio.active {
  background: rgba(37, 99, 235, 0.25);
  border-color: #3b82f6;
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 2px 10px rgba(37, 99, 235, 0.25);
}

.chip-radio.active .radio-dot {
  border-color: #3b82f6;
  background: #2563eb;
}

.chip-radio.active .radio-dot::after {
  background: #ffffff;
}

/* Contact 3-Col Layout & Hints */
.contact-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}

@media (max-width: 640px) {
  .contact-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

.contact-hint {
  font-size: 12px;
  color: #93c5fd;
  background: rgba(37, 99, 235, 0.1);
  border: 1px dashed rgba(59, 130, 246, 0.35);
  border-radius: 8px;
  padding: 8px 12px;
  margin-top: -6px;
  margin-bottom: 16px;
  line-height: 1.4;
  display: flex;
  align-items: center;
  gap: 6px;
}

.sub-nav-tip {
  text-align: center;
  margin-top: 24px;
  font-size: 13px;
  color: var(--text-secondary);
}

.sub-nav-tip a {
  color: #60a5fa;
  text-decoration: none;
  font-weight: 600;
  margin-left: 4px;
  transition: color 0.2s;
}

.sub-nav-tip a:hover {
  color: #93c5fd;
  text-decoration: underline;
}

/* Privacy Guarantee Box */
.privacy-box {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 10px;
  padding: 12px 14px;
  margin: 16px 0 20px 0;
  font-size: 12px;
  line-height: 1.5;
  color: #a7f3d0;
}

.privacy-box .shield-icon {
  font-size: 18px;
  line-height: 1;
}

/* Submit Button */
.btn-submit {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border: none;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  padding: 14px 20px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.35);
  font-family: inherit;
}

.btn-submit:hover {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.45);
}

.btn-submit:active {
  transform: translateY(0);
}

.btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Honeypot field (hidden completely from humans) */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  top: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Modal Dialog */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(9, 13, 22, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  width: 100%;
  max-width: 440px;
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 18px;
  padding: 28px 24px;
  text-align: center;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  transform: scale(0.95);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.active .modal-card {
  transform: scale(1);
}

.modal-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.modal-title {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}

.modal-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 20px;
}

.modal-meta-box {
  background: rgba(15, 23, 42, 0.6);
  border: 1px dashed var(--border-color);
  border-radius: 10px;
  padding: 12px;
  font-size: 12px;
  color: #cbd5e1;
  text-align: left;
  margin-bottom: 20px;
  line-height: 1.5;
}

.modal-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-secondary-action {
  width: 100%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 11px 16px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  display: inline-block;
  box-sizing: border-box;
}

.btn-secondary-action:hover {
  background: rgba(255, 255, 255, 0.14);
}

.btn-tg-action {
  background: #0284c7;
  border-color: #0284c7;
}

.btn-tg-action:hover {
  background: #0369a1;
}

/* Toast */
.form-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(30px);
  background: #1e293b;
  border: 1px solid var(--border-color);
  color: #fff;
  font-size: 13px;
  padding: 10px 20px;
  border-radius: 30px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 10000;
  white-space: nowrap;
}

.form-toast.active {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.form-toast.toast-error {
  border-color: rgba(239, 68, 68, 0.5);
  background: #7f1d1d;
}

.form-toast.toast-success {
  border-color: rgba(16, 185, 129, 0.5);
  background: #064e3b;
}
