* {
  box-sizing: border-box;
}

:root {
  --brand: #f05a24;
  --brand-2: #8b8d8f;
  --brand-3: #3f4245;
  --ink: #26292c;
  --muted: #73777a;
  --line: #ded9d5;
  --soft: #f7f3f0;
  --panel: #ffffff;
  --danger: #b42318;
  --radius: 8px;
  --sidebar: 276px;
  --shadow-soft: 0 12px 30px rgba(51, 44, 39, 0.12);
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
}

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

body {
  background: #f6f4f2;
  color: var(--ink);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.language-switcher {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  min-height: 38px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.language-switcher select {
  min-height: 30px;
  border: 0;
  outline: none;
  background: transparent;
  color: inherit;
  font-weight: 800;
}

body[data-language="en"] {
  text-align: left;
}

body[data-language="en"] .login-panel {
  direction: ltr;
  text-align: left;
  border-inline-end: 0;
  border-inline-start: 4px solid rgba(240, 90, 36, 0.12);
}

body[data-language="en"] .login-panel input,
body[data-language="en"] .login-panel textarea {
  text-align: left;
}

#app {
  min-height: 100vh;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: clamp(18px, 4vw, 56px);
  background:
    radial-gradient(circle at 15% 18%, rgba(240, 90, 36, 0.14), transparent 28%),
    radial-gradient(circle at 82% 78%, rgba(139, 141, 143, 0.16), transparent 30%),
    linear-gradient(135deg, #fbfaf8 0%, #f0eeeb 100%);
}

.login-card {
  width: min(1058px, 100%);
  min-height: 700px;
  display: grid;
  grid-template-columns: minmax(360px, 0.92fr) minmax(420px, 1.08fr);
  direction: ltr;
  overflow: hidden;
  border: 1px solid #ddd8d4;
  border-radius: 32px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(48, 42, 38, 0.14);
}

.login-panel {
  direction: rtl;
  display: grid;
  align-content: start;
  gap: 20px;
  padding: 48px 38px;
  background: #fff;
  border-inline-end: 4px solid rgba(240, 90, 36, 0.12);
}

.login-panel h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 900;
  color: #2a2d30;
}

.login-panel .lead {
  margin: -8px 0 20px;
  color: #686c70;
  font-size: 17px;
}

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

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

.field label,
.section-label,
.checkbox-group > span {
  font-size: 13px;
  font-weight: 800;
  color: #17353d;
}

.field input,
.field select,
.field textarea,
.search-input {
  width: 100%;
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 11px 14px;
  outline: none;
  background: #fff;
  color: var(--ink);
}

.field textarea {
  min-height: 96px;
  resize: vertical;
  line-height: 1.7;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.search-input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(255, 91, 42, 0.12);
}

.field.is-disabled label {
  color: #8b989d;
}

.field input:disabled,
.field select:disabled,
.field textarea:disabled {
  background: #f3f6f6;
  color: #8b989d;
}

.field-help {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.password-field {
  position: relative;
}

.password-field input {
  padding-inline-end: 54px;
}

.ghost-icon {
  position: absolute;
  inset-inline-end: 8px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  border-radius: 10px;
  padding: 8px 10px;
  background: #edf5f4;
  color: #31555c;
  font-size: 12px;
}

.login-error {
  display: none;
  color: var(--danger);
  font-weight: 800;
  font-size: 13px;
}

.login-error.is-visible {
  display: block;
}

.demo-note {
  display: grid;
  gap: 10px;
  margin-top: 4px;
  color: #64777f;
  text-align: end;
  line-height: 1.45;
}

.demo-note strong {
  color: #61727a;
}

.demo-note span {
  direction: ltr;
  unicode-bidi: plaintext;
}

.login-visual {
  position: relative;
  direction: rtl;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 28px;
  overflow: hidden;
  padding: 40px 54px 46px;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.92) 0%, rgba(243, 240, 237, 0.96) 100%),
    radial-gradient(circle at 30% 22%, rgba(240, 90, 36, 0.16), transparent 34%);
  color: var(--ink);
}

