:root {
  --bg: #f5f6f7;
  --ink: #151515;
  --muted: #687078;
  --line: #d9dee3;
  --panel: #ffffff;
  --gold: #ffb612;
  --gold-dark: #8a5d00;
  --charcoal: #171717;
  --success: #257457;
  --warning: #9a6a00;
  --radius: 8px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(255, 182, 18, 0.08), transparent 280px),
    var(--bg);
}

.hidden {
  display: none !important;
}

button,
a {
  font: inherit;
}

button {
  min-height: 38px;
  border: 1px solid rgba(255, 182, 18, 0.55);
  border-radius: var(--radius);
  background: var(--gold);
  color: #151515;
  padding: 8px 13px;
  font-weight: 800;
  cursor: pointer;
}

.ghost,
.text-button {
  background: transparent;
  color: var(--ink);
}

.ghost {
  border-color: var(--line);
}

.ghost.light {
  width: 100%;
  margin-top: 12px;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.28);
}

.text-button {
  min-height: auto;
  border: 0;
  padding: 6px 0;
  text-align: left;
  color: var(--gold-dark);
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(rgba(16, 16, 16, 0.76), rgba(16, 16, 16, 0.9)),
    url("../employee-portal/assets/reside-global-banner.png") center/cover;
}

.auth-panel {
  width: min(460px, 100%);
  border: 1px solid rgba(255, 182, 18, 0.35);
  border-radius: var(--radius);
  padding: 24px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.25);
}

.auth-panel img {
  width: 210px;
  max-width: 100%;
  display: block;
  margin-bottom: 16px;
}

.auth-panel h1 {
  margin: 4px 0 8px;
  font-size: 2rem;
}

