/* ── Base ── */
html {
  font-size: 14px;
  position: relative;
  min-height: 100%;
}

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

body { margin-bottom: 60px; }

.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;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   NAVBAR
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.ti-navbar {
  background: linear-gradient(135deg, #0f3460 0%, #1450a3 55%, #1f6feb 100%);
  padding-top: 0;
  padding-bottom: 0;
  min-height: 58px;
}

/* Brand */
.ti-brand-icon {
  font-size: 1.4rem;
  color: #ffd700;
  line-height: 1;
}
.ti-brand-text {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  color: #fff;
}
.navbar-brand:hover .ti-brand-text { color: #e8f4ff; }

/* Nav link base */
.ti-main-nav .ti-nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, 0.88);
  font-weight: 500;
  font-size: 0.875rem;
  padding: 0.55rem 0.85rem;
  border-radius: 0.5rem;
  white-space: nowrap;
  transition: background 0.18s ease, color 0.18s ease;
  margin: 3px 1px;
}

.ti-main-nav .ti-nav-link i {
  font-size: 1rem;
  flex-shrink: 0;
}

.ti-main-nav .ti-nav-link:hover,
.ti-main-nav .ti-nav-link:focus {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
}

/* Active dropdown toggle */
.ti-main-nav .nav-item.dropdown.show > .ti-nav-link {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

/* Dropdown caret */
.ti-main-nav .dropdown-toggle::after {
  margin-left: 4px;
  opacity: 0.75;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   DROPDOWN MENU
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.ti-dropdown-menu {
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 0.65rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.14), 0 2px 8px rgba(0, 0, 0, 0.08);
  min-width: 210px;
  padding: 6px 6px;
  margin-top: 6px !important;
  background: #fff;
  animation: tiDropIn 0.15s ease;
}

@keyframes tiDropIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Section header inside dropdown */
.ti-dropdown-section-header {
  font-size: 0.67rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #8a94a6;
  padding: 8px 10px 4px;
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Divider */
.ti-divider {
  margin: 5px 8px;
  border-color: #e9ecef;
}

/* Dropdown item */
.ti-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 0.45rem;
  padding: 0.48rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #1a2b4a;
  transition: background 0.14s ease, color 0.14s ease;
}

.ti-dropdown-item:hover,
.ti-dropdown-item:focus {
  background: #eef4ff;
  color: #1450a3;
}

/* Icon chip inside dropdown item */
.ti-item-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 0.35rem;
  background: #eef4ff;
  color: #1f6feb;
  font-size: 0.875rem;
  flex-shrink: 0;
  transition: background 0.14s ease;
}

.ti-dropdown-item:hover .ti-item-icon,
.ti-dropdown-item:focus .ti-item-icon {
  background: #1f6feb;
  color: #fff;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   ACCOUNT / LOGIN AREA
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.ti-login-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;
  margin-bottom: 0;
}

.ti-login-nav .nav-link {
  color: rgba(255, 255, 255, 0.88);
  font-weight: 500;
  font-size: 0.875rem;
  border-radius: 0.5rem;
  padding: 0.4rem 0.75rem;
  white-space: nowrap;
  transition: background 0.18s ease, color 0.18s ease;
}

.ti-login-nav .nav-link:hover,
.ti-login-nav .nav-link:focus {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
}

.ti-user-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  padding: 0.3rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
}

.ti-account-link {
  color: rgba(255, 255, 255, 0.88) !important;
  padding: 0.4rem 0.75rem !important;
}

.ti-logout-btn {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.82rem;
  padding: 0.32rem 0.85rem;
  transition: background 0.18s ease;
}

.ti-logout-btn:hover,
.ti-logout-btn:focus {
  background: rgba(255, 255, 255, 0.28);
  color: #fff;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   RESPONSIVE — MOBILE COLLAPSED MENU
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
@media (max-width: 991.98px) {
  .ti-main-nav .ti-nav-link {
    margin: 2px 0;
    border-radius: 0.45rem;
  }

  .ti-dropdown-menu {
    background: rgba(255, 255, 255, 0.06);
    border: none;
    box-shadow: none;
    border-radius: 0.45rem;
    margin-top: 2px !important;
    padding: 2px 4px;
    animation: none;
  }

  .ti-dropdown-section-header {
    color: rgba(255, 255, 255, 0.55);
  }

  .ti-dropdown-item {
    color: rgba(255, 255, 255, 0.85);
  }

  .ti-dropdown-item:hover,
  .ti-dropdown-item:focus {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
  }

  .ti-item-icon {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
  }

  .ti-dropdown-item:hover .ti-item-icon {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
  }

  .ti-divider {
    border-color: rgba(255, 255, 255, 0.15);
  }

  .ti-account-nav {
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    margin-top: 8px;
    padding-top: 8px;
  }

  .ti-user-badge {
    margin-bottom: 6px;
  }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   FORM FLOATING OVERRIDES
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.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;
}
