:root {
  --bg: #f7f9fd;
  --surface: rgba(255, 255, 255, 0.94);
  --surface-strong: #ffffff;
  --text: #090d18;
  --muted: #5c6680;
  --soft: #eef2f8;
  --line: #dfe5ee;
  --line-strong: #cdd6e4;
  --blue: #2457ff;
  --blue-dark: #1747ef;
  --green: #0bb266;
  --green-soft: #d7f6e6;
  --shadow: 0 24px 70px rgba(30, 46, 77, 0.08);
  --panel-shadow: 0 12px 34px rgba(24, 39, 75, 0.05);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 40% -10%, rgba(36, 87, 255, 0.08), transparent 34rem),
    linear-gradient(180deg, #fbfcff 0%, var(--bg) 100%);
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  width: min(1504px, calc(100vw - 32px));
  min-height: calc(100vh - 32px);
  margin: 16px auto;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(214, 221, 234, 0.85);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 86px;
  padding: 0 32px;
  background: rgba(255, 255, 255, 0.82);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--text);
  font-size: 24px;
  font-weight: 760;
  letter-spacing: 0;
  text-decoration: none;
}

.brand-mark {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, #3168ff, #1747ef);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 10px 24px rgba(36, 87, 255, 0.22);
}

.brand-mark::before {
  width: 19px;
  height: 19px;
  content: "";
  border: 3px solid #ffffff;
  border-radius: 50%;
}

.clock-hand {
  position: absolute;
  width: 8px;
  height: 3px;
  background: #ffffff;
  border-radius: 99px;
  transform: translate(4px, 1px) rotate(36deg);
  transform-origin: left center;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.theme-switch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #eef2f8;
}

.profile-button,
.chevron-button,
.input-icon-button {
  display: inline-grid;
  place-items: center;
  border: 0;
  background: transparent;
}

.theme-option {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: #536078;
}

.theme-option.is-active {
  background: var(--blue);
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(36, 87, 255, 0.22);
}

.theme-option:not(.is-active):hover {
  background: rgba(255, 255, 255, 0.78);
  color: #1f2937;
}

.sun-icon,
.moon-icon,
.calendar-icon,
.file-icon,
.upload-icon,
.chevron-button span {
  position: relative;
  display: inline-block;
  flex: 0 0 auto;
}

.sun-icon {
  width: 19px;
  height: 19px;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.sun-icon::before {
  position: absolute;
  inset: -7px;
  content: "";
  background: conic-gradient(from 0deg, currentColor 0 7deg, transparent 7deg 38deg, currentColor 38deg 45deg, transparent 45deg 83deg, currentColor 83deg 90deg, transparent 90deg 128deg, currentColor 128deg 135deg, transparent 135deg 173deg, currentColor 173deg 180deg, transparent 180deg 218deg, currentColor 218deg 225deg, transparent 225deg 263deg, currentColor 263deg 270deg, transparent 270deg 308deg, currentColor 308deg 315deg, transparent 315deg);
  border-radius: 50%;
  mask: radial-gradient(circle, transparent 0 11px, #000 11px);
}

.moon-icon {
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: currentColor;
  -webkit-mask: radial-gradient(circle at 68% 32%, transparent 0 7px, #000 7.5px);
  mask: radial-gradient(circle at 68% 32%, transparent 0 7px, #000 7.5px);
  transform: rotate(-12deg);
}

.divider {
  width: 1px;
  height: 28px;
  background: var(--soft);
}

.profile-button {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--blue);
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(36, 87, 255, 0.22);
  font-weight: 700;
  font-size: 15px;
}

.chevron-button {
  width: 30px;
  height: 30px;
  color: #0e1320;
}

.chevron-button span {
  width: 10px;
  height: 10px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}

.content {
  padding: 38px 33px 36px;
}

.page-heading {
  margin: 0 0 32px 5px;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: clamp(30px, 3vw, 38px);
  line-height: 1.08;
  letter-spacing: 0;
}

.page-heading p {
  margin-top: 11px;
  color: #3c465d;
  font-size: 19px;
}

.work-form {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(340px, 1.14fr) minmax(280px, 0.88fr);
  gap: 25px;
}

.panel {
  min-height: 677px;
  padding: 32px 29px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--panel-shadow);
}

.panel h2 {
  margin-bottom: 31px;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0;
}

.field-group {
  display: grid;
  gap: 13px;
  color: #1d2639;
  font-size: 16px;
  font-weight: 520;
}

.field-group + .field-group {
  margin-top: 48px;
}

.input-wrap,
.textarea-wrap {
  display: flex;
  align-items: center;
  width: 100%;
  border: 1px solid var(--line-strong);
  background: var(--surface-strong);
  box-shadow: inset 0 1px 2px rgba(24, 39, 75, 0.03);
}

.input-wrap {
  min-height: 57px;
  gap: 16px;
  padding: 0 10px 0 18px;
  border-radius: 12px;
}

.input-wrap input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  font-size: 19px;
}

.input-wrap:focus-within,
.textarea-wrap:focus-within {
  border-color: rgba(36, 87, 255, 0.55);
  box-shadow: 0 0 0 4px rgba(36, 87, 255, 0.10);
}

.calendar-icon {
  width: 22px;
  height: 22px;
  color: #7a8498;
  border: 2px solid currentColor;
  border-radius: 4px;
}

.calendar-icon::before,
.calendar-icon::after {
  position: absolute;
  content: "";
}

.calendar-icon::before {
  top: 5px;
  left: 2px;
  right: 2px;
  height: 2px;
  background: currentColor;
}

.calendar-icon::after {
  top: -4px;
  left: 5px;
  width: 8px;
  height: 6px;
  border-right: 2px solid currentColor;
  border-left: 2px solid currentColor;
}

.input-icon-button {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  color: #7a8498;
}

.input-icon-button:hover {
  background: #f4f6fa;
}

.numeric-input {
  padding-left: 18px;
}

.numeric-input input {
  appearance: textfield;
}

.numeric-input input::-webkit-outer-spin-button,
.numeric-input input::-webkit-inner-spin-button {
  margin: 0;
  appearance: none;
}

.unit-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 62px;
  height: 36px;
  padding: 0 12px;
  border-radius: 8px;
  background: #eef1f6;
  color: #253047;
  font-size: 16px;
  font-weight: 520;
}

