:root {
  --auth-bg: linear-gradient(135deg, #eef4fb 0%, #dbe6f4 100%);
  --auth-panel: rgba(255, 255, 255, 0.78);
  --auth-border: rgba(255, 255, 255, 0.48);
  --auth-text: #102033;
  --auth-muted: #64748b;
  --auth-accent: #2563eb;
  --auth-shadow: 0 18px 48px rgba(15, 23, 42, 0.12);
}

.profile-nav-slot {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.profile-chip,
.dashboard-chip,
.auth-link-btn,
.logout-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.4);
  color: #0f172a;
  text-decoration: none;
  font: inherit;
  cursor: pointer;
  backdrop-filter: blur(14px);
}

.profile-chip strong {
  font-size: 0.9rem;
}

.profile-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
}

.logout-chip {
  background: rgba(254, 242, 242, 0.8);
  color: #991b1b;
}

.side-profile-slot {
  display: grid;
  gap: 8px;
  margin: 6px 0 8px;
}

.side-profile-toggle,
.side-profile-link,
.side-profile-signout {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 15px 18px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.44);
  color: #0f172a;
  text-decoration: none;
  font: inherit;
  cursor: pointer;
  box-shadow: 0 14px 28px rgba(148, 163, 184, 0.12);
  backdrop-filter: blur(16px);
}

.side-profile-toggle strong,
.side-profile-link,
.side-profile-signout {
  font-weight: 700;
}

.side-profile-toggle small {
  color: #64748b;
  font-weight: 500;
}

.side-profile-dropdown {
  display: none;
  gap: 8px;
  padding-top: 2px;
}

.side-profile-dropdown.open {
  display: grid;
}

.side-profile-group {
  display: grid;
  gap: 6px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(203, 213, 225, 0.42);
}

.side-profile-group:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.side-profile-link,
.side-profile-signout {
  justify-content: flex-start;
}

.side-profile-signout {
  color: #991b1b;
  background: rgba(254, 242, 242, 0.72);
}

#sideMenu nav,
.account-side-menu nav {
  display: grid;
  gap: 8px;
}

#sideMenu nav > a,
#sideMenu .side-buying-btn,
#sideMenu .side-rent-btn,
.account-side-menu nav > a {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  padding: 15px 18px;
  border-radius: 22px;
  color: #0f172a;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.44);
  border: 1px solid rgba(255, 255, 255, 0.42);
  box-shadow: 0 14px 28px rgba(148, 163, 184, 0.12);
  backdrop-filter: blur(16px);
}

#sideMenu nav > a:hover,
#sideMenu .side-buying-btn:hover,
#sideMenu .side-rent-btn:hover,
.account-side-menu nav > a:hover,
.side-profile-toggle:hover,
.side-profile-link:hover,
.side-profile-signout:hover {
  background: rgba(255, 255, 255, 0.58);
  transform: translateY(-1px);
}

#sideMenu .side-submenu,
.account-side-menu .side-submenu {
  display: none;
  gap: 7px;
  padding-top: 2px;
}

#sideMenu .side-submenu.open,
.account-side-menu .side-submenu.open {
  display: grid;
}

#sideMenu .side-submenu a,
.account-side-menu .side-submenu a {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  padding: 14px 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.34);
  color: #0f172a;
  text-decoration: none;
}

.auth-body {
  min-height: 100vh;
  margin: 0;
  font-family: "Segoe UI", Tahoma, sans-serif;
  background: var(--auth-bg);
  color: var(--auth-text);
}

.auth-shell {
  width: min(1160px, calc(100% - 32px));
  margin: 32px auto;
  display: grid;
  grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.auth-panel,
.auth-side,
.dashboard-panel,
.profile-panel,
.public-profile-panel {
  background: var(--auth-panel);
  border: 1px solid var(--auth-border);
  box-shadow: var(--auth-shadow);
  backdrop-filter: blur(18px);
  border-radius: 28px;
}

.auth-panel,
.dashboard-panel,
.profile-panel,
.public-profile-panel {
  padding: 28px;
}

.auth-side {
  padding: 32px;
}

.auth-side h1,
.auth-panel h1,
.dashboard-head h1,
.profile-panel h1,
.public-profile-panel h1 {
  margin-top: 0;
}

.auth-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.auth-tab {
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--auth-border);
  background: rgba(255, 255, 255, 0.46);
  cursor: pointer;
  font: inherit;
}

.auth-tab.active {
  background: var(--auth-accent);
  border-color: var(--auth-accent);
  color: white;
}

.auth-form,
.profile-form {
  display: grid;
  gap: 14px;
}

