/* ============================================
   VTOP Clone – Custom Styles (VTop.css equivalent)
   ============================================ */

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  background: #eee;
  margin: 0;
  overflow-x: hidden;
}

/* ─── HEADER BACKGROUND ──────────────────────── */
.headerBackgroundColor {
  background: linear-gradient(90deg,
    #0a1628 0%,
    #122b5e 22%,
    #1a5dab 52%,
    #2e86c7 82%,
    #3d9be0 100%) !important;
  border: none !important;
}

/* ─── NAVBAR TWEAKS ──────────────────────────── */
#vtopHeader {
  min-height: 50px;
  z-index: 1030;
}
#vtopHeader .navbar-brand { line-height: 1; }
#vtopHeader .h1 { margin-bottom: 0; font-size: 1.65rem; }
#vtopHeader .h4 { margin-bottom: 0; }

.VITLogoStyle {
  letter-spacing: 3px;
}

/* navbar icons alignment */
#vtopHeader .navbar-text {
  padding-top: 0;
  padding-bottom: 0;
  display: inline-flex;
  align-items: center;
}
#vtopHeader .navbar-text .h4 {
  font-size: 1.15rem;
  line-height: 1;
}

/* Quick-links dropdown button override */
#quickLinks .btn-outline-primary {
  border-color: rgba(255,255,255,0.35);
}
#quickLinks .btn-outline-primary:hover {
  background: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.5);
}
#quickLinks .btn-outline {
  border: none;
}

/* user badge image */
.img-circle { border-radius: 50%; }
.img_icon_size {
  width: 30px;
  height: 30px;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,0.45);
}
.img_stamp_size {
  width: 100px;
  height: 120px;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,0.45);
}

/* ─── SESSION TIMER ──────────────────────────── */
#countdownDisplay {
  display: inline-flex;
  align-items: center;
  background: #dc3545;
  padding: 3px 14px;
  border-radius: 4px;
  margin: 0 12px;
  white-space: nowrap;
}

/* ─── SIDEBAR ────────────────────────────────── */
.btnBarColor {
  background: linear-gradient(180deg,
    #0a1628 0%,
    #122b5e 40%,
    #1a5dab 100%);
}

#sidePanel {
  width: 46px;
  min-width: 46px;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 50;
  scrollbar-width: none;
}
#sidePanel::-webkit-scrollbar { width: 0; }

.SideBarMenuBtn {
  color: rgba(255,255,255,0.72) !important;
  font-size: 1rem;
  padding: 7px 0 !important;
  width: 100%;
  text-align: center;
  background: transparent !important;
  transition: color .15s, background .15s;
}
.SideBarMenuBtn:hover,
.SideBarMenuBtn:focus {
  color: #fff !important;
  background: rgba(255,255,255,0.15) !important;
}
.SideBarMenuBtn .iconSpace {
  margin-right: 0;
}

/* Sidebar dropdowns */
.SideBarMenuDropDown {
  background: #fff !important;
  min-width: 260px;
  border-radius: 6px !important;
  max-height: 80vh;
  overflow-y: auto;
}
.dropdownMenuBoxWidth {
  min-width: 260px !important;
}
.menuHeaderColor {
  background: linear-gradient(90deg, #0a1628, #122b5e, #1a5dab);
  color: #fff !important;
  border-radius: 6px 6px 0 0;
}
.menuHeaderFontStyle {
  font-size: 0.82rem;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}
.menuFontStyle {
  font-size: 0.82rem !important;
  color: #333 !important;
  padding: 6px 12px !important;
}
.menuFontStyle:hover {
  background: #f0f4ff !important;
  color: #163172 !important;
}
.iconSpace {
  margin-right: 5px;
  width: 16px;
  text-align: center;
  display: inline-block;
}
.textColor1 { color: #163172; }

/* Sidebar button group vertical fix */
#sidePanel .btn-group-vertical {
  width: 100%;
}
#sidePanel .btn-group-vertical > .btn-group {
  width: 100%;
}
#sidePanel .btn-group.dropend {
  width: 100%;
}

/* ─── MAIN CONTENT AREA ─────────────────────── */
#vtopCoreDocument {
  padding: 20px 28px 40px;
  background: #eee;
}

/* ─── PROFILE CARD ───────────────────────────── */
.profile-card {
  background: #fff;
  border-radius: 3px;
  padding: 28px 36px;
  display: flex;
  align-items: flex-start;
  gap: 50px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
  margin-bottom: 24px;
}

.profile-photo-wrap {
  text-align: center;
  flex-shrink: 0;
}
.profile-photo-wrap img {
  width: 155px;
  height: 190px;
  object-fit: cover;
  border: 2px solid #b0b0b0;
  display: block;
}
.student-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: #222;
  margin-top: 10px;
  text-transform: uppercase;
  text-align: center;
}

