:root {
  color-scheme: light;
  --bg: #f4f7f8;
  --panel: #ffffff;
  --ink: #10283a;
  --muted: #60707d;
  --line: #dbe4e8;
  --brand: #0f7cc9;
  --brand-dark: #095487;
  --ready: #14825d;
  --work: #a15f08;
  --shadow: 0 20px 60px rgba(16, 40, 58, 0.12);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
}

button, input {
  font: inherit;
}

select, textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.shell {
  min-height: 100vh;
}

.login-view {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
  background: #10283a;
}

.login-panel {
  width: min(960px, 100%);
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 28px;
  align-items: stretch;
}

.brand-block,
.login-card {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: var(--shadow);
}

.brand-block {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 430px;
  padding: 34px;
  color: white;
}

.brand-block img {
  width: 210px;
  max-width: 100%;
}

.brand-block p {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 800;
}

.login-card {
  padding: 30px;
  background: white;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--brand);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1, h2, p {
  margin-top: 0;
}

h1 {
  margin-bottom: 22px;
  font-size: 1.9rem;
  line-height: 1.12;
}

h2 {
  margin-bottom: 0;
  font-size: 1.2rem;
}

label {
  display: grid;
  gap: 7px;
  margin: 18px 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 12px;
  color: var(--ink);
  background: white;
}

input:focus {
  outline: 2px solid rgba(15, 124, 201, 0.22);
  border-color: var(--brand);
}

.login-card button,
.user-card button,
.dialog-head button,
.download-link,
.row-action {
  min-height: 42px;
  border-radius: 7px;
  padding: 0 14px;
  color: white;
  background: var(--brand);
  font-weight: 900;
  text-decoration: none;
}

.login-card button {
  width: 100%;
}

.message {
  min-height: 22px;
  color: #a13232;
  font-weight: 800;
}

.app-view {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 26px;
  padding: 24px;
  color: white;
  background: #10283a;
}

.logo img {
  width: 180px;
}

.sidebar nav {
  display: grid;
  gap: 8px;
}

.sidebar nav button {
  min-height: 44px;
  border-radius: 7px;
  padding: 0 14px;
  color: rgba(255, 255, 255, 0.78);
  background: transparent;
  text-align: left;
  font-weight: 900;
}

.sidebar nav button.active,
.sidebar nav button:hover {
  color: white;
  background: rgba(255, 255, 255, 0.12);
}

.user-card {
  margin-top: auto;
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.user-card span,
.user-card small {
  color: rgba(255, 255, 255, 0.72);
}

.workspace {
  min-width: 0;
  padding: 28px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin-bottom: 22px;
}

.topbar h1 {
  margin-bottom: 0;
}

.status-pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--ready);
  background: white;
  font-weight: 900;
}

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

.stats article,
.panel,
.property-dialog {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 12px 36px rgba(16, 40, 58, 0.06);
}

.stats article {
  padding: 16px;
}

.stats span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
}

.stats strong {
  font-size: 1.8rem;
}

.panel {
  padding: 18px;
}

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

.search {
  max-width: 280px;
}

.table-wrap {
  overflow-x: auto;
}

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

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

th {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

td strong {
  display: block;
}

td small {
  color: var(--muted);
}

.badge {
  display: inline-flex;
  border-radius: 999px;
  padding: 5px 9px;
  color: var(--work);
  background: rgba(161, 95, 8, 0.1);
  font-size: 0.78rem;
  font-weight: 900;
}

.badge.ready {
  color: var(--ready);
  background: rgba(20, 130, 93, 0.1);
}

.row-action {
  background: var(--ink);
}

.office-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.office-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}

.office-card span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
}

.property-dialog {
  width: min(860px, calc(100vw - 28px));
  border: 0;
  padding: 0;
}

.property-dialog::backdrop {
  background: rgba(16, 40, 58, 0.58);
}

.dialog-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 22px;
  border-bottom: 1px solid var(--line);
}

.dialog-head p {
  margin-bottom: 0;
  color: var(--muted);
}

.dialog-head button {
  width: 42px;
  padding: 0;
  background: var(--ink);
}

.media-list {
  display: grid;
  gap: 10px;
  max-height: 60vh;
  overflow: auto;
  padding: 18px 22px 22px;
}

.media-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.media-row strong {
  display: block;
  margin-bottom: 4px;
}

.media-row small {
  color: var(--muted);
}

.empty {
  padding: 22px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 860px) {
  .login-panel,
  .app-view {
    grid-template-columns: 1fr;
  }

  .brand-block {
    min-height: 180px;
  }

  .sidebar {
    position: static;
  }

  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .search {
    max-width: none;
  }
}

@media (max-width: 560px) {
  .workspace,
  .sidebar,
  .login-view {
    padding: 16px;
  }

  .stats {
    grid-template-columns: 1fr;
  }

  th:nth-child(2),
  td:nth-child(2),
  th:nth-child(3),
  td:nth-child(3) {
    display: none;
  }

  .media-row {
    grid-template-columns: 1fr;
  }

  .portal-app {
    grid-template-columns: 1fr;
  }
}

