:root {
  --bg: #ffffff;
  --panel: #ffffff;
  --panel-strong: #ffffff;
  --text: #545454;
  --muted: #7a7a7a;
  --border: #ececec;
  --accent: #0d5eaf;
  --accent-dark: #0a4d8f;
  --accent-soft: #eaf2fb;
  --accent-soft-border: #cfe0f4;
  --ok-bg: #f7fbff;
  --ok-text: #0d5eaf;
  --ok-border: #d8e7f7;
  --danger: #a56a5b;
  --shadow: 0 10px 26px rgba(0, 0, 0, 0.06);
  --sky-soft: #f5f9fd;
  --sky-strong: #edf4fb;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", sans-serif;
  color: var(--text);
  background: #ffffff;
  min-height: 100vh;
}

.app-loading #loginScreen,
.app-loading #appScreen {
  visibility: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: #0d5eaf;
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  font-weight: 400;
  letter-spacing: 0.01em;
}

.field-label {
  color: #0d5eaf;
}

a {
  color: inherit;
}

a.btn,
a.btn-secondary,
a.btn-ghost-action,
.module-tile {
  text-decoration: none;
}

.page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px;
}

.hero {
  position: relative;
  display: grid;
  gap: 18px;
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 28px;
  background: url("../../storage/img/destkop/header.jpg") center center / cover no-repeat;
  color: #fffdfa;
  box-shadow: var(--shadow);
  min-height: 264px;
  overflow: hidden;
}

.hero-head {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 18px;
  position: relative;
  z-index: 1;
}

.hero-actions {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 10px;
  margin-left: auto;
  padding-left: 24px;
}

.hero-meta {
  display: none;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 251, 0.82);
  border: 1px solid rgba(232, 225, 214, 0.92);
  color: #0d5eaf;
  font-size: 14px;
  font-weight: 700;
}

.hero-pill.is-confirmed {
  background: rgba(249, 246, 240, 0.96);
  color: var(--ok-text);
}

.hero h1,
.hero h2,
.card h2,
.card h3,
.section-header h2 {
  margin: 0;
}

.layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 20px;
  margin-top: 20px;
}

.sidebar,
.card,
.login-card {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.sidebar,
.card {
  padding: 20px;
}

.admin-layout {
  align-items: start;
}

.admin-sidebar {
  align-self: start;
  height: auto;
}

.admin-sidebar .actions {
  padding-top: 0;
}

.admin-groups {
  align-content: start;
  gap: 12px;
}

.admin-content {
  align-content: start;
}

.login-wrap {
  min-height: 100vh;
  min-height: 100svh;
  min-height: 540px;
  padding: 0;
  background: #fffefd;
}

.login-card {
  width: min(100%, 460px);
  padding: 28px;
  position: relative;
  z-index: 1;
  background: rgba(255, 255, 252, 0.92);
  border: 1px solid rgba(241, 234, 225, 0.9);
  backdrop-filter: blur(18px);
}

.login-card h1 {
  margin-top: 0;
}

.guest-login-page .login-card {
  width: 270px;
  min-height: calc(100vh - 120px);
  min-height: 420px;
  padding: 92px 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
  display: grid;
  grid-template-rows: auto 1fr;
  justify-items: center;
  align-items: start;
  gap: 0;
}

.login-shell {
  min-height: 100vh;
  min-height: 100svh;
  min-height: 540px;
  display: grid;
  grid-template-columns: 31vw 69vw;
}

.login-visual {
  width: 31vw;
  height: 100vh;
  height: 100svh;
  min-height: 540px;
  overflow: hidden;
}

.login-visual img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.login-panel {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 0 24px;
  background: #fffefd;
}

.login-brand {
  width: 312px;
  margin-bottom: 0;
}

.login-brand img {
  display: block;
  width: 100%;
  height: auto;
}

.login-content {
  width: 100%;
  display: grid;
  align-content: center;
  justify-items: center;
  align-self: center;
  gap: 0;
}

.login-copy {
  width: 100%;
  margin: 0 0 42px;
  color: var(--text);
  text-align: center;
}

.login-copy p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
}