.profile-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px 80px;
  flex: 1;
  padding-top: 16px;
}
.info-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: #c62828;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
.info-value {
  font-size: 0.95rem;
  color: #222;
  margin-top: 4px;
}

/* ─── SECTION ACCORDIONS ─────────────────────── */
.sections-wrap {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.section-accordion {
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}

.section-header {
  background: linear-gradient(90deg,
    #0a1628 0%,
    #122b5e 22%,
    #1a5dab 52%,
    #2e86c7 82%,
    #3d9be0 100%);
  display: flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
  min-height: 64px;
  transition: filter .15s;
}
.section-header:hover {
  filter: brightness(1.06);
}

.section-icon-box {
  background: #f5a623;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #163172;
  flex-shrink: 0;
}

.section-title {
  flex: 1;
  color: #fff;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  padding: 0 22px;
  font-family: 'Segoe UI', Roboto, Arial, sans-serif;
}

.section-chevron {
  color: rgba(255,255,255,0.85);
  font-size: 1.1rem;
  padding-right: 22px;
  transition: transform .3s ease;
}
.section-accordion.open .section-chevron {
  transform: rotate(180deg);
}

.section-body {
  background: #fff;
  max-height: 0;
  overflow: hidden;
  transition: max-height .4s ease;
}
.section-accordion.open .section-body {
  max-height: 1500px;
}
.section-body-inner {
  padding: 16px 20px;
}

/* ─── HOSTEL TABLE ───────────────────────────── */
.hostel-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.hostel-table tr {
  border-bottom: 1px solid #d5d5d5;
}
.hostel-table tr:last-child {
  border-bottom: none;
}
.hostel-table td {
  padding: 13px 16px;
  vertical-align: middle;
}
.hostel-table td:first-child {
  background-color: #d4d3d3;
  font-weight: 600;
  color: #222;
  width: 35%;
  font-size: 0.86rem;
}
.hostel-table td:last-child {
  background-color: #FAF0DD;
  color: #333;
}
.hostel-table tr:nth-child(even) td:first-child {
  background-color: #d4d3d3;
}
.hostel-table tr:nth-child(even) td:last-child {
  background-color: #FAF0DD;
}

/* ─── INFO TABLE (Personal / Educational) ──── */
.info-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}
.info-table th {
  background: #163172;
  color: #fff;
  padding: 9px 14px;
  text-align: left;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}
.info-table td {
  padding: 9px 14px;
  border-bottom: 1px solid #eaeaea;
  color: #444;
}
.info-table tr:last-child td {
  border-bottom: none;
}
.info-table tr:nth-child(even) td {
  background: #f6f7fc;
}

/* ─── ONBOARD MODAL ──────────────────────────── */
#onboardModal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  backdrop-filter: blur(5px);
}
#onboardModal.hidden { display: none; }

.modal-box {
  background: #fff;
  border-radius: 12px;
  width: 420px;
  max-width: 95vw;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0,0,0,0.45);
  animation: popIn .3s cubic-bezier(.34,1.56,.64,1);
}
@keyframes popIn {
  from { transform: scale(.82); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}

.modal-header-custom {
  background: linear-gradient(90deg, #0a1628, #122b5e, #1a5dab, #2e86c7);
  padding: 20px 24px;
  color: #fff;
  text-align: center;
}
.modal-header-custom .vit-logo {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: 3px;
}
.modal-header-custom p {
  font-size: 0.82rem;
  margin-top: 4px;
  opacity: 0.85;
}

.modal-body-custom { padding: 24px; }
.modal-body-custom h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #163172;
  margin-bottom: 16px;
  text-align: center;
}

.form-group { margin-bottom: 14px; }
.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: #444;
  margin-bottom: 5px;
}
.form-group input[type="text"],
.form-group input[type="email"] {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid #ddd;
  border-radius: 6px;
  font-size: 0.88rem;
  outline: none;
  transition: border-color .2s;
}
.form-group input:focus {
  border-color: #1565c0;
}
.form-group select {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid #ddd;
  border-radius: 6px;
  font-size: 0.88rem;
  outline: none;
  background: #fff;
  cursor: pointer;
  transition: border-color .2s;
}
.form-group select:focus {
  border-color: #1565c0;
}

