/* =============================================================
   responsive.css — ADBU Admission Portal
   University Design: Deep Navy + Maroon + Teal
   ============================================================= */

/* ---------------------------------------------------------------
   1. Design Tokens
--------------------------------------------------------------- */
:root {
  --navy:       #1a3a6b;
  --navy-dk:    #122a52;
  --navy-lt:    #2a4f8f;
  --maroon:     #8b1a1a;
  --teal:       #1a5f5f;
  --bg:         #f0f2f5;
  --surface:    #ffffff;
  --border:     #d0d7e3;
  --text:       #1e2a3a;
  --muted:      #5a6a7e;
  --radius:     6px;
  --shadow:     0 2px 8px rgba(26,58,107,0.12);
}

/* ---------------------------------------------------------------
   2. Base reset
--------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: 'Segoe UI', Arial, sans-serif;
  font-size: 14px;
  background: var(--bg);
  color: var(--text);
  margin: 0;
  padding: 0;
}

/* ---------------------------------------------------------------
   3. Sidebar nav — override old style.css floats
--------------------------------------------------------------- */
.left-panel {
  width: 230px;
  flex-shrink: 0;
  background: var(--navy);
  border-radius: var(--radius);
  overflow: hidden;
  align-self: flex-start;
  position: sticky;
  top: 16px;
  box-shadow: var(--shadow);
}

.left-panel ul {
  margin: 0;
  padding: 8px 0;
  list-style: none;
  width: 100%;
  float: none;
}

.left-panel ul li {
  margin: 0;
  padding: 0;
  width: 100%;
  float: none;
  font-size: 13px;
  font-weight: normal;
}

.left-panel ul li a,
.left-panel ul li a:hover {
  display: block;
  width: 100%;
  float: none;
  padding: 10px 16px;
  color: #c8d8f0;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  border-left: 3px solid transparent;
  border-radius: 0;
  background: none;
  box-sizing: border-box;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  min-height: 0;
}

.left-panel ul li a:hover {
  background: rgba(255,255,255,0.10);
  color: #ffffff;
  border-left-color: var(--teal);
}

#left-nav hr {
  border: none;
  border-top: 1px solid rgba(255,255,255,0.12);
  margin: 8px 0;
}

#left-nav h3,
#left-nav h4 {
  color: #b8cce8;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 16px;
  margin: 0;
}

#left-nav iframe {
  display: block;
  margin: 8px 12px 12px;
  width: calc(100% - 24px);
  border-radius: 4px;
}

/* ---------------------------------------------------------------
   4. Right panel
--------------------------------------------------------------- */
.right-panel {
  flex: 1;
  min-width: 0;
  margin-left: 16px;
  padding: 0;
  background: transparent;
}

.right-panel .head {
  background: var(--navy);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  padding: 10px 16px;
  border-radius: var(--radius) var(--radius) 0 0;
  border-left: 4px solid var(--maroon);
  width: 100%;
  float: none;
  box-sizing: border-box;
  margin-bottom: 0;
}

