/* ============================================================
   RANGOTSAV CELEBRATION – Centered form portal (Figma match)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&display=swap');

:root {
  --orange: #ff6b1d;
  --orange-2: #ff7a2f;
  --navy: #1a2b4c;
  --muted: #6b7c93;
  --line: #e3eaf3;
  --field: #f3f7fb;
  --font: "Poppins", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  color: var(--navy);
  background: #fff8f2;
}

a { text-decoration: none; color: var(--orange); }

.site-shell {
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(ellipse 70% 42% at 0% 0%, rgba(255, 176, 130, 0.5), transparent 70%),
    radial-gradient(ellipse 55% 40% at 100% 0%, rgba(255, 200, 160, 0.4), transparent 65%),
    radial-gradient(ellipse 60% 35% at 100% 100%, rgba(255, 186, 140, 0.38), transparent 60%),
    radial-gradient(ellipse 50% 30% at 0% 100%, rgba(255, 210, 180, 0.32), transparent 55%),
    #fff8f2;
}

.wave-top,
.wave-bottom {
  position: absolute;
  left: 0;
  right: 0;
  height: 220px;
  pointer-events: none;
  z-index: 0;
}
.wave-top {
  top: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 220' preserveAspectRatio='none'%3E%3Cpath fill='%23ffd2b5' fill-opacity='0.55' d='M0,64L60,80C120,96,240,128,360,128C480,128,600,96,720,90.7C840,85,960,107,1080,112C1200,117,1320,107,1380,101.3L1440,96L1440,0L0,0Z'/%3E%3C/svg%3E") top center / 100% 100% no-repeat;
}
.wave-bottom {
  bottom: 0;
  transform: scaleY(-1);
  opacity: .85;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 220' preserveAspectRatio='none'%3E%3Cpath fill='%23ffd2b5' fill-opacity='0.5' d='M0,64L60,80C120,96,240,128,360,128C480,128,600,96,720,90.7C840,85,960,107,1080,112C1200,117,1320,107,1380,101.3L1440,96L1440,0L0,0Z'/%3E%3C/svg%3E") top center / 100% 100% no-repeat;
}

.plus-pattern {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .12;
  background-image:
    linear-gradient(#ffb07a 1px, transparent 1px),
    linear-gradient(90deg, #ffb07a 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(circle at 80% 40%, #000 0%, transparent 55%);
}

/* Header */
.site-header {
  position: relative;
  z-index: 10;
  padding: 22px 28px 8px;
}
.site-header-inner {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.brand-block {
  display: flex;
  align-items: center;
  gap: 14px;
  color: inherit;
  min-width: 0;
}
.brand-mark {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(160deg, #ff8a3d, #ff6b1d);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 18px;
  box-shadow: 0 10px 24px rgba(255, 107, 29, 0.35);
  flex-shrink: 0;
}
.brand-text strong {
  display: block;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--navy);
  line-height: 1.15;
}
.brand-text small {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #7b8aa0;
}
.site-nav { display: flex; gap: 10px; flex-wrap: wrap; }
.site-nav a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1.5px solid #d7dee8;
  background: #fff;
  color: #334155;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  box-shadow: 0 6px 16px rgba(29, 45, 68, 0.05);
}
.site-nav a:hover { border-color: #ffc09a; color: var(--orange); }
.site-nav a.active {
  background: linear-gradient(160deg, #ff8a3d, #ff6b1d);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 10px 22px rgba(255, 107, 29, 0.32);
}

/* ===== CENTERED STAGE ===== */
.portal-main {
  position: relative;
  z-index: 5;
  flex: 1;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 18px 20px 28px;
  display: grid;
  grid-template-columns: 220px minmax(320px, 520px) 220px;
  gap: 24px;
  align-items: center;
  justify-content: center;
}

.side-art {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  text-align: center;
  user-select: none;
}
.side-art img {
  width: 100%;
  max-width: 220px;
  height: auto;
  display: block;
}
.side-title {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--navy);
  line-height: 1.2;
}
.side-title span { display: block; }
.side-underline {
  width: 72px;
  height: 4px;
  border-radius: 99px;
  background: var(--orange);
  margin: 8px auto 0;
}

/* Center form card */
.form-panel {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid #eef2f7;
  border-radius: 28px;
  box-shadow:
    0 28px 70px rgba(255, 120, 60, 0.16),
    0 10px 28px rgba(26, 43, 76, 0.06);
  padding: 28px 28px 26px;
  position: relative;
  z-index: 2;
}

.form-panel-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  margin-bottom: 8px;
}
.form-panel-head .icon-badge {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: linear-gradient(160deg, #ff8a3d, #ff6b1d);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 22px;
  box-shadow: 0 10px 22px rgba(255, 107, 29, 0.3);
}
.form-panel-head h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: 0.02em;
}
.form-panel-head h2 .accent { color: var(--orange); }

.card-lead {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.45;
  font-weight: 500;
  text-align: center;
}

