/* ====================================================
   ARYAVART HOSPITAL — TWO-PANEL FEEDBACK
   White BG · Red & Blue Gradients · Side Info Panel
   ==================================================== */

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

:root {
  --red:      #e81c0b;
  --red-dk:   #c01508;
  --blue:     #1a1aff;
  --blue-dk:  #0d0dcc;
  --blue-lt:  #4444ff;

  --g-rb:  linear-gradient(135deg, #e81c0b 0%, #1a1aff 100%);
  --g-br:  linear-gradient(135deg, #1a1aff 0%, #e81c0b 100%);
  --g-r:   linear-gradient(135deg, #e81c0b, #c01508);
  --g-b:   linear-gradient(135deg, #1a1aff, #0d0dcc);
  --g-bg:  linear-gradient(145deg, #eef0ff 0%, #fff0f0 60%, #eef2ff 100%);

  --white:   #ffffff;
  --surface: #f7f8ff;
  --border:  #e2e6f8;
  --text-h:  #080830;
  --text-b:  #1c1c50;
  --text-m:  #4a4a8a;
  --text-l:  #8888bb;

  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --tr: all 0.2s ease;
}

html { height: 100%; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--g-bg);
  min-height: 100vh;
  display: flex;
  align-items: stretch;
  color: var(--text-b);
  line-height: 1.5;
}

/* ══════════════════════════════════════════════════
   LAYOUT
══════════════════════════════════════════════════ */
.layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  width: 100%;
  min-height: 100vh;
  max-width: 1200px;
  margin: 0 auto;
  box-shadow: 0 0 80px rgba(26,26,255,0.1), 0 0 40px rgba(232,28,11,0.05);
}

/* ══════════════════════════════════════════════════
   LEFT SIDE PANEL
══════════════════════════════════════════════════ */
.side-panel {
  background: var(--white);
  border-right: 1px solid var(--border);
  padding: 28px 22px;
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow-y: auto;
  position: sticky;
  top: 0;
  height: 100vh;
}

/* Logo Row */
.side-logo-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.side-logo {
  width: 56px; height: 56px;
  border-radius: 14px;
  object-fit: contain;
  padding: 6px;
  background: var(--white);
  border: 2px solid var(--border);
  box-shadow: 0 4px 16px rgba(26,26,255,0.1);
  flex-shrink: 0;
}
.side-name {
  font-size: 1.05rem; font-weight: 800;
  background: var(--g-rb);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.side-location {
  font-size: 0.68rem;
  color: var(--text-l);
  margin-top: 2px;
}

/* Tag */
.side-tag {
  font-size: 0.72rem;
  color: var(--text-m);
  line-height: 1.5;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 8px 12px;
  margin-bottom: 14px;
}

/* Stats */
.stats-row {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}
.stat-pill {
  flex: 1;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  padding: 10px 6px;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  transition: var(--tr);
}
.stat-pill:hover {
  border-color: var(--blue);
  background: rgba(26,26,255,0.04);
}
.stat-n {
  font-size: 1rem; font-weight: 800;
  background: var(--g-rb);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}
.stat-u {
  font-size: 0.6rem; font-weight: 600;
  color: var(--text-l); text-align: center;
}

/* Divider */
.side-divider {
  height: 1px;
  background: var(--border);
  margin: 12px 0;
}

/* Section label */
.section-label {
  font-size: 0.7rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text-m);
  margin-bottom: 10px;
}

/* Doctor card */
.doc-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border-radius: var(--r-md);
  border: 1.5px solid var(--border);
  background: var(--surface);
  transition: var(--tr);
}
.doc-card:hover {
  border-color: var(--blue);
  box-shadow: 0 4px 16px rgba(26,26,255,0.08);
}
.doc-avatar {
  width: 42px; height: 42px;
  border-radius: 12px;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.78rem; font-weight: 800; color: white;
  overflow: hidden;
}
.doc-avatar img {
  width: 100%; height: 100%; object-fit: cover; border-radius: 10px;
}
.blue-av { background: var(--g-b); }
.red-av  { background: var(--g-r); }
.doc-name {
  font-size: 0.82rem; font-weight: 800;
  color: var(--text-h); margin-bottom: 1px;
}
.doc-qual {
  font-size: 0.67rem; font-weight: 600;
  color: var(--blue); margin-bottom: 3px;
}
.doc-about {
  font-size: 0.64rem; color: var(--text-l); line-height: 1.4;
}

/* Why list */
.why-list {
  list-style: none;
  display: flex; flex-direction: column; gap: 6px;
  margin-bottom: 0;
}
.why-list li {
  display: flex; align-items: center; gap: 7px;
  font-size: 0.72rem; color: var(--text-m);
}
.wico { font-size: 0.75rem; flex-shrink: 0; }

/* Department chips */
.dept-chips {
  display: flex; flex-wrap: wrap; gap: 5px;
}
.dchip {
  font-size: 0.64rem; font-weight: 600;
  padding: 3px 9px; border-radius: 100px;
  border: 1px solid var(--border);
  color: var(--text-m);
  background: var(--surface);
  transition: var(--tr);
}
.dchip:hover {
  border-color: var(--red);
  color: var(--red);
  background: rgba(232,28,11,0.04);
}

/* Contact */
.contact-row {
  display: flex; flex-direction: column; gap: 8px;
}
.contact-item {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.72rem; color: var(--text-m);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: var(--r-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: var(--tr);
}
.contact-item:hover {
  border-color: var(--blue);
  color: var(--blue);
  background: rgba(26,26,255,0.04);
}
.c-ico { font-size: 1rem; flex-shrink: 0; }

/* ══════════════════════════════════════════════════
   RIGHT FORM PANEL
══════════════════════════════════════════════════ */
.form-panel {
  display: flex;
  flex-direction: column;
  background: var(--white);
  overflow-y: auto;
}

/* Form Header */
.form-header {
  background: var(--g-rb);
  padding: 18px 28px;
  display: flex; align-items: center; justify-content: space-between;
  flex-shrink: 0;
  position: sticky; top: 0; z-index: 10;
}
.fh-left { display: flex; align-items: center; gap: 12px; }
.fh-logo {
  width: 42px; height: 42px; border-radius: 10px;
  background: white; padding: 4px; object-fit: contain;
  box-shadow: 0 4px 14px rgba(0,0,0,0.2);
  flex-shrink: 0;
}
.fh-title {
  font-size: 1rem; font-weight: 800; color: white;
  letter-spacing: -0.01em;
}
.fh-sub { font-size: 0.7rem; color: rgba(255,255,255,0.7); margin-top: 1px; }
.fh-badge {
  display: flex; align-items: center; gap: 7px;
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.35);
  color: white; font-size: 0.72rem; font-weight: 700;
  padding: 5px 13px; border-radius: 100px;
  backdrop-filter: blur(8px);
}
.live-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #4ade80;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:0.5;transform:scale(0.75)} }

/* Form body */
.the-form {
  flex: 1;
  padding: 22px 28px 16px;
  display: flex; flex-direction: column; gap: 14px;
}

/* Two-column input row */
.row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

/* Field group */
.fg { display: flex; flex-direction: column; gap: 5px; }
.fg label {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.76rem; font-weight: 700;
  color: var(--text-m);
}
.li { font-size: 0.95rem; }
.req { color: var(--red); font-weight: 900; }
.wbadge {
  margin-left: auto;
  font-size: 0.65rem; font-weight: 700;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text-l); padding: 2px 8px; border-radius: 100px;
  transition: var(--tr);
}
.wbadge.warn { background:#fff8e0; border-color:#f59e0b; color:#92610a; }
.wbadge.over { background:#fee5e5; border-color:var(--red); color:var(--red); }
.opt-tag {
  margin-left: auto; font-size: 0.64rem; font-weight: 600;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text-l); padding: 2px 8px; border-radius: 100px;
}
.err { font-size: 0.67rem; color: var(--red); font-weight: 600; min-height: 14px; }

/* Inputs */
.fg input,
.fg select,
.fg textarea {
  width: 100%; padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem; color: var(--text-h);
  background: var(--surface);
  transition: var(--tr); outline: none;
}
.fg input::placeholder,
.fg textarea::placeholder { color: #c0c5e0; }
.fg input:focus,
.fg select:focus,
.fg textarea:focus {
  border-color: var(--blue); background: white;
  box-shadow: 0 0 0 3px rgba(26,26,255,0.09);
}
.fg textarea { resize: none; min-height: 72px; }

.sel-wrap { position: relative; }
.sel-wrap select { appearance: none; cursor: pointer; padding-right: 34px; }
.sarrow {
  position: absolute; right: 12px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-l); pointer-events: none;
}

/* Word bar */
.wbar-wrap { height: 3px; background: #eceef8; border-radius: 3px; overflow: hidden; margin-top: 3px; }
.wbar {
  height: 100%; width: 0%; border-radius: 3px;
  background: var(--g-b); transition: width 0.3s ease, background 0.3s;
}
.wbar.warn { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.wbar.over { background: var(--g-r); }

/* ── Ratings ── */
.ratings-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.rbox {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  padding: 12px 8px;
  display: flex; flex-direction: column;
  align-items: center; gap: 4px;
  transition: var(--tr);
}
.rbox.active {
  border-color: var(--red);
  background: rgba(232,28,11,0.03);
  box-shadow: 0 4px 16px rgba(232,28,11,0.1);
}
.rico { font-size: 1.15rem; line-height: 1; }
.rlbl { font-size: 0.68rem; font-weight: 700; color: var(--text-m); text-align: center; }
.stars { display: flex; gap: 2px; }
.star {
  font-size: 1.35rem; color: #d5d8ea;
  cursor: pointer; transition: var(--tr); line-height: 1; user-select: none;
}
.star:hover, .star.hover { color: var(--red); transform: scale(1.2); }
.star.lit {
  background: var(--g-rb);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.rhint { font-size: 0.6rem; font-weight: 600; color: var(--text-l); min-height: 12px; text-align: center; }

/* ── Upload ── */
.upload-zone {
  border: 1.5px dashed #c5cae8; border-radius: var(--r-md);
  background: var(--surface); cursor: pointer;
  transition: var(--tr); overflow: hidden; min-height: 56px;
}
.upload-zone:hover { border-color: var(--blue); background: rgba(26,26,255,0.03); }
.u-idle {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px;
}
.u-text { font-size: 0.73rem; color: var(--text-m); font-weight: 500; }
.u-previews { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px; }
.preview-item {
  position: relative; width: 56px; height: 56px;
  border-radius: 8px; overflow: hidden;
  border: 1.5px solid var(--border); background: #eceef8; flex-shrink: 0;
}
.preview-item img, .preview-item video { width: 100%; height: 100%; object-fit: cover; }
.aud-box { width:100%; height:100%; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px; padding:4px; }
.aud-box span { font-size:1.3rem; }
.aud-box p { font-size:0.5rem; color:var(--text-m); text-align:center; word-break:break-all; }
.preview-rm {
  position:absolute; top:2px; right:2px;
  width:15px; height:15px; border-radius:50%;
  background:var(--red); color:white; font-size:0.52rem; font-weight:900;
  display:flex; align-items:center; justify-content:center;
  cursor:pointer; border:1.5px solid white; transition:var(--tr);
}
.preview-rm:hover { transform:scale(1.15); }

/* ── Submit button ── */
.sub-btn {
  width: 100%; padding: 14px;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--g-rb);
  color: white; border: none; border-radius: var(--r-md);
  font-family: 'Inter', sans-serif; font-size: 0.95rem; font-weight: 800;
  cursor: pointer; transition: var(--tr);
  box-shadow: 0 6px 24px rgba(232,28,11,0.28), 0 2px 10px rgba(26,26,255,0.18);
  position: relative; overflow: hidden;
}
.sub-btn::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.12), transparent);
  opacity: 0; transition: opacity 0.2s;
}
.sub-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 32px rgba(232,28,11,0.38), 0 4px 16px rgba(26,26,255,0.22); }
.sub-btn:hover::before { opacity: 1; }
.sub-btn:active { transform: translateY(0); }
.sub-btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none !important; }
.b-spin {
  width: 17px; height: 17px; border-radius: 50%;
  border: 2.5px solid rgba(255,255,255,0.35); border-top-color: white;
  animation: spin 0.7s linear infinite; display: none;
}
@keyframes spin { to { transform: rotate(360deg); } }
.priv-note { font-size: 0.67rem; color: var(--text-l); text-align: center; }