.login-copy p + p {
  margin-top: 14px;
}

.login-copy strong {
  color: #0d5eaf;
  font-weight: 700;
}

.login-form {
  width: 100%;
  justify-items: center;
  gap: 14px;
  margin-top: 0;
}

.login-field,
.login-submit {
  width: 100%;
}

.login-field {
  height: 46px;
  min-height: 46px;
  padding: 10px 18px;
  border-radius: 5px;
  border: 2px solid #d8e7f7;
  background: #fffefd;
  color: #0d5eaf;
  text-align: center;
  font-size: 17px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.login-field::placeholder {
  color: #9eb8d5;
  opacity: 1;
}

.login-field:focus {
  outline: none;
  border-color: #0d5eaf;
  box-shadow: 0 0 0 3px rgba(13, 94, 175, 0.12);
}

.guest-login-page .login-submit {
  min-height: 47px;
  height: 47px;
  border-radius: 4px;
  background: #0d5eaf;
  color: #fffdfa;
  font-size: 19px;
  font-weight: 700;
  text-transform: uppercase;
  box-shadow: none;
}

.guest-login-page .login-submit:hover {
  background: #0a4d8f;
}

#loginError {
  width: 100%;
}

.stack {
  display: grid;
  gap: 18px;
}

.dashboard-stack {
  gap: 14px;
}

.muted {
  color: var(--muted);
}

.field,
.textarea,
.select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fffefd;
  font: inherit;
  color: var(--text);
}

.field:focus,
.textarea:focus,
.select:focus {
  outline: none;
  border-color: #0d5eaf;
  box-shadow: 0 0 0 4px rgba(13, 94, 175, 0.1);
}

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

.field-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

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

.btn {
  border: 0;
  border-radius: 14px;
  padding: 12px 16px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s ease;
}

.btn:focus,
.btn:focus-visible {
  outline: none;
  box-shadow: none;
}

.btn-primary {
  background: var(--accent);
  color: #fffdfa;
  box-shadow: none;
}

.btn-primary:hover {
  background: var(--accent-dark);
}

.btn-secondary {
  background: rgba(255, 255, 252, 0.96);
  color: #0d5eaf;
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: #fffefd;
  border-color: var(--border);
}

.btn-logout,
.btn-ghost-action {
  padding: 8px 12px;
  font-size: 13px;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  vertical-align: middle;
  align-self: flex-start;
}

.btn-danger {
  background: #fff0f0;
  color: var(--danger);
  border: 1px solid #efc6c6;
}

.section-card {
  border: 0;
  border-radius: 22px;
  background: var(--panel-strong);
  padding: 18px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.05);
}

.section-card > .actions,
.section-card form + .actions,
.person-card + .actions {
  margin-top: 18px;
}

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

.module-tile {
  display: grid;
  grid-template-rows: auto auto;
  align-content: center;
  justify-items: center;
  text-align: center;
  text-decoration: none;
  border: 0;
  border-radius: 22px;
  background: var(--panel-strong);
  padding: 20px 16px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  min-height: 140px;
}

.module-tile:focus,
.module-tile:focus-visible {
  outline: none;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.08);
}

.module-tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.08);
}

.module-tile h3 {
  margin: 0;
}

.module-icon {
  width: 52px;
  height: 52px;
  display: inline-grid;
  place-items: center;
  margin-bottom: 12px;
  border-radius: 0;
  background: transparent;
}

.module-icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: brightness(0) saturate(100%) invert(31%) sepia(0%) saturate(0%) hue-rotate(170deg) brightness(94%) contrast(90%);
}

.module-copy {
  display: grid;
  align-content: center;
  justify-items: center;
}

.tile-status {
  display: none !important;
}

.tile-status.is-complete {
  display: none !important;
}

.tile-status.muted-status {
  display: none !important;
}

.section-card.is-complete {
  background: var(--ok-bg);
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  margin-bottom: 14px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 4px;
}

.status-badge {
  display: none !important;
}