.auth-grid,
.profile-grid,
.stats-grid,
.public-listings {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.auth-field,
.profile-field {
  display: grid;
  gap: 8px;
}

.auth-field.full,
.profile-field.full {
  grid-column: 1 / -1;
}

.auth-field input,
.auth-field select,
.auth-field textarea,
.profile-field input,
.profile-field select,
.profile-field textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid #d8e2ee;
  background: white;
  font: inherit;
}

.auth-submit,
.guest-btn,
.save-profile-btn,
.panel-link {
  padding: 12px 16px;
  border-radius: 16px;
  border: none;
  background: var(--auth-accent);
  color: white;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: inherit;
}

.guest-btn {
  background: #0f172a;
}

.auth-alt {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.auth-note,
.role-note,
.panel-muted,
.public-muted {
  color: var(--auth-muted);
  line-height: 1.8;
}

.status-msg {
  padding: 12px 14px;
  border-radius: 16px;
  font-size: 0.95rem;
}

.status-msg.error {
  background: #fee2e2;
  color: #991b1b;
}

.status-msg.success {
  background: #dcfce7;
  color: #166534;
}

.dashboard-shell,
.profile-shell,
.public-profile-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 28px auto 40px;
  display: grid;
  gap: 20px;
}


.auth-body .auth-shell {
  width: min(1080px, calc(100% - 32px));
  grid-template-columns: minmax(0, 1fr);
}

.auth-body .auth-wide-panel {
  width: min(980px, 100%);
  margin-inline: auto;
}

.dashboard-head,
.profile-head,
.public-profile-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.stats-grid {
  margin-top: 18px;
}

.stat-box {
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid var(--auth-border);
  border-radius: 22px;
  padding: 18px;
}

.stat-box strong {
  display: block;
  font-size: 2rem;
  margin-bottom: 8px;
}

.dashboard-layout,
.public-profile-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(290px, 0.75fr);
  gap: 20px;
}

.dashboard-section,
.public-profile-card,
.listing-card,
.activity-card {
  background: var(--auth-panel);
  border: 1px solid var(--auth-border);
  box-shadow: var(--auth-shadow);
  backdrop-filter: blur(18px);
  border-radius: 24px;
  padding: 22px;
}

.dashboard-section h2,
.public-profile-card h2,
.profile-panel h2 {
  margin-top: 0;
}

.activity-list,
.dashboard-list,
.unit-list {
  display: grid;
  gap: 12px;
}

.activity-item,
.dashboard-item,
.unit-item {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 18px;
  border: 1px solid var(--auth-border);
}

.unit-item {
  align-items: start;
}

.unit-item img {
  width: 120px;
  height: 90px;
  object-fit: cover;
  border-radius: 16px;
}

.role-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4ed8;
  font-weight: 700;
  font-size: 0.88rem;
}

.public-profile-summary {
  display: grid;
  gap: 14px;
  justify-items: center;
  text-align: center;
}

.public-profile-avatar,
.profile-avatar-large {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  object-fit: cover;
}

.rating-line {
  color: #2563eb;
  font-weight: 700;
}

.locked-action-msg {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #fff7ed;
  color: #9a3412;
}

.list-link {
  color: inherit;
  text-decoration: none;
}

.role-badge-row,
.inline-actions,
.public-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.empty-state {
  padding: 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.56);
  color: var(--auth-muted);
  border: 1px dashed rgba(148, 163, 184, 0.55);
}

.mini-stat {
  font-size: 0.95rem;
  color: var(--auth-muted);
}

.profile-hero {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.profile-hero img,
.public-avatar-large {
  width: 120px;
  height: 120px;
  border-radius: 28px;
  object-fit: cover;
}

.public-avatar-large {
  width: 110px;
  height: 110px;
  border-radius: 24px;
}

.locked-note {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(254, 242, 242, 0.86);
  color: #991b1b;
}

.hidden {
  display: none !important;
}

#sideMenu,
.account-side-menu {
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.8) transparent;
}

#sideMenu nav,
.account-side-menu nav {
  min-height: max-content;
  padding-bottom: 22px;
}

#sideMenu::-webkit-scrollbar,
.account-side-menu::-webkit-scrollbar {
  width: 10px;
}

#sideMenu::-webkit-scrollbar-track,
.account-side-menu::-webkit-scrollbar-track {
  background: transparent;
}

#sideMenu::-webkit-scrollbar-thumb,
.account-side-menu::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.72);
  border: 2px solid transparent;
  background-clip: padding-box;
}

@media (max-width: 980px) {
  .auth-shell,
  .dashboard-layout,
  .public-profile-layout {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 720px) {
  .auth-grid,
  .profile-grid,
  .stats-grid,
  .public-listings {
    grid-template-columns: 1fr;
  }
}
