/* Modern, Clean & Professional Styles for IRCTC Forms */
:root {
  --primary: #0a3871;
  --primary-dark: #07264e;
  --primary-light: #1557a6;
  --accent: #e65100;
  --text-dark: #1e293b;
  --text-muted: #64748b;
  --bg-light: #f8fafc;
  --border: #cbd5e1;
  --card-bg: #ffffff;
  --success: #16a34a;
  --radius: 10px;
  --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  background-color: var(--bg-light);
  color: var(--text-dark);
  line-height: 1.5;
  padding-bottom: 40px;
}

header {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  padding: 24px 16px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

header p {
  font-size: 0.95rem;
  opacity: 0.9;
}

.badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.2);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-top: 8px;
  text-transform: uppercase;
}

.container {
  max-width: 900px;
  margin: 24px auto;
  padding: 0 16px;
}

.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
  border: 1px solid #e2e8f0;
}

.card-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary);
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 8px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

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

label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #334155;
}

label span.req {
  color: #dc2626;
  margin-left: 2px;
}

input[type="text"],
input[type="date"],
input[type="email"],
input[type="tel"],
input[type="number"],
select,
textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.95rem;
  color: var(--text-dark);
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(21, 87, 166, 0.15);
}

.passenger-row {
  background: #f1f5f9;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 12px;
  border: 1px solid #e2e8f0;
  position: relative;
}

.passenger-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-weight: 700;
  color: var(--primary);
  font-size: 0.9rem;
}

.remove-pax-btn {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fca5a5;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 0.8rem;
  cursor: pointer;
  font-weight: 600;
}

.remove-pax-btn:hover {
  background: #fecaca;
}

.add-pax-btn {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px dashed #7dd3fc;
  border-radius: 6px;
  padding: 10px 16px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  text-align: center;
  transition: background 0.2s;
}

.add-pax-btn:hover {
  background: #bae6fd;
}

/* Signature Pad */
.signature-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
}

.signature-pad-box {
  border: 2px dashed #94a3b8;
  border-radius: 8px;
  background: #fff;
  width: 100%;
  max-width: 450px;
  height: 160px;
  touch-action: none;
  cursor: crosshair;
}

.sig-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.clear-btn {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 6px 12px;
  font-size: 0.85rem;
  cursor: pointer;
}

.clear-btn:hover {
  background: #e2e8f0;
}

/* Submit Button */
.btn-submit {
  display: block;
  width: 100%;
  background: linear-gradient(135deg, #16a34a, #15803d);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 16px;
  font-size: 1.15rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.3);
  transition: transform 0.1s, box-shadow 0.2s, opacity 0.2s;
  text-align: center;
  margin-top: 16px;
}

.btn-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(22, 163, 74, 0.4);
}

.btn-submit:active {
  transform: translateY(1px);
}

.btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Landing Page Cards */
.selector-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 32px;
}

.choice-card {
  background: #fff;
  border-radius: 12px;
  padding: 32px 24px;
  text-align: center;
  box-shadow: var(--shadow);
  border: 2px solid transparent;
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.choice-card:hover {
  border-color: var(--primary-light);
  transform: translateY(-4px);
  box-shadow: 0 10px 20px -3px rgba(0,0,0,0.1);
}

.choice-icon {
  font-size: 3rem;
  margin-bottom: 16px;
}

.choice-card h2 {
  font-size: 1.3rem;
  color: var(--primary);
  margin-bottom: 8px;
}

.choice-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 24px;
}

.btn-choice {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  text-decoration: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  transition: background 0.2s;
}

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

/* Disclaimer / Checkbox */
.declaration-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-left: 4px solid var(--primary);
  padding: 14px;
  border-radius: 6px;
  margin-top: 12px;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.88rem;
  color: #334155;
  cursor: pointer;
  line-height: 1.4;
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--primary);
}

/* Status / Alert modal */
.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #1e293b;
  color: #fff;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 0.95rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  display: none;
  z-index: 1000;
}

@media (max-width: 600px) {
  header h1 {
    font-size: 1.25rem;
  }
  .card {
    padding: 16px;
  }
  .grid {
    grid-template-columns: 1fr;
  }
}