/* photo upload */
.photo-upload-area {
  border: 2px dashed #bbb;
  border-radius: 8px;
  padding: 14px;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s, background .2s;
}
.photo-upload-area:hover {
  border-color: #1565c0;
  background: #f0f6ff;
}
.photo-upload-area input { display: none; }
#photoPreview {
  width: 85px;
  height: 105px;
  object-fit: cover;
  border-radius: 4px;
  display: none;
  margin: 0 auto 6px;
  border: 2px solid #1565c0;
}
.upload-icon { font-size: 1.8rem; color: #aaa; }
.upload-text { font-size: 0.78rem; color: #888; margin-top: 4px; }

.save-option {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.82rem;
  color: #555;
  margin: 14px 0 16px;
  cursor: pointer;
}
.save-option input[type="checkbox"] {
  width: 15px; height: 15px;
  accent-color: #1565c0;
  cursor: pointer;
}

.btn-submit-modal {
  width: 100%;
  padding: 11px;
  background: linear-gradient(90deg, #122b5e, #1a5dab, #2e86c7);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity .2s, transform .1s;
}
.btn-submit-modal:hover { opacity: .92; transform: translateY(-1px); }
.btn-submit-modal:active { transform: translateY(0); }

.error-msg {
  color: #c0392b;
  font-size: 0.78rem;
  margin-top: 3px;
  display: none;
}

/* ─── TOAST ──────────────────────────────────── */
#toast {
  position: fixed;
  bottom: 28px;
  right: 28px;
  background: #163172;
  color: #fff;
  padding: 11px 20px;
  border-radius: 6px;
  font-size: 0.86rem;
  font-weight: 600;
  box-shadow: 0 4px 18px rgba(0,0,0,0.3);
  transform: translateY(80px);
  opacity: 0;
  transition: transform .3s, opacity .3s;
  z-index: 10000;
}
#toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* ─── CHANGE PHOTO BTN (hidden by default) ─── */
.change-photo-btn { display: none; }

/* ─── USER DROPDOWN (header) ─────────────────── */
.user-dropdown-menu {
  background: linear-gradient(180deg, #0a1628, #122b5e);
  border: none;
  padding: 10px;
}
.user-dropdown-menu .dropdown-item {
  color: rgba(255,255,255,0.8);
}
.user-dropdown-menu .dropdown-divider {
  border-color: rgba(255,255,255,0.15);
}

/* ─── OFFCANVAS SIDEBAR ──────────────────────── */
#expandedSideBar {
  width: 280px;
  background: #fff;
}
#expandedSideBar .offcanvas-header {
  background: linear-gradient(90deg, #0a1628, #122b5e, #1a5dab);
  color: #fff;
}

/* ─── RESPONSIVE ───────────────────────────────── */
@media (max-width: 767.98px) {
  .profile-card {
    flex-direction: column;
    align-items: center;
    padding: 18px 14px;
    gap: 16px;
  }
  .profile-photo-wrap img {
    width: 120px;
    height: 150px;
  }
  .profile-info-grid {
    grid-template-columns: 1fr;
    gap: 14px;
    padding-top: 8px;
  }
  #vtopCoreDocument {
    padding: 12px 10px 24px;
  }
  #countdownDisplay {
    display: none !important;
  }
  .section-title {
    font-size: 0.82rem;
    letter-spacing: 1.2px;
    padding: 0 10px;
  }
  .section-icon-box {
    width: 48px;
    height: 48px;
    font-size: 1.1rem;
  }
  .section-header {
    min-height: 48px;
  }
  .sections-wrap {
    gap: 14px;
  }
  .hostel-table td {
    padding: 10px 12px;
    font-size: 0.82rem;
  }
  .hostel-table td:first-child {
    width: 40%;
    font-size: 0.8rem;
  }
  .info-table td,
  .info-table th {
    padding: 8px 10px;
    font-size: 0.8rem;
  }
  #vtopHeader .h1 {
    font-size: 1.3rem;
  }
  #vtopHeader .navbar-text {
    font-size: 0.75rem;
  }
  .modal-box {
    width: 95vw;
    max-width: 380px;
  }
  .modal-header-custom {
    padding: 16px 18px;
  }
  .modal-body-custom {
    padding: 18px;
  }
  .info-label {
    font-size: 0.75rem;
  }
  .info-value {
    font-size: 0.88rem;
  }
}

@media (max-width: 575.98px) {
  #sidePanel {
    display: none !important;
  }
  .vtop-body-wrapper {
    padding-top: 46px;
  }
  #vtopHeader {
    min-height: 46px;
  }
  .section-chevron {
    padding-right: 12px;
  }
}

@media (min-width: 768px) and (max-width: 991.98px) {
  .profile-info-grid {
    gap: 18px 40px;
  }
  .profile-card {
    gap: 35px;
    padding: 24px 28px;
  }
}

/* ─── LAYOUT HELPERS ─────────────────────────── */
.vtop-body-wrapper {
  display: flex;
  padding-top: 50px;
  height: 100vh;
  width: 100%;
}
.vtop-sidebar-col {
  height: calc(100vh - 50px);
  overflow-y: auto;
  position: sticky;
  top: 50px;
}
.vtop-content-col {
  flex: 1;
  height: calc(100vh - 50px);
  overflow-y: auto;
}

/* Scrollbar for main content */
.vtop-content-col::-webkit-scrollbar { width: 8px; }
.vtop-content-col::-webkit-scrollbar-track { background: #e0e0e0; }
.vtop-content-col::-webkit-scrollbar-thumb { background: #999; border-radius: 4px; }
.vtop-content-col::-webkit-scrollbar-thumb:hover { background: #777; }