/* Restored original portal workspace on top of the secure backend. */
.portal-app {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 284px minmax(0, 1fr);
  background: var(--bg);
}

.portal-app .sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 26px;
  padding: 24px;
  color: #f7fbff;
  background: #0d1c29;
}

.sidebar-brand {
  display: inline-flex;
}

.sidebar-brand img {
  width: 170px;
}

.portal-nav {
  display: grid;
  align-content: start;
  gap: 8px;
}

.portal-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 48px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 10px;
  color: rgba(247, 251, 255, 0.74);
  font-weight: 900;
  text-align: left;
  text-decoration: none;
}

.portal-nav a.active,
.portal-nav a:hover {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.09);
  color: #f7fbff;
}

.nav-icon {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(149, 229, 255, 0.14);
  color: #95e5ff;
  font-size: 0.78rem;
}

.sidebar-user {
  display: grid;
  gap: 6px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.sidebar-user span {
  color: #95e5ff;
  font-size: 0.74rem;
  font-weight: 950;
  text-transform: uppercase;
}

.sidebar-user strong {
  color: #f7fbff;
  font-size: 1rem;
}

.sidebar-user small {
  color: rgba(247, 251, 255, 0.62);
  line-height: 1.4;
}

.sidebar-user button,
.topbar-actions a,
.quick-actions a,
.module-link,
.panel-head a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  padding: 12px 16px;
  color: #fff;
  background: var(--brand);
  font-weight: 950;
  text-decoration: none;
}

.sidebar-user button {
  width: 100%;
  margin-top: 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: transparent;
}

.portal-app .workspace {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 22px;
  padding: 24px;
}

.workspace-topbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  min-height: 84px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.workspace-topbar h1 {
  margin-bottom: 0;
  font-size: clamp(1.8rem, 3vw, 3rem);
  line-height: 1;
  letter-spacing: 0;
}

.topbar-actions,
.quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.topbar-actions a:first-child,
.quick-actions a:first-child {
  background: #07131e;
}

.welcome-band,
.admin-band,
.module-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-radius: 8px;
  padding: 22px;
  background: #07131e;
  color: #f7fbff;
  box-shadow: var(--shadow);
}

.admin-band {
  background: linear-gradient(135deg, #07131e, #133425);
}

.module-head {
  background: var(--panel);
  color: var(--ink);
}

.welcome-band h2,
.admin-band h2,
.module-head h2 {
  margin-bottom: 0;
  font-size: 1.4rem;
  line-height: 1.15;
}

.welcome-band p:not(.eyebrow) {
  max-width: 720px;
  margin: 10px 0 0;
  color: rgba(247, 251, 255, 0.72);
  line-height: 1.55;
}

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

.stats-grid article {
  min-height: 118px;
  display: grid;
  align-content: space-between;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 16px;
  box-shadow: 0 12px 36px rgba(16, 40, 58, 0.06);
}

.stats-grid span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
}

.stats-grid strong {
  font-size: 2.15rem;
  line-height: 1;
}

.overview-layout,
.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
  gap: 14px;
  align-items: start;
}

.admin-grid-wide,
.accounts-office-layout {
  grid-template-columns: minmax(0, 1fr);
}

.list-panel,
.next-panel {
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 18px;
  box-shadow: var(--shadow);
}

.admin-create-form {
  display: grid;
  gap: 14px;
  align-self: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 18px;
  box-shadow: var(--shadow);
}

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

.field {
  display: grid;
  gap: 8px;
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 12px 14px;
  outline: none;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: rgba(15, 124, 201, 0.7);
  box-shadow: 0 0 0 4px rgba(15, 124, 201, 0.12);
}

.primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 8px;
  padding: 12px 16px;
  color: #fff;
  background: var(--brand);
  font-weight: 950;
}

.portal-notice {
  margin: 0;
  border: 1px solid rgba(20, 130, 93, 0.24);
  border-radius: 8px;
  background: rgba(20, 130, 93, 0.1);
  color: var(--ready);
  padding: 12px 14px;
  font-weight: 900;
}

.panel-head a {
  min-height: 40px;
  background: #eef3fa;
  color: var(--ink);
}

.property-list,
.workflow-list,
.account-table,
.admin-account-list,
.office-list {
  display: grid;
  gap: 10px;
}

.property-row,
.account-row,
.upload-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  min-height: 78px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  color: inherit;
  background: #fff;
  text-decoration: none;
}

.property-row:hover,
.workflow-list a:hover,
.account-row:hover,
.office-card:hover {
  border-color: rgba(15, 124, 201, 0.55);
  box-shadow: 0 0 0 4px rgba(15, 124, 201, 0.08);
}

.property-row strong,
.account-row strong {
  display: block;
  margin-bottom: 5px;
}

.property-row span,
.account-row span,
.workflow-list span {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.35;
}