.form-label {
  display: block;
  margin-bottom: 7px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #5b6b82;
}
.form-label .req { color: #ef4444; }

.mb-3 { margin-bottom: 16px !important; }
.mb-4 { margin-bottom: 20px !important; }
.mb-2 { margin-bottom: 10px !important; }

.field-icon { position: relative; }
.field-icon > i.leading {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #9aa8bc;
  font-size: 16px;
  z-index: 2;
  pointer-events: none;
}
.field-icon.textarea-icon > i.leading {
  top: 16px;
  transform: none;
}
.field-icon > i.trailing {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #9aa8bc;
  font-size: 16px;
  z-index: 2;
  pointer-events: none;
}

.form-control,
.form-select {
  width: 100%;
  min-height: 50px;
  border-radius: 12px;
  border: 1.5px solid var(--line);
  background: var(--field);
  padding: 12px 16px 12px 44px;
  font-size: 14px;
  font-weight: 600;
  color: var(--navy);
  text-transform: uppercase;
  font-family: var(--font);
}
.form-select {
  padding-right: 40px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%239aa8bc' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 6l3.5 3.5L11.5 6' stroke='%239aa8bc' stroke-width='1.8' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}
.form-control:focus,
.form-select:focus {
  outline: none;
  border-color: #ffc09a;
  box-shadow: 0 0 0 4px rgba(255, 107, 29, 0.12);
  background: #fff;
}
textarea.form-control {
  min-height: 140px;
  resize: vertical;
  line-height: 1.5;
  padding-top: 14px;
}
.field-date .form-control { padding-right: 44px; }
.date-display { cursor: pointer; }

.dept-display {
  min-height: 50px;
  border-radius: 12px;
  border: 1.5px solid var(--line);
  background: #eef4fb;
  padding: 12px 16px 12px 44px;
  display: flex;
  align-items: center;
  font-size: 14px;
  font-weight: 700;
  color: #445468;
}

.dept-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.btn-primary {
  width: 100%;
  min-height: 52px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(160deg, #ff8a3d, #ff6b1d);
  color: #fff !important;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.05em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 14px 28px rgba(255, 107, 29, 0.32);
  cursor: pointer;
  font-family: var(--font);
}
.btn-primary:hover { filter: brightness(0.97); color: #fff; }

.btn-soft-dept {
  min-height: 50px;
  border-radius: 12px;
  border: 1.5px solid #ffc09a;
  background: #fff4ec;
  color: var(--orange);
  font-weight: 800;
  padding: 0 16px;
  white-space: nowrap;
  font-family: var(--font);
}
.btn-soft-dept:hover { background: #ffe8d6; }

.add-dept-box {
  display: none;
  margin-top: 10px;
  padding: 12px;
  border-radius: 14px;
  background: #fff4ec;
  border: 1px dashed #ffc09a;
}
.add-dept-box.open { display: block; }
.add-dept-box .hint { font-size: 12px; color: var(--muted); margin-bottom: 8px; }

.alert { border-radius: 12px; font-size: 13px; margin-bottom: 14px; }

.success-box { text-align: center; padding: 12px 4px; }
.success-box .icon {
  width: 74px;
  height: 74px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: #dcfce7;
  color: #166534;
  display: grid;
  place-items: center;
  font-size: 30px;
}
.success-box h2 { margin: 0 0 8px; font-size: 22px; font-weight: 800; }

.site-footer {
  position: relative;
  z-index: 5;
  text-align: center;
  padding: 0 16px 24px;
  color: #9aa8bc;
  font-size: 12px;
  font-weight: 600;
}

.toast-mini {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 1080;
  background: #0f172a;
  color: #fff;
  padding: 12px 14px;
  border-radius: 12px;
  display: none;
  max-width: 320px;
  font-size: 13px;
  font-weight: 600;
}
.toast-mini.show { display: block; }
.toast-mini.error { background: #b91c1c; }
.toast-mini.success { background: #15803d; }

.btn-outline-secondary {
  border-radius: 14px !important;
  font-weight: 700 !important;
  min-height: 48px;
}

/* Select2 searchable dropdown */
.field-icon .select2-container { width: 100% !important; }
.select2-container--default .select2-selection--single {
  min-height: 50px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: var(--field);
  padding-left: 28px;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
  line-height: 48px;
  padding-left: 12px;
  color: var(--navy);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 14px;
}
.select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 48px;
  right: 8px;
}
.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--open .select2-selection--single {
  border-color: #ffc09a;
  box-shadow: 0 0 0 4px rgba(255, 107, 29, 0.12);
}
.select2-dropdown {
  border: 1.5px solid #ffc09a;
  border-radius: 12px;
  overflow: hidden;
  text-transform: uppercase;
  font-family: var(--font);
}
.select2-search--dropdown .select2-search__field {
  border-radius: 10px;
  border: 1.5px solid var(--line);
  padding: 8px 10px;
  text-transform: uppercase;
  font-weight: 600;
}
.select2-results__option {
  padding: 10px 12px;
  font-weight: 600;
  font-size: 13px;
}
.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
  background: #ff6b1d;
}

@media (max-width: 1100px) {
  .portal-main {
    grid-template-columns: 160px minmax(300px, 480px) 160px;
    gap: 12px;
  }
}

@media (max-width: 900px) {
  .portal-main {
    grid-template-columns: 1fr;
    max-width: 560px;
  }
  .side-art { display: none; }
}

@media (max-width: 640px) {
  .site-header { padding: 16px 14px 4px; }
  .site-header-inner { flex-direction: column; align-items: stretch; }
  .site-nav a { flex: 1; justify-content: center; }
  .brand-text strong { font-size: 16px; }
  .form-panel { padding: 22px 16px; border-radius: 22px; }
  .dept-row { grid-template-columns: 1fr; }
}