.help-text,
.support-text {
  color: #67728a;
  font-size: 15px;
  line-height: 1.55;
}

.help-text {
  margin-top: 17px;
}

.text-field {
  gap: 12px;
}

.textarea-wrap {
  position: relative;
  min-height: 156px;
  align-items: stretch;
  border-radius: 12px;
}

textarea {
  width: 100%;
  min-height: 154px;
  padding: 15px 16px 36px;
  resize: none;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  font-size: 16px;
  line-height: 1.5;
}

textarea::placeholder {
  color: #6e7890;
}

.char-count {
  position: absolute;
  right: 15px;
  bottom: 10px;
  color: #293246;
  font-size: 14px;
  font-weight: 430;
}

.or-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 28px;
  margin: 39px 18px 25px;
  color: #2f394f;
  font-size: 15px;
  font-weight: 430;
}

.or-row span {
  height: 1px;
  background: var(--line);
}

.or-row strong {
  font-weight: 450;
}

.upload-group {
  display: grid;
  gap: 12px;
}

.upload-label {
  color: #1d2639;
  font-size: 16px;
  font-weight: 520;
}

.drop-zone {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 239px;
  padding: 29px;
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
  color: #3c465d;
  text-align: center;
  transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.drop-zone:hover,
.drop-zone.is-dragging {
  border-color: rgba(36, 87, 255, 0.75);
  background: rgba(36, 87, 255, 0.04);
}

.drop-zone input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.file-icon {
  width: 36px;
  height: 44px;
  margin-bottom: 6px;
  color: #7a8498;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpath d='M14 2v6h6'/%3E%3Cpath d='M16 13H8'/%3E%3Cpath d='M16 17H8'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpath d='M14 2v6h6'/%3E%3Cpath d='M16 13H8'/%3E%3Cpath d='M16 17H8'/%3E%3C/svg%3E") center / contain no-repeat;
}

.drop-zone em {
  margin: 6px 0 16px;
  color: #3c465d;
  font-style: normal;
}

.browse-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 56px;
  min-width: 188px;
  padding: 0 22px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #ffffff;
  color: #0e1320;
  box-shadow: 0 8px 18px rgba(24, 39, 75, 0.04);
  font-size: 17px;
  font-weight: 560;
}

.upload-icon {
  width: 18px;
  height: 17px;
  border-bottom: 2px solid currentColor;
}

.upload-icon::before {
  position: absolute;
  left: 8px;
  top: -8px;
  width: 2px;
  height: 18px;
  content: "";
  background: currentColor;
}

.upload-icon::after {
  position: absolute;
  left: 3px;
  top: -8px;
  width: 10px;
  height: 10px;
  content: "";
  border-top: 2px solid currentColor;
  border-left: 2px solid currentColor;
  transform: rotate(45deg);
}

.support-text {
  margin-top: 4px;
}

.summary-panel {
  display: grid;
  grid-template-rows: auto 1fr;
}

.summary-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 34px 0 83px;
  text-align: center;
}

.summary-icon {
  display: inline-grid;
  place-items: center;
  width: 76px;
  height: 76px;
  margin-bottom: 50px;
  border-radius: 50%;
  background: var(--green-soft);
  color: var(--green);
}

