:root {
  --gims-green: #258e46;
  --gims-green-dark: #1b6b34;
  --gims-forest: #228b22;
  --gims-teal: #007a70;
  --gims-teal-soft: #f0f8f7;
  --gims-mint: #f4fbf9;
  --gims-navy: #031220;
  --gims-slate: #334155;
  --gims-muted: #5b6670;
  --gims-amber: #f4930e;
  --gims-orange: #f37f43;
  --gims-border: #d7e3de;
  --gims-bg: #f5f7f6;
  --gims-white: #ffffff;
  --gims-danger: #c62828;
  --gims-danger-bg: #fef2f2;
  --gims-success: #15803d;
  --gims-success-bg: #ecfdf5;
  --gims-warn: #b45309;
  --gims-warn-bg: #fffbeb;
  --gims-info: #0369a1;
  --gims-info-bg: #f0f9ff;
  --gims-shadow: 0 10px 30px rgba(3, 18, 32, 0.07);
  --gims-radius: 12px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  overflow-x: clip;
  font-family: 'Open Sans', 'Segoe UI', Roboto, Arial, sans-serif;
  color: var(--gims-navy);
  background: var(--gims-bg);
  line-height: 1.6;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--gims-teal);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.gims-container {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 clamp(12px, 3vw, 28px);
}

/* Top Utility Bar */
.gims-topbar {
  background: var(--gims-navy);
  color: #e2e8f0;
  font-size: 12.5px;
  border-bottom: 3px solid var(--gims-amber);
}

.gims-topbar-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px 16px;
  padding: 8px 0;
}

.gims-topbar-info {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 18px;
  min-width: 0;
}

.gims-topbar-info span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  word-break: break-word;
}

.gims-topbar-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
}

.gims-topbar-links a {
  color: #f8fafc;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 0;
}

.gims-topbar-links a:hover {
  color: var(--gims-amber);
  text-decoration: none;
}

/* Masthead */
.gims-masthead {
  background: var(--gims-white);
  border-bottom: 1px solid var(--gims-border);
  padding: clamp(10px, 2vw, 16px) 0;
}

.gims-masthead-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: clamp(10px, 2vw, 20px);
}

.gims-masthead-logo img {
  height: clamp(52px, 7vw, 76px);
  width: auto;
  display: block;
}

.gims-masthead-title {
  text-align: center;
  min-width: 0;
}

.gims-masthead-hi {
  margin: 0;
  font-size: clamp(14px, 2.2vw, 18px);
  font-weight: 700;
  color: var(--gims-teal);
  line-height: 1.3;
}

.gims-masthead-en {
  margin: 2px 0 3px;
  font-size: clamp(15.5px, 2.5vw, 21px);
  font-weight: 800;
  color: var(--gims-navy);
  letter-spacing: -0.2px;
  line-height: 1.25;
}

.gims-masthead-sub {
  margin: 0;
  font-size: clamp(10.5px, 1.4vw, 12.5px);
  font-weight: 600;
  color: var(--gims-green);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 1.35;
}

/* Primary Navigation */
.gims-nav {
  background: linear-gradient(90deg, var(--gims-green-dark) 0%, var(--gims-green) 50%, var(--gims-teal) 100%);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
}

.gims-nav-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.gims-nav-links {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0;
}

.gims-nav-links li {
  display: flex;
}

.gims-nav-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--gims-white);
  font-weight: 600;
  font-size: 14px;
  padding: 12px 16px;
  min-height: 44px;
  transition: background 0.2s ease;
  white-space: nowrap;
}

.gims-nav-links a:hover,
.gims-nav-links a.active {
  background: rgba(255, 255, 255, 0.16);
  text-decoration: none;
}

.gims-nav-badge {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.28);
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

/* Main Content */
.gims-main {
  padding: clamp(18px, 3vw, 32px) 0 clamp(32px, 5vw, 56px);
  min-height: calc(100vh - 290px);
}

