html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

:root {
  --drdo-ink: #0b2a4a;
  --drdo-subtle: #5b6b7a;
  --drdo-surface: #ffffff;
  --drdo-border: #e8eef4;
  --drdo-shadow: 0 10px 30px rgba(0, 40, 90, 0.10);
}

body.site-bg {
  margin-bottom: 0;
  background:
    radial-gradient(1200px 600px at 10% 5%, rgba(13, 110, 253, 0.08), transparent 55%),
    radial-gradient(1000px 600px at 90% 10%, rgba(220, 53, 69, 0.08), transparent 60%),
    radial-gradient(800px 500px at 50% 100%, rgba(100, 200, 255, 0.06), transparent 70%),
    linear-gradient(180deg, #f0f5ff 0%, #ffffff 35%, #f5f8ff 70%, #ffffff 100%);
  color: var(--drdo-ink);
  position: relative;
}

body.site-bg::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(600px 400px at 20% 30%, rgba(52, 152, 219, 0.03), transparent 70%),
    radial-gradient(500px 500px at 80% 70%, rgba(155, 89, 182, 0.03), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

body.site-bg > * {
  position: relative;
  z-index: 1;
}

.main-wrap {
  min-height: calc(100vh - 76px);
}

.glass-nav {
  background: rgba(255, 255, 255, 0.8) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(232, 238, 244, 0.9) !important;
  box-shadow: 0 4px 20px rgba(0, 40, 90, 0.08);
}

.navbar .navbar-brand {
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--drdo-ink) !important;
  font-size: 1.2rem;
}

.navbar .nav-link {
  font-weight: 600;
  color: var(--drdo-ink) !important;
  transition: all 0.3s ease;
  padding: 0.5rem 1rem !important;
  border-radius: 8px;
}

.navbar .nav-link:hover {
  background: rgba(13, 110, 253, 0.08);
  color: #0d6efd !important;
}

.navbar .dropdown-menu {
  border: 1px solid var(--drdo-border);
  box-shadow: 0 12px 40px rgba(0, 40, 90, 0.12);
  border-radius: 12px;
  padding: 0.5rem;
}

.navbar .dropdown-item {
  border-radius: 10px;
  padding: 0.55rem 0.75rem;
}

.navbar .dropdown-item:active {
  background: rgba(13, 110, 253, 0.12);
  color: var(--drdo-ink);
}

.white-box {
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  box-shadow: 0 15px 40px rgba(0, 40, 90, 0.1), inset 0 1px 1px rgba(255, 255, 255, 0.8);
}

.gray-txt {
  color: var(--drdo-subtle) !important;
}

.form-control,
.form-select {
  border-radius: 10px;
  border: 1.5px solid #dbe6f0;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(5px);
  transition: all 0.3s ease;
  font-weight: 500;
}

.form-control:focus,
.form-select:focus {
  border-color: #0d6efd;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15), inset 0 1px 2px rgba(13, 110, 253, 0.05);
}

.form-control::placeholder {
  color: rgba(91, 107, 122, 0.65);
  font-weight: 500;
}

.form-label {
  font-weight: 600;
  color: var(--drdo-ink);
  font-size: 0.95rem;
  margin-bottom: 0.6rem;
}

.btn {
  border-radius: 10px;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  transition: all 0.3s ease;
  border: none;
  font-size: 0.95rem;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
}

.btn-primary {
  background: linear-gradient(135deg, #0d6efd, #0b5ed7);
  color: #fff;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #0b5ed7, #0a58ca);
}

.btn-danger {
  background: linear-gradient(135deg, #dc3545, #bb2d3b);
  color: #fff;
}

.btn-danger:hover {
  background: linear-gradient(135deg, #bb2d3b, #a02830);
}

.btn-outline-primary {
  border: 2px solid #0d6efd;
  color: #0d6efd;
  background: transparent;
}

.btn-outline-primary:hover {
  background: rgba(13, 110, 253, 0.08);
  border-color: #0b5ed7;
  color: #0b5ed7;
}

.btn-outline-danger {
  border: 2px solid #dc3545;
  color: #dc3545;
  background: transparent;
}

.btn-outline-danger:hover {
  background: rgba(220, 53, 69, 0.08);
  border-color: #bb2d3b;
  color: #bb2d3b;
}

.btn-lg {
  padding: 0.9rem 2rem;
}

.login-wrap {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

.form-box {
  width: 100%;
  max-width: 650px;
  padding: 3rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(15px);
  border: 2px solid rgba(13, 110, 253, 0.1);
  box-shadow: 0 20px 60px rgba(0, 40, 90, 0.15), inset 0 1px 1px rgba(255, 255, 255, 0.8);
  transition: all 0.3s ease;
}

.form-title {
  color: var(--drdo-ink);
  font-weight: 700;
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
}

.form-head {
  margin-bottom: 2rem;
  text-align: center;
}

.form-head .text-muted {
  color: var(--drdo-subtle) !important;
  font-size: 0.95rem;
}

.logo-big {
  width: 90px;
  height: 90px;
  object-fit: contain;
  margin-bottom: 1rem;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.or-line {
  text-align: center;
  color: var(--drdo-subtle);
  font-weight: 600;
  font-size: 0.9rem;
  position: relative;
}

.or-line::before,
.or-line::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 40%;
  height: 1px;
  background: var(--drdo-border);
}

.or-line::before {
  left: 0;
}

.or-line::after {
  right: 0;
}

.input-group-text {
  background: rgba(255, 255, 255, 0.6);
  border: 1.5px solid #dbe6f0;
  color: var(--drdo-subtle);
}

.badge {
  border-radius: 20px;
  font-weight: 600;
  padding: 0.5rem 1.2rem;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
}

.home-top,
.home-top {
  padding: 4rem 2rem 3rem;
  max-width: 1000px;
  margin: 0 auto;
}

.home-top {
  position: relative;
  isolation: isolate;
}

.home-top::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("/images/drdo-logo.png");
  background-repeat: no-repeat;
  background-position: center 60%;
  background-size: 550px 550px;
  opacity: 0.12;
  z-index: -1;
  pointer-events: none;
}

.home-top h1,
.home-top h1 {
  color: var(--drdo-ink);
  font-weight: 800;
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.home-top .lead,
.home-top .lead {
  font-size: 1.1rem;
  color: var(--drdo-subtle);
  font-weight: 500;
}

.home-card {
  padding: 2.5rem 2rem;
  border-radius: 14px;
  text-align: center;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 10px 30px rgba(0, 40, 90, 0.08), inset 0 1px 1px rgba(255, 255, 255, 0.7);
  transition: all 0.3s ease;
}

.home-card:hover {
  background: rgba(255, 255, 255, 0.75);
  transform: translateY(-8px);
  box-shadow: 0 20px 50px rgba(0, 40, 90, 0.12), inset 0 1px 1px rgba(255, 255, 255, 0.7);
}

.card-admin {
  border-top: 4px solid #dc3545;
}

.card-student {
  border-top: 4px solid #0d6efd;
}

.home-card-big {
  min-height: 320px;
  padding: 3rem 2.25rem;
}

.form-box-red {
  border-top: 4px solid #dc3545;
}

.form-box-blue {
  border-top: 4px solid #0d6efd;
}

.site-foot {
  border-top: 1px solid rgba(232, 238, 244, 0.9);
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* Admin Panel */
.admin-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 0 2rem;
}

.page-head {
  font-weight: 800;
  color: var(--drdo-ink);
  font-size: 1.75rem;
}

.sec-title {
  font-weight: 700;
  color: var(--drdo-ink);
}

.user-img {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e8f4f8, #d4e8f0);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.info-box {
  border: 1px solid #d4e8f0;
  border-radius: 12px;
  padding: 1.25rem;
  text-align: center;
  background: #fafcfd;
}

.info-lbl {
  font-size: 0.85rem;
  color: var(--drdo-subtle);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.info-val {
  font-size: 2rem;
  font-weight: 800;
  color: #0d9488;
}

.search-row {
  display: flex;
  gap: 0.75rem;
}

.search-row .form-control {
  flex: 1;
}

.btn-logout,
.btn-find,
.btn-add {
  background: linear-gradient(135deg, #14b8a6, #8b5cf6);
  color: #fff;
  border: none;
  white-space: nowrap;
}

.btn-reset {
  background: #fff;
  color: #0d9488;
  border: 2px solid #14b8a6;
  white-space: nowrap;
}

.btn-logout:hover,
.btn-find:hover,
.btn-add:hover {
  background: linear-gradient(135deg, #0d9488, #7c3aed);
  color: #fff;
}

.btn-reset:hover {
  background: rgba(20, 184, 166, 0.08);
  color: #0d9488;
  border-color: #0d9488;
}

.tbl {
  border-collapse: separate;
  border-spacing: 0;
}

.tbl thead th {
  background: linear-gradient(90deg, #14b8a6, #8b5cf6);
  color: #fff;
  font-weight: 600;
  padding: 0.85rem 1rem;
  border: none;
  font-size: 0.9rem;
}

.tbl thead th:first-child {
  border-radius: 10px 0 0 0;
}

.tbl thead th:last-child {
  border-radius: 0 10px 0 0;
}

.tbl tbody td {
  padding: 0.85rem 1rem;
  vertical-align: middle;
  border-bottom: 1px solid #e8eef4;
  font-size: 0.9rem;
}

.tbl tbody tr:hover {
  background: rgba(20, 184, 166, 0.04);
}

.st-on {
  color: #16a34a;
  font-weight: 700;
}

.st-off {
  color: #dc2626;
  font-weight: 700;
}

.tbl-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.tbl-btns .btn {
  padding: 0.35rem 0.65rem;
  font-size: 0.8rem;
  border-radius: 8px;
}

.status-opt .form-check-input:checked + .form-check-label {
  font-weight: 600;
}

#studentStatusActive:checked + .form-check-label {
  color: #16a34a;
}

#studentStatusDeactivate:checked + .form-check-label {
  color: #dc2626;
}

.btn-vw,
.btn-ed,
.btn-ok,
.btn-warn {
  border: none;
  color: #fff !important;
}

.btn-vw {
  background-color: #8b5cf6;
}

.btn-ed {
  background-color: #3b82f6;
}

.btn-ok {
  background-color: #22c55e;
}

.btn-warn {
  background-color: #f97316;
}

.btn-vw:hover,
.btn-vw:focus,
.btn-vw:active,
.btn-ed:hover,
.btn-ed:focus,
.btn-ed:active,
.btn-ok:hover,
.btn-ok:focus,
.btn-ok:active,
.btn-warn:hover,
.btn-warn:focus,
.btn-warn:active {
  color: #fff !important;
  border-color: transparent !important;
  opacity: 1;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-vw:hover,
.btn-vw:focus,
.btn-vw:active {
  background-color: #7c3aed !important;
}

.btn-ed:hover,
.btn-ed:focus,
.btn-ed:active {
  background-color: #2563eb !important;
}

.btn-ok:hover,
.btn-ok:focus,
.btn-ok:active {
  background-color: #16a34a !important;
}

.btn-warn:hover,
.btn-warn:focus,
.btn-warn:active {
  background-color: #ea580c !important;
}

/* Apprenticeship Panel */
.stu-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 0 2rem;
}

.page-head {
  font-weight: 800;
  color: var(--drdo-ink);
  font-size: 1.75rem;
}

.sec-title {
  font-weight: 700;
  color: var(--drdo-ink);
}

.user-img {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #dbeafe, #bfdbfe);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.info-box {
  background: #f8fbff;
  border-color: #cfe2ff;
}

.info-box .info-val {
  color: #0d6efd;
}

.info-sm {
  font-size: 1.15rem !important;
}

.btn-logout {
  background: linear-gradient(135deg, #0d6efd, #0b5ed7);
  color: #fff;
  border: none;
  white-space: nowrap;
}

.btn-logout:hover {
  background: linear-gradient(135deg, #0b5ed7, #0a58ca);
  color: #fff;
}

.det-row .det-lbl {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--drdo-subtle);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.25rem;
}

.det-row .det-val {
  display: block;
  font-weight: 600;
  color: var(--drdo-ink);
  word-break: break-word;
}

.feat-box {
  border: 1px solid #cfe2ff;
  border-radius: 12px;
  padding: 1.5rem;
  height: 100%;
  background: #f8fbff;
  transition: all 0.3s ease;
}

.feat-box:hover {
  background: #fff;
  box-shadow: 0 8px 24px rgba(13, 110, 253, 0.1);
  transform: translateY(-4px);
}

.feat-ico {
  font-size: 1.75rem;
  margin-bottom: 0.75rem;
}

.feat-box h5 {
  font-weight: 700;
  color: var(--drdo-ink);
  margin-bottom: 0.5rem;
}

/* App Header Styles */
.top-head {
  background: linear-gradient(135deg, #0b2a4a 0%, #1a4d7a 100%);
  color: white;
  padding: 1.5rem 0;
  box-shadow: 0 4px 20px rgba(0, 40, 90, 0.15);
}

.head-row {
  padding: 0 1rem;
}

.logo-sm {
  width: 80px;
  height: 80px;
  object-fit: contain;
  background: white;
  padding: 8px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.brand-row div {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.site-title {
  font-size: 1.5rem;
  font-weight: 800;
  margin: 0;
  color: white;
  letter-spacing: 0.3px;
}

.site-tag {
  font-size: 0.85rem;
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
  letter-spacing: 0.5px;
}

.top-head .navbar .nav-link {
  color: white !important;
  font-weight: 600;
  padding: 0.5rem 1rem !important;
  transition: all 0.3s ease;
}

.top-head .navbar .nav-link:hover {
  color: #64c8ff !important;
  transform: translateY(-2px);
}

.top-head .dropdown-menu {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(13, 110, 253, 0.15);
  box-shadow: 0 12px 40px rgba(0, 40, 90, 0.15);
  border-radius: 12px;
  margin-top: 0.5rem;
}

.top-head .dropdown-item {
  color: var(--drdo-ink);
  font-weight: 500;
  padding: 0.65rem 1rem;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.top-head .dropdown-item:hover {
  background: rgba(13, 110, 253, 0.08);
  color: #0d6efd;
  padding-left: 1.25rem;
}

.top-head .dropdown-item.text-danger:hover {
  background: rgba(220, 53, 69, 0.08);
  color: #dc3545;
}

/* Mobile responsiveness */
@media (max-width: 576px) {
  .home-top,
  .home-top {
    padding: 2.25rem 1rem 2rem;
  }

  .home-top h1,
  .home-top h1 {
    font-size: 1.8rem;
  }

  .home-card {
    padding: 1.5rem 1.25rem;
  }

  .page-head,
  .page-head {
    font-size: 1.35rem;
  }

  .top-btns,
  .form-btns {
    width: 100%;
  }

  .top-btns .btn,
  .form-btns .btn {
    flex: 1;
    width: 100%;
  }

  .top-btns form {
    flex: 1;
  }

  .top-btns form .btn {
    width: 100%;
  }

  .info-box {
    padding: 1rem;
  }

  .info-val {
    font-size: 1.6rem;
  }

  .info-sm {
    font-size: 1rem !important;
  }

  .search-row {
    flex-direction: column;
  }

  .tbl-btns {
    flex-direction: column;
    align-items: stretch;
  }

  .tbl-btns .btn,
  .tbl-btns form,
  .tbl-btns form .btn {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .home-card:hover,
  .feat-box:hover {
    transform: none;
  }
}