.navbar-custom {
  max-width: 100vw;
  overflow-x: clip;
  background: var(--brand-gradient, linear-gradient(135deg, #5099FF 0%, #01112B 100%));
  font-family: var(--aimock-heading-font, "IBM Plex Sans", "Inter", sans-serif) !important;
  letter-spacing: 0;
}

.navbar-custom > .container-fluid {
  min-width: 0;
  max-width: 100%;
  flex-wrap: nowrap;
}

.navbar-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 0 1 auto;
}

.brand-logo {
  height: 36px;
  width: auto;
  max-width: 180px;
  display: block;
}

.navbar-custom.navbar-inner-pages .navbar-brand {
  padding: 0.2rem 0.35rem;
  margin: 0.15rem 0;
}

.navbar-custom.navbar-inner-pages > .container-fluid {
  padding-left: 0.95rem !important;
  padding-right: 0.95rem !important;
}

.navbar-custom.navbar-inner-pages .brand-logo {
  height: 32px;
  max-width: 160px;
}

@media (max-width: 575.98px) {
  .brand-logo {
    height: 30px;
    max-width: 150px;
  }

  .navbar-custom.navbar-inner-pages .brand-logo {
    height: 27px;
    max-width: 136px;
  }

  .navbar-custom.navbar-inner-pages > .container-fluid {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
  }
}

.navbar-nav .nav-link {
  font-weight: 500;
  font-size: 1.05em;
}

.navbar-brand,
.auth-main-btn,
.notification-title,
.dropdown-header,
.role-option-label,
.auth-profile-main {
  font-family: var(--aimock-heading-font, "IBM Plex Sans", "Inter", sans-serif);
  letter-spacing: 0;
}

.auth-profile-sub,
.notification-message,
.notification-time,
.role-option-sub,
.notification-empty {
  font-family: var(--aimock-body-font, "IBM Plex Sans", "Inter", sans-serif);
  letter-spacing: 0;
}

.btn-warning {
  font-weight: bold;
}

.auth-main-btn {
  min-width: 128px;
  font-weight: 600;
  border-radius: 10px;
  border: 1px solid rgba(226, 232, 240, 0.4);
  box-shadow: none;
  background: rgba(15, 23, 42, 0.25);
  color: #e2e8f0;
}

.auth-main-btn:hover,
.auth-main-btn:focus {
  background: rgba(148, 163, 184, 0.2);
  color: #f8fafc;
  border-color: rgba(226, 232, 240, 0.7);
}

.auth-profile-btn {
  min-width: 0;
  padding-left: 0.6rem;
  padding-right: 0.75rem;
}

.auth-notify-row {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.auth-login-btn {
  min-width: 108px;
}

.navbar-right-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.55rem;
  min-width: 0;
  flex: 0 1 auto;
}

.nav-mobile-user {
  display: inline-flex;
  align-items: center;
  min-width: 0;
}

.notification-trigger {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  position: relative;
}

.notification-trigger .notif-badge {
  position: absolute;
  top: -6px;
  right: -7px;
  background: #ef4444;
  color: #fff;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  font-size: 0.64rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.75);
}

.notification-menu {
  width: min(360px, 92vw);
  border-radius: 14px;
  border: 1px solid #dce6f3;
  box-shadow: 0 16px 30px rgba(2, 6, 23, 0.16);
  padding: 0;
  overflow: hidden;
}

.notification-menu .dropdown-header {
  background: #f8fbff;
  color: #0f172a;
  border-bottom: 1px solid #dce6f3;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  padding: 0.72rem 0.85rem;
}

.notification-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.notification-close-btn {
  border: 0;
  background: transparent;
  color: #475569;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
  cursor: pointer;
}

.notification-close-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.notification-actions {
  padding: 0.45rem 0.85rem;
  border-bottom: 1px solid #edf2f8;
  background: #ffffff;
  text-align: right;
}

.notification-action-btn {
  border: 0;
  background: transparent;
  color: #1d4ed8;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 0;
}

.notification-action-btn:hover {
  color: #1e40af;
  text-decoration: underline;
}

.notification-item-form {
  margin: 0;
}

.notification-item {
  width: 100%;
  text-align: left;
  border: 0;
  background: #fff;
  color: #0f172a;
  padding: 0.75rem 0.85rem;
  border-bottom: 1px solid #edf2f8;
  border-left: 4px solid transparent;
}

.notification-item.unread {
  background: var(--brand-gradient, linear-gradient(135deg, #5099FF 0%, #01112B 100%));
  border-left-color: #1d4ed8;
  box-shadow: inset 0 0 0 1px rgba(29, 78, 216, 0.08);
}
.notification-item.unread .notification-title,
.notification-item.unread .notification-message,
.notification-item.unread .notification-time,
.notification-item.unread .notification-state {
  color: #f8fbff;
}

.notification-item.read {
  background: #fbfdff;
  border-left-color: #d8e3f0;
}

.notification-item.read .notification-title {
  color: #42566f;
  font-weight: 600;
}

.notification-item.read .notification-message {
  color: #64748b;
}

.notification-item:hover {
  background: #eaf2fc;
}

.notification-title {
  display: block;
  font-size: 0.84rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
}

.notification-message {
  display: block;
  color: #42566f;
  font-size: 0.75rem;
  line-height: 1.35;
  margin-bottom: 0.22rem;
}

.notification-time {
  font-size: 0.66rem;
  color: #64748b;
}

.notification-state {
  display: inline-flex;
  margin-top: 0.18rem;
  font-size: 0.63rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #1d4ed8;
}

.notification-item.read .notification-state {
  color: #64748b;
}

.notification-empty {
  margin: 0;
  padding: 0.95rem 0.9rem;
  color: #64748b;
  font-size: 0.79rem;
}

.auth-btn-inner {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: nowrap;
  min-width: 0;
}

.auth-icon-wrap {
  width: 1.7rem;
  height: 1.7rem;
  flex: 0 0 1.7rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(226, 232, 240, 0.16);
  font-size: 0.76rem;
  color: #f8fafc;
}

.auth-icon-wrap.has-photo {
  padding: 0;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.2);
}

.auth-avatar {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.auth-icon-fallback {
  width: 100%;
  height: 100%;
  display: none;
  align-items: center;
  justify-content: center;
}

.auth-icon-fallback.u-inline-flex {
  display: inline-flex;
}

.auth-profile-text {
  display: inline-flex;
  flex-direction: column;
  gap: 0.08rem;
  line-height: 1.15;
  text-align: left;
  min-width: 0;
}

.auth-profile-main {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0;
  white-space: nowrap;
}

.auth-profile-sub {
  display: block;
  font-size: 0.66rem;
  opacity: 0.86;
  white-space: nowrap;
}

.role-login-modal .modal-content {
  border-radius: 12px;
  border: 1px solid #dbe5ef;
  overflow: hidden;
}

.role-login-modal .modal-header {
  background: var(--brand-secondary, #0d1b2a);
  color: #e2e8f0;
  border: 0;
}

.role-login-modal .btn-close {
  filter: invert(1);
}

.role-login-modal .modal-body {
  padding: 0.85rem;
  background: #f8fafc;
}

.role-option-card {
  width: 100%;
  border: 1px solid #dbe5ef;
  border-radius: 10px;
  padding: 0.66rem 0.75rem;
  background: #fff;
  text-decoration: none;
  color: #0f172a;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: border-color 0.14s ease, background-color 0.14s ease;
}

.role-option-card:hover {
  border-color: #94a3b8;
  background-color: #f8fafc;
  color: #0f172a;
}

.role-option-main {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.role-option-icon {
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.8rem;
}

.role-option-icon.student {
  background: #1d4ed8;
}

.role-option-icon.teacher {
  background: #0f766e;
}

.role-option-icon.institution {
  background: #334155;
}

.role-option-label {
  font-weight: 700;
  font-size: 0.88rem;
}

.role-option-sub {
  font-size: 0.7rem;
  color: #64748b;
}

.role-option-arrow {
  color: #94a3b8;
}

.google-auth-modal .modal-content {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.2);
}

.google-auth-modal .modal-header {
  border: 0;
  padding: 0.85rem 0.9rem 0;
}

.google-auth-modal .modal-body {
  padding: 0.55rem 1.15rem 1.15rem;
}

.google-auth-mark {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.07);
}

.google-auth-mark svg,
.google-auth-button svg {
  display: block;
}

.google-auth-button {
  width: 100%;
  min-height: 48px;
  border: 1px solid #d5dce8;
  border-radius: 8px;
  background: #ffffff;
  color: #111827;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  text-decoration: none;
  transition: border-color 0.14s ease, background 0.14s ease, box-shadow 0.14s ease;
}

.google-auth-button:hover,
.google-auth-button:focus {
  color: #111827;
  border-color: #94a3b8;
  background: #f8fafc;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-primary, #5099FF) 18%, transparent);
}

.google-auth-note {
  border: 1px solid #dbeafe;
  background: #eff6ff;
  color: #1e3a8a;
  border-radius: 8px;
  padding: 0.65rem 0.75rem;
  font-size: 0.8rem;
}

.google-auth-copy {
  max-width: 300px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.45;
}

@media (max-width: 991.98px) {
  .nav-mobile-user .notification-menu-mobile {
    position: fixed !important;
    left: 0.55rem !important;
    right: 0.55rem !important;
    top: 4rem !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    max-height: calc(100vh - 4.8rem);
    overflow-y: auto;
    transform: none !important;
    inset: 4rem 0.55rem auto 0.55rem !important;
  }
}

@media (max-width: 575.98px) {
  .navbar-right-actions {
    gap: 0.42rem;
  }

  .navbar-custom.navbar-inner-pages > .container-fluid {
    padding-left: 0.55rem !important;
    padding-right: 0.55rem !important;
  }

  .navbar-custom.navbar-inner-pages .brand-logo {
    height: 24px;
    max-width: 118px;
  }

  .auth-notify-row {
    gap: 0.35rem;
  }

  .auth-main-btn {
    min-width: 116px;
    padding-left: 0.55rem;
    padding-right: 0.62rem;
  }

  .notification-trigger {
    width: auto;
    height: auto;
    min-width: 0;
    border: 0;
    border-radius: 0;
    padding: 0.2rem 0.25rem;
    background: transparent;
    box-shadow: none;
    font-size: 0.9rem;
  }

  .notification-trigger:hover,
  .notification-trigger:focus {
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .notification-trigger .notif-badge {
    top: -5px;
    right: -8px;
  }

  .auth-profile-btn {
    padding-left: 0.45rem;
    padding-right: 0.55rem;
  }

  .nav-mobile-user .auth-profile-btn {
    min-width: auto;
    padding-left: 0.42rem;
    padding-right: 0.48rem;
  }

  .nav-mobile-user .auth-icon-wrap {
    width: 1.46rem;
    height: 1.46rem;
    font-size: 0.7rem;
  }

  .nav-mobile-user .auth-profile-main {
    max-width: 4.7rem;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.72rem;
  }

  .nav-mobile-user .auth-profile-sub {
    display: none;
  }

  .auth-profile-main {
    font-size: 0.76rem;
  }

  .auth-profile-sub {
    font-size: 0.62rem;
  }

  .google-auth-modal {
    margin: 0.75rem;
  }

  .google-auth-modal .modal-header {
    padding: 0.75rem 0.8rem 0;
  }

  .google-auth-modal .modal-body {
    padding: 0.4rem 0.9rem 1rem;
  }

  .google-auth-mark {
    width: 2.4rem;
    height: 2.4rem;
  }

  .google-auth-mark svg {
    width: 21px;
    height: 21px;
  }

  .google-auth-copy {
    max-width: 240px;
    font-size: 0.8rem;
  }

  .google-auth-button {
    min-height: 44px;
    gap: 0.5rem;
    font-size: 0.88rem;
  }

  .google-auth-note {
    padding: 0.55rem 0.65rem;
    font-size: 0.76rem;
  }
}

@media (max-width: 380px) {
  .navbar-custom.navbar-inner-pages .brand-logo {
    max-width: 108px;
  }

  .nav-mobile-user .auth-profile-text {
    display: none;
  }

  .nav-mobile-user .auth-profile-btn {
    padding-left: 0.34rem;
    padding-right: 0.34rem;
  }
}