/* Alerts */
.gims-alert {
  padding: 13px 16px;
  border-radius: 10px;
  margin-bottom: 18px;
  border: 1px solid transparent;
  font-size: 14px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  word-break: break-word;
}

.gims-alert-success {
  background: var(--gims-success-bg);
  border-color: #a7f3d0;
  color: #065f46;
}

.gims-alert-danger {
  background: var(--gims-danger-bg);
  border-color: #fecaca;
  color: #991b1b;
}

.gims-alert-info {
  background: var(--gims-info-bg);
  border-color: #bae6fd;
  color: #075985;
}

.gims-alert ul {
  margin: 4px 0 0 18px;
  padding: 0;
}

/* Cards & Grids */
.gims-card {
  background: var(--gims-white);
  border: 1px solid var(--gims-border);
  border-radius: var(--gims-radius);
  box-shadow: var(--gims-shadow);
  overflow: visible;
  min-width: 0;
}

.gims-card-header {
  padding: clamp(14px, 2.5vw, 18px) clamp(16px, 3vw, 24px);
  background: linear-gradient(135deg, var(--gims-mint) 0%, #ffffff 100%);
  border-bottom: 1px solid var(--gims-border);
  border-radius: calc(var(--gims-radius) - 1px) calc(var(--gims-radius) - 1px) 0 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.gims-card-title {
  margin: 0;
  font-size: clamp(16px, 2.2vw, 18px);
  font-weight: 700;
  color: var(--gims-navy);
}

.gims-card-subtitle {
  margin: 3px 0 0;
  font-size: 13px;
  color: var(--gims-muted);
}

.gims-card-body {
  padding: clamp(16px, 3vw, 24px);
}

.gims-hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.95fr;
  gap: clamp(18px, 3vw, 28px);
  align-items: start;
}

.gims-hero-grid > *,
.gims-grid-2 > *,
.gims-grid-3 > *,
.gims-grid-4 > *,
.gims-kv-grid > * {
  min-width: 0;
}

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

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

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

/* Hero Info Panel */
.gims-hero-banner {
  background: linear-gradient(135deg, var(--gims-navy) 0%, #0a2e36 55%, var(--gims-teal) 100%);
  color: #ffffff;
  border-radius: var(--gims-radius);
  padding: clamp(18px, 3vw, 28px);
  box-shadow: var(--gims-shadow);
  min-width: 0;
}

.gims-pill-tag {
  display: inline-block;
  background: rgba(244, 147, 14, 0.2);
  border: 1px solid rgba(244, 147, 14, 0.55);
  color: #fde68a;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
}

.gims-hero-banner h2 {
  margin: 0 0 10px;
  font-size: clamp(20px, 3vw, 26px);
  line-height: 1.25;
  color: #ffffff;
}

.gims-hero-banner p {
  margin: 0 0 18px;
  color: #d8ece8;
  font-size: 14.5px;
}

.gims-step-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.gims-step-mini {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  padding: 12px 14px;
}

.gims-step-mini strong {
  display: block;
  font-size: 13px;
  color: #fcd34d;
  margin-bottom: 3px;
}

.gims-step-mini span {
  font-size: 12.5px;
  color: #e2f1ee;
}

.gims-security-strip {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  font-size: 12.5px;
  color: #cbd5e1;
}

/* Forms */
.gims-form-group {
  margin-bottom: 16px;
}

.gims-label {
  display: block;
  font-weight: 600;
  font-size: 13.5px;
  color: var(--gims-navy);
  margin-bottom: 6px;
}

.gims-required {
  color: var(--gims-danger);
}

.gims-input,
.gims-select,
.gims-textarea {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 44px;
  margin: 0;
  padding: 9px 13px;
  border: 1px solid #c5d3cd;
  border-radius: 8px;
  font-family: inherit;
  font-size: 14.5px;
  line-height: 1.35;
  color: var(--gims-navy);
  background-color: #ffffff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.gims-input:not([type="file"]),
.gims-select {
  height: 44px;
}

.gims-textarea {
  min-height: 92px;
  height: auto;
  line-height: 1.5;
  resize: vertical;
}

/* Cross-platform macOS Safari & Chrome Select Normalization */
.gims-select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  display: block;
  padding: 9px 40px 9px 13px;
  background-color: #ffffff;
  background-image: url('../images/chevron-down.svg');
  background-repeat: no-repeat;
  background-position: right 13px center;
  background-size: 16px 16px;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gims-select::-ms-expand {
  display: none;
}

.gims-select option {
  background-color: #ffffff;
  color: var(--gims-navy);
  font-weight: 500;
}

/* Cross-platform macOS Date & Time Input Fallback Normalization */
input[type="date"].gims-input,
input[type="time"].gims-input {
  -webkit-appearance: none;
  appearance: none;
  display: flex;
  align-items: center;
  height: 44px;
  min-height: 44px;
  padding: 8px 12px;
}

input[type="date"].gims-input::-webkit-date-and-time-value,
input[type="time"].gims-input::-webkit-date-and-time-value {
  text-align: left;
  margin: 0;
  width: 100%;
}

input[type="date"].gims-input::-webkit-datetime-edit,
input[type="time"].gims-input::-webkit-datetime-edit {
  padding: 0;
  font-size: 14.5px;
  line-height: 1.35;
}

input[type="date"].gims-input::-webkit-calendar-picker-indicator,
input[type="time"].gims-input::-webkit-calendar-picker-indicator {
  width: 22px;
  height: 22px;
  padding: 2px;
  margin-left: 6px;
  opacity: 0.85;
  cursor: pointer;
}

input[type="file"].gims-input {
  height: auto;
  min-height: 44px;
  padding: 8px 10px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gims-input:focus,
.gims-select:focus,
.gims-textarea:focus {
  outline: none;
  border-color: var(--gims-green);
  box-shadow: 0 0 0 3px rgba(37, 142, 70, 0.15);
}

.gims-input:disabled,
.gims-select:disabled {
  background-color: #f1f5f4;
  color: var(--gims-slate);
  cursor: not-allowed;
}

/* Large CSP-Safe Custom Date & Time Picker Popovers (macOS / Cross-Browser) */
.gims-picker-field {
  position: relative;
  width: 100%;
  min-width: 0;
}

.gims-picker-control {
  position: relative;
  display: flex;
  align-items: stretch;
  width: 100%;
}

.gims-picker-control .gims-input {
  padding-right: 44px;
}

.gims-picker-trigger {
  position: absolute;
  top: 1px;
  right: 1px;
  bottom: 1px;
  width: 42px;
  border: none;
  border-left: 1px solid #e2ebe7;
  background: #f8fbfa;
  color: var(--gims-teal);
  border-radius: 0 7px 7px 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.gims-picker-trigger:hover,
.gims-picker-trigger:focus-visible {
  background: var(--gims-mint);
  color: var(--gims-green-dark);
  outline: none;
}

.gims-picker-trigger svg {
  width: 19px;
  height: 19px;
  display: block;
}

.gims-calendar-popover,
.gims-time-popover {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 1200;
  background: #ffffff;
  border: 1px solid #bfd1ca;
  border-radius: 12px;
  box-shadow: 0 18px 40px rgba(3, 18, 32, 0.2);
  padding: 14px;
  display: none;
}

.gims-calendar-popover {
  width: min(352px, calc(100vw - 28px));
}

.gims-time-popover {
  width: min(312px, calc(100vw - 28px));
}

.gims-calendar-popover.is-open,
.gims-time-popover.is-open {
  display: block;
}

.gims-calendar-popover.is-up,
.gims-time-popover.is-up {
  top: auto;
  bottom: calc(100% + 6px);
}

.gims-calendar-popover.is-right,
.gims-time-popover.is-right {
  left: auto;
  right: 0;
}

.gims-cal-header {
  display: grid;
  grid-template-columns: 36px 1fr 1fr 36px;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
}

.gims-cal-nav-btn {
  width: 36px;
  height: 36px;
  border: 1px solid #c5d3cd;
  background: #f8fbfa;
  color: var(--gims-navy);
  border-radius: 8px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.gims-cal-nav-btn:hover:not(:disabled) {
  background: var(--gims-mint);
  border-color: var(--gims-teal);
  color: var(--gims-teal);
}

.gims-cal-nav-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.gims-cal-range-note {
  margin-bottom: 10px;
  padding: 6px 10px;
  border-radius: 7px;
  background: var(--gims-mint);
  border: 1px solid #cce3da;
  font-size: 12px;
  font-weight: 600;
  color: var(--gims-teal);
  text-align: center;
}

.gims-cal-range-note.is-empty {
  display: none;
}

.gims-cal-select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  width: 100%;
  height: 36px;
  min-height: 36px;
  padding: 4px 28px 4px 10px;
  border: 1px solid #c5d3cd;
  border-radius: 8px;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--gims-navy);
  background-color: #ffffff;
  background-image: url('../images/chevron-down.svg');
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 14px 14px;
  cursor: pointer;
}

.gims-cal-weekdays,
.gims-cal-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}

.gims-cal-weekdays {
  margin-bottom: 6px;
}

.gims-cal-weekdays span {
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--gims-muted);
  padding: 4px 0;
}

.gims-cal-day {
  height: 40px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--gims-navy);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.14s ease, border-color 0.14s ease, color 0.14s ease;
}

.gims-cal-day:hover:not(:disabled) {
  background: var(--gims-mint);
  border-color: #a9d5c8;
  color: var(--gims-teal);
}

.gims-cal-day.is-in-range:not(:disabled):not(.is-selected):not(.is-range-edge) {
  background: var(--gims-teal-soft);
  border-color: #cde6e1;
  color: var(--gims-teal);
}

.gims-cal-day.is-range-edge:not(:disabled):not(.is-selected) {
  background: var(--gims-teal);
  border-color: var(--gims-teal);
  color: #ffffff;
  font-weight: 700;
}

.gims-cal-day.is-outside,
.gims-cal-day.is-out-of-range,
.gims-cal-day:disabled {
  visibility: hidden;
  pointer-events: none;
}

.gims-cal-day.is-today:not(.is-selected):not(:disabled) {
  border-color: var(--gims-teal);
  color: var(--gims-teal);
  font-weight: 700;
}

.gims-cal-day.is-selected:not(:disabled) {
  background: var(--gims-green);
  border-color: var(--gims-green);
  color: #ffffff;
  font-weight: 700;
}

.gims-cal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #e5eeea;
}