.summary-icon .calendar-icon {
  width: 32px;
  height: 32px;
  color: var(--green);
}

.summary-content h3 {
  margin-bottom: 14px;
  font-size: 24px;
  line-height: 1.2;
  letter-spacing: 0;
}

.summary-content p {
  max-width: 340px;
  color: #4e5a72;
  font-size: 16px;
  line-height: 1.65;
}

.submit-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: min(100%, 348px);
  min-height: 70px;
  margin-top: 84px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(180deg, #2d62ff 0%, var(--blue-dark) 100%);
  color: #ffffff;
  box-shadow: 0 18px 28px rgba(36, 87, 255, 0.25);
  font-size: 23px;
  font-weight: 620;
}

.submit-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 22px 34px rgba(36, 87, 255, 0.30);
}

body.dark {
  --bg: #111827;
  --surface: rgba(27, 35, 50, 0.92);
  --surface-strong: #161f2e;
  --text: #f8fafc;
  --muted: #c6cfdd;
  --soft: #2a3548;
  --line: #2f3b4f;
  --line-strong: #405066;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.25);
  --panel-shadow: 0 12px 34px rgba(0, 0, 0, 0.18);
  background: linear-gradient(180deg, #0f1724 0%, #111827 100%);
}

body.dark .app-shell,
body.dark .topbar {
  background: rgba(16, 24, 38, 0.88);
}

body.dark .theme-switch,
body.dark .unit-pill {
  background: #253044;
  color: var(--text);
}

body.dark .browse-button {
  border-color: #405066;
  background: #253044;
  color: #f8fafc;
}

body.dark .theme-option {
  color: #c6cfdd;
}

body.dark .theme-option.is-active {
  background: #ffffff;
  color: #111827;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.22);
}

body.dark .profile-button {
  background: #ffffff;
  color: #111827;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.22);
}

body.dark .chevron-button {
  color: #e5eaf2;
}

body.dark .chevron-button:hover,
body.dark .input-icon-button:hover {
  background: #253044;
}

body.dark .divider {
  background: #405066;
}

body.dark .theme-option:not(.is-active):hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

body.dark .page-heading p,
body.dark .field-group,
body.dark .help-text,
body.dark .support-text,
body.dark .summary-content p,
body.dark .drop-zone,
body.dark .or-row {
  color: var(--muted);
}

body.dark .upload-label {
  color: #eef2f7;
}

body.dark textarea::placeholder,
body.dark .char-count,
body.dark .drop-zone em {
  color: #9eabc0;
}

body.dark .calendar-icon,
body.dark .input-icon-button,
body.dark .file-icon {
  color: #aeb9cc;
}

body.dark .summary-icon .calendar-icon {
  color: var(--green);
}

@media (max-width: 1120px) {
  .app-shell {
    width: calc(100vw - 24px);
    min-height: calc(100vh - 24px);
    margin: 12px auto;
    border-radius: 22px;
  }

  .work-form {
    grid-template-columns: 1fr 1fr;
  }

  .summary-panel {
    grid-column: 1 / -1;
    min-height: 420px;
  }

  .summary-content {
    padding-bottom: 34px;
  }

  .summary-icon {
    margin-bottom: 24px;
  }

  .submit-button {
    margin-top: 32px;
  }
}

@media (max-width: 760px) {
  .app-shell {
    width: 100%;
    min-height: 100vh;
    margin: 0;
    border-width: 0;
    border-radius: 0;
  }

  .topbar {
    height: auto;
    gap: 18px;
    padding: 18px 18px;
  }

  .brand {
    font-size: 21px;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
  }

  .theme-option {
    width: 40px;
    height: 40px;
  }

  .profile-button {
    width: 46px;
    height: 46px;
    font-size: 14px;
  }

  .content {
    padding: 29px 18px 24px;
  }

  .page-heading {
    margin-left: 0;
  }

  .page-heading p {
    font-size: 17px;
  }

  .work-form {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .panel {
    min-height: unset;
    padding: 25px 20px;
    border-radius: 18px;
  }

  .panel h2 {
    margin-bottom: 24px;
  }

  .field-group + .field-group {
    margin-top: 32px;
  }

  .or-row {
    margin: 30px 0 22px;
  }

  .drop-zone {
    min-height: 218px;
  }

  .summary-content {
    padding: 16px 0 10px;
  }
}

@media (max-width: 520px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar-actions {
    width: 100%;
    justify-content: space-between;
  }

  .divider {
    display: none;
  }

  .input-wrap {
    gap: 10px;
    padding-left: 13px;
  }

  .input-wrap input {
    font-size: 17px;
  }

  .submit-button {
    min-height: 62px;
    font-size: 20px;
  }
}
