:root {
  --navy-deep: #0b1730;
  --navy-mid: #142744;
  --navy-panel: #16233d;
  --blue-accent: #2f7bff;
  --gold: #d9a441;
  --gold-soft: #e7c07a;
  --text-muted: #9fb0c9;
  --text-body: #4b5568;
}

html, body {
  height: 100%;
  font-family: 'Inter', sans-serif;
  background: var(--navy-deep);
}

body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
  overflow: hidden;
}

/* Background geometric accents */
body::before,
body::after {
  content: "";
  position: absolute;
  pointer-events: none;
}
body::before {
  top: -180px;
  left: -160px;
  width: 520px;
  height: 520px;
  background: linear-gradient(135deg, rgba(47,123,255,0.18), transparent 70%);
  clip-path: polygon(0 0, 100% 0, 60% 100%, 0 60%);
}
body::after {
  bottom: -220px;
  right: -180px;
  width: 560px;
  height: 560px;
  background: linear-gradient(315deg, rgba(217,164,65,0.10), transparent 65%);
  clip-path: polygon(100% 100%, 0 100%, 40% 0, 100% 40%);
}

.auth-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 980px;
  display: flex;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 30px 70px rgba(3, 10, 26, 0.55);
}

/* LEFT PANEL */
.brand-panel {
  flex: 1 1 46%;
  background: linear-gradient(160deg, var(--navy-mid) 0%, var(--navy-panel) 55%, var(--navy-deep) 100%);
  padding: 48px 44px;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.brand-panel::before {
  content: "";
  position: absolute;
  top: -60px;
  right: -90px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(47,123,255,0.16), transparent 70%);
}

.brand-logo-row {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  z-index: 1;
}

.brand-logo-row img {
  width: 46px;
  height: 46px;
  object-fit: contain;
}

.brand-name {
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 0.5px;
  line-height: 1.1;
  margin: 0;
}

.brand-tagline {
  font-size: 0.68rem;
  letter-spacing: 2px;
  color: var(--gold);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}
.brand-tagline::before,
.brand-tagline::after {
  content: "";
  height: 1px;
  width: 14px;
  background: var(--gold);
  opacity: 0.7;
}

.product-block {
  position: relative;
  z-index: 1;
  margin-top: 36px;
}

.product-name {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 2.6rem;
  line-height: 1;
  margin-bottom: 18px;
}

.product-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.55;
  max-width: 340px;
  margin-bottom: 26px;
}

.divider-line {
  width: 46px;
  height: 2px;
  background: var(--gold);
  margin-bottom: 26px;
}

.feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.feature-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
  color: #e7ecf5;
}

.feature-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
}

.brand-footer {
  position: relative;
  z-index: 1;
  font-size: 0.75rem;
  color: rgba(159, 176, 201, 0.7);
  margin-top: 40px;
}

/* RIGHT PANEL */
.form-panel {
  flex: 1 1 54%;
  background: #ffffff;
  padding: 56px 52px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.welcome-title {
  font-weight: 800;
  font-size: 1.9rem;
  color: #0b1730;
  margin-bottom: 6px;
}

.welcome-sub {
  color: var(--text-body);
  font-size: 0.95rem;
  margin-bottom: 30px;
}

.form-label-custom {
  font-weight: 600;
  font-size: 0.88rem;
  color: #0b1730;
  margin-bottom: 6px;
}

.input-icon-group {
  position: relative;
  margin-bottom: 20px;
}

.input-icon-group .form-control {
  padding-left: 44px;
  height: 50px;
  border-radius: 10px;
  border: 1px solid #dfe3ea;
  background: #f7f8fa;
  font-size: 0.95rem;
}

.input-icon-group .form-control:focus {
  box-shadow: 0 0 0 3px rgba(47, 123, 255, 0.15);
  border-color: var(--blue-accent);
  background: #fff;
}

.input-icon-group .icon-left {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #8891a0;
  pointer-events: none;
}

.input-icon-group .icon-toggle {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #8891a0;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  line-height: 0;
}

.btn-signin {
  background: var(--navy-deep);
  border: none;
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  height: 52px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: background 0.15s ease;
}

.btn-signin:hover {
  background: #14213b;
  color: #fff;
}

.powered-by {
  text-align: center;
  margin-top: 26px;
  font-size: 0.82rem;
  color: #9aa3b2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.powered-by img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.powered-by strong {
  color: #b9862f;
  font-weight: 700;
}

@media (max-width: 860px) {
  .auth-shell {
    flex-direction: column;
    max-width: 480px;
  }
  .brand-panel, .form-panel {
    padding: 40px 32px;
  }
  .product-name {
    font-size: 2.1rem;
  }
}

/* ============== PROFILE PAGE ============== */
.profile-body {
  display: block;
  height: auto;
  overflow: visible;
  align-items: normal;
  justify-content: normal;
  background: #f4f6fa;
}
.profile-body::before,
.profile-body::after {
  content: none;
}

.profile-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}

