* {
  box-sizing: border-box;
}

:root {
  --app-bg: #f5f7fb;
  --app-surface: #ffffff;
  --app-surface-soft: #f8fafc;
  --app-text: #172033;
  --app-muted: #64748b;
  --app-border: #dbe3ee;
  --app-border-strong: #cbd5e1;
  --app-blue: #2563eb;
  --app-blue-dark: #1d4ed8;
  --app-blue-soft: #eff6ff;
  --app-navy: #123052;
  --app-success-bg: #ecfdf5;
  --app-success-text: #064e3b;
  --app-error-bg: #fef2f2;
  --app-error-text: #7f1d1d;
  --app-warning-bg: #fffbeb;
  --app-warning-text: #78350f;
  --app-radius: 10px;
  --app-shadow: 0 10px 28px rgba(15, 23, 42, .07);
}

html {
  min-width: 0;
}

body {
  margin: 0;
  min-width: 0;
  min-height: 100vh;
  background: var(--app-bg);
  color: var(--app-text);
  font-family: "DM Sans", "Noto Sans JP", system-ui, sans-serif;
  line-height: 1.7;
}

body,
main,
section,
article,
div,
form,
fieldset,
header,
nav {
  min-width: 0;
}

a {
  color: var(--app-blue);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img,
svg,
video,
canvas {
  max-width: 100%;
}

.applicant-shell-header {
  background: #fff;
  border-bottom: 1px solid var(--app-border);
}

.applicant-header {
  width: min(1080px, 100%);
  margin: 0 auto;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  color: var(--app-navy);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1.8px;
  line-height: 1.25;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
}

.brand-link:hover,
.brand-link:focus-visible {
  color: var(--app-blue-dark);
  text-decoration: none;
}

.applicant-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.applicant-nav-btn,
.btn,
button {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  border-radius: 8px;
  border: 1px solid var(--app-blue);
  background: var(--app-blue);
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease;
}

.applicant-nav-btn {
  min-height: 38px;
  padding: 8px 13px;
  font-size: 13px;
  white-space: nowrap;
}

.btn,
button {
  padding: 11px 15px;
}

.btn:hover,
button:hover,
.applicant-nav-btn:hover {
  background: var(--app-blue-dark);
  border-color: var(--app-blue-dark);
  color: #fff;
  text-decoration: none;
}

.secondary,
.applicant-nav-ghost {
  background: #fff;
  border-color: #bfdbfe;
  color: var(--app-blue);
}

.secondary:hover,
.applicant-nav-ghost:hover {
  background: var(--app-blue-soft);
  border-color: #93c5fd;
  color: var(--app-blue-dark);
}

.applicant-nav-primary {
  background: var(--app-blue);
  border-color: var(--app-blue);
  color: #fff;
}

.danger {
  background: #fff;
  border-color: #fecaca;
  color: #b91c1c;
}

.danger:hover {
  background: var(--app-error-bg);
  border-color: #fca5a5;
  color: #991b1b;
}

button:disabled,
.btn[aria-disabled="true"],
.disabled {
  cursor: not-allowed;
  opacity: .58;
}

.brand-link:focus-visible,
.applicant-nav-btn:focus-visible,
.btn:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
.check:focus-within,
.file-picker:focus-within {
  outline: 3px solid rgba(37, 99, 235, .22);
  outline-offset: 3px;
}

.applicant-shell-main,
.page,
.auth-main {
  width: min(1080px, 100%);
  margin: 0 auto;
  padding: 28px 18px 56px;
}

.auth-main {
  width: min(780px, 100%);
}

.panel,
.hero-card,
.section-card {
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius);
  box-shadow: var(--app-shadow);
  padding: 22px;
  margin-bottom: 16px;
}

.panel-flat {
  background: #fff;
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius);
  padding: 18px;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0 0 10px;
  color: #0f172a;
  font-size: 28px;
  line-height: 1.35;
  letter-spacing: 0;
}