/* Form footer */
.form-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 10px 28px;
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  font-size: 0.67rem; color: var(--text-l); flex-shrink: 0;
}
.form-footer a { color: var(--blue); text-decoration: none; }
.form-footer a:hover { color: var(--red); }

/* ══════════════════════════════════════════════════
   LOADER OVERLAY
══════════════════════════════════════════════════ */
.loader-overlay {
  display: none; position: fixed; inset: 0; z-index: 1000;
  background: rgba(255,255,255,0.85); backdrop-filter: blur(5px);
  flex-direction: column; align-items: center; justify-content: center;
  color: var(--text-h); font-weight: 700; font-size: 1.1rem; gap: 15px;
}
.loader-overlay.show { display: flex; animation: fadeIn 0.3s ease; }
.l-spinner {
  width: 40px; height: 40px; border-radius: 50%;
  border: 4px solid rgba(26,26,255,0.2); border-top-color: var(--blue);
  animation: spin 0.8s linear infinite;
}

/* ══════════════════════════════════════════════════
   SUCCESS MODAL
══════════════════════════════════════════════════ */
.success-overlay {
  display: none; position: fixed; inset: 0; z-index: 999;
  background: rgba(5,5,40,0.65); backdrop-filter: blur(10px);
  align-items: center; justify-content: center;
}
.success-overlay.show { display: flex; animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from{opacity:0} to{opacity:1} }