.profile-card {
  width: 100%;
  max-width: 620px;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 30px 70px rgba(3, 10, 26, 0.12);
  padding: 40px 44px;
}

.profile-card-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid #edf0f6;
}
.profile-card-header h1 {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--navy-deep);
  margin: 0;
}
.profile-card-header p {
  font-size: 0.85rem;
  color: var(--text-body);
  margin: 4px 0 0;
}
.profile-back-link {
  margin-left: auto;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--blue-accent);
  text-decoration: none;
  white-space: nowrap;
}
.profile-back-link:hover {
  text-decoration: underline;
}

.avatar-circle-lg {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 1.15rem;
}

.profile-section-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #8891a0;
  margin-bottom: 14px;
}
.profile-section-title span {
  text-transform: none;
  font-weight: 400;
  letter-spacing: normal;
  color: #b0b8c4;
}
.profile-section-title-spaced {
  margin-top: 30px;
}

@media (max-width: 520px) {
  .profile-card {
    padding: 30px 24px;
  }
  .profile-card-header {
    flex-wrap: wrap;
  }
  .profile-back-link {
    margin-left: 0;
    width: 100%;
  }
}

/* ============== APP NAVBAR (dashboard) ============== */
.app-navbar {
  width: 100%;
  background: #fff;
  border-bottom: 1px solid #e7eaf1;
  padding: 14px 32px;
  display: flex;
  align-items: center;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 20;
}
.app-navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  margin-right: auto;
}
.app-navbar-brand img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}
.app-navbar-brand-name {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--navy-deep);
  line-height: 1;
  margin: 0;
}
.app-navbar-brand-sub {
  font-size: 0.68rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #8891a0;
  margin: 0;
}

/* ============== NAVBAR PROFILE TRIGGER (right side, any topbar) ======== */
.navbar-profile-trigger {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #f1f3f8;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 6px 12px 6px 6px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
  flex-shrink: 0;
}
.navbar-profile-trigger:hover,
.navbar-profile-trigger:focus-visible {
  background: #e7eaf1;
  border-color: #dfe3ea;
}
.navbar-profile-trigger .avatar-circle {
  width: 34px;
  height: 34px;
  font-size: 0.8rem;
}
.navbar-profile-trigger-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.2;
  min-width: 0;
}
.navbar-profile-trigger-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--navy-deep);
  max-width: 140px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.navbar-profile-trigger-role {
  font-size: 0.7rem;
  color: #8891a0;
}
.navbar-profile-trigger-chevron {
  color: #8891a0;
  flex-shrink: 0;
}

@media (max-width: 560px) {
  .navbar-profile-trigger-text {
    display: none;
  }
  .navbar-profile-trigger {
    padding: 4px;
    border-radius: 50%;
  }
}

.navbar-profile-dropdown {
  flex-shrink: 0;
}
.navbar-profile-menu {
  min-width: 220px;
  padding: 8px;
  border: 1px solid #e7eaf1;
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(20, 24, 40, 0.14);
  margin-top: 8px !important;
}
.navbar-profile-menu .dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 0.88rem;
  color: var(--navy-deep);
}
.navbar-profile-menu .dropdown-item:hover,
.navbar-profile-menu .dropdown-item:focus {
  background: #f1f3f8;
}
.navbar-profile-menu .dropdown-item.text-danger:hover,
.navbar-profile-menu .dropdown-item.text-danger:focus {
  background: #fdeceb;
}
.navbar-profile-menu .dropdown-item svg {
  flex-shrink: 0;
  opacity: 0.8;
}
.navbar-profile-menu .dropdown-divider {
  margin: 6px 4px;
}

/* ============== PROFILE MODAL ============== */
.profile-modal-content {
  border-radius: 18px;
  border: none;
  overflow: hidden;
}
.profile-modal-header {
  align-items: flex-start;
  border-bottom: 1px solid #edf0f6;
  padding: 24px 28px;
}
.profile-modal-identity {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.profile-modal-identity .modal-title {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--navy-deep);
}
.profile-modal-meta {
  font-size: 0.8rem;
  color: var(--text-body);
  margin: 4px 0 0;
}
.profile-modal-body {
  padding: 24px 28px 28px;
}
.profile-modal-footer {
  border-top: 1px solid #edf0f6;
  margin-top: 22px;
  padding-top: 18px;
  text-align: center;
}
.profile-modal-logout {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.86rem;
  font-weight: 600;
  color: #b23b3b;
  text-decoration: none;
}
.profile-modal-logout:hover {
  text-decoration: underline;
}