h2 {
  margin: 0 0 12px;
  color: #172033;
  font-size: 19px;
  line-height: 1.45;
}

h3 {
  margin: 0 0 8px;
  color: #172033;
  font-size: 15px;
  line-height: 1.55;
}

.lead,
.auth-lead,
.muted {
  color: var(--app-muted);
  font-size: 14px;
  line-height: 1.8;
}

.muted {
  font-size: 13px;
}

.small {
  font-size: 12px;
}

.state {
  margin: 12px 0;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid var(--app-border);
  line-height: 1.7;
  scroll-margin-top: 24px;
}

.success,
.state.success,
.success-box {
  background: var(--app-success-bg);
  border-color: #bbf7d0;
  color: var(--app-success-text);
}

.error,
.state.error,
.error-box {
  background: var(--app-error-bg);
  border-color: #fecaca;
  color: var(--app-error-text);
}

.loading,
.state.loading,
.info-box,
.auth-info {
  background: var(--app-blue-soft);
  border-color: #bfdbfe;
  color: #1e3a8a;
}

.warning,
.state.warning {
  background: var(--app-warning-bg);
  border-color: #fde68a;
  color: var(--app-warning-text);
}

.auth-info {
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  padding: 13px 14px;
  font-size: 14px;
  line-height: 1.75;
  margin: 0 0 16px;
}

.hidden {
  display: none !important;
}

.actions,
.hero-actions,
.form-actions,
.file-row,
.upload-row,
.save-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.actions > *,
.hero-actions > *,
.form-actions > *,
.file-row > *,
.upload-row > *,
.save-row > * {
  min-width: 0;
}

.auth-panel {
  max-width: 680px;
  margin: 0 auto;
}

.auth-panel h1 {
  margin-bottom: 6px;
}

.tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 18px 0;
  padding: 4px;
  border: 1px solid var(--app-border);
  border-radius: 10px;
  background: var(--app-surface-soft);
}

.tab {
  width: 100%;
  min-height: 42px;
  border: 1px solid transparent;
  background: transparent;
  color: #475569;
  box-shadow: none;
}

.tab.active,
.tab[aria-selected="true"] {
  background: #fff;
  border-color: #bfdbfe;
  color: var(--app-blue-dark);
  box-shadow: 0 4px 12px rgba(15, 23, 42, .06);
}

.tab:hover {
  background: #fff;
  border-color: #bfdbfe;
  color: var(--app-blue-dark);
}

.auth-benefits,
.step-list,
.compact-list {
  margin: 12px 0;
  padding-left: 1.2em;
  color: #475569;
  font-size: 14px;
  line-height: 1.8;
}

.field,
.form-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin: 14px 0;
  min-width: 0;
}

.field label,
.form-field label,
label.label,
legend {
  color: #334155;
  font-size: 13px;
  font-weight: 800;
}

fieldset {
  margin: 16px 0;
  padding: 0;
  border: 0;
}

input,
textarea,
select {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--app-border-strong);
  border-radius: 8px;
  background: #fff;
  color: var(--app-text);
  font: inherit;
  font-size: 16px;
  padding: 11px 12px;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

input[readonly] {
  background: #f8fafc;
  color: #475569;
}

.required,
.optional,
.status-badge,
.tag,
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: max-content;
  max-width: 100%;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
  white-space: nowrap;
}

.required {
  margin-left: 6px;
  background: #dbeafe;
  color: var(--app-blue-dark);
}

.optional {
  margin-left: 6px;
  background: #f1f5f9;
  color: #475569;
}

.status-badge,
.badge {
  background: var(--app-blue-soft);
  color: var(--app-blue-dark);
}

.status-badge.done {
  background: #f1f5f9;
  color: #475569;
}

.status-badge.active {
  background: var(--app-success-bg);
  color: #047857;
}

.status-badge.warning {
  background: var(--app-warning-bg);
  color: var(--app-warning-text);
}

.check {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  min-width: 0;
  margin: 10px 0;
  font-size: 13px;
  line-height: 1.65;
}