.gims-cal-action-btn {
  border: 1px solid #c5d3cd;
  background: #ffffff;
  color: var(--gims-navy);
  border-radius: 7px;
  padding: 6px 12px;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}

.gims-cal-action-btn:hover {
  background: var(--gims-mint);
  border-color: var(--gims-teal);
  color: var(--gims-teal);
}

.gims-cal-action-btn.is-primary {
  background: var(--gims-teal);
  border-color: var(--gims-teal);
  color: #ffffff;
}

.gims-cal-action-btn.is-primary:hover {
  background: #005f57;
}

/* Time Picker Popover */
.gims-time-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--gims-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 10px;
}

.gims-time-columns {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 10px;
  align-items: end;
}

.gims-time-col-label {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--gims-slate);
  margin-bottom: 4px;
}

.gims-ampm-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}

.gims-ampm-btn {
  height: 44px;
  min-width: 44px;
  border: 1px solid #c5d3cd;
  border-radius: 8px;
  background: #ffffff;
  color: var(--gims-slate);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.gims-ampm-btn.is-active {
  background: var(--gims-green);
  border-color: var(--gims-green);
  color: #ffffff;
}

.gims-time-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.gims-time-chip {
  border: 1px solid #d5e2dd;
  background: #f8fbfa;
  color: var(--gims-slate);
  border-radius: 6px;
  padding: 5px 9px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.gims-time-chip:hover {
  background: var(--gims-mint);
  border-color: var(--gims-teal);
  color: var(--gims-teal);
}

.gims-input-uppercase {
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 600;
}

.gims-input-otp {
  font-size: clamp(20px, 5vw, 24px);
  font-weight: 700;
  letter-spacing: clamp(4px, 1.8vw, 8px);
  text-align: center;
}

.gims-help {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--gims-muted);
  word-break: break-word;
}

.gims-error-text {
  display: block;
  margin-top: 4px;
  font-size: 12.5px;
  color: var(--gims-danger);
  font-weight: 600;
}

.gims-input-group {
  display: flex;
  align-items: stretch;
  width: 100%;
}

.gims-input-prefix {
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  background: #eef4f1;
  border: 1px solid #c5d3cd;
  border-right: none;
  border-radius: 8px 0 0 8px;
  font-weight: 600;
  font-size: 13.5px;
  color: var(--gims-slate);
  flex-shrink: 0;
}

.gims-input-group .gims-input {
  border-radius: 0 8px 8px 0;
  min-width: 0;
}

/* Radio Pills (Onward / Return & Travel Modes) */
.gims-pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.gims-pill-option {
  position: relative;
}

.gims-pill-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.gims-pill-option label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 38px;
  padding: 7px 14px;
  border: 1px solid #c5d3cd;
  border-radius: 999px;
  background: #ffffff;
  font-size: 13px;
  font-weight: 600;
  color: var(--gims-slate);
  cursor: pointer;
  transition: all 0.15s ease;
}