/* ---------------------------------------------------------------
   5. Form fields — clean modern look
--------------------------------------------------------------- */
.fm-left input[type=text],
.fm-left input[type=password],
.fm-left input[type=email],
.fm-left input[type=number],
.fm-left input[type=tel],
.fm-left input[type=date],
.fm-left select,
.fm-left textarea,
.fm-right input[type=text],
.fm-right input[type=password],
.fm-right input[type=email],
.fm-right input[type=number],
.fm-right input[type=tel],
.fm-right input[type=date],
.fm-right select,
.fm-right textarea,
.fm-left-login input[type=text],
.fm-left-login input[type=password],
.fm-left-login select,
.fm-full input[type=text],
.fm-full select,
.fm-full textarea,
.fm-full-academic input[type=text],
.fm-full-academic select,
.fm-full-academic textarea {
  border: 1px solid var(--border);
  background: #f8fafc;
  border-radius: var(--radius);
  font-family: 'Segoe UI', Arial, sans-serif;
  color: var(--text);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.fm-left input:focus,
.fm-right input:focus,
.fm-left select:focus,
.fm-right select:focus,
.fm-left textarea:focus,
.fm-right textarea:focus,
.fm-left-login input:focus,
.fm-full input:focus,
.fm-full select:focus,
.fm-full-academic input:focus,
.fm-full-academic select:focus {
  border-color: var(--navy-lt);
  box-shadow: 0 0 0 3px rgba(26,58,107,0.10);
  background: #fff;
}

/* ---------------------------------------------------------------
   6. Buttons
--------------------------------------------------------------- */
.submit,
input[type="submit"],
input[type="button"],
button[type="submit"] {
  background: var(--navy);
  border: none;
  border-radius: var(--radius);
  color: #fff;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  padding: 9px 22px;
  transition: background 0.15s;
  box-shadow: var(--shadow);
}

.submit:hover,
input[type="submit"]:hover,
input[type="button"]:hover {
  background: var(--navy-lt);
}

.bt1 a,
.bt1 input[type=submit],
.bt1 input[type=button],
.bt2 input[type=submit],
.bt2 input[type=button] {
  background: var(--navy);
  border: none;
  border-radius: var(--radius);
  color: #fff;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  padding: 9px 22px;
  text-decoration: none;
  display: inline-block;
  text-align: center;
  margin: 10px 8px 0 0;
  float: none;
  width: auto;
  transition: background 0.15s;
}

.bt1 a:hover,
.bt1 input[type=submit]:hover,
.bt1 input[type=button]:hover,
.bt2 input[type=submit]:hover,
.bt2 input[type=button]:hover {
  background: var(--navy-lt);
  color: #fff;
  text-decoration: none;
}

/* ---------------------------------------------------------------
   7. Login / Register card
--------------------------------------------------------------- */
.login {
  width: 100%;
  max-width: 500px;
  background: var(--surface);
  margin: 30px auto;
  border-radius: 8px;
  border-top: 4px solid var(--navy);
  box-shadow: var(--shadow);
  padding: 32px;
  float: none;
  height: auto !important;   /* override any inline height */
  min-height: 0 !important;
  box-sizing: border-box;
}

.fm-left-login {
  width: 100%;
  float: none;
  margin: 0 0 12px;
  padding: 0 0 10px;
  border-bottom: 1px solid #e8ecf2;
  box-sizing: border-box;
}

.fm-left-login label {
  display: block;
  width: 100%;
  float: none;
  margin: 8px 0 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.fm-left-login input[type=text],
.fm-left-login input[type=password] {
  width: 100%;
  height: 40px;
  padding: 8px 12px;
  font-size: 15px;
  float: none;
  box-sizing: border-box;
}

.fm-left-login select {
  width: 100%;
  height: 40px;
  padding: 8px 12px;
  box-sizing: border-box;
}

.fm-left-login input[type=radio],
.fm-left-login input[type=checkbox] {
  width: auto;
  height: auto;
  float: none;
}

/* Registration form inside login card */
.registration label {
  display: block;
  margin: 8px 0 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.registration input[type=text],
.registration input[type=password],
.registration select {
  width: 100%;
  height: 40px;
  padding: 8px 12px;
  font-size: 15px;
  border: 1px solid var(--border);
  background: #f8fafc;
  border-radius: var(--radius);
  color: var(--text);
  outline: none;
  box-sizing: border-box;
  margin-bottom: 4px;
}

/* ---------------------------------------------------------------
   8. update-academic card
--------------------------------------------------------------- */
.update-academic {
  width: 100%;
  max-width: 700px;
  border: none;
  border-radius: 8px;
  border-top: 4px solid var(--navy);
  box-shadow: var(--shadow);
  padding: 24px;
  margin: 20px auto;
  float: none;
  background: var(--surface);
  box-sizing: border-box;
}

/* ---------------------------------------------------------------
   9. Headings
--------------------------------------------------------------- */
.head2 {
  color: var(--navy);
  font-size: 18px;
  font-weight: 700;
  text-align: center;
  margin: 8px 0;
}

.head2 a { color: var(--maroon); text-decoration: none; }

.head3 {
  color: var(--navy);
  font-size: 17px;
  font-weight: 700;
  text-align: left;
  line-height: 1.4;
}

.head3 a { color: var(--navy); text-decoration: none; }

/* ---------------------------------------------------------------
   10. Tables
--------------------------------------------------------------- */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius);
  margin-bottom: 12px;
}

.table_body {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  background: var(--surface);
}

.tr_width1 {
  background: var(--navy) !important;
  color: #fff !important;
  font-weight: 600;
  font-size: 12px;
  padding: 9px 10px !important;
  text-align: left;
  border: none !important;
}

.tr_width {
  padding: 8px 10px;
  border-bottom: 1px solid #e8ecf2 !important;
  border-left: none !important;
  color: var(--text);
  font-size: 13px;
  vertical-align: middle;
}

td, th { min-width: 80px; }

/* ---------------------------------------------------------------
   11. Footer
--------------------------------------------------------------- */
.footer .wrapper {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.foot-left { color: #b8cce8; font-size: 13px; float: none; }
.foot-right { float: none; }
.foot-right a { color: #b8cce8; text-decoration: none; font-size: 13px; }
.foot-right a:hover,
.foot-right a.active { color: #fff; }

/* ---------------------------------------------------------------
   12. Hamburger — hidden on desktop
--------------------------------------------------------------- */
#nav-toggle {
  display: none;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 5px;
  cursor: pointer;
  padding: 9px 11px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

#nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
}

/* ---------------------------------------------------------------
   13. Chosen plugin
--------------------------------------------------------------- */
.chosen-container { max-width: 100%; }

/* ---------------------------------------------------------------
   14. Link styles
--------------------------------------------------------------- */
.link-style  { color: var(--maroon); text-decoration: none; font-weight: 600; font-size: 14px; }
.link-style:hover  { color: #6b1212; text-decoration: underline; }
.link-style2 { color: var(--navy); text-decoration: none; font-weight: 600; font-size: 14px; }
.link-style2:hover { color: var(--navy-lt); text-decoration: underline; }
.link-style3 { color: var(--navy-lt); text-decoration: none; font-weight: 600; font-size: 14px; }
.link-style3:hover { color: var(--navy); text-decoration: underline; }

.link-style4 {
  color: var(--navy);
  font-size: 14px;
  font-weight: 600;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--navy);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: block;
  text-align: left;
  text-decoration: none;
  margin-top: 10px;
  transition: background 0.15s, border-color 0.15s;
  box-shadow: 0 1px 3px rgba(26,58,107,0.08);
  width: auto;
  clear: both;
  filter: none;
}
.link-style4:hover { background: #eef2f9; border-left-color: var(--maroon); color: var(--navy); text-decoration: none; }

/* ---------------------------------------------------------------
   15. Misc
--------------------------------------------------------------- */
.red   { color: #c0392b; font-weight: 600; }
.green { color: #1a7a3a; font-weight: 600; }
.error { border: 1px solid #c0392b !important; background: #fff5f5 !important; }
.submit2 { background: var(--maroon); border: none; color: #fff; padding: 7px 16px; border-radius: var(--radius); cursor: pointer; }

/* ---------------------------------------------------------------
   16. MOBILE — max-width: 768px
--------------------------------------------------------------- */
@media (max-width: 768px) {

  /* Stack layout vertically */
  .content-area {
    flex-direction: column !important;
    padding: 10px !important;
  }

  /* Hide sidebar by default, show when toggled */
  .left-panel {
    width: 100% !important;
    position: static !important;
    border-radius: var(--radius) !important;
    margin-bottom: 0 !important;
    display: none !important;
    flex-shrink: unset !important;
  }

  .left-panel.nav-open {
    display: block !important;
    margin-bottom: 12px !important;
  }

  /* Nav content always visible when panel is shown */
  #left-nav { display: block !important; }

  /* Right panel full width */
  .right-panel {
    margin-left: 0 !important;
    width: 100% !important;
  }

  /* Show hamburger */
  #nav-toggle {
    display: flex !important;
  }

  /* Nav links — bigger touch targets */
  .left-panel ul li a,
  .left-panel ul li a:hover {
    min-height: 48px;
    display: flex !important;
    align-items: center;
    padding: 12px 16px;
  }

  /* Form columns — stack full width */
  .fm-left,
  .fm-right {
    width: 100% !important;
    float: none !important;
    margin: 8px 0 0 !important;
  }

  /* All inputs full width, touch-friendly */
  input[type="text"],
  input[type="password"],
  input[type="email"],
  input[type="number"],
  input[type="tel"],
  input[type="date"],
  select,
  textarea {
    width: 100% !important;
    box-sizing: border-box !important;
    min-height: 44px !important;
    font-size: 16px !important;
    float: none !important;
  }

  /* Radios/checkboxes — don't stretch */
  input[type="radio"],
  input[type="checkbox"] {
    width: auto !important;
    min-height: 0 !important;
    height: auto !important;
  }

  /* Login / register card — full width */
  .login {
    width: 100% !important;
    max-width: 100% !important;
    margin: 12px 0 !important;
    padding: 20px !important;
    height: auto !important;
    min-height: 0 !important;
    float: none !important;
  }

  .fm-left-login {
    width: 100% !important;
    float: none !important;
    margin: 0 0 12px !important;
  }

  .fm-left-login input[type=text],
  .fm-left-login input[type=password] {
    width: 100% !important;
    float: none !important;
  }

  .registration input[type=text],
  .registration input[type=password],
  .registration select {
    width: 100% !important;
  }

  /* update-academic card */
  .update-academic {
    width: 100% !important;
    max-width: 100% !important;
    margin: 12px 0 !important;
    padding: 16px !important;
    float: none !important;
  }

  /* Buttons — full width on mobile */
  .bt1 a,
  .bt1 input[type=submit],
  .bt1 input[type=button],
  .bt2 input[type=submit],
  .bt2 input[type=button] {
    width: 100% !important;
    margin: 8px 0 0 !important;
    float: none !important;
    display: block !important;
    text-align: center !important;
  }

  /* Header title smaller */
  .header-title { font-size: 14px; padding: 0 10px; }

  /* fm-full full width */
  .fm-full,
  .fm-full-academic {
    width: 100% !important;
    float: none !important;
  }

  .fm-full select,
  .fm-full-academic select {
    width: 100% !important;
  }

  /* left-sd / right-sd stack */
  .left-sd,
  .right-sd {
    width: 100% !important;
    float: none !important;
  }
}

/* ---------------------------------------------------------------
   17. MOBILE — max-width: 600px (footer)
--------------------------------------------------------------- */
@media (max-width: 600px) {
  .foot-left,
  .foot-right {
    width: 100%;
    display: block;
  }

  .footer .wrapper {
    flex-direction: column;
    gap: 6px;
  }

  .footer a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
}

/* ---------------------------------------------------------------
   18. MOBILE — max-width: 480px (logo)
--------------------------------------------------------------- */
@media (max-width: 480px) {
  .logo a img { max-width: 150px; height: auto; }
  .header-title { font-size: 13px; }
}

/* ---------------------------------------------------------------
   Steps for Application
--------------------------------------------------------------- */
.steps-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px 16px;
  background: var(--surface);
}

.step-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: #f6f8fb;
  border: 1px solid var(--border);
  border-left: 4px solid var(--navy);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
  box-shadow: 0 1px 3px rgba(26,58,107,0.07);
}

.step-card:hover {
  background: #eef2f9;
  border-left-color: var(--maroon);
  box-shadow: 0 3px 8px rgba(26,58,107,0.13);
  text-decoration: none;
  color: var(--text);
}

.step-card.step-done {
  border-left-color: var(--teal);
  background: #f0f8f6;
  opacity: 0.85;
}

.step-card.step-active {
  border-left-color: var(--maroon);
  background: #fff8f8;
}

.step-number {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--navy);
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.step-card.step-done .step-number {
  background: var(--teal);
}

.step-card.step-active .step-number {
  background: var(--maroon);
}

.step-body {
  flex: 1;
  min-width: 0;
}

.step-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 3px;
}

.step-card.step-done .step-title {
  color: var(--teal);
}

.step-card.step-active .step-title {
  color: var(--maroon);
}

.step-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
}

.step-arrow {
  font-size: 18px;
  color: var(--navy);
  flex-shrink: 0;
  font-weight: 700;
}

.step-card.step-done .step-arrow {
  color: var(--teal);
}

.step-card.step-active .step-arrow {
  color: var(--maroon);
}

@media (max-width: 480px) {
  .step-card { padding: 12px 14px; gap: 12px; }
  .step-number { width: 34px; height: 34px; font-size: 14px; }
  .step-title { font-size: 14px; }
}

/* ---------------------------------------------------------------
   Login page — action buttons and links
--------------------------------------------------------------- */
.login-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
  align-items: center;
}

.login-actions .submit {
  margin: 0;
  padding: 10px 28px;
  font-size: 14px;
}

.btn-register {
  display: inline-block;
  background: transparent;
  border: 2px solid var(--navy);
  border-radius: var(--radius);
  color: var(--navy);
  font-size: 14px;
  font-weight: 600;
  padding: 8px 20px;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
  cursor: pointer;
}

.btn-register:hover {
  background: var(--navy);
  color: #ffffff;
  text-decoration: none;
}

.login-links {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #e8ecf2;
}

.forgot-link {
  font-size: 13px;
  color: var(--maroon);
  text-decoration: none;
  font-weight: 500;
}

.forgot-link:hover {
  text-decoration: underline;
  color: var(--maroon-dark, #6b1212);
}

@media (max-width: 480px) {
  .login-actions {
    flex-direction: column;
  }
  .login-actions .submit,
  .btn-register {
    width: 100%;
    text-align: center;
  }
}

/* ---------------------------------------------------------------
   Toast notifications (replaces old message-red / message-green)
--------------------------------------------------------------- */
.toast {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 99999;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 300px;
  max-width: 420px;
  padding: 16px 18px;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
  font-family: 'Segoe UI', Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  animation: toastIn 0.3s ease;
}

.toast-success {
  background: #1a5f3a;
  color: #ffffff;
  border-left: 5px solid #2ecc71;
}

.toast-error {
  background: #6b1212;
  color: #ffffff;
  border-left: 5px solid #e74c3c;
}

.toast-icon {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

.toast-success .toast-icon {
  background: rgba(255,255,255,0.20);
  color: #ffffff;
}

.toast-error .toast-icon {
  background: rgba(255,255,255,0.20);
  color: #ffffff;
  font-size: 16px;
}

.toast-text {
  flex: 1;
  font-weight: 500;
}

.toast-close {
  background: none;
  border: none;
  color: rgba(255,255,255,0.75);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  margin-left: 4px;
  flex-shrink: 0;
  transition: color 0.15s;
}

.toast-close:hover {
  color: #ffffff;
}

.toast-hide {
  animation: toastOut 0.35s ease forwards;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes toastOut {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(40px); }
}

@media (max-width: 480px) {
  .toast {
    top: 12px;
    right: 12px;
    left: 12px;
    min-width: 0;
    max-width: 100%;
  }
}
