/* Login page — split layout (branding left, form right)
   BuildTack brand: navy #122538 + orange #F15A24 (image unchanged) */

.login-page {
  --bt-navy: #122538;
  --bt-orange: #F15A24;
  --bt-orange-hover: #D94A14;
  height: 100vh;
  height: 100dvh;
  display: flex;
  align-items: stretch;
  background: #f7f8fb;
  padding: 0;
  margin: 0;
  overflow: hidden;
}

.login-split {
  display: flex;
  width: 100%;
  height: 100%;
  flex-direction: row;
}

/* ===== Right Panel: Form (soft ambient background) ===== */
.login-split-left {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  overflow-y: auto;
  background:
    radial-gradient(ellipse 55% 45% at 88% 92%, rgba(241, 90, 36, 0.14), transparent 70%),
    radial-gradient(ellipse 45% 40% at 8% 88%, rgba(18, 37, 56, 0.08), transparent 68%),
    radial-gradient(ellipse 50% 35% at 70% 12%, rgba(241, 90, 36, 0.06), transparent 65%),
    #f7f8fb;
}

.login-panel-decor {
  position: absolute;
  pointer-events: none;
  z-index: 0;
}

.login-panel-dots {
  top: 20px;
  right: 24px;
  width: 140px;
  height: 140px;
  background-image: radial-gradient(#cbd5e1 1.3px, transparent 1.3px);
  background-size: 14px 14px;
  opacity: 0.55;
}

.login-panel-blob {
  border-radius: 50%;
  filter: blur(8px);
}

.login-panel-blob-br {
  right: -50px;
  bottom: -70px;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle at 35% 35%, rgba(241, 90, 36, 0.32), transparent 68%);
}

.login-panel-blob-bl {
  left: -60px;
  bottom: -40px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle at 50% 50%, rgba(18, 37, 56, 0.12), transparent 70%);
}

.login-form-wrapper {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
}

.login-welcome-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--bt-navy, #122538);
  margin-bottom: 24px;
  line-height: 1.3;
}

.login-card {
  background: #fff;
  border-radius: 20px;
  padding: 28px 26px;
  border: 1px solid rgba(18, 37, 56, 0.06);
  box-shadow:
    0 4px 6px rgba(15, 23, 42, 0.03),
    0 18px 40px rgba(15, 23, 42, 0.08);
}

