/* ===== SaaS split login (hero left / form right) ===== */

html:has(body.login-page) {
  width: 100%;
  height: 100%;
}

body.login-page {
  width: 100% !important;
  height: 100vh !important;
  height: 100dvh !important;
  min-height: 100vh !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  background: #fff !important;
}

.login-shell {
  display: flex !important;
  flex-direction: row !important;
  align-items: stretch !important;
  width: 100% !important;
  max-width: none !important;
  height: 100% !important;
  min-height: 100vh !important;
  min-height: 100dvh !important;
}

.login-hero {
  position: relative !important;
  flex: 1 1 50% !important;
  width: 50% !important;
  min-width: 0 !important;
  min-height: 100% !important;
  overflow: hidden !important;
  color: #fff;
}

.login-hero-image,
img.login-hero-image {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: cover !important;
  object-position: center !important;
  display: block !important;
  z-index: 0 !important;
}

.login-hero-shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(2, 6, 23, 0.28) 0%, rgba(2, 6, 23, 0.45) 42%, rgba(2, 6, 23, 0.86) 100%);
  pointer-events: none;
}

.login-hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 36px 40px 28px;
  box-sizing: border-box;
}

.login-hero-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.login-hero-logo {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(8px);
  flex-shrink: 0;
}

.login-hero-logo svg {
  width: 22px;
  height: 22px;
  color: #fff;
}

.login-hero-company {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.1;
}

.login-hero-company .accent,
.login-hero-headline .accent {
  color: var(--login-accent, #2dd4bf);
}

.login-hero-product {
  margin-top: 2px;
  font-size: 12px;
  font-weight: 500;
  opacity: 0.9;
}

.login-hero-copy {
  max-width: 460px;
}

.login-hero-headline {
  margin: 0 0 14px;
  font-size: clamp(34px, 4.2vw, 52px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.login-hero-desc {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.88);
  max-width: 420px;
}

.login-hero-copy-footer {
  margin: 0;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
}

.login-panel {
  position: relative !important;
  flex: 1 1 50% !important;
  width: 50% !important;
  min-width: 0 !important;
  min-height: 100% !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  padding: 48px 28px;
  background: #fff;
  overflow: auto;
  box-sizing: border-box;
}

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

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

.login-panel-blobs {
  right: -40px;
  bottom: -60px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, color-mix(in srgb, var(--login-accent, #14b8a6) 28%, transparent), transparent 70%);
  filter: blur(2px);
}

.login-help-btn {
  position: absolute;
  top: 22px;
  right: 22px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #475569;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
}

.login-help-btn svg {
  width: 15px;
  height: 15px;
}

.login-help-btn:hover {
  border-color: color-mix(in srgb, var(--login-accent, #14b8a6) 45%, #e2e8f0);
  color: #0f172a;
}

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

.login-card {
  background: #fff;
  border-radius: 28px;
  padding: 34px 32px 28px;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.10);
  border: 1px solid rgba(226, 232, 240, 0.9);
}

.login-card-head {
  margin-bottom: 22px;
}

.login-card-head h2 {
  margin: 0;
  font-size: 28px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.login-card-head p {
  margin: 6px 0 0;
  font-size: 14px;
  color: #64748b;
}

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

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

.form-label {
  font-size: 13px;
  font-weight: 600;
  color: #334155;
}

.input-with-icon {
  position: relative;
}

.input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 17px;
  height: 17px;
  color: #94a3b8;
  pointer-events: none;
}

.input-eye {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border: 0;
  background: transparent;
  color: #94a3b8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 8px;
}

.input-eye svg {
  width: 17px;
  height: 17px;
}

.input-eye:hover {
  color: #475569;
  background: #f8fafc;
}

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

.form-input.has-icon {
  padding-left: 42px;
}

.form-input.has-trailing {
  padding-right: 44px;
}

.form-input:focus {
  border-color: var(--login-accent, #14b8a6);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--login-accent, #14b8a6) 18%, transparent);
}

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

.login-form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: -2px;
}

.login-remember {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #475569;
  cursor: pointer;
  user-select: none;
}

.login-remember input {
  width: 16px;
  height: 16px;
  accent-color: var(--login-accent, #14b8a6);
}

.login-forgot {
  font-size: 13px;
  font-weight: 600;
  color: var(--login-accent, #0d9488);
  text-decoration: none;
}

.login-forgot:hover {
  text-decoration: underline;
}

.btn-login {
  width: 100%;
  margin-top: 4px;
  padding: 13px 16px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(90deg, var(--login-accent-from, #12B5D4), var(--login-accent-to, #3A82EE));
  box-shadow: 0 10px 24px color-mix(in srgb, var(--login-accent, #3A82EE) 28%, transparent);
  transition: transform 0.12s ease, opacity 0.2s ease;
}

.btn-login svg {
  width: 18px;
  height: 18px;
}

.btn-login:hover {
  opacity: 0.95;
}

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

.login-or {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0 14px;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 600;
}

.login-or::before,
.login-or::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e2e8f0;
}

.login-or span {
  letter-spacing: 0.08em;
}

.login-signup {
  margin: 0;
  text-align: center;
  font-size: 13px;
  color: #64748b;
}

.login-signup a {
  color: var(--login-accent, #0d9488);
  font-weight: 700;
  text-decoration: none;
}

.login-signup a:hover {
  text-decoration: underline;
}

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

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

@media (max-width: 980px) {
  .login-shell {
    flex-direction: column !important;
  }

  .login-hero {
    display: none !important;
  }

  .login-panel {
    width: 100% !important;
    flex: 1 1 auto !important;
    min-height: 100vh !important;
  }
}

@media (max-width: 480px) {
  .login-card {
    padding: 26px 18px 22px;
    border-radius: 22px;
  }

  .login-card-head h2 {
    font-size: 24px;
  }

  .login-help-btn {
    top: 14px;
    right: 14px;
  }
}

/* ===== 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-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;
  }
}