.check input {
  flex: 0 0 auto;
  width: auto;
  min-height: 18px;
  margin-top: 4px;
}

.checks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
}

.checks .check {
  align-items: center;
  min-height: 44px;
  margin: 0;
  padding: 9px 10px;
  border: 1px solid var(--app-border);
  border-radius: 8px;
  background: #fff;
}

.consent-group {
  scroll-margin-top: 24px;
}

.field-error {
  margin: 10px 0 14px;
  padding: 10px 12px;
  border: 1px solid #fecaca;
  border-radius: 8px;
  background: var(--app-error-bg);
  color: var(--app-error-text);
  font-size: 13px;
  line-height: 1.6;
  scroll-margin-top: 24px;
}

.oauth-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 14px 0 18px;
}

.google-btn {
  width: 100%;
  background: #fff;
  border-color: var(--app-border-strong);
  color: var(--app-text);
}

.google-btn:hover {
  background: var(--app-surface-soft);
  border-color: #94a3b8;
  color: var(--app-text);
}

.google-btn svg {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
}

.divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0;
  color: var(--app-muted);
  font-size: 13px;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--app-border);
}

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 88px;
}

.password-toggle {
  position: absolute;
  right: 6px;
  bottom: 6px;
  min-height: 34px;
  padding: 6px 10px;
  border-color: transparent;
  background: transparent;
  color: var(--app-blue);
  font-size: 12px;
}

.password-toggle:hover {
  background: var(--app-blue-soft);
  color: var(--app-blue-dark);
}

.section-title {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.summary-grid,
.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.summary-card,
.metric-card,
.task-card,
.application-card,
.resume-current,
.resume-document,
.empty-state {
  min-width: 0;
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius);
  background: #fff;
}

.summary-card,
.metric-card {
  padding: 15px;
}

.summary-card h2,
.metric-card h2 {
  margin: 0 0 8px;
  color: var(--app-muted);
  font-size: 13px;
}

