:root {
  --brand-green: #09A646;
  --brand-green-dark: #007A33;
  --brand-green-light: #15C947;
  --brand-mint-bg: #E2F8E9;
  --brand-mint-soft: #F2FBF5;
  --brand-mint-border: #C4EDD3;
  --ink-primary: #1F2B24;
  --ink-strong: #1A241E;
  --ink-secondary: #5B6961;
  --ink-muted: #84928A;
  --ink-placeholder: #9AA69F;
  --line-divider: #EEF2EF;
  --line-input: #E2EAE5;
  --line-btn: #C9DDD0;
  --bg-page: #FFFFFF;
  --bg-input: #F6F9F7;
  --red-dot: #E02424;
  --radius-btn: 14px;
  --radius-input: 12px;
  --radius-chip: 10px;
  --header-height: 60px;
  --bottom-nav-height: 68px;
  --container-max: 540px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100%;
  background: var(--bg-page);
  color: var(--ink-primary);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

button,
input,
textarea,
select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
svg {
  display: block;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ===== Page Shell ===== */
.app-shell {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: #fff;
}

/* Top Header */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  width: 100%;
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid #EEF2F0;
}

.topbar-inner {
  width: 100%;
  max-width: var(--container-max);
  height: 100%;
  margin: 0 auto;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand-badge {
  position: relative;
  width: 44px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.brand-badge svg {
  width: 44px;
  height: 36px;
}

.brand-domain {
  font-size: 14px;
  font-weight: 500;
  color: #6B7770;
  letter-spacing: -0.01em;
}

.employer-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  padding: 0 14px;
  border: 1px solid #76D39A;
  border-radius: 9px;
  background: #FFFFFF;
  color: #09A646;
  font-size: 13.5px;
  font-weight: 600;
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.12s ease;
  white-space: nowrap;
}

.employer-btn:hover {
  background: #F2FBF5;
  border-color: #16B352;
}

.employer-btn:active {
  transform: scale(0.97);
}

/* Main Content Area */
.page-main {
  position: relative;
  flex: 1;
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 18px 36px;
  overflow-x: clip;
}

.page-main.has-bottom-nav {
  padding-bottom: calc(var(--bottom-nav-height) + 28px + env(safe-area-inset-bottom));
}

.page-main.has-sticky-actions {
  padding-bottom: 164px;
}

/* ===== Mint Wave Arc Top Decoration ===== */
.mint-wave-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 210px;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.mint-wave-bg svg {
  width: 100%;
  height: 100%;
}

.page-content {
  position: relative;
  z-index: 1;
}

/* ===== Page Title & Green Brush Arc ===== */
.page-title-wrap {
  padding-top: 22px;
  margin-bottom: 18px;
}

.page-title {
  margin: 0;
  font-size: 26px;
  font-weight: 800;
  line-height: 1.25;
  color: #1A241E;
  letter-spacing: -0.02em;
  display: inline-block;
  position: relative;
}

.title-arc {
  display: block;
  margin-top: 4px;
  height: 10px;
}

.title-arc.short {
  width: 68px;
}

.title-arc.medium {
  width: 112px;
}

.title-arc.wide {
  width: 122px;
}

.page-subtitle {
  margin: 10px 0 0;
  font-size: 13.5px;
  line-height: 1.55;
  color: #7D8B83;
}

/* ===== Primary & Secondary Buttons ===== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 52px;
  padding: 0 20px;
  border: none;
  border-radius: 15px;
  background: linear-gradient(90deg, #16C846 0%, #09A646 48%, #027A33 100%);
  color: #FFFFFF;
  font-size: 16.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 8px 20px -6px rgba(6, 148, 61, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.28);
  transition: transform 0.14s ease, filter 0.14s ease, box-shadow 0.14s ease;
}

.btn-primary:hover {
  filter: brightness(1.03);
  box-shadow: 0 10px 22px -6px rgba(6, 148, 61, 0.48), inset 0 1px 0 rgba(255, 255, 255, 0.34);
}

.btn-primary:active {
  transform: translateY(1px) scale(0.99);
  filter: brightness(0.96);
}

.btn-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.btn-primary svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  height: 50px;
  padding: 0 20px;
  border: 1.2px solid #BCCEC2;
  border-radius: 14px;
  background: #FFFFFF;
  color: #2B3931;
  font-size: 16px;
  font-weight: 600;
  transition: background 0.14s ease, border-color 0.14s ease, transform 0.12s ease;
}

.btn-secondary:hover {
  background: #F7FBF8;
  border-color: #93BFA3;
}

.btn-secondary:active {
  transform: scale(0.99);
  background: #EEF6F1;
}

.btn-outline-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 14px;
  border: 1px solid #D9E5DD;
  border-radius: 9px;
  background: #FFFFFF;
  color: #1A8746;
  font-size: 13.5px;
  font-weight: 600;
  transition: background 0.14s ease, border-color 0.14s ease;
}

.btn-outline-sm:hover {
  background: #F2FBF5;
  border-color: #9EDBB5;
}

.btn-ghost-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  padding: 0 14px;
  border: 1px solid #DDE5E0;
  border-radius: 9px;
  background: #FFFFFF;
  color: #46544C;
  font-size: 13px;
  font-weight: 500;
  transition: background 0.14s ease, border-color 0.14s ease;
}

.btn-ghost-pill:hover {
  background: #F6F9F7;
  border-color: #B7C9BE;
}

/* Action Stack */
.action-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
}

/* ===== Inputs ===== */
.field-input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line-input);
  border-radius: var(--radius-input);
  background: var(--bg-input);
  color: var(--ink-primary);
  font-size: 15px;
  outline: none;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.field-input::placeholder {
  color: var(--ink-placeholder);
}