.workflow-list a {
  display: grid;
  gap: 5px;
  min-height: 74px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
  color: var(--ink);
  text-align: left;
  text-decoration: none;
}

.module-link {
  background: #07131e;
}

.office-list {
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.office-card {
  display: grid;
  gap: 16px;
  min-height: 180px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 16px;
}

.office-card h3 {
  margin: 0 0 8px;
}

.office-card p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.45;
}

.account-office-panel,
.admin-account-panel {
  max-width: 980px;
}

.website-admin-shell {
  min-width: 0;
}

.website-editor-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
}

.website-editor-head > p {
  max-width: 420px;
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.website-editor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.34fr);
  gap: 14px;
  align-items: start;
}

.website-canvas,
.website-inspector {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.website-canvas {
  overflow: hidden;
}

.website-canvas-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.website-canvas-header img {
  width: 140px;
}

.website-canvas-header nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.website-page-tab {
  min-height: 36px;
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--ink);
  background: #eef3fa;
  font-weight: 900;
}

.website-page-tab.is-active {
  color: #fff;
  background: var(--brand);
}

.website-canvas-hero {
  min-height: 320px;
  display: grid;
  align-items: end;
  padding: 26px;
  color: #fff;
  background:
    linear-gradient(115deg, rgba(4, 13, 21, 0.86), rgba(7, 19, 30, 0.38)),
    url("https://staging.emiko.be/assets/images/diensten/fotografie.png") center / cover;
}

.website-canvas-copy {
  display: grid;
  gap: 10px;
  max-width: 540px;
}

.website-canvas-copy strong {
  font-size: clamp(1.8rem, 3vw, 3.1rem);
  line-height: 1.02;
}

.website-kicker {
  color: #95e5ff;
  font-weight: 950;
}

.website-inspector {
  display: grid;
  gap: 10px;
  padding: 18px;
}

.portal-app.is-broker {
  display: block;
  min-height: 100vh;
  color: #f7fbff;
  background:
    linear-gradient(180deg, #06192b 0%, #03111f 62%, #06192b 100%);
}

.portal-app.is-broker .sidebar {
  position: relative;
  top: auto;
  width: min(1180px, calc(100% - 32px));
  height: auto;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 220px;
  grid-template-rows: auto;
  align-items: center;
  gap: 18px;
  margin-inline: auto;
  padding: 18px 0 12px;
  background: transparent;
}

.portal-app.is-broker .portal-nav {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.portal-app.is-broker .portal-nav a {
  width: auto;
  min-height: 46px;
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
}

.portal-app.is-broker .nav-icon {
  display: none;
}

.portal-app.is-broker .sidebar-user {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px 10px;
  min-width: 190px;
  padding: 0;
  border-top: 0;
  text-align: right;
}

.portal-app.is-broker .sidebar-user span {
  display: none;
}

.portal-app.is-broker .sidebar-user small {
  width: 100%;
}

.portal-app.is-broker .sidebar-user button {
  width: auto;
  min-height: 42px;
  margin-top: 0;
  border-radius: 999px;
  background: rgba(38, 136, 255, 0.16);
}

.portal-app.is-broker .workspace {
  width: min(1180px, calc(100% - 32px));
  margin-inline: auto;
  padding: 24px 0 56px;
  color: #f7fbff;
}

.portal-app.is-broker .workspace-topbar {
  border-bottom-color: rgba(255, 255, 255, 0.16);
}

.portal-app.is-broker .welcome-band,
.portal-app.is-broker .stats-grid article,
.portal-app.is-broker .list-panel,
.portal-app.is-broker .next-panel {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: #f7fbff;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.34);
}

.portal-app.is-broker .property-row,
.portal-app.is-broker .workflow-list a {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: #f7fbff;
}

.portal-app.is-broker .property-row span,
.portal-app.is-broker .workflow-list span,
.portal-app.is-broker .stats-grid span {
  color: rgba(247, 251, 255, 0.68);
}

.portal-app.is-broker .topbar-actions {
  display: none;
}

@media (max-width: 980px) {
  .portal-app {
    grid-template-columns: 1fr;
  }

  .portal-app .sidebar {
    position: static;
    height: auto;
  }

  .portal-app.is-broker .sidebar {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .portal-app.is-broker .portal-nav {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .portal-app.is-broker .sidebar-user {
    justify-content: flex-start;
    text-align: left;
  }

  .workspace-topbar,
  .welcome-band,
  .admin-band,
  .module-head,
  .website-editor-head {
    align-items: stretch;
    flex-direction: column;
  }

  .overview-layout,
  .admin-grid,
  .form-grid,
  .website-editor-layout {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .portal-app .workspace,
  .portal-app .sidebar {
    padding: 16px;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .topbar-actions,
  .quick-actions {
    width: 100%;
    flex-direction: column;
  }

  .topbar-actions a,
  .quick-actions a {
    width: 100%;
  }

  .property-row,
  .account-row {
    grid-template-columns: 1fr;
  }
}