.summary-value,
.metric-value {
  color: #0f172a;
  font-size: 24px;
  font-weight: 800;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.summary-note,
.metric-note {
  margin-top: 6px;
  color: var(--app-muted);
  font-size: 12px;
  line-height: 1.6;
}

.progress-wrap {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.progress-track {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}

.progress-bar {
  height: 100%;
  border-radius: 999px;
  background: var(--app-blue);
  transition: width .2s ease;
}

.task-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.task-card {
  padding: 14px;
  background: var(--app-surface-soft);
}

.task-card b {
  display: block;
  margin-bottom: 6px;
  color: var(--app-text);
  font-size: 14px;
}

.task-card p {
  margin: 0 0 10px;
  color: var(--app-muted);
  font-size: 13px;
  line-height: 1.7;
}

.complete-box {
  border: 1px solid #bbf7d0;
  border-radius: var(--app-radius);
  background: var(--app-success-bg);
  color: var(--app-success-text);
  padding: 14px;
  font-weight: 800;
}

.applications-list,
.resume-list {
  display: grid;
  gap: 12px;
}

.application-card,
.resume-document {
  padding: 16px;
  display: grid;
  gap: 10px;
}

.application-head,
.resume-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.application-title,
.resume-title,
.doc-name,
.file-name,
.breakable {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.application-title,
.resume-title,
.doc-name {
  color: var(--app-text);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.55;
}

.application-meta,
.detail-grid,
.resume-meta,
.profile-section-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
}

.application-meta,
.resume-meta,
.detail-grid {
  color: #475569;
  font-size: 13px;
}

.application-meta b,
.resume-meta b,
.detail-grid b {
  display: block;
  color: var(--app-muted);
  font-size: 12px;
}

.empty-state {
  padding: 20px;
  background: var(--app-blue-soft);
  border-style: dashed;
  text-align: center;
}

.empty-state h2 {
  margin-bottom: 8px;
}

.empty-state p {
  margin: 0 0 14px;
  color: #475569;
  font-size: 14px;
}

.form-section {
  padding: 20px 0;
  border-top: 1px solid var(--app-border);
}

.form-section:first-child {
  border-top: 0;
  padding-top: 0;
}

.form-section-header {
  margin-bottom: 12px;
}

.form-section-header p {
  margin: 4px 0 0;
}

.unit-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.unit-field input {
  border-radius: 8px 0 0 8px;
}

.unit-label {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid var(--app-border-strong);
  border-left: 0;
  border-radius: 0 8px 8px 0;
  background: var(--app-surface-soft);
  color: #475569;
  font-size: 13px;
  white-space: nowrap;
}

.resume-current {
  padding: 14px;
  background: var(--app-surface-soft);
}

.file-input-hidden {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  opacity: 0;
}

.file-picker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #fff;
  color: var(--app-blue);
  padding: 10px 13px;
  font-weight: 800;
  cursor: pointer;
}

.file-picker:hover {
  background: var(--app-blue-soft);
}

.inline-status {
  color: var(--app-muted);
  font-size: 13px;
  line-height: 1.6;
}

.inline-status.success-text {
  color: #047857;
}

.inline-status.error-text {
  color: #b91c1c;
}

.sticky-save {
  position: sticky;
  bottom: 0;
  z-index: 5;
  margin: 20px -22px -22px;
  padding: 12px 22px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--app-border);
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(10px);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media (max-width: 920px) {
  .summary-grid,
  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .task-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .applicant-header {
    padding: 12px 10px;
    align-items: flex-start;
    flex-direction: column;
    gap: 9px;
  }

  .brand-link {
    min-height: 30px;
    font-size: 11px;
    letter-spacing: 1.4px;
  }

  .applicant-nav {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .applicant-nav:has(> :nth-child(3)):not(:has(> :nth-child(4))) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .applicant-nav-btn {
    width: 100%;
    min-width: 0;
    padding: 9px 6px;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: clip;
  }

  .applicant-shell-main,
  .page,
  .auth-main {
    padding: 20px 10px 40px;
  }

  .panel,
  .hero-card,
  .section-card {
    padding: 16px;
  }

  h1 {
    font-size: 23px;
  }

  h2 {
    font-size: 17px;
  }

  .section-title {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .profile-section-grid,
  .application-meta,
  .detail-grid,
  .resume-meta {
    grid-template-columns: 1fr;
  }

  .application-head,
  .resume-head {
    display: grid;
  }

  .actions,
  .hero-actions,
  .form-actions,
  .file-row,
  .upload-row,
  .save-row {
    align-items: stretch;
  }

  .actions .btn,
  .actions button,
  .hero-actions .btn,
  .hero-actions button,
  .form-actions .btn,
  .form-actions button {
    width: auto;
  }

  .primary-action,
  .save-row button[type="submit"],
  .google-btn {
    width: 100%;
  }

  .profile-page {
    padding-bottom: calc(22px + env(safe-area-inset-bottom));
  }

  .profile-page .page {
    padding-bottom: calc(72px + env(safe-area-inset-bottom));
  }

  .sticky-save {
    margin: 18px -16px -16px;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  }

  .profile-page .sticky-save {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 20;
    margin: 0;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    box-shadow: 0 -8px 24px rgba(15, 23, 42, .10);
  }

  .profile-page .sticky-save.is-compact {
    transform: translateY(calc(100% - 8px));
    opacity: 0;
    pointer-events: none;
    box-shadow: none;
  }

  .profile-page:has(.sticky-save:not(.is-compact)) {
    padding-bottom: calc(88px + env(safe-area-inset-bottom));
  }

  .profile-page:has(.sticky-save:not(.is-compact)) .page {
    padding-bottom: calc(128px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 560px) {
  .summary-grid,
  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .summary-card,
  .metric-card {
    padding: 12px;
  }

  .summary-value,
  .metric-value {
    font-size: 20px;
  }

  .checks {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .checks .check {
    padding: 8px;
  }

  .tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .password-field input {
    padding-right: 78px;
  }

  .password-toggle {
    padding-inline: 8px;
  }
}

/* Visual design refinement */
:root {
  --app-bg: #eef4fb;
  --app-bg-soft: #f6f9fd;
  --app-surface: #fff;
  --app-surface-soft: #f8fbff;
  --app-surface-blue: #eef6ff;
  --app-navy: #102a43;
  --app-blue: #2563eb;
  --app-blue-dark: #1d4ed8;
  --app-muted: #64748b;
  --app-border: #d8e3f0;
  --app-border-soft: #e6edf6;
  --app-danger: #be123c;
  --app-success: #047857;
  --app-shadow: 0 14px 36px rgba(15, 23, 42, .08);
  --app-shadow-soft: 0 8px 22px rgba(15, 23, 42, .055);
}

body {
  background:
    radial-gradient(circle at 12% -8%, rgba(37, 99, 235, .10), transparent 28rem),
    linear-gradient(180deg, var(--app-bg) 0%, var(--app-bg-soft) 46%, #f8fafc 100%);
  color: #172033;
}

.applicant-shell-header {
  background: rgba(255, 255, 255, .96);
  border-bottom-color: rgba(148, 163, 184, .22);
  box-shadow: 0 8px 22px rgba(15, 23, 42, .05);
  backdrop-filter: saturate(145%) blur(10px);
}

.brand-link {
  color: var(--app-navy);
  letter-spacing: .02em;
}

.brand-link::before {
  background: #2563eb;
  border-radius: 3px;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .12);
}

.applicant-nav-btn {
  border-color: #dbe3ee;
  background: #fff;
}

.applicant-nav-primary {
  background: var(--app-blue);
  border-color: var(--app-blue);
  color: #fff;
  box-shadow: 0 8px 18px rgba(37, 99, 235, .14);
}

.applicant-nav-primary:visited,
.applicant-nav-primary[aria-current="page"] {
  background: var(--app-blue);
  border-color: var(--app-blue);
  color: #fff;
}

.applicant-nav-primary:hover,
.applicant-nav-primary:focus-visible,
.applicant-nav-primary[aria-current="page"]:hover,
.applicant-nav-primary[aria-current="page"]:focus-visible {
  background: var(--app-blue-dark);
  border-color: var(--app-blue-dark);
  color: #fff;
  text-decoration: none;
}

.applicant-nav-ghost {
  color: #475569;
  background: #fff;
}

.applicant-nav-ghost:hover,
.applicant-nav-ghost:focus-visible {
  color: var(--app-blue);
  background: #f8fbff;
  border-color: #bfdbfe;
}

.page-title h1,
.section-title h2,
.panel h2,
.hero-card h1,
.hero-card h2,
.form-section-header h2,
.summary-card h2,
.task-card b,
.application-card h2,
.resume-document h2,
.doc-name {
  color: var(--app-navy);
}

.page-title p,
.muted,
.hint,
.lead {
  color: var(--app-muted);
}

.panel,
.hero-card,
.section-card,
.auth-panel,
.summary-card,
.metric-card,
.application-card,
.resume-document {
  background: linear-gradient(180deg, #fff 0%, #fbfdff 100%);
  border-color: var(--app-border-soft);
  box-shadow: var(--app-shadow-soft);
}

.hero-card {
  background: linear-gradient(135deg, #fff 0%, #f8fbff 56%, #eef6ff 100%);
  border-color: #cfe1f8;
  box-shadow: var(--app-shadow);
}

.hero-card::before {
  background: linear-gradient(180deg, #2563eb, #60a5fa);
  opacity: .95;
}

.panel-flat,
.auth-side,
.confirm-panel,
.mail-pending-panel,
.done-panel,
.resume-current,
.empty-state,
.upload-panel {
  background: var(--app-surface-soft);
  border-color: #dbeafe;
}

.task-card,
.next-action-card {
  background: linear-gradient(135deg, #f8fbff 0%, #eef6ff 100%);
  border-color: #bfdbfe;
  box-shadow: 0 8px 20px rgba(37, 99, 235, .07);
}

.task-card::before {
  background: #2563eb;
}

.summary-card:nth-child(1),
.metric-card:nth-child(1) {
  background: linear-gradient(135deg, #f8fbff 0%, #eef6ff 100%);
  border-color: #bfdbfe;
}

.summary-card:nth-child(2),
.metric-card:nth-child(2) {
  background: linear-gradient(180deg, #fff 0%, #f7fbff 100%);
}

.summary-value,
.metric-value,
.progress-value {
  color: var(--app-navy);
}

.progress-bar {
  background: #dbeafe;
}

.progress-fill {
  background: linear-gradient(90deg, #2563eb, #60a5fa);
}

.application-card {
  box-shadow: 0 6px 18px rgba(15, 23, 42, .045);
}

.application-card:hover {
  border-color: #bfdbfe;
  box-shadow: 0 12px 26px rgba(37, 99, 235, .08);
}

.application-meta,
.detail-grid,
.resume-meta,
.info-row {
  color: #475569;
}

.form-section {
  border-top-color: transparent;
}

.form-section + .form-section {
  border-top: 1px solid var(--app-border-soft);
}

.form-section-header {
  padding: 12px 14px;
  border-left: 4px solid var(--app-blue);
  border-radius: 8px;
  background: linear-gradient(90deg, #eef6ff 0%, #f8fbff 100%);
}

.form-section-header p {
  color: var(--app-muted);
}

.field label,
.field-title,
legend {
  color: var(--app-navy);
}

input,
textarea,
select {
  background: #fff;
  border-color: #cbd5e1;
  box-shadow: inset 0 1px 0 rgba(15, 23, 42, .02);
}

input:focus,
textarea:focus,
select:focus {
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .14);
}

input:disabled,
textarea:disabled,
select:disabled {
  background: #f1f5f9;
  border-color: #d8e3f0;
  color: #64748b;
  cursor: not-allowed;
}

.checks .check {
  background: #fff;
  border-color: #dbe3ee;
  box-shadow: 0 1px 0 rgba(15, 23, 42, .02);
}

.checks .check:has(input:checked) {
  background: #eef6ff;
  border-color: #93c5fd;
  color: #1e3a8a;
}

.checks .check:has(input:disabled) {
  background: #f1f5f9;
  border-style: dashed;
  color: #64748b;
}

.primary-action,
button[type="submit"],
.save-row button[type="submit"],
.google-btn {
  box-shadow: 0 8px 18px rgba(37, 99, 235, .16);
}

button:not(.primary-action):not([type="submit"]),
.btn.secondary,
.secondary-action,
.text-action {
  box-shadow: none;
}

button.google-btn,
.google-btn {
  box-shadow: 0 8px 18px rgba(15, 23, 42, .08);
}

.danger-action,
button.danger,
.archive-btn {
  background: #fff1f2;
  border-color: #fecdd3;
  color: var(--app-danger);
}

.danger-action:hover,
button.danger:hover,
.archive-btn:hover {
  background: #ffe4e6;
  border-color: #fda4af;
}

.badge,
.status-badge,
.required,
.optional,
.recommended {
  border-radius: 999px;
  font-weight: 800;
  letter-spacing: 0;
}

.required {
  background: #fff1f2;
  border-color: #fecdd3;
  color: var(--app-danger);
}

.recommended {
  background: #eef6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

.optional {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #475569;
}

.badge {
  background: #eef6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

.status-badge.active {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: var(--app-success);
}

.status-badge.warning {
  background: #fff7ed;
  border-color: #fed7aa;
  color: #9a3412;
}

.status-badge.done {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #475569;
}

.state.success,
.success-message,
.mail-pending-panel,
.done-panel {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #064e3b;
}

.state.error,
.error-message,
.error-summary,
[role="alert"] {
  background: #fff1f2;
  border-color: #fecdd3;
  color: #7f1d1d;
}

.tabs {
  background: #eaf2fb;
  border-color: #d8e3f0;
  padding: 4px;
}

.tab {
  border-color: transparent;
  background: transparent;
  color: #475569;
}

.tab[aria-selected="true"] {
  background: #fff;
  color: var(--app-navy);
  border-color: #dbeafe;
  box-shadow: 0 6px 16px rgba(15, 23, 42, .06);
}

.divider,
.or-divider {
  color: var(--app-muted);
}

.divider::before,
.divider::after,
.or-divider::before,
.or-divider::after {
  background: #dbe3ee;
}

.resume-document:has(.badge),
.resume-current:has(.badge) {
  background: linear-gradient(135deg, #f8fbff 0%, #eef6ff 100%);
  border-color: #93c5fd;
  box-shadow: 0 10px 24px rgba(37, 99, 235, .08);
}

.resume-document.archived {
  background: #f1f5f9;
  border-color: #d8e3f0;
  color: #64748b;
  box-shadow: none;
}

.resume-document.archived .doc-name {
  color: #475569;
}

.doc-name,
.breakable,
.email-text,
.file-name {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.sticky-save {
  background: rgba(255, 255, 255, .96);
  border-color: #dbeafe;
  box-shadow: 0 -10px 24px rgba(15, 23, 42, .10);
  backdrop-filter: saturate(145%) blur(10px);
}

.profile-page .sticky-save.is-compact {
  box-shadow: none;
}

@media (max-width: 760px) {
  body {
    background: linear-gradient(180deg, #eef4fb 0%, #f7f9fc 44%, #f8fafc 100%);
  }

  .applicant-shell-header {
    box-shadow: 0 6px 18px rgba(15, 23, 42, .045);
  }

  .panel,
  .hero-card,
  .section-card,
  .auth-panel,
  .summary-card,
  .metric-card,
  .application-card,
  .resume-document {
    box-shadow: 0 6px 16px rgba(15, 23, 42, .045);
  }

  .hero-card {
    box-shadow: 0 8px 20px rgba(37, 99, 235, .07);
  }

  .form-section-header {
    padding: 11px 12px;
    border-left-width: 3px;
  }

  .task-card {
    box-shadow: 0 6px 16px rgba(37, 99, 235, .06);
  }

  .sticky-save {
    background: rgba(255, 255, 255, .97);
  }
}

@media (max-width: 760px) {
  .applicant-header {
    padding: 10px 12px 8px;
    gap: 6px;
  }

  .applicant-nav,
  .applicant-nav:has(> :nth-child(3)):not(:has(> :nth-child(4))) {
    display: flex;
    align-items: center;
    justify-content: space-between;
    grid-template-columns: none;
    gap: 4px;
    width: 100%;
    padding-top: 2px;
    background: #fff;
  }

  .applicant-nav-btn,
  button.applicant-nav-btn {
    position: relative;
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    min-height: 38px;
    padding: 8px 4px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: #475569;
    font-size: 12px;
    line-height: 1.2;
    white-space: nowrap;
    overflow: visible;
    text-overflow: clip;
  }

  .applicant-nav-primary,
  .applicant-nav-btn[aria-current="page"] {
    color: var(--app-blue);
    background: transparent;
    box-shadow: none;
  }

  .applicant-nav-btn[aria-current="page"]::after {
    content: "";
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 3px;
    height: 2px;
    border-radius: 999px;
    background: var(--app-blue);
  }

  .applicant-nav-ghost,
  button.applicant-nav-ghost {
    color: #64748b;
    background: transparent;
  }

  button.applicant-nav-ghost {
    color: #64748b;
  }

  .applicant-nav-btn:hover,
  .applicant-nav-btn:focus-visible,
  .applicant-nav-ghost:hover,
  .applicant-nav-ghost:focus-visible {
    color: var(--app-blue);
    background: #f8fbff;
    border-color: transparent;
    text-decoration: none;
    box-shadow: none;
  }
}
