:root {
  color-scheme: light;
  --bg-main: #f2f6fb;
  --bg-panel: #ffffff;
  --line: #d8e2ef;
  --text-main: #0f2740;
  --text-muted: #5e7186;
  --sea-700: #0a5673;
  --sea-500: #118ab2;
  --admin-700: #3b2f65;
  --admin-500: #5963b8;
  --success-soft: #d9f5e8;
  --shadow-soft: 0 10px 30px rgba(15, 39, 64, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body,
#app {
  margin: 0;
  min-height: 100%;
}

body {
  min-height: 100vh;
  font-family: 'Manrope', 'Segoe UI', sans-serif;
  color: var(--text-main);
  background:
    radial-gradient(circle at 15% -10%, #dceeff 0%, transparent 36%),
    radial-gradient(circle at 85% 110%, #dff8ff 0%, transparent 42%),
    var(--bg-main);
}

a {
  color: inherit;
}

.boot-loader {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.boot-loader__panel {
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  width: min(440px, 100%);
  box-shadow: var(--shadow-soft);
  text-align: center;
  padding: 28px;
}

.boot-loader__panel p {
  margin: 14px 0 0;
  color: var(--text-muted);
  font-weight: 600;
}

.spinner {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 4px solid #d3e1f0;
  border-top-color: var(--sea-500);
  margin: 0 auto;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 250px 1fr;
}

.sidebar {
  padding: 26px 20px;
  color: #eef7ff;
  display: flex;
  flex-direction: column;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
}

.sidebar--seafarer {
  background: linear-gradient(180deg, var(--sea-700), #07394d);
}

.sidebar--admin {
  background: linear-gradient(180deg, var(--admin-700), #2a2248);
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 28px;
}

.brand__logo {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.18);
  font-weight: 800;
}

.brand__title {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.brand__subtitle {
  font-size: 12px;
  opacity: 0.9;
}

.nav {
  display: grid;
  gap: 8px;
}

.nav__item {
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  opacity: 0.9;
  padding: 10px 12px;
  border-radius: 10px;
  transition: background 0.2s ease;
}

.nav__item:hover {
  background: rgba(255, 255, 255, 0.12);
}

.nav__item.router-link-active {
  background: rgba(255, 255, 255, 0.2);
  opacity: 1;
}

.sidebar__footer {
  margin-top: auto;
  display: grid;
  gap: 10px;
}

.user-mail {
  font-size: 12px;
  opacity: 0.9;
  overflow-wrap: anywhere;
}

.btn {
  height: 40px;
  border-radius: 10px;
  border: 1px solid transparent;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.btn--ghost {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.26);
}

.btn--primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--sea-500);
  color: #fff;
  text-decoration: none;
  padding: 0 20px;
}

.content {
  padding: 26px;
}

.topbar {
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-soft);
  padding: 18px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.topbar__title {
  margin: 0;
  font-size: 22px;
}

.topbar__badge {
  padding: 7px 10px;
  border-radius: 999px;
  background: #e2f4fb;
  color: #11617d;
  font-size: 12px;
  font-weight: 700;
}

.topbar__badge--admin {
  background: #ece9ff;
  color: #49368f;
}

.content__body {
  margin-top: 18px;
}

.view-stack {
  display: grid;
  gap: 16px;
}

.hero-card,
.info-card {
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-soft);
  padding: 20px;
}

.hero-card h2,
.info-card h3 {
  margin: 0 0 8px;
}

.hero-card p,
.info-card p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.6;
}

.hero-card--seafarer {
  border-left: 4px solid var(--sea-500);
}

.hero-card--admin {
  border-left: 4px solid var(--admin-500);
}

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

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

.placeholder-line {
  margin-top: 14px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, #e8eff7, #dce7f4);
}

.placeholder-line--short {
  width: 65%;
}

.table-placeholder {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.table-placeholder__head {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 12px;
  background: #f4f8fc;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  color: #54687e;
}

.table-placeholder__row {
  height: 46px;
  border-top: 1px solid var(--line);
  background: linear-gradient(90deg, #ffffff 0%, #f8fbff 100%);
}

.auth-required-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.auth-card {
  width: min(520px, 100%);
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-soft);
  padding: 26px;
  text-align: center;
}

.auth-card h1 {
  margin: 0 0 10px;
}

.auth-card p {
  margin: 0 0 18px;
  color: var(--text-muted);
}

.page-state {
  color: var(--text-muted);
  font-weight: 600;
}

.page-state--soft {
  background: #f6f9fd;
  border: 1px dashed #c9d6e7;
  border-radius: 12px;
  padding: 14px;
}

.section-head {
  margin-bottom: 14px;
}

.section-head h3 {
  margin: 0 0 4px;
}

.section-head p {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
}

.section-head--inline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.section-head--tight {
  margin-bottom: 10px;
}

.alert {
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
}

.alert--success {
  background: var(--success-soft);
  color: #1f6f49;
  border: 1px solid #9ad7b7;
}

.alert--error {
  background: #ffe9e9;
  color: #9a2a2a;
  border: 1px solid #f0b6b6;
}

.profile-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr);
  gap: 16px;
}

.profile-form-card,
.vacancy-form-card,
.vacancy-list-card {
  overflow: hidden;
}

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

.field {
  display: grid;
  gap: 6px;
}

.field span {
  font-size: 13px;
  font-weight: 700;
  color: #334a63;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid #c9d7e8;
  border-radius: 10px;
  background: #fff;
  min-height: 42px;
  padding: 10px 12px;
  font: inherit;
  color: var(--text-main);
}

.field textarea {
  min-height: 100px;
  resize: vertical;
}

.summary-preview {
  background: #f5f9fe;
  color: #4d6178;
}

.note-preview {
  background: #fff8eb;
  border: 1px solid #f0d9a8;
  border-radius: 10px;
  color: #7a5a19;
  font-size: 13px;
  line-height: 1.5;
  padding: 10px 12px;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 0;
  border-color: #84b8dc;
  box-shadow: 0 0 0 3px rgba(17, 138, 178, 0.12);
}

.field--full {
  grid-column: 1 / -1;
}

.field--toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: #f8fbff;
  border: 1px solid #d3deeb;
  border-radius: 10px;
}