.login-logo-frame {
  position: relative;
  z-index: 2;
  width: min(520px, 100%);
  min-height: 180px;
  display: grid;
  place-items: center;
  padding: 22px;
  margin-top: 6px;
  border: 1px solid rgba(139, 141, 143, 0.22);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 22px 55px rgba(59, 55, 52, 0.12);
}

.login-logo-frame img {
  width: 100%;
  max-height: 170px;
  object-fit: contain;
  display: block;
}

.mobile-app-icon {
  width: 66px;
  height: 66px;
  display: grid;
  place-items: center;
  margin-top: 0;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.mobile-app-icon span {
  width: 46px;
  height: 46px;
  display: block;
  border-radius: 13px;
  background:
    linear-gradient(145deg, transparent 38%, #fff 39% 48%, transparent 49%),
    linear-gradient(145deg, #ff4e1f, #ff8a3d);
  position: relative;
}

.mobile-app-icon span::before {
  content: "";
  position: absolute;
  inset: 11px 8px;
  border: 5px solid rgba(255, 255, 255, 0.9);
  border-left: 0;
  border-radius: 999px;
  transform: rotate(-25deg);
}

.login-copy {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 22px;
  max-width: 460px;
  margin-top: 12px;
  text-align: center;
}

.login-copy h2 {
  margin: 0;
  color: #4b4e51;
  font-size: clamp(42px, 6vw, 58px);
  letter-spacing: 0;
  font-weight: 900;
}

.login-copy p {
  margin: 0;
  color: #5f6367;
  font-size: 18px;
  line-height: 1.8;
}

.runway-mark {
  position: absolute;
  width: 720px;
  height: 360px;
  left: -205px;
  bottom: -82px;
  border: 42px solid rgba(240, 90, 36, 0.28);
  border-left-color: transparent;
  border-top-color: transparent;
  border-radius: 50%;
  transform: rotate(34deg);
}

.visual-footnote {
  position: absolute;
  right: 58px;
  bottom: 58px;
  z-index: 1;
  max-width: 420px;
  margin: 0;
  color: #6d7073;
  font-size: 17px;
  line-height: 1.9;
  text-align: right;
}

.download-strip {
  grid-column: 1 / -1;
  direction: rtl;
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 10px 18px;
  border-top: 1px solid #e4ded8;
  background: linear-gradient(90deg, #ffffff, #fbf7f4);
}

.download-copy {
  display: grid;
  gap: 4px;
}

.download-copy strong {
  color: #2d3033;
  font-size: 15px;
  font-weight: 900;
}

.download-copy span {
  color: var(--muted);
  font-size: 11px;
}

.store-badges,
.direct-install-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.store-badge {
  min-width: 128px;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  border-radius: 10px;
  background: #18191b;
  color: #fff;
  text-decoration: none;
  box-shadow: 0 8px 18px rgba(24, 25, 27, 0.14);
}

.store-badge span:last-child {
  display: grid;
  gap: 1px;
  direction: ltr;
  text-align: left;
  font-weight: 900;
  line-height: 1.05;
  font-size: 12px;
}

.store-badge small {
  color: rgba(255, 255, 255, 0.74);
  font-size: 8px;
  font-weight: 700;
}

.store-icon {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 8px;
}

.play-icon {
  background: linear-gradient(135deg, #21c063, #2f7df6);
  clip-path: polygon(18% 8%, 90% 50%, 18% 92%);
}

.apple-icon {
  background: #fff;
  position: relative;
}

.apple-icon::before {
  content: "";
  width: 12px;
  height: 14px;
  border-radius: 46% 46% 48% 48%;
  background: #18191b;
}

.direct-install-actions .btn {
  min-height: 34px;
  padding: 6px 10px;
  font-size: 12px;
  white-space: nowrap;
}

.btn {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 10px 16px;
  font-weight: 900;
  text-decoration: none;
  transition: 0.18s ease;
}

.btn-primary {
  background: linear-gradient(90deg, #ff5426, #ff8137);
  color: #fff;
}

.btn-primary:hover {
  filter: brightness(0.98);
  transform: translateY(-1px);
}

.btn-secondary {
  border-color: #dfd7d1;
  background: #f7f3f0;
  color: #4a4d50;
}

.btn-quiet {
  border-color: var(--line);
  background: #fff;
  color: #595d60;
}

.btn-danger {
  background: #fff1ed;
  border-color: #ffc7b7;
  color: var(--danger);
}

.btn-small {
  min-height: 36px;
  padding: 7px 11px;
  font-size: 13px;
}

.layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--sidebar) 1fr;
  background: #f6f4f2;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 18px;
  overflow-y: auto;
  padding: 22px 18px;
  background: linear-gradient(180deg, #3f4245 0%, #2b2d30 100%);
  color: #fff;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 78px;
  height: 52px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 12px;
  background: #fff;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-title {
  margin: 0;
  color: inherit;
  font-size: 18px;
  font-weight: 900;
}

.nav {
  display: grid;
  gap: 8px;
  align-content: start;
}

.nav button {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 9px 10px;
  background: transparent;
  color: rgba(255, 255, 255, 0.78);
  text-align: start;
  font-weight: 800;
}

.nav button.active,
.nav button:hover {
  background: rgba(240, 90, 36, 0.22);
  color: #fff;
}

.nav-icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: rgba(240, 90, 36, 0.28);
  color: #fff;
  font-size: 12px;
}

.sidebar-footer {
  display: grid;
  gap: 12px;
}

.current-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
}

.avatar {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-weight: 900;
}

.user-meta {
  display: grid;
  gap: 3px;
}

.user-meta span {
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
}

.main {
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 82px;
  padding: 16px 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
}

.topbar h1 {
  margin: 0;
  font-size: 26px;
}

.topbar p {
  margin: 5px 0 0;
  color: var(--muted);
}

.top-actions,
.form-actions,
.table-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.pnl-card-actions {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.pnl-upload-button {
  position: relative;
  overflow: hidden;
}

.pnl-upload-button input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.pnl-inline-check {
  min-height: 36px;
  padding: 7px 10px;
  font-size: 12px;
  background: #fff8f4;
  border-color: #ffd1bd;
}

.mobile-menu {
  display: none;
}

.content {
  padding: 24px 28px 42px;
}

.view {
  display: none;
}

.view.active {
  display: grid;
  gap: 18px;
}

.panel,
.trip-card,
.task-card,
.timeline-item,
.live-progress-row,
.metric-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.panel {
  padding: 18px;
  display: grid;
  gap: 16px;
}

.panel-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.panel-title {
  margin: 0;
  font-size: 20px;
}

.panel-subtitle {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

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

.metric-card {
  padding: 16px;
  display: grid;
  gap: 8px;
}

.metric-card span,
.metric-card small {
  color: var(--muted);
}

.metric-card strong {
  font-size: 30px;
  color: var(--brand-3);
}

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

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

.form-grid .full,
.full {
  grid-column: 1 / -1;
}

.operation-form-step {
  display: contents;
}

.mobile-wizard-header,
.mobile-step-actions {
  display: none;
}

.checkbox-row,
.permissions-grid,
.employees-grid,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.check-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 11px;
  background: #fff;
}

.check-pill input {
  width: 16px;
  height: 16px;
  accent-color: var(--brand);
}

.check-pill.is-disabled {
  opacity: 0.58;
  background: #f4f4f2;
}

.attachment-preview {
  display: none;
  min-height: 96px;
  border: 1px dashed #b8c9cd;
  border-radius: var(--radius);
  padding: 12px;
  background: #f7fbfb;
}

.attachment-preview.is-visible {
  display: grid;
  gap: 10px;
}

.attachment-preview img {
  width: min(240px, 100%);
  max-height: 170px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.attachment-preview iframe {
  width: 100%;
  height: 280px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.existing-file {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 11px;
  background: #f7faf9;
  color: var(--muted);
  font-size: 13px;
}

.filters-row {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) 180px 180px;
  gap: 10px;
  margin-bottom: 14px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

th,
td {
  padding: 10px;
  border-bottom: 1px solid var(--line);
  text-align: start;
  vertical-align: top;
}

th {
  color: #26464e;
  background: #f7fbfb;
  font-weight: 900;
}

.audit-delete-row td {
  border-block: 1px solid #ffd0bd;
  background: #fff1eb;
  color: #8d2700;
  font-weight: 900;
}

.user-card-grid,
.employee-card-grid,
.trip-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

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

.user-card,
.employee-card {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  background: #fff;
}

.user-card header,
.employee-card header,
.trip-card header,
.task-card header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
}

.user-card h3,
.employee-card h3,
.trip-card h3,
.task-card h3 {
  margin: 0;
  font-size: 16px;
}

.user-card p,
.employee-card p,
.trip-card p,
.task-card p {
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.tag {
  border-radius: 999px;
  padding: 4px 8px;
  background: #fff1eb;
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
}

.muted-tag {
  background: #f0f0ee;
  color: var(--muted);
}

.two-factor-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfefe;
}

.two-factor-card > span {
  color: var(--muted);
  font-size: 13px;
}

.two-factor-card strong,
.two-factor-card span,
.two-factor-card code {
  display: block;
}

.two-factor-card code {
  margin-top: 6px;
  color: var(--brand);
  font-size: 12px;
  overflow-wrap: anywhere;
  direction: ltr;
}

.two-factor-qr {
  width: 150px;
  height: 150px;
  display: grid;
  place-items: center;
  padding: 6px;
  border: 1px solid #dce8ea;
  border-radius: 10px;
  background: #fff;
}

.document-response {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid #ffe0d2;
  border-radius: 12px;
  background: #fff7f2;
  color: #553a30;
}

.document-complete-form {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.locked-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid #ffd5c4;
  border-radius: 12px;
  background: #fff8f4;
  color: #24383d;
}

.locked-panel > div:first-child {
  display: grid;
  gap: 5px;
}

.locked-panel strong {
  color: #123f46;
}

.change-summary {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #dce8ea;
  border-radius: 12px;
  background: #f5faf9;
}

.change-summary > strong {
  color: #123f46;
}

.change-summary > span {
  color: #5b6b70;
  font-size: 12px;
}

.change-summary-list {
  display: grid;
  gap: 8px;
}

.change-summary-list > div {
  display: grid;
  gap: 4px;
  padding: 9px;
  border: 1px solid #e4eef0;
  border-radius: 10px;
  background: #fff;
}

.change-summary-list small {
  color: #43545a;
}

.trip-card {
  padding: 15px;
  display: grid;
  gap: 12px;
}

.trip-card.is-sent {
  border-color: #ffd5c4;
}

.trip-meta {
  display: grid;
  gap: 7px;
  color: #3d4c50;
  font-size: 13px;
}

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

.status-ok {
  background: #e5f8f1;
  color: #08724f;
}

.status-wait {
  background: #fff4df;
  color: #9b5a00;
}

.status-info {
  background: #e8f2ff;
  color: #255db0;
}

.status-danger {
  background: #fff1ed;
  color: var(--danger);
}

.status-stack {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}

.progress-line {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
  gap: 6px;
  align-items: start;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fbfb;
}

.progress-step {
  display: grid;
  justify-items: center;
  gap: 5px;
  min-width: 0;
  color: var(--muted);
  text-align: center;
}

.progress-step span {
  width: 14px;
  height: 14px;
  border: 2px solid #b8c9cd;
  border-radius: 50%;
  background: #fff;
}

.progress-step.done span {
  border-color: var(--brand-2);
  background: var(--brand-2);
}

.progress-step.current small {
  color: var(--brand);
  font-weight: 900;
}

.progress-step small {
  font-size: 11px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.live-progress-list,
.timeline,
.task-list,
.role-list,
.extra-paper-list,
.passenger-exception-list {
  display: grid;
  gap: 12px;
}

.live-progress-row,
.timeline-item,
.task-card {
  padding: 13px;
}

.live-progress-row header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.timeline-item.is-unread,
.task-card.is-unread {
  border-color: #f0c078;
  background: #fff9ee;
}

.timeline-item strong {
  display: block;
  margin-bottom: 4px;
}

.timeline-item span {
  color: var(--muted);
  font-size: 13px;
}

.station-work-form,
.station-permission-panel {
  display: grid;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.station-permission-panel {
  border: 1px solid #ffd5c4;
  border-radius: var(--radius);
  padding: 12px;
  background: #fff8f4;
}

.station-section-title {
  color: var(--brand);
  font-weight: 900;
  font-size: 14px;
}

.paper-grid,
.station-times-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.paper-status {
  min-height: 48px;
  display: grid;
  grid-template-columns: 1fr 96px;
  gap: 8px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  background: #fff;
}

.paper-status span {
  font-weight: 900;
  color: #2d3d42;
  font-size: 13px;
}

.paper-toggle {
  min-height: 32px;
  border: 0;
  border-radius: 999px;
  font-weight: 900;
}

.paper-toggle.pending {
  background: #edf3f4;
  color: #60777d;
}

.paper-toggle.ok {
  background: #dff7ee;
  color: #08724f;
}

.paper-toggle.error {
  background: #fff1ed;
  color: var(--danger);
}

.station-extra-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff8f4;
}

.station-extra-header strong,
.station-extra-header span {
  display: block;
}

.station-extra-header span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.extra-paper-row,
.passenger-exception-row {
  display: grid;
  grid-template-columns: minmax(150px, 1.2fr) minmax(120px, 0.7fr) minmax(130px, 0.8fr) minmax(130px, 0.8fr) auto;
  gap: 10px;
  align-items: end;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  background: #fff;
}

.passenger-exception-row {
  grid-template-columns: minmax(160px, 1fr) minmax(180px, 1fr) auto;
}

.extra-paper-file {
  display: none;
  grid-column: 1 / -2;
}

.extra-paper-file.is-visible {
  display: grid;
}

.stepper-control {
  display: grid;
  grid-template-columns: 36px minmax(64px, 1fr) 36px;
  gap: 6px;
  align-items: center;
}

.stepper-control input {
  text-align: center;
}

.extra-status {
  grid-template-columns: 1fr 78px;
}

.role-row {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 13px;
}

.role-row header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.integration-guide,
.identity-preview {
  border: 1px dashed #ffc2aa;
  border-radius: var(--radius);
  padding: 12px;
  background: #fff8f4;
  color: #4a3c37;
  line-height: 1.8;
}

.identity-preview {
  display: flex;
  align-items: center;
  gap: 14px;
}

.settings-brand-mark {
  width: 136px;
  height: 92px;
  box-shadow: none;
}

.empty-state {
  min-height: 120px;
  display: grid;
  place-items: center;
  border: 1px dashed #cbdadd;
  border-radius: var(--radius);
  color: var(--muted);
  background: #fbfefe;
  text-align: center;
  padding: 18px;
}

.inline-empty {
  min-height: 64px;
  width: 100%;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 25;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(18, 25, 28, 0.46);
  backdrop-filter: blur(5px);
}

.attachment-dialog {
  width: min(760px, 100%);
  max-height: min(760px, calc(100vh - 44px));
  display: grid;
  gap: 16px;
  overflow: auto;
  padding: 20px;
  border: 1px solid #d7e0e1;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 28px 70px rgba(15, 25, 28, 0.22);
}

.attachment-dialog header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.attachment-dialog header span {
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
}

.attachment-dialog header h2 {
  margin: 4px 0;
  color: var(--ink);
  font-size: 26px;
}

.attachment-dialog header p {
  margin: 0;
  color: var(--muted);
}

.attachment-dialog-summary {
  display: grid;
  grid-template-columns: auto 1fr auto 1fr;
  gap: 8px 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid #ffe0d2;
  border-radius: 12px;
  background: #fff7f2;
}

.attachment-dialog-summary strong {
  color: var(--accent);
  font-size: 20px;
}

.attachment-dialog-summary span {
  color: #745c52;
  font-size: 13px;
  font-weight: 800;
}

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

.attachment-file-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfefe;
}

.attachment-file-meta {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.attachment-file-meta strong {
  color: var(--ink);
}

.attachment-file-meta span {
  overflow-wrap: anywhere;
  color: #2f4347;
  direction: ltr;
  text-align: right;
}

.attachment-file-meta small {
  color: var(--muted);
}

.toast {
  position: fixed;
  left: 24px;
  bottom: 24px;
  z-index: 30;
  max-width: min(420px, calc(100vw - 48px));
  padding: 12px 14px;
  border-radius: 12px;
  background: #0b343a;
  color: #fff;
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: 0.2s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1120px) {
  .metrics-grid,
  .trip-grid,
  .employee-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grid-2,
  .users-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .login-card {
    min-height: 0;
    grid-template-columns: 1fr;
    border-radius: 24px;
  }

  .login-visual {
    min-height: 440px;
    order: -1;
    padding: 36px 28px 120px;
  }

  .login-panel {
    padding: 32px 24px;
  }

  .download-strip {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
  }

  .download-copy {
    grid-row: 1 / span 2;
    min-width: 118px;
  }

  .store-badges,
  .direct-install-actions {
    justify-content: stretch;
  }

  .store-badge,
  .direct-install-actions .btn {
    flex: 1 1 124px;
  }

  .visual-footnote {
    right: 28px;
    bottom: 30px;
    left: 28px;
  }
}

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

  .sidebar {
    position: fixed;
    inset-block: 0;
    inset-inline-start: 0;
    width: min(var(--sidebar), 88vw);
    z-index: 20;
    transform: translateX(104%);
    transition: transform 0.2s ease;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .mobile-menu {
    display: inline-flex;
  }

  .topbar {
    padding: 12px 16px;
  }

  .content {
    padding: 18px 16px 30px;
  }

  .filters-row,
  .form-grid,
  .user-card-grid,
  .employee-card-grid,
  .extra-paper-row,
  .passenger-exception-row,
  .paper-grid,
  .station-times-grid {
    grid-template-columns: 1fr;
  }

  .extra-paper-file {
    grid-column: auto;
  }

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

@media (max-width: 720px) {
  #tripForm.form-grid {
    gap: 16px;
  }

  .mobile-wizard-header {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #f8fbfb;
  }

  .mobile-step-pill {
    min-height: 42px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    color: var(--muted);
    font-weight: 800;
    text-align: center;
    background: #fff;
  }

  .mobile-step-pill.is-active {
    color: #fff;
    background: var(--brand);
    box-shadow: var(--shadow-soft);
  }

  .operation-form-step {
    display: none;
    grid-column: 1 / -1;
  }

  .operation-form-step.is-active {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .mobile-step-actions {
    display: flex;
    justify-content: flex-end;
  }

  .mobile-step-actions .btn {
    width: 100%;
  }
}

@media (max-width: 620px) {
  .login-shell {
    padding: 10px;
  }

  .login-card {
    border-radius: 18px;
  }

  .login-copy h2 {
    font-size: 38px;
  }

  .download-strip {
    grid-template-columns: 1fr;
    gap: 7px;
    padding: 8px;
  }

  .download-copy {
    grid-row: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .download-copy span {
    display: none;
  }

  .store-badge {
    flex: 1 1 124px;
  }

  .direct-install-actions .btn {
    flex: 1 1 88px;
  }

  .modal-backdrop {
    padding: 10px;
  }

  .attachment-dialog {
    max-height: calc(100vh - 20px);
    padding: 14px;
    border-radius: 12px;
  }

  .attachment-dialog header,
  .attachment-file-card {
    grid-template-columns: 1fr;
  }

  .attachment-dialog header {
    display: grid;
  }

  .attachment-dialog-summary {
    grid-template-columns: auto 1fr;
  }

  .metrics-grid,
  .trip-grid {
    grid-template-columns: 1fr;
  }

  .topbar,
  .panel-header,
  .trip-card header,
  .task-card header,
  .live-progress-row header {
    align-items: stretch;
    flex-direction: column;
  }

  .top-actions,
  .form-actions,
  .table-actions {
    width: 100%;
  }

  .top-actions .btn,
  .form-actions .btn {
    flex: 1 1 150px;
  }

  table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}