.s-modal {
  background: white; border-radius: var(--r-lg);
  padding: 40px 36px; text-align: center;
  max-width: 400px; width: 92%;
  box-shadow: 0 40px 100px rgba(0,0,0,0.4);
  animation: popIn 0.4s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes popIn { from{transform:scale(0.8);opacity:0} to{transform:scale(1);opacity:1} }
.s-icon { margin-bottom: 18px; }
.sring { animation: drawR 0.6s cubic-bezier(0.65,0,0.45,1) forwards; }
.stck  { animation: drawT 0.35s cubic-bezier(0.65,0,0.45,1) 0.55s forwards; }
@keyframes drawR { to{stroke-dashoffset:0} }
@keyframes drawT { to{stroke-dashoffset:0} }

.s-title {
  font-size: 1.6rem; font-weight: 800;
  background: var(--g-rb);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; margin-bottom: 8px;
}
.s-sub { font-size: 0.87rem; color: var(--text-m); line-height: 1.6; margin-bottom: 14px; }
.s-sub strong { color: var(--blue); -webkit-text-fill-color: var(--blue); }
.s-ref {
  display: inline-block;
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: 8px; padding: 7px 16px;
  font-size: 0.78rem; color: var(--text-m); margin-bottom: 12px;
}
.s-ref strong { color: var(--red); font-weight: 800; }
.s-quote {
  font-size: 0.72rem; color: var(--text-l);
  font-style: italic; line-height: 1.6;
  background: var(--surface); border-radius: 8px; padding: 8px 12px;
  margin-bottom: 20px;
}
.s-actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.btn-web {
  padding: 9px 18px; border-radius: 9px;
  background: linear-gradient(135deg,#0ea5e9,#0284c7);
  color:white; border:none; font-family:'Inter',sans-serif; text-decoration: none;
  font-size:0.82rem; font-weight:700; cursor:pointer; transition:var(--tr);
  box-shadow: 0 4px 12px rgba(14,165,233,0.3); display: inline-block;
}
.btn-web:hover { transform:translateY(-1px); box-shadow:0 6px 18px rgba(14,165,233,0.4); }
.btn-wa {
  padding: 9px 18px; border-radius: 9px;
  background: linear-gradient(135deg,#25d366,#1aaa52);
  color:white; border:none; font-family:'Inter',sans-serif;
  font-size:0.82rem; font-weight:700; cursor:pointer; transition:var(--tr);
  box-shadow: 0 4px 12px rgba(37,211,102,0.3);
}
.btn-wa:hover { transform:translateY(-1px); box-shadow:0 6px 18px rgba(37,211,102,0.4); }
.btn-gr {
  padding: 9px 18px; border-radius: 9px;
  background: linear-gradient(135deg,#f59e0b,#d97706);
  color:white; border:none; font-family:'Inter',sans-serif;
  font-size:0.82rem; font-weight:700; cursor:pointer; transition:var(--tr);
  box-shadow: 0 4px 12px rgba(245,158,11,0.3);
}
.btn-gr:hover { transform:translateY(-1px); }
.btn-new {
  padding: 9px 18px; border-radius: 9px;
  background: var(--g-b); color:white; border:none;
  font-family:'Inter',sans-serif; font-size:0.82rem; font-weight:700;
  cursor:pointer; transition:var(--tr);
  box-shadow: 0 4px 12px rgba(26,26,255,0.25);
}
.btn-new:hover { transform:translateY(-1px); box-shadow:0 6px 18px rgba(26,26,255,0.35); }

.side-footer-copy { display: none; }

/* ══════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════ */
@media (max-width: 820px) {
  .layout {
    display: flex;
    flex-direction: column;
  }

  .form-panel {
    order: 1;
  }

  .side-panel {
    order: 2;
    position: static; height: auto;
    border-right: none; border-top: 1px solid var(--border); border-bottom: none;
    padding: 20px 16px;
  }
  /* Show details on bottom for mobile view */
  .side-panel .why-list,
  .side-panel .dept-chips,
  .side-panel .contact-row { display: flex; }
  .side-panel .dept-chips { display: flex; flex-wrap: wrap; }
  .side-panel .side-divider:last-of-type { display: block; }

  /* Hide middle footer on mobile, show at bottom of details */
  .form-footer { display: none; }
  .side-footer-copy {
    display: block; text-align: center;
    font-size: 0.68rem; color: var(--text-l);
    margin-top: 16px; padding-top: 12px;
    border-top: 1px solid var(--border);
  }

  .form-header { position: static; padding: 14px 16px; }
  .the-form { padding: 16px 16px 14px; }

  .stats-row { gap: 6px; }
}

@media (max-width: 560px) {
  .row2 { grid-template-columns: 1fr; }
  .ratings-grid { grid-template-columns: repeat(2, 1fr); }
  .fh-badge { display: none; }
  .star { font-size: 1.25rem; }
}

@media (max-width: 380px) {
  .ratings-grid { grid-template-columns: repeat(2, 1fr); }
  .star { font-size: 1.1rem; }
}

/* Scrollbar styling for side panel */
.side-panel::-webkit-scrollbar { width: 4px; }
.side-panel::-webkit-scrollbar-track { background: transparent; }
.side-panel::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.form-panel::-webkit-scrollbar { width: 4px; }
.form-panel::-webkit-scrollbar-track { background: transparent; }
.form-panel::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
