* {
  box-sizing: border-box;
}

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

body {
  --form-control-height: 50px;
  --form-control-radius: 16px;
  --form-control-padding-x: 14px;
  --form-control-padding-y: 11px;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top, #eef6ff 0, #f8fbff 34%, #f5f7fb 60%),
    linear-gradient(180deg, #f8fbff 0, #f3f6fb 100%);
  color: #17212b;
  overflow-x: hidden;
}

a {
  color: inherit;
}

.app-shell {
  max-width: 1040px;
  margin: 0 auto;
  padding: 12px;
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding: 2px 2px 0;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  width: 58px;
  height: 58px;
  flex: 0 0 auto;
  border-radius: 18px;
}

.brand-text {
  display: grid;
  gap: 3px;
}

.brand-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: #0c3559;
  letter-spacing: -0.02em;
}

.brand-sub {
  font-size: 0.9rem;
  color: #5c6b7b;
}

.user-chip {
  padding: 9px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid #d8e2ee;
  backdrop-filter: blur(10px);
  font-size: 0.92rem;
}

.header-meta {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.header-language-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border-radius: 999px;
  border: 1px solid #d8e2ee;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(10px);
}

.header-language-switch__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  min-height: 34px;
  padding: 6px 10px;
  border-radius: 999px;
  text-decoration: none;
  color: #5a6f84;
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.header-language-switch__link.is-active {
  background: #e9f4ff;
  color: #0e4f82;
  box-shadow: inset 0 0 0 1px #c8ddf3;
}

.header-user-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.header-logout-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid #d4dce6;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 20px rgba(16, 42, 67, 0.04);
  text-decoration: none;
  color: #153d63;
}

.header-logout-pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 22px rgba(16, 42, 67, 0.08);
}

.app-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.app-nav--desktop {
  display: flex;
}

.app-nav--mobile {
  display: none;
  margin: 10px 0 0;
}

.mobile-nav {
  display: none;
  margin-bottom: 12px;
  border: 1px solid #dbe4ee;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 26px rgba(16, 42, 67, 0.05);
  overflow: hidden;
}

.mobile-nav summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  cursor: pointer;
  font-weight: 700;
  color: #153d63;
  list-style: none;
}

.mobile-nav summary::-webkit-details-marker {
  display: none;
}

.mobile-nav summary::after {
  content: "▾";
  font-size: 0.9rem;
  color: #5a7391;
}

.mobile-nav[open] summary::after {
  content: "▴";
}

.nav-link,
.button,
button,
input,
select,
textarea {
  font: inherit;
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    background-color 0.18s ease,
    transform 0.18s ease;
}

.nav-link,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid #d4dce6;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 20px rgba(16, 42, 67, 0.04);
  text-decoration: none;
}

.nav-link:hover,
.button:hover,
button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 22px rgba(16, 42, 67, 0.08);
}

.nav-link.is-active,
.button.is-primary,
button.is-primary {
  border-color: #2c74b4;
  background: #e9f4ff;
  color: #0e4f82;
}

.nav-link.is-admin {
  border-color: #163b63;
  background: #163b63;
  color: #ffffff;
}

.nav-link.is-admin:hover,
.nav-link.is-admin.is-active {
  border-color: #102b48;
  background: #102b48;
  color: #ffffff;
}

.button.is-danger,
button.is-danger {
  border-color: #ebc1c1;
  background: #fff3f3;
  color: #8c2f2f;
}