.gims-pill-option input:checked + label {
  background: var(--gims-teal-soft);
  border-color: var(--gims-teal);
  color: var(--gims-teal);
  box-shadow: 0 0 0 2px rgba(0, 122, 112, 0.14);
}

.gims-pill-option input:focus-visible + label {
  outline: 2px solid var(--gims-green);
  outline-offset: 2px;
}

/* Buttons */
.gims-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 18px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.18s ease;
  text-decoration: none;
  text-align: center;
  white-space: nowrap;
}

.gims-btn:hover {
  text-decoration: none;
}

.gims-btn-primary {
  background: var(--gims-green);
  color: #ffffff;
}

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

.gims-btn-teal {
  background: var(--gims-teal);
  color: #ffffff;
}

.gims-btn-teal:hover {
  background: #005f57;
}

.gims-btn-outline {
  background: #ffffff;
  border-color: #b7c9c2;
  color: var(--gims-navy);
}

.gims-btn-outline:hover {
  background: var(--gims-mint);
  border-color: var(--gims-teal);
}

.gims-btn-danger {
  background: var(--gims-danger);
  color: #ffffff;
}

.gims-btn-danger-outline {
  background: #ffffff;
  border-color: #fca5a5;
  color: var(--gims-danger);
}

.gims-btn-danger-outline:hover {
  background: var(--gims-danger-bg);
}