.field--toggle input {
  width: 16px;
  height: 16px;
  min-height: auto;
  padding: 0;
}

.field--toggle span {
  margin: 0;
}

.vessel-selector {
  margin-top: 16px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.tag {
  background: #e7f5fb;
  color: #155f7a;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
}

.chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #c8d6e8;
  border-radius: 999px;
  padding: 7px 11px;
  background: #f8fbff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}

.chip input {
  margin: 0;
}

.chip--active {
  border-color: #86bde1;
  background: #e8f5ff;
}

.form-actions {
  margin-top: 16px;
}

.btn--action,
.btn--action-secondary {
  height: 42px;
  border-radius: 10px;
  border: 1px solid transparent;
  padding: 0 16px;
}

.btn--action {
  background: var(--sea-500);
  color: #fff;
}

.btn--action:hover {
  background: #0e7aa0;
}

.btn--action:disabled {
  background: #9dc4d4;
  cursor: not-allowed;
}

.btn--action-secondary {
  background: #ecf2fd;
  border-color: #ccd9ec;
  color: #2e4867;
}

.btn--action-secondary:hover {
  background: #e0ebfa;
}

.muted-list {
  margin-top: 12px;
  display: grid;
  gap: 8px;
  color: var(--text-muted);
  font-size: 14px;
}

.admin-vacancies-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 16px;
}

.vacancy-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.vacancy-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 620px;
}

.vacancy-table th {
  text-align: left;
  font-size: 12px;
  color: #4f6780;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: #f5f9fe;
  padding: 10px;
  border-bottom: 1px solid var(--line);
}

.vacancy-table td {
  padding: 11px 10px;
  border-bottom: 1px solid #e7eef8;
  font-size: 14px;
}

.vacancy-table tbody tr {
  cursor: pointer;
}

.vacancy-table tbody tr:hover {
  background: #f8fbff;
}

.vacancy-table tbody tr.is-selected {
  background: #e9f4ff;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 8px;
}

.status-chip--on {
  background: #dcf6e9;
  color: #1f6f49;
}

.status-chip--off {
  background: #f3edf8;
  color: #66517d;
}

@media (max-width: 1024px) {
  .app-shell {
    grid-template-columns: 86px 1fr;
  }

  .brand__title,
  .brand__subtitle,
  .user-mail,
  .nav__item {
    display: none;
  }

  .nav {
    gap: 12px;
  }

  .nav__item.router-link-active,
  .nav__item {
    display: block;
    height: 38px;
  }
}

@media (max-width: 760px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding: 16px;
  }

  .nav,
  .sidebar__footer {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 12px;
  }

  .nav__item {
    display: inline-flex;
  }

  .content {
    padding: 16px;
  }

  .profile-grid,
  .admin-vacancies-grid {
    grid-template-columns: 1fr;
  }

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

  .section-head--inline {
    align-items: flex-start;
    flex-direction: column;
  }

  .grid-cards,
  .grid-cards--two {
    grid-template-columns: 1fr;
  }
}