.page-wrap {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.app-footer {
  margin: 10px 0 12px;
  padding: 14px 2px 0;
  border-top: 1px solid #dbe4ee;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.app-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
}

.app-footer__link {
  display: inline;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: #4c6480;
  font-size: 0.92rem;
  text-decoration: none;
}

.app-footer__link:hover {
  color: #0e4f82;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.app-footer__copy {
  color: #5f6f80;
  font-size: 0.92rem;
}

.app-store-badge-link {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 110px;
}

.app-store-badge-link--footer {
  max-width: 90px;
}

.app-store-badge-image {
  display: block;
  width: 100%;
  height: auto;
}

.member-footer-nav {
  display: none;
}

.card {
  background: #ffffff;
  border: 1px solid #dbe4ee;
  border-radius: 20px;
  padding: 18px;
  box-shadow: 0 18px 38px rgba(16, 42, 67, 0.07);
  min-width: 0;
}

.hero-card {
  background: linear-gradient(135deg, #ffffff 0%, #f4f9ff 52%, #eaf3ff 100%);
  border-color: #cadef1;
}

.hero-card--dashboard {
  background: linear-gradient(135deg, #ffffff 0%, #f2f8ff 38%, #edf5ff 100%);
}

.legal-card {
  max-width: 720px;
}

.legal-copy {
  display: grid;
  gap: 14px;
}

.legal-copy h2 {
  margin: 0;
  font-size: 1rem;
  color: #153d63;
}

.legal-copy ul {
  margin: 0;
  padding-left: 18px;
  color: #17212b;
  line-height: 1.6;
}

.legal-copy li {
  margin-bottom: 6px;
}

.legal-card p {
  margin: 0 0 12px;
  line-height: 1.6;
}

.legal-card p:last-child {
  margin-bottom: 0;
}

.legal-eyebrow {
  margin-bottom: 8px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #4672a1;
}

.legal-contact-link {
  font-weight: 800;
  color: #0e4f82;
  text-decoration: none;
}

.legal-contact-link:hover {
  text-decoration: underline;
}

.legal-meta {
  display: grid;
  gap: 4px;
  color: #24384c;
  line-height: 1.6;
}

.contact-summary {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.contact-summary__item {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid #dbe4ee;
  border-radius: 16px;
  background: linear-gradient(135deg, #ffffff 0%, #f6faff 100%);
}

.contact-summary__label {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #5b7390;
}

.contact-divider {
  height: 1px;
  margin: 22px 0 20px;
  background: linear-gradient(90deg, rgba(201, 216, 232, 0), rgba(201, 216, 232, 1), rgba(201, 216, 232, 0));
}

.contact-form {
  gap: 16px;
}

.contact-form .button,
.contact-form button {
  width: auto;
  justify-self: start;
  min-width: 190px;
}

.contact-honeypot {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

@media (min-width: 700px) {
  .contact-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.landing-shell {
  display: grid;
  gap: 14px;
}

.landing-hero {
  display: grid;
  gap: 20px;
  align-items: center;
  background:
    radial-gradient(circle at top right, rgba(120, 171, 232, 0.22), transparent 34%),
    linear-gradient(135deg, #ffffff 0%, #f3f8ff 48%, #e7f1ff 100%);
  border-color: #cfe0f1;
  overflow: hidden;
}

.landing-hero__copy {
  display: grid;
  gap: 14px;
}

.landing-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  max-width: 100%;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid #cfe0f1;
  color: #23527f;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.landing-hero h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.6rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
  color: #0c3559;
  max-width: 10ch;
}

.landing-lead {
  max-width: 56ch;
  font-size: 1.03rem;
}

.landing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.landing-actions .button {
  width: auto;
  min-width: 150px;
}

.landing-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.landing-hero__visual {
  display: flex;
  justify-content: center;
}

.landing-phone-stack {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 220px));
  gap: 16px;
  align-items: end;
}

.landing-phone-card {
  padding: 12px;
  border-radius: 30px;
  border: 1px solid #c9dcef;
  background: linear-gradient(180deg, #17324a 0%, #102739 100%);
  box-shadow: 0 22px 50px rgba(13, 33, 55, 0.2);
}

.landing-phone-card--primary {
  transform: rotate(-5deg);
}

.landing-phone-card--accent {
  transform: rotate(6deg) translateY(28px);
}

.landing-phone-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  padding: 0 4px;
  color: #d9e8f7;
  font-size: 0.8rem;
  font-weight: 700;
}

.landing-phone-bar small {
  font-size: 0.72rem;
  color: #95aec8;
}

.landing-phone-screen {
  aspect-ratio: 9 / 19.5;
  border-radius: 22px;
  padding: 0;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.02)),
    linear-gradient(180deg, #f7fbff 0%, #e9f2fb 100%);
}

.landing-screenshot {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.landing-shot-placeholder {
  height: 100%;
  border-radius: 18px;
  border: 1px dashed #aac3de;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(234, 243, 255, 0.92)),
    repeating-linear-gradient(
      -45deg,
      rgba(115, 155, 199, 0.08),
      rgba(115, 155, 199, 0.08) 12px,
      rgba(255, 255, 255, 0.24) 12px,
      rgba(255, 255, 255, 0.24) 24px
    );
  display: grid;
  align-content: center;
  justify-items: center;
  text-align: center;
  gap: 6px;
  padding: 18px;
  color: #36577a;
}

.landing-shot-placeholder strong {
  font-size: 1rem;
}

.landing-shot-placeholder span {
  font-size: 0.84rem;
  color: #5c7390;
}

.landing-stat-grid,
.landing-feature-grid,
.landing-story-grid,
.landing-gallery {
  display: grid;
  gap: 12px;
}

.landing-stat-card {
  display: grid;
  gap: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #f5f9ff 100%);
}

.landing-stat-card strong {
  font-size: 1.2rem;
  color: #163b63;
}

.landing-stat-card span {
  color: #4f6275;
  line-height: 1.55;
}

.landing-feature-card {
  padding: 16px;
  border: 1px solid #d7e4f1;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.landing-feature-kicker {
  margin-bottom: 10px;
  color: #5b7da3;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.landing-feature-card h3,
.landing-story-step h3,
.landing-cta-card h2 {
  margin: 0 0 8px;
}

.landing-feature-card p,
.landing-story-step p {
  margin: 0;
  line-height: 1.6;
  color: #516578;
}

.landing-story-card {
  background:
    radial-gradient(circle at top left, rgba(103, 154, 215, 0.14), transparent 28%),
    linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
}

.landing-story-step {
  position: relative;
  padding: 16px 16px 16px 68px;
  border-radius: 18px;
  border: 1px solid #d9e5f2;
  background: rgba(255, 255, 255, 0.88);
}

.landing-story-number {
  position: absolute;
  left: 16px;
  top: 16px;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: #e8f2ff;
  color: #0f4d82;
  font-weight: 800;
}

.landing-gallery-card {
  display: grid;
  gap: 12px;
  padding: 10px;
  border-radius: 20px;
  border: 1px solid #d6e2ef;
  background: linear-gradient(180deg, #ffffff 0%, #f5f9ff 100%);
}

.landing-gallery-frame {
  aspect-ratio: 10 / 7;
  border-radius: 16px;
  overflow: hidden;
  background: #edf4fb;
}

.landing-gallery-screenshot {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.landing-gallery-copy {
  display: grid;
  gap: 4px;
  padding: 0 4px 2px;
}

.landing-gallery-copy strong {
  font-size: 1rem;
  color: #163b63;
}

.landing-gallery-copy span {
  color: #566b80;
  line-height: 1.55;
}

.landing-cta-card {
  display: grid;
  gap: 16px;
  align-items: center;
  background:
    radial-gradient(circle at bottom right, rgba(118, 167, 226, 0.18), transparent 28%),
    linear-gradient(135deg, #ffffff 0%, #eef5ff 52%, #e8f2ff 100%);
}

.hero-eyebrow {
  margin-bottom: 8px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #4672a1;
}

.hero-actions {
  align-items: flex-start;
}

.card h1,
.card h2,
.card h3 {
  margin: 0 0 10px;
}

.muted {
  color: #5f6f80;
  font-size: 0.95rem;
  line-height: 1.45;
}

.flash {
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 0.96rem;
}

.flash--success {
  background: #e9f8ec;
  color: #1d6a2d;
  border: 1px solid #b8debf;
}

.flash--error {
  background: #fff1f1;
  color: #9c3131;
  border: 1px solid #edc3c3;
}

.flash--info {
  background: #eef5ff;
  color: #24517c;
  border: 1px solid #c8dcf1;
}

.auth-shell {
  max-width: 420px;
  margin: 4vh auto 0;
}

.auth-brand {
  display: grid;
  justify-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.auth-logo {
  width: 94px;
  height: 94px;
  border-radius: 28px;
}

.auth-logo-title {
  font-size: 1.28rem;
  font-weight: 800;
  color: #0c3559;
  letter-spacing: -0.02em;
}

.auth-helper-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-top: 16px;
}

.auth-helper-links a {
  color: #0e4f82;
  text-decoration: none;
  font-weight: 600;
}

.auth-helper-links a:hover {
  text-decoration: underline;
}

.auth-inline-note {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid #d6e5f4;
  background: #f5faff;
  color: #335777;
  line-height: 1.5;
}

.password-checklist {
  display: grid;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid #d6e5f4;
  background: #f7fbff;
}

.password-checklist__title {
  font-size: 0.92rem;
  font-weight: 700;
  color: #234d72;
}

.password-checklist__items {
  display: grid;
  gap: 8px;
}

.password-checklist__item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #56697c;
  font-size: 0.94rem;
}

.password-checklist__item::before {
  content: '○';
  color: #7d91a6;
  font-size: 0.9rem;
}

.password-checklist__item.is-valid {
  color: #1d6a2d;
}

.password-checklist__item.is-valid::before {
  content: '✓';
  color: #1d6a2d;
}

.password-checklist__item.is-invalid {
  color: #9c3131;
}

.password-checklist__item.is-invalid::before {
  content: '!';
  color: #9c3131;
}

.password-match-note {
  margin-top: 2px;
  color: #5f6f80;
  font-size: 0.92rem;
  line-height: 1.45;
}

.password-match-note.is-valid {
  color: #1d6a2d;
}

.password-match-note.is-invalid {
  color: #9c3131;
}

.form-grid {
  display: grid;
  gap: 12px;
}

.compact-grid {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.form-span-all {
  grid-column: 1 / -1;
}

.form-grid.columns-2,
.summary-grid,
.list-grid {
  grid-template-columns: 1fr;
}

.field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.signature-pad-wrap {
  width: 100%;
  min-height: 110px;
  border: 1px solid #c7d3df;
  border-radius: 14px;
  background: #ffffff;
  overflow: hidden;
}

.signature-pad-canvas {
  display: block;
  width: 100%;
  height: 110px;
  touch-action: none;
  cursor: crosshair;
}

.field.is-primary {
  padding: 12px;
  border-radius: 18px;
  background: linear-gradient(180deg, #f3f9ff 0%, #edf6ff 100%);
  border: 1px solid #c8def4;
}

.field.is-primary label {
  color: #0f4d82;
}

.field--compact input {
  text-align: center;
}

.field--date input {
  text-align: left;
}

.field--compact,
.field--compact input {
  min-width: 0;
}

.field--date input[type="date"],
.field--compact input[type="time"] {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  width: 100%;
  height: var(--form-control-height);
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}

.field--date input[type="date"]::-webkit-datetime-edit,
.field--compact input[type="time"]::-webkit-datetime-edit {
  padding: 0;
}

.field--date input[type="date"]::-webkit-datetime-edit-fields-wrapper,
.field--compact input[type="time"]::-webkit-datetime-edit-fields-wrapper {
  padding: 0;
  min-width: 0;
}

.field--date input[type="date"]::-webkit-date-and-time-value,
.field--compact input[type="time"]::-webkit-date-and-time-value {
  min-height: 1.15em;
}

label {
  font-size: 0.92rem;
  font-weight: 700;
}

input,
select,
textarea,
button {
  width: 100%;
  max-width: 100%;
  min-height: var(--form-control-height);
  padding: var(--form-control-padding-y) var(--form-control-padding-x);
  border: 1px solid #cad5e1;
  border-radius: var(--form-control-radius);
  background: #ffffff;
  color: #17212b;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]),
select {
  height: var(--form-control-height);
  line-height: 1.2;
}

input[type="date"],
input[type="time"] {
  letter-spacing: -0.01em;
}

select {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 42px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14' fill='none'%3E%3Cpath d='M3.25 5.5 7 9.25l3.75-3.75' stroke='%235a6f84' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 14px 14px;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #7aa7d2;
  box-shadow: 0 0 0 4px rgba(92, 152, 213, 0.14);
}

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

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  min-width: 0;
}

.inline-actions > * {
  width: auto;
}

.check-inline {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: #314659;
}

.check-inline input[type="checkbox"] {
  width: 18px;
  min-height: 18px;
  height: 18px;
  margin: 0;
  padding: 0;
}

.check-inline--primary {
  align-items: flex-start;
}

.check-inline--primary span {
  display: grid;
  gap: 4px;
}

.check-inline--primary strong {
  color: #153d63;
}

.check-inline--primary small {
  font-size: 0.82rem;
  line-height: 1.35;
  color: #5f6f80;
}

.summary-grid {
  display: grid;
  gap: 12px;
}

.list-grid {
  display: grid;
  gap: 16px;
}

.filter-grid {
  display: grid;
  gap: 12px;
}

.export-filter-form,
.export-filter-grid,
.export-download-grid,
.export-stats-grid {
  min-width: 0;
}

.export-filter-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
}

.export-filter-grid .field,
.export-filter-grid input,
.export-filter-grid select {
  min-width: 0;
}

.export-filter-grid__remarks {
  grid-column: 1 / -1;
}

.export-download-grid {
  margin-top: 8px;
}

.export-stats-grid {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.summary-box {
  padding: 14px;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #eef5ff 100%);
  border: 1px solid #d4e1ef;
}

.summary-box strong {
  display: block;
  font-size: 1.45rem;
  margin-bottom: 4px;
}

.summary-box small {
  display: block;
  margin-top: 4px;
  font-size: 0.78rem;
}

.sync-card {
  border-color: #d9e6f4;
}

.sync-card[data-state="info"] {
  background: linear-gradient(180deg, #fafdff 0%, #f0f7ff 100%);
}

.sync-card[data-state="warning"] {
  background: linear-gradient(180deg, #fffdf8 0%, #fff6e8 100%);
  border-color: #f0d8a6;
}

.sync-card[data-state="success"] {
  background: linear-gradient(180deg, #fbfffc 0%, #eefaf1 100%);
  border-color: #c6e5cd;
}

.section-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
}

.section-title--compact {
  margin-bottom: 12px;
}

.pagination-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.entry-list {
  display: grid;
  gap: 10px;
}

.field--toggle {
  padding-top: 14px;
  padding-bottom: 14px;
}

.checkbox-field .toggle {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.95rem;
  color: #18324b;
}

.checkbox-field .toggle input {
  width: 18px;
  height: 18px;
  min-height: 18px;
  max-width: 18px;
  padding: 0;
  margin-top: 2px;
}

.preset-grid .field {
  align-content: start;
  min-height: 114px;
}

.preset-grid .field > label {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
}

.preset-grid .checkbox-field .toggle {
  min-height: var(--form-control-height);
  align-items: center;
  border: 1px solid #cad5e1;
  border-radius: var(--form-control-radius);
  background: #ffffff;
  padding: 0 14px;
}

.preset-grid .checkbox-field .toggle input {
  margin-top: 0;
}

.preset-grid-note {
  margin-top: -2px;
  margin-bottom: 2px;
}

.preset-list {
  display: grid;
  gap: 10px;
}

.preset-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid #d7e0ea;
  border-radius: 14px;
  background: #fbfdff;
}

.preset-row__main {
  display: grid;
  gap: 3px;
}

.preset-row__main strong {
  color: #17324c;
}

.preset-row__main span {
  color: #4f6478;
  font-size: 0.92rem;
}

.preset-row__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.preset-row__actions form {
  margin: 0;
}

.preset-row__actions button {
  width: auto;
}

.entry-row {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid #d7e0ea;
  border-radius: 16px;
  background: #fbfdff;
}

.entry-main {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.entry-select {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.86rem;
  color: #4c6480;
}

.entry-select input {
  width: 16px;
  height: 16px;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  max-width: 100%;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid #d4dce6;
  background: rgba(255, 255, 255, 0.92);
  font-size: 0.82rem;
  font-weight: 700;
  text-align: center;
  white-space: normal;
}

.pill.is-primary {
  background: #e9f4ff;
  border-color: #bfdaf5;
  color: #0f4d82;
}

.table-wrap {
  overflow: auto;
  border: 1px solid #d7e0ea;
  border-radius: 16px;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 920px;
  background: #ffffff;
}

th,
td {
  padding: 12px;
  border-bottom: 1px solid #e4ebf3;
  text-align: left;
  vertical-align: top;
}

th {
  background: #f3f7fb;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #5f6f80;
}

tr:last-child td {
  border-bottom: 0;
}

.hint {
  margin-top: 6px;
  font-size: 0.84rem;
  color: #5f6f80;
  overflow-wrap: anywhere;
}

.profile-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.soft-panel {
  margin-top: 8px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid #d9e6f4;
  background: linear-gradient(180deg, #fbfdff 0%, #f4f9ff 100%);
}

.field--airfield {
  position: relative;
}

.turnstile-box {
  margin-top: 6px;
}

.upload-box {
  padding: 14px;
  border: 1px dashed #bfd1e4;
  border-radius: 16px;
  background: #f8fbff;
}

.suggest-box {
  position: absolute;
  top: calc(100% - 2px);
  left: 0;
  right: 0;
  z-index: 30;
  display: grid;
  gap: 4px;
  padding: 6px;
  border-radius: 16px;
  border: 1px solid #cfe0f1;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 14px 30px rgba(16, 42, 67, 0.12);
  max-height: 220px;
  overflow: auto;
  backdrop-filter: blur(10px);
}

.suggest-box[hidden] {
  display: none;
}

.suggest-item {
  display: grid;
  gap: 2px;
  text-align: left;
  padding: 8px 10px;
  border-radius: 12px;
  border: 0;
  background: #ffffff;
  box-shadow: inset 0 0 0 1px #d8e5f2;
}

.suggest-item strong {
  font-size: 0.9rem;
  color: #153d63;
  overflow-wrap: anywhere;
}

.suggest-item span,
.suggest-empty {
  font-size: 0.78rem;
  color: #5f6f80;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.desktop-only {
  display: block;
}

.mobile-only {
  display: none;
}

.suggest-empty {
  padding: 8px 10px;
  border-radius: 12px;
  border: 0;
  background: #f8fbff;
}

.stack-list {
  display: grid;
  gap: 10px;
}

.queue-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid #d7e0ea;
  background: rgba(255, 255, 255, 0.9);
}

.queue-item strong {
  display: block;
  margin-bottom: 4px;
  color: #163754;
}

.queue-remove {
  width: auto;
  min-height: 38px;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid #d6dde8;
  background: #ffffff;
  box-shadow: none;
  white-space: nowrap;
}

.entry-actions {
  align-items: stretch;
}

.entry-actions form {
  margin: 0;
  flex: 0 0 auto;
}

.entry-actions form button {
  width: auto;
}

.edit-row-card {
  border: 1px solid #d7e0ea;
  border-radius: 16px;
  background: #fbfdff;
  padding: 12px 14px;
}

.edit-row-card summary {
  cursor: pointer;
  font-weight: 700;
  color: #17324a;
}

.edit-row-card[open] {
  background: #ffffff;
}

.preview-note {
  padding: 12px;
  border-radius: 14px;
  background: #fff8e7;
  border: 1px solid #f0d59a;
  color: #7a5a14;
}

@media (min-width: 720px) {
  .landing-hero {
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
    padding: 26px;
  }

  .landing-stat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .landing-story-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .landing-gallery {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .landing-cta-card {
    grid-template-columns: minmax(0, 1.1fr) auto;
  }

  .compact-grid--lead {
    grid-template-columns: minmax(180px, 0.8fr) minmax(0, 1.2fr);
  }

  .compact-grid--times {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .compact-grid--metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

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

  .export-filter-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

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

  .export-stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .summary-grid.summary-grid--profile {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

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

@media (max-width: 719px) {
  .app-shell {
    max-width: 100%;
    padding: 4px;
  }

  .app-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 10px;
    padding: 2px 2px 0;
  }

  .brand-link {
    gap: 10px;
  }

  .brand-mark {
    width: 50px;
    height: 50px;
    border-radius: 16px;
  }

  .brand-title {
    font-size: 1.22rem;
  }

  .brand-sub {
    font-size: 0.84rem;
  }

  .header-meta {
    width: 100%;
    justify-content: space-between;
  }

  .user-chip {
    width: 100%;
    border-radius: 14px;
    padding: 8px 11px;
  }

  .header-user-actions {
    width: 100%;
    display: grid;
    gap: 8px;
  }

  .header-logout-pill {
    width: 100%;
  }

  .app-nav--desktop {
    display: none;
  }

  .mobile-nav {
    display: block;
  }

  .mobile-nav[open] .app-nav--mobile {
    display: grid;
    grid-template-columns: 1fr;
  }

  .nav-link,
  .button,
  .inline-actions > * {
    width: 100%;
  }

  .card {
    padding: 10px;
    border-radius: 16px;
    box-shadow: 0 12px 26px rgba(16, 42, 67, 0.06);
  }

  .auth-logo {
    width: 82px;
    height: 82px;
    border-radius: 24px;
  }

  .hero-card {
    padding: 12px;
  }

  .card h1 {
    font-size: 1.3rem;
  }

  .card h2 {
    font-size: 1.02rem;
  }

  .form-grid {
    gap: 10px;
  }

  .compact-grid {
    gap: 8px;
  }

  .compact-grid--lead {
    grid-template-columns: 1fr;
  }

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

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

  .page-wrap {
    gap: 10px;
  }

  .landing-hero h1 {
    max-width: none;
    font-size: 2.2rem;
  }

  .landing-actions .button {
    width: 100%;
  }

  .app-store-badge-link {
    max-width: 100px;
  }

  .landing-phone-stack {
    grid-template-columns: 1fr;
    width: 100%;
    max-width: 280px;
  }

  .landing-phone-card--primary,
  .landing-phone-card--accent {
    transform: none;
  }

  .landing-phone-card--accent {
    margin-top: -4px;
  }

  .app-footer {
    margin: 12px 0 8px;
    padding: 12px 0 0;
  }

  .app-footer__links {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
  }

  .app-footer__link {
    width: auto;
  }

  .app-footer__copy {
    width: 100%;
  }

  .app-store-badge-link--footer {
    max-width: 85px;
  }

  .is-authenticated .page-wrap {
    padding-bottom: 92px;
  }

  .is-authenticated .app-footer {
    padding-bottom: 88px;
  }

  .member-footer-nav {
    position: fixed;
    left: 50%;
    bottom: 12px;
    transform: translateX(-50%);
    z-index: 30;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    width: min(380px, calc(100vw - 16px));
    padding: 8px;
    border-radius: 28px;
    border: 1px solid rgba(214, 220, 230, 0.95);
    background: rgba(255, 255, 255, 0.96);
    box-shadow:
      0 18px 38px rgba(16, 42, 67, 0.16),
      inset 0 1px 0 rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(16px);
  }

  .member-footer-link {
    display: grid;
    justify-items: center;
    gap: 6px;
    padding: 10px 8px 9px;
    border-radius: 22px;
    color: #1a2230;
    text-decoration: none;
  }

  .member-footer-link.is-active {
    background: #eceef5;
    color: #0e4f82;
  }

  .member-footer-link__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    color: currentColor;
  }

  .member-footer-link.is-active .member-footer-link__icon {
    background: rgba(14, 79, 130, 0.14);
  }

  .member-footer-link__icon svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .member-footer-link__label {
    font-size: 0.84rem;
    font-weight: 700;
    line-height: 1.05;
  }

  .field.is-primary {
    padding: 10px;
    border-radius: 16px;
  }

  .field--compact {
    padding: 8px;
    border-radius: 14px;
  }

  .field--toggle {
    padding: 10px;
  }

  .preset-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .preset-grid .field {
    min-height: 0;
  }

  .field--compact label {
    font-size: 0.84rem;
  }

  body {
    --form-control-height: 46px;
    --form-control-radius: 14px;
    --form-control-padding-x: 12px;
    --form-control-padding-y: 10px;
  }

  .soft-panel {
    padding: 10px;
    border-radius: 16px;
  }

  .field--compact input[type="date"],
  .field--compact input[type="time"] {
    min-height: var(--form-control-height);
    height: var(--form-control-height);
    padding: var(--form-control-padding-y) var(--form-control-padding-x);
  }

  .field--date input[type="date"] {
    font-size: 0.94rem;
    letter-spacing: -0.02em;
  }

  .field--compact input[type="time"] {
    font-size: 0.88rem;
    letter-spacing: -0.01em;
    text-align: left;
  }

  .suggest-item,
  .suggest-empty,
  .upload-box,
  .summary-box,
  .entry-row,
  .queue-item {
    padding: 10px;
  }

  .export-filter-grid,
  .export-stats-grid {
    gap: 10px;
  }

  .suggest-box {
    top: calc(100% - 1px);
    padding: 5px;
    border-radius: 14px;
    max-height: 190px;
  }

  .queue-item {
    flex-direction: column;
  }

  .queue-remove {
    width: 100%;
  }

  .entry-actions form {
    width: 100%;
  }

  .entry-actions form button {
    width: 100%;
  }

  .desktop-only {
    display: none !important;
  }

  .mobile-only {
    display: block !important;
  }

  .entry-main {
    flex-direction: column;
    align-items: flex-start;
  }

  table {
    min-width: 560px;
  }
}