.gims-btn-sm {
  min-height: 36px;
  padding: 6px 12px;
  font-size: 12.5px;
}

.gims-btn-block {
  width: 100%;
}

/* Wizard Stepper */
.gims-stepper {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}

.gims-step-item {
  background: #ffffff;
  border: 1px solid var(--gims-border);
  border-radius: 10px;
  padding: 11px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.gims-step-item.active {
  border-color: var(--gims-green);
  background: var(--gims-mint);
  box-shadow: 0 4px 12px rgba(37, 142, 70, 0.12);
}

.gims-step-item.completed {
  border-color: var(--gims-teal);
  background: #f0fdf4;
}

.gims-step-num {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  background: #e2e8f0;
  color: var(--gims-slate);
  flex-shrink: 0;
}

.gims-step-item.active .gims-step-num {
  background: var(--gims-green);
  color: #ffffff;
}

.gims-step-item.completed .gims-step-num {
  background: var(--gims-teal);
  color: #ffffff;
}

.gims-step-label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--gims-navy);
  line-height: 1.25;
}

.gims-step-sub {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: var(--gims-muted);
}

/* Verified Claimant Bar */
.gims-claimant-bar {
  background: var(--gims-navy);
  color: #f8fafc;
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 12px;
  font-size: 13px;
}