.auth-form {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.auth-form label,
.ticket-form label {
  display: grid;
  gap: 6px;
  color: #39414a;
  font-size: 0.84rem;
  font-weight: 800;
}

.auth-form input,
.auth-form select,
.auth-form textarea,
.ticket-form input,
.ticket-form select,
.ticket-form textarea {
  min-height: 40px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 9px 10px;
  font: inherit;
  background: #fff;
}

.password-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.notice {
  margin: 0;
  border-left: 4px solid var(--gold);
  border-radius: var(--radius);
  padding: 10px 12px;
  background: #fff8e5;
  color: #3d3421;
}

.notice.error {
  border-left-color: #b42318;
  background: #fff1f0;
  color: #8a1f14;
}

.route-note {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid rgba(255, 182, 18, 0.32);
  border-radius: var(--radius);
  background: #fff8e5;
  color: #4a3920;
  font-size: 0.86rem;
  line-height: 1.45;
}

.auth-actions {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.portal-shell {
  min-height: 100vh;
  padding-left: 290px;
}

.side-panel {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 290px;
  min-height: auto;
  overflow-y: auto;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  align-content: stretch;
  gap: 20px;
  padding: 20px;
  color: #fff;
  background:
    linear-gradient(rgba(16, 16, 16, 0.9), rgba(16, 16, 16, 0.98)),
    url("../employee-portal/assets/reside-global-sidebar-bg.jpg") center/cover;
  border-right: 1px solid rgba(255, 182, 18, 0.25);
}

.brand-block {
  display: grid;
  gap: 10px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.brand-block img {
  width: min(210px, 100%);
  height: auto;
}

.brand-block span,
.advisor-card span,
.eyebrow,
.metric-grid span,
.appointment span {
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.side-logout {
  width: 100%;
  margin-top: 4px;
  color: #151515;
  border-color: rgba(255, 182, 18, 0.68);
  background: var(--gold);
}

nav {
  display: grid;
  gap: 8px;
  margin: 0;
}

nav a {
  color: #f6f6f6;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  padding: 11px 12px;
  font-weight: 800;
}

nav a.active,
nav a:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: #151515;
}

.advisor-card {
  margin-top: auto;
  border: 1px solid rgba(255, 182, 18, 0.28);
  border-radius: var(--radius);
  padding: 14px;
  background: rgba(255, 255, 255, 0.06);
}

.advisor-card strong {
  display: block;
  margin: 8px 0 4px;
}

.advisor-card p,
.hero p,
.metric-grid p,
.message-list p,
.appointment p,
.timeline span {
  margin: 0;
  color: var(--muted);
}

.advisor-card p {
  color: #d9d9d9;
}

.workspace {
  min-width: 0;
  padding: 24px;
  display: grid;
  gap: 18px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 20px;
  align-items: end;
  min-height: 265px;
  padding: 24px;
  border-radius: var(--radius);
  color: #fff;
  background:
    linear-gradient(90deg, rgba(16, 16, 16, 0.9), rgba(16, 16, 16, 0.55)),
    url("../employee-portal/assets/reside-global-banner.png") center/cover;
  border: 1px solid rgba(255, 182, 18, 0.28);
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.13);
}

.hero h1 {
  margin: 6px 0 8px;
  font-size: clamp(2rem, 5vw, 3.6rem);
  line-height: 1;
  letter-spacing: 0;
}

.hero p {
  max-width: 660px;
  color: #ededed;
}

.status-panel,
.metric-grid article,
.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
}

.status-panel {
  padding: 16px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
}

.status-panel strong {
  display: block;
  margin: 8px 0 14px;
  font-size: 1.45rem;
}

.progress-bar {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #e4e8ec;
}

.progress-bar span {
  display: block;
  height: 100%;
  background: var(--gold);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.metric-grid article {
  padding: 16px;
}

.metric-grid strong {
  display: block;
  margin: 8px 0 4px;
  font-size: 1.65rem;
}

.two-column {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 12px;
}

.panel {
  padding: 18px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.panel h2 {
  margin: 0;
  font-size: 1.1rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  background: #fff3cf;
  color: var(--gold-dark);
  padding: 4px 10px;
  font-size: 0.78rem;
  font-weight: 900;
}

.timeline {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline li {
  position: relative;
  display: grid;
  gap: 4px;
  padding: 0 0 18px 28px;
  border-left: 2px solid #d8dde2;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #c2c8ce;
  border: 2px solid #fff;
}

.timeline li.done::before,
.timeline li.active::before {
  background: var(--gold);
}

.timeline li:last-child {
  border-left-color: transparent;
  padding-bottom: 0;
}

.message-list {
  display: grid;
  gap: 10px;
}

.message-list div,
.appointment,
.doc-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: #fafbfc;
}

.document-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.doc-item {
  display: grid;
  gap: 5px;
  border-left: 4px solid #b8c0c8;
}

.doc-item.complete {
  border-left-color: var(--success);
}

.doc-item.review {
  border-left-color: var(--gold);
}

.doc-item.pending {
  border-left-color: #9aa3ab;
}

.doc-item span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

th {
  color: #434a51;
  background: #f7f8f9;
  font-size: 0.78rem;
  text-transform: uppercase;
}

.appointment + .appointment {
  margin-top: 10px;
}

.ticket-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fafbfc;
}

.ticket-form .wide {
  grid-column: 1 / -1;
}

.ticket-form label {
  font-size: 0.82rem;
}

.ticket-form textarea {
  resize: vertical;
}

.ticket-form button {
  align-self: end;
}

.ticket-result {
  margin-bottom: 14px;
  padding: 12px;
  border-left: 4px solid var(--gold);
  border-radius: var(--radius);
  background: #fff8e5;
}

.muted {
  color: var(--muted);
}

.doc-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.doc-item a {
  color: var(--gold-dark);
  font-weight: 800;
}

.ticket-item {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.ticket-item + .ticket-item {
  margin-top: 10px;
}

.ticket-item p {
  margin: 0;
  color: var(--muted);
}

.ticket-item details {
  padding: 10px;
  border-radius: var(--radius);
  background: #f7f8f9;
}

.ticket-item details p {
  margin-top: 8px;
  white-space: pre-wrap;
}

.ticket-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

@media (max-width: 980px) {
  .portal-shell,
  .hero,
  .two-column,
  .metric-grid,
  .document-grid,
  .ticket-form {
    grid-template-columns: 1fr;
  }

  .portal-shell {
    padding-left: 0;
  }

  .side-panel {
    min-height: auto;
    position: static;
    width: auto;
  }

  nav {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 620px) {
  .workspace,
  .side-panel,
  .hero,
  .panel {
    padding: 14px;
  }

  nav {
    grid-template-columns: 1fr;
  }

  .panel-head {
    align-items: stretch;
    flex-direction: column;
  }
}