.login-card-heading {
  font-size: 16px;
  font-weight: 600;
  color: var(--bt-navy, #122538);
  margin-bottom: 20px;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 13px;
  font-weight: 500;
  color: #475569;
}

.form-input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #e8edf3;
  border-radius: 12px;
  font-size: 14px;
  color: #1e293b;
  background: #f3f6fb;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.form-input:focus {
  border-color: var(--bt-orange, #F15A24);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(241, 90, 36, 0.15);
}

.form-input::placeholder {
  color: #94a3b8;
}

.btn-login {
  width: 100%;
  padding: 12px;
  margin-top: 8px;
  background: linear-gradient(90deg, #122538 0%, #F15A24 100%);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(241, 90, 36, 0.28);
  transition: opacity 0.2s, transform 0.1s, filter 0.2s;
}

.btn-login:hover {
  filter: brightness(1.05);
  opacity: 1;
}

.btn-login:active {
  transform: scale(0.98);
}

.login-links {
  margin-top: 20px;
  text-align: center;
  font-size: 13px;
  color: #64748b;
  line-height: 1.8;
}

.login-links a,
.form-link {
  color: var(--bt-orange, #F15A24);
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s;
}

.form-link:hover {
  color: var(--bt-orange-hover, #D94A14);
  text-decoration: underline;
}

.login-hint {
  color: var(--bt-navy, #122538) !important;
}

/* ===== Left Panel: Branding ===== */
.login-split-right {
  flex: 1.1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  position: relative;
  overflow: hidden;
  padding: 40px 32px;
  border-right: 1px solid #e2e8f0;
}

.login-split-right::before {
  display: none;
}

.login-brand-content {
  position: relative;
  z-index: 1;
  text-align: center;
  width: 100%;
  max-width: 560px;
}

.login-brand-image-panel {
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-brand-image {
  width: 100%;
  max-width: 520px;
  height: auto;
  object-fit: contain;
  display: block;
}

.login-brand-logo {
  font-size: 80px;
  display: block;
  margin-bottom: 24px;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.2));
}

.login-brand-name {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: 2px;
  margin-bottom: 8px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.login-brand-tagline {
  font-size: 16px;
  opacity: 0.85;
  font-weight: 400;
  letter-spacing: 0.5px;
}

/* ===== Error ===== */
.login-error {
  display: none;
  padding: 10px 12px;
  background: #fee2e2;
  color: #dc2626;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 12px;
}

.login-error.show {
  display: block;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .login-split-right {
    display: none;
  }

  .login-split-left {
    padding: 24px;
  }
}

@media (max-width: 480px) {
  .login-welcome-title {
    font-size: 22px;
  }

  .login-card {
    padding: 20px 16px;
  }
}

/* ===== Dark theme ===== */
[data-theme="dark"] .login-page {
  background: #0b1220;
}

[data-theme="dark"] .login-split-right {
  background: #0f172a;
  border-right-color: #334155;
}

[data-theme="dark"] .login-split-left {
  background:
    radial-gradient(ellipse 55% 45% at 88% 92%, rgba(241, 90, 36, 0.18), transparent 70%),
    radial-gradient(ellipse 45% 40% at 8% 88%, rgba(241, 90, 36, 0.08), transparent 68%),
    #1e293b;
}

[data-theme="dark"] .login-panel-dots {
  background-image: radial-gradient(#64748b 1.3px, transparent 1.3px);
  opacity: 0.35;
}

[data-theme="dark"] .login-card {
  background: #0f172a;
  border-color: #334155;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

[data-theme="dark"] .login-welcome-title {
  color: #f1f5f9;
}

[data-theme="dark"] .login-card-heading {
  color: #e2e8f0;
}

[data-theme="dark"] .form-label {
  color: #94a3b8;
}

[data-theme="dark"] .form-input {
  background: #1e293b;
  border-color: #334155;
  color: #f1f5f9;
}

[data-theme="dark"] .form-input:focus {
  border-color: #F15A24;
  background: #0f172a;
  box-shadow: 0 0 0 3px rgba(241, 90, 36, 0.2);
}

[data-theme="dark"] .login-links {
  color: #94a3b8;
}

[data-theme="dark"] .login-error {
  background: #450a0a;
  color: #fca5a5;
}

/* ===== Profile page (kept from original) ===== */
.profile-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 20px;
  align-items: start;
}

.profile-sidebar-card {
  padding: 24px;
  text-align: center;
}

.profile-avatar-wrap {
  position: relative;
  display: inline-block;
  margin-bottom: 16px;
}

.profile-avatar-lg {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--page-bg);
  box-shadow: var(--shadow);
}

.profile-avatar-edit {
  position: absolute;
  bottom: 4px;
  right: 4px;
  width: 32px;
  height: 32px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
  cursor: pointer;
  transition: background 0.2s;
}

.profile-avatar-edit svg {
  width: 14px;
  height: 14px;
}

.profile-avatar-edit:hover {
  background: #ea580c;
}

.profile-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-1);
}

.profile-role-badge {
  display: inline-block;
  margin-top: 6px;
  padding: 4px 12px;
  background: #FFEDD5;
  color: #EA580C;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}

.profile-meta-list {
  margin-top: 20px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.profile-meta-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  color: var(--text-2);
}

.profile-meta-item svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--text-2);
}

.profile-meta-item span {
  color: var(--text-1);
  font-weight: 500;
}

.profile-main {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.profile-section {
  padding: 24px;
}

.profile-section-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-1);
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.profile-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.profile-form-grid .form-group.full-width {
  grid-column: 1 / -1;
}

.profile-form-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.activity-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.activity-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.activity-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--page-bg);
}

.activity-icon svg {
  width: 16px;
  height: 16px;
  color: var(--info);
}

.activity-content strong {
  display: block;
  font-size: 13px;
  color: var(--text-1);
}

.activity-content p {
  font-size: 12px;
  color: var(--text-2);
  margin-top: 2px;
}

.activity-time {
  font-size: 11px;
  color: var(--text-2);
  margin-left: auto;
  white-space: nowrap;
}

/* Profile dropdown */
.profile-wrapper {
  position: relative;
}

.user-profile {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #FAFBFC;
}

.profile-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 220px;
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
  border: 1px solid var(--border);
  z-index: 300;
  overflow: hidden;
}

.profile-dropdown.show {
  display: block;
}

.profile-dropdown-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}

.profile-dropdown-header img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

.profile-dropdown-header strong {
  display: block;
  font-size: 13px;
  color: var(--text-1);
}

.profile-dropdown-header span {
  font-size: 11px;
  color: var(--text-2);
}

.profile-dropdown-menu {
  padding: 6px;
}

.profile-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--text-1);
  transition: background 0.15s;
  cursor: pointer;
  width: 100%;
  text-align: left;
}

.profile-dropdown-item:hover {
  background: var(--page-bg);
}

.profile-dropdown-item svg {
  width: 16px;
  height: 16px;
  color: var(--text-2);
}

.profile-dropdown-item.danger {
  color: var(--danger);
}

.profile-dropdown-item.danger svg {
  color: var(--danger);
}

.profile-dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 8px;
}

@media (max-width: 768px) {
  .profile-grid {
    grid-template-columns: 1fr;
  }

  .profile-form-grid {
    grid-template-columns: 1fr;
  }
}