.gims-verified-pill {
  background: rgba(37, 142, 70, 0.25);
  border: 1px solid #4ade80;
  color: #bbf7d0;
  padding: 3px 10px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 11.5px;
}

/* PAN Check Indicator */
.gims-pan-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.gims-pan-row .gims-input {
  flex: 1 1 200px;
}

.gims-pan-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 42px;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: var(--gims-muted);
}

.gims-pan-badge.valid {
  background: var(--gims-success-bg);
  border-color: #86efac;
  color: var(--gims-success);
}

.gims-pan-badge.invalid {
  background: var(--gims-danger-bg);
  border-color: #fca5a5;
  color: var(--gims-danger);
}

/* Travel Leg Card */
.gims-leg-card {
  border: 1px solid var(--gims-border);
  border-left: 4px solid var(--gims-teal);
  border-radius: 10px;
  padding: clamp(14px, 2.5vw, 18px);
  margin-bottom: 16px;
  background: #fafcfb;
}

.gims-leg-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e2ece8;
}

.gims-leg-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--gims-teal);
}

/* Tables */
.gims-table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 8px;
}

.gims-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.gims-table th {
  text-align: left;
  padding: 11px 12px;
  background: #f1f6f4;
  color: var(--gims-navy);
  font-weight: 700;
  border-bottom: 2px solid var(--gims-border);
  white-space: nowrap;
}

.gims-table-grouped th {
  border: 1px solid var(--gims-border);
  font-size: 12px;
  padding: 7px 8px;
  white-space: normal;
  line-height: 1.25;
}

.gims-table-grouped td {
  padding: 9px 8px;
  font-size: 13px;
}

.gims-table-grouped th.gims-th-center {
  text-align: center;
  background: #e7f1ed;
}

.gims-bill-meta {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 4px;
  font-size: 12px;
  color: var(--gims-muted);
}

.gims-bill-name {
  display: inline-block;
  max-width: 155px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
}

.gims-table td {
  padding: 11px 12px;
  border-bottom: 1px solid #e7efec;
  vertical-align: top;
  overflow-wrap: break-word;
}

.gims-table tr:hover td {
  background: #f9fcfb;
}

/* Status Badges */
.gims-status {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  white-space: nowrap;
}