.section-card.is-complete .status-badge {
  display: none !important;
}

.person-card,
.admin-group-item {
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.admin-group-item {
  display: block;
  width: 100%;
  min-height: 0;
  text-align: left;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
}

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

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
}

.notice,
.alert {
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 14px;
}

.notice {
  background: transparent;
  border: 0;
  padding: 0;
  border-radius: 0;
}

.plain-note {
  color: var(--text);
  line-height: 1.65;
}

.detail-row {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.detail-row:first-child {
  padding-top: 0;
}

.detail-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.detail-value {
  margin-top: 4px;
  line-height: 1.6;
}

.details-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px 28px;
  align-items: start;
}

.details-grid .detail-row {
  padding: 0;
  border-bottom: 0;
}

.flight-layout {
  display: grid;
  gap: 28px;
}

.flight-group {
  display: grid;
  gap: 14px;
}

.detail-group-title {
  margin: 0;
}

.alert-error {
  background: #fff1f1;
  border: 1px solid #efc7c7;
  color: #963f3f;
}

.alert-success {
  background: #edf8f1;
  border: 1px solid #b8dfc4;
  color: #246a46;
}

.toolbar,
.hidden {
  display: none !important;
}

.divider {
  height: 1px;
  background: var(--border);
  margin: 8px 0;
}

.small {
  font-size: 13px;
}

@media (max-width: 960px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .login-shell {
    grid-template-columns: 31vw minmax(0, 1fr);
  }

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

}

@media (max-width: 768px) {
  .details-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 20px;
  }

  .hero-actions {
    margin-left: auto;
    padding-left: 16px;
    width: auto;
    justify-content: flex-end;
  }

  .btn-logout,
  .btn-ghost-action {
    margin-left: 0;
  }
}

@media (max-width: 768px) {
  .login-wrap {
    padding: 0;
    min-height: 100svh;
  }

  .login-shell {
    grid-template-columns: 1fr;
    min-height: 100vh;
    min-height: 100svh;
  }

  .login-visual {
    width: 100%;
    height: 10svh;
    min-height: 10svh;
  }

  .login-visual img {
    object-position: center top;
  }

  .login-panel {
    padding: 12px 24px 16px;
  }

  .guest-login-page .login-card {
    width: min(calc(100% - 48px), 320px);
    min-height: calc(68svh - 28px);
    gap: 0;
    padding: 16px 0 12px;
  }

  .login-brand {
    width: min(100%, 232px);
  }

  .login-copy {
    margin-bottom: 26px;
  }

  .login-copy p {
    font-size: 12.5px;
    line-height: 1.5;
  }

  .login-copy p + p {
    margin-top: 12px;
  }

  .login-field {
    min-height: 44px;
    height: 44px;
    font-size: 15px;
  }

  .guest-login-page .login-submit {
    min-height: 44px;
    height: 44px;
    font-size: 16px;
  }

  .page {
    padding: 16px;
  }

  .hero {
    padding: 20px;
    gap: 14px;
    border-radius: 22px;
    position: relative;
    min-height: 168px;
  }

  .hero-meta {
    padding-top: 2px;
    margin-top: auto;
  }

  .hero-pill {
    width: auto;
    max-width: 100%;
    justify-content: center;
    text-align: center;
    min-height: 40px;
    padding: 9px 12px;
    font-size: 13px;
  }

  .hero-actions {
    position: absolute;
    top: 20px;
    right: 20px;
    gap: 8px;
    padding-left: 0;
  }

  .btn-logout,
  .btn-ghost-action {
    min-height: 36px;
    padding: 8px 11px;
    font-size: 12px;
  }

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

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

  .module-tile {
    min-height: 0;
    padding: 16px;
  }

  .module-icon {
    width: 46px;
    height: 46px;
    margin-bottom: 12px;
    font-size: 22px;
  }

  .tile-status {
    margin-top: 12px;
    font-size: 12px;
  }

  .section-card,
  .card,
  .sidebar {
    padding: 16px;
    border-radius: 18px;
  }

  .actions {
    gap: 8px;
  }
}