.field-input:focus {
  border-color: #21B857;
  background: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(15, 178, 76, 0.12);
}

.field-textarea {
  width: 100%;
  min-height: 112px;
  padding: 12px 14px;
  border: 1px solid var(--line-input);
  border-radius: var(--radius-input);
  background: var(--bg-input);
  color: var(--ink-primary);
  font-size: 14.5px;
  line-height: 1.65;
  resize: vertical;
  outline: none;
}

.field-textarea:focus {
  border-color: #21B857;
  background: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(15, 178, 76, 0.12);
}

/* ===== Red Unread Dot ===== */
.unread-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--red-dot);
  flex-shrink: 0;
}

/* ===== Fixed Bottom Navigation ===== */
.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 45;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(8px);
  border-top: 1px solid #EDF1EE;
  padding-bottom: env(safe-area-inset-bottom);
}

.bottom-nav-inner {
  width: 100%;
  max-width: var(--container-max);
  height: var(--bottom-nav-height);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.nav-tab {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: #6B7770;
  font-size: 12px;
  font-weight: 500;
  transition: color 0.15s ease;
}

.nav-tab .nav-icon-wrap {
  position: relative;
  width: 26px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.nav-tab svg {
  width: 23px;
  height: 23px;
}

.nav-tab .tab-dot {
  position: absolute;
  top: -1px;
  right: -5px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--red-dot);
  border: 1.5px solid #fff;
  box-sizing: content-box;
}

.nav-tab.active {
  color: #09A646;
  font-weight: 700;
}

/* ===== Modal & Toast ===== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(16, 30, 22, 0.45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  animation: fadeIn 0.16s ease;
}

.modal-sheet {
  width: 100%;
  max-width: 520px;
  max-height: 86vh;
  max-height: min(86vh, var(--visible-viewport-height, 100dvh));
  overflow-y: auto;
  overscroll-behavior: contain;
  overflow-wrap: anywhere;
  background: #FFFFFF;
  border-radius: 20px 20px 0 0;
  padding: 20px 18px calc(22px + env(safe-area-inset-bottom));
  box-shadow: 0 -10px 36px rgba(15, 36, 24, 0.16);
  animation: slideUp 0.2s ease;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.modal-title {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: #1A241E;
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #6B7770;
  background: #F4F7F5;
  font-size: 18px;
}

.modal-body {
  font-size: 14px;
  line-height: 1.65;
  color: #46544C;
}

.modal-prompt-box {
  background: #F4FAF6;
  border: 1px solid #D6EEDF;
  border-radius: 12px;
  padding: 13px 14px;
  font-size: 13.5px;
  line-height: 1.65;
  color: #24382C;
  margin: 10px 0 14px;
}

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.modal-actions > button {
  flex: 1;
  height: 44px;
  font-size: 14.5px;
  border-radius: 12px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(86px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 100;
  max-width: calc(100vw - 32px);
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(24, 39, 30, 0.92);
  color: #FFFFFF;
  font-size: 13.5px;
  font-weight: 500;
  text-align: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(-4px);
}

.hidden {
  display: none !important;
}

/* State Switcher Helper (subtle, unobtrusive for empty/data toggle when needed) */
.demo-state-bar {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.demo-state-pill {
  font-size: 12px;
  color: #6B7770;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid #E2EAE5;
  background: #FFFFFF;
}

.demo-state-pill:hover {
  color: #09A646;
  border-color: #9EDBB5;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { transform: translateY(18px); opacity: 0.7; }
  to { transform: translateY(0); opacity: 1; }
}

/* ===== Responsive Breakpoints ===== */
@media (max-width: 375px) {
  .topbar-inner,
  .page-main {
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-title {
    font-size: 24px;
  }
}

@media (min-width: 768px) {
  :root {
    --container-max: 560px;
  }

  body {
    background: #F6F9F7;
  }

  .app-shell {
    max-width: 600px;
    margin: 0 auto;
    min-height: 100vh;
    background: #FFFFFF;
    box-shadow: 0 0 0 1px rgba(17, 50, 30, 0.06), 0 16px 48px rgba(15, 45, 26, 0.06);
  }

  .topbar {
    max-width: 600px;
    margin: 0 auto;
  }

  .bottom-nav {
    max-width: 600px;
    left: 50%;
    right: auto;
    width: 100%;
    transform: translateX(-50%);
    border-left: 1px solid rgba(17, 50, 30, 0.06);
    border-right: 1px solid rgba(17, 50, 30, 0.06);
  }

  .modal-backdrop {
    align-items: center;
    padding: 20px;
  }

  .modal-sheet {
    border-radius: 18px;
    padding: 22px 22px 20px;
  }
}

@media (min-width: 1200px) {
  :root {
    --container-max: 620px;
  }

  .app-shell,
  .topbar,
  .bottom-nav {
    max-width: 660px;
  }
}