.gims-status-submitted { background: #e0f2fe; color: #0369a1; }
.gims-status-under_review { background: #fef3c7; color: #b45309; }
.gims-status-clarification_requested { background: #ffedd5; color: #c2410c; }
.gims-status-approved { background: #dcfce7; color: #15803d; }
.gims-status-rejected { background: #fee2e2; color: #b91c1c; }
.gims-status-paid { background: #d1fae5; color: #065f46; }
.gims-status-draft { background: #e2e8f0; color: #475569; }

/* KPI Stat Cards */
.gims-stat-card {
  background: #ffffff;
  border: 1px solid var(--gims-border);
  border-radius: 12px;
  padding: 16px 18px;
  box-shadow: 0 4px 14px rgba(3, 18, 32, 0.04);
}

.gims-stat-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--gims-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.gims-stat-value {
  margin-top: 6px;
  font-size: clamp(20px, 3vw, 24px);
  font-weight: 800;
  color: var(--gims-navy);
}

.gims-stat-sub {
  margin-top: 2px;
  font-size: 12px;
  color: var(--gims-teal);
  font-weight: 600;
}

/* Utilities */
.gims-flex-between {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.gims-flex-gap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.gims-declaration-label {
  display: flex;
  align-items: flex-start;
  flex-wrap: nowrap;
  gap: 12px;
  cursor: pointer;
  margin: 0;
  width: 100%;
}

.gims-declaration-label input[type="checkbox"] {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 3px 0 0;
  accent-color: var(--gims-green);
  cursor: pointer;
}

.gims-declaration-label span {
  flex: 1 1 auto;
  min-width: 0;
  line-height: 1.55;
}

.gims-hidden {
  display: none !important;
}

.gims-nowrap {
  white-space: nowrap;
}

.gims-section-title {
  display: block;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--gims-navy);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--gims-border);
  margin-bottom: 12px;
}

.gims-meta-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.gims-meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  font-size: 12px;
  color: var(--gims-slate);
  word-break: break-word;
}

.gims-meta-chip strong {
  color: var(--gims-navy);
  font-weight: 700;
}

.gims-btn-row-nowrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}

.gims-mt-12 { margin-top: 12px; }
.gims-mt-16 { margin-top: 16px; }
.gims-mt-20 { margin-top: 20px; }
.gims-mb-12 { margin-bottom: 12px; }
.gims-mb-18 { margin-bottom: 18px; }
.gims-inline-form { display: inline-block; margin: 0; }
.gims-login-wrap { max-width: 460px; width: 100%; margin: 20px auto; }

.gims-align-end {
  align-items: end;
}

.gims-filter-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1.5fr) repeat(2, minmax(160px, 1fr)) repeat(2, minmax(175px, 1fr)) auto;
  gap: 12px;
  align-items: end;
}

/* Laravel Tailwind Paginator Normalization (CSP-safe without Tailwind) */
.gims-pagination {
  margin-top: 18px;
}

.gims-pagination nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.gims-pagination nav > div {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.gims-pagination svg {
  width: 16px;
  height: 16px;
  display: block;
}

.gims-pagination a,
.gims-pagination span[aria-current="page"] > span,
.gims-pagination span[aria-disabled="true"] > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  min-height: 34px;
  padding: 5px 10px;
  border-radius: 6px;
  border: 1px solid var(--gims-border);
  font-size: 13px;
  font-weight: 600;
  background: #ffffff;
  color: var(--gims-navy);
}

.gims-pagination span[aria-current="page"] > span {
  background: var(--gims-green);
  border-color: var(--gims-green);
  color: #ffffff;
}

.gims-pagination p {
  margin: 0;
  font-size: 13px;
  color: var(--gims-muted);
}

.gims-total-box {
  background: var(--gims-mint);
  border: 1px solid #b6dfd1;
  border-radius: 10px;
  padding: 14px 18px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}

.gims-total-amount {
  font-size: clamp(18px, 3vw, 22px);
  font-weight: 800;
  color: var(--gims-green-dark);
}

.gims-summary-box {
  background: #f8fbfa;
  border: 1px solid var(--gims-border);
  border-radius: 10px;
  padding: clamp(12px, 2.5vw, 16px);
  margin-bottom: 18px;
}

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

.gims-kv-label {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--gims-muted);
  text-transform: uppercase;
}

.gims-kv-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--gims-navy);
  word-break: break-word;
  overflow-wrap: anywhere;
}

/* Footer */
.gims-footer {
  background: var(--gims-navy);
  color: #cbd5e1;
  padding: 28px 0 18px;
  font-size: 13px;
  border-top: 4px solid var(--gims-green);
}

.gims-footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 24px;
  margin-bottom: 18px;
}

.gims-footer h4 {
  margin: 0 0 10px;
  color: #ffffff;
  font-size: 14.5px;
}

.gims-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.gims-footer li {
  margin-bottom: 6px;
}

.gims-footer a {
  color: #a7f3d0;
}

.gims-footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 12px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  color: #94a3b8;
}

/* ==========================================================================
   Responsive Breakpoints (Laptop, Tablet, Mobile, Small Phones)
   ========================================================================== */

@media (max-width: 1200px) {
  .gims-filter-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 960px) {
  .gims-hero-grid,
  .gims-footer-grid {
    grid-template-columns: 1fr;
  }

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

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

@media (max-width: 768px) {
  /* Prevent automatic mobile Safari zoom when focusing inputs */
  .gims-input,
  .gims-select,
  .gims-textarea {
    font-size: 16px;
  }

  .gims-nav-inner {
    flex-direction: column;
    align-items: stretch;
    padding-bottom: 8px;
  }

  .gims-nav-links {
    width: 100%;
    justify-content: flex-start;
  }

  .gims-nav-links li {
    flex: 1 1 auto;
  }

  .gims-nav-links a {
    width: 100%;
    padding: 10px 12px;
    font-size: 13.5px;
  }

  .gims-nav-badge {
    align-self: center;
  }
}

/* Ultra-responsive Stacked Card Tables for Mobile (< 720px) */
@media (max-width: 720px) {
  .gims-table thead {
    display: none;
  }

  .gims-table,
  .gims-table tbody,
  .gims-table tr,
  .gims-table td {
    display: block;
    width: 100%;
  }

  .gims-table tr {
    background: #ffffff;
    border: 1px solid var(--gims-border);
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 12px;
  }

  .gims-table td {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding: 7px 0;
    border-bottom: 1px dashed #e5eeea;
    text-align: right;
  }

  .gims-nowrap {
    white-space: normal;
  }

  .gims-meta-list {
    justify-content: flex-end;
  }

  .gims-btn-row-nowrap {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .gims-table td:last-child {
    border-bottom: none;
  }

  .gims-table td[data-label]::before {
    content: attr(data-label);
    font-weight: 700;
    font-size: 11.5px;
    text-transform: uppercase;
    color: var(--gims-muted);
    text-align: left;
    flex-shrink: 0;
    max-width: 44%;
  }

  .gims-table td[colspan] {
    display: block;
    text-align: center;
  }

  .gims-table td[colspan]::before {
    content: none;
  }
}

@media (max-width: 640px) {
  .gims-topbar-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  /* Compact two-emblem + title Masthead on small phones */
  .gims-masthead-inner {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "logoLeft logoRight"
      "title title";
    row-gap: 8px;
  }

  .gims-masthead-logo:first-child {
    grid-area: logoLeft;
    justify-self: start;
  }

  .gims-masthead-logo:last-child {
    grid-area: logoRight;
    justify-self: end;
  }

  .gims-masthead-title {
    grid-area: title;
  }

  .gims-masthead-logo img {
    height: 48px;
  }

  .gims-grid-2,
  .gims-grid-3,
  .gims-grid-4,
  .gims-kv-grid,
  .gims-stepper,
  .gims-step-list,
  .gims-filter-grid {
    grid-template-columns: 1fr;
  }

  .gims-wizard-actions {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .gims-wizard-actions .gims-btn {
    width: 100%;
  }

  .gims-pan-badge {
    width: 100%;
  }
}

@media (max-width: 420px) {
  .gims-nav-links {
    flex-direction: column;
  }

  .gims-nav-links a {
    justify-content: flex-start;
  }

  .gims-pill-option {
    flex: 1 1 calc(50% - 4px);
  }

  .gims-pill-option label {
    width: 100%;
  }
}

@media print {
  .gims-topbar,
  .gims-nav,
  .gims-footer,
  .no-print {
    display: none !important;
  }
  body {
    background: #ffffff;
  }
  .gims-card {
    box-shadow: none;
    border: 1px solid #cbd5e1;
  }
}
