@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=DM+Serif+Display:ital@0;1&display=swap');

:root {
  font-family: 'DM Sans', sans-serif;
  --ink: #17211d;
  --muted: #68736d;
  --muted-2: #87928b;
  --line: #dce4dc;
  --line-soft: #edf1ed;
  --paper: #fff;
  --bg: #f4f6f2;
  --green: #1e5b49;
  --green-dark: #154a3b;
  --green-light: #dcefe5;
  --green-pale: #eaf3ec;
  --yellow: #f5c86a;
  --yellow-bg: #fff2d9;
  --red: #bd5d4a;
  --red-bg: #fce8e3;
  --blue: #3b7bb3;
  --blue-bg: #e3eef6;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow-sm: 0 1px 2px rgba(22,52,38,.04);
  --shadow: 0 4px 12px rgba(22,52,38,.06);
  --shadow-lg: 0 16px 28px rgba(22,52,38,.08);
  --transition: .2s ease;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'DM Sans', sans-serif;
  color: var(--ink);
  background: var(--bg);
  min-width: 320px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
ul { list-style: none; }

/* ==================== App loading overlay (shared across pages) ==================== */

.app-loading {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: var(--bg);
  z-index: 5000;
  transition: opacity .25s ease;
}
.app-loading p { color: var(--muted); font-size: 13px; font-weight: 600; }
.app-loading.hidden { opacity: 0; pointer-events: none; }

.spinner {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 3px solid var(--line);
  border-top-color: var(--green);
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Generic skeleton block, used while async data (stats/tables) is loading */
.skeleton {
  background: linear-gradient(90deg, var(--line-soft) 25%, var(--line) 37%, var(--line-soft) 63%);
  background-size: 400% 100%;
  animation: skeleton-loading 1.4s ease infinite;
  border-radius: var(--radius-sm);
}
@keyframes skeleton-loading { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* ==================== Welcome / Landing ==================== */

.welcome-shell {
  display: grid;
  grid-template-columns: minmax(380px, .92fr) 1.08fr;
  min-height: 100vh;
}

.welcome-panel {
  background: #173e35;
  color: #e9f2ed;
  padding: 48px clamp(28px, 6vw, 96px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100vh;
  position: relative;
  overflow: hidden;
}

.welcome-panel::after {
  content: '';
  position: absolute;
  width: 420px;
  height: 420px;
  border: 1px solid rgba(220,239,229,.18);
  border-radius: 50%;
  right: -180px;
  bottom: -90px;
  box-shadow: 0 0 0 54px rgba(220,239,229,.04), 0 0 0 108px rgba(220,239,229,.03);
  pointer-events: none;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  font-weight: 700;
  letter-spacing: -.03em;
  font-size: 19px;
  position: relative;
  z-index: 1;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: #d7ecdf;
  color: #173e35;
  font-weight: 700;
  font-size: 16px;
}

.welcome-copy { max-width: 460px; position: relative; z-index: 1; }

.eyebrow, .card-kicker {
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 18px;
}
.eyebrow { color: #7da991; }

h1 {
  font-size: clamp(48px, 6vw, 82px);
  line-height: .98;
  letter-spacing: -.07em;
  margin-bottom: 28px;
  font-weight: 600;
}
h1 em { font-family: 'DM Serif Display', serif; font-weight: 400; color: #b9dbc7; }

.lead { color: #bbcbc2; font-size: 17px; line-height: 1.65; max-width: 400px; }

.welcome-note {
  display: flex;
  gap: 10px;
  align-items: center;
  color: #b9cbc0;
  font-size: 12px;
  position: relative;
  z-index: 1;
}

.status-dot {
  background: #84c695;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(132,198,149,.12);
}

.role-panel {
  padding: 48px clamp(28px, 6vw, 96px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.role-heading { max-width: 500px; margin-bottom: 36px; }
.role-heading h2 { font-size: clamp(30px, 3.5vw, 44px); letter-spacing: -.05em; line-height: 1.05; margin-bottom: 14px; }
.role-heading > p:last-child { color: var(--muted); line-height: 1.6; }

.role-grid { display: grid; gap: 16px; max-width: 560px; }

.role-card {
  display: grid;
  grid-template-columns: 46px 1fr 30px;
  gap: 18px;
  align-items: start;
  padding: 25px 24px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.role-card:hover { transform: translateY(-3px); border-color: #b5cbbb; box-shadow: var(--shadow-lg); }

.role-card-dark { background: var(--green); color: #eef7f1; border-color: var(--green); }
.role-card-dark:hover { border-color: var(--green); box-shadow: 0 16px 28px rgba(22,52,38,.19); }

.role-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #eef3ec;
  color: var(--green);
  font-size: 20px;
}

.role-card-dark .role-icon { background: rgba(255,255,255,.13); color: #d7ecdf; }

.card-kicker { color: #7e8981; margin-bottom: 7px; font-size: 10px; }
.role-card-dark .card-kicker { color: #a8c6b4; }

.role-card h3 { font-size: 19px; margin-bottom: 7px; }
.role-card p:last-child { font-size: 13px; color: #76817a; line-height: 1.5; }
.role-card-dark p:last-child { color: #bdd0c4; }

.role-arrow { align-self: center; color: #91a099; font-size: 22px; transition: transform var(--transition); }
.role-card:hover .role-arrow { transform: translateX(4px); }

.role-footer { color: var(--muted); font-size: 12px; margin-top: 30px; }
.role-footer a { color: var(--green); font-weight: 700; }

/* ==================== Login ==================== */

.login-shell {
  display: grid;
  grid-template-columns: minmax(360px, .85fr) 1.15fr;
  min-height: 100vh;
}

.login-side {
  background: #173e35;
  color: #e9f2ed;
  padding: 48px clamp(28px, 5vw, 72px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100vh;
  position: relative;
  overflow: hidden;
}

.login-side::after {
  content: '';
  position: absolute;
  width: 360px;
  height: 360px;
  border: 1px solid rgba(220,239,229,.15);
  border-radius: 50%;
  right: -160px;
  top: -80px;
  box-shadow: 0 0 0 50px rgba(220,239,229,.03);
  pointer-events: none;
}

.login-side-content { position: relative; z-index: 1; max-width: 380px; margin: auto 0; }
.login-side-content h2 { font-size: clamp(28px, 3vw, 38px); letter-spacing: -.04em; line-height: 1.1; margin-bottom: 16px; }
.login-side-content p { color: #bbcbc2; font-size: 15px; line-height: 1.65; }

.login-side-footer { position: relative; z-index: 1; color: #89ab99; font-size: 11px; }

.login-main {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px clamp(24px, 5vw, 64px);
}

.login-card {
  width: 100%;
  max-width: 400px;
}

.login-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 36px;
  transition: color var(--transition);
}
.login-back:hover { color: var(--green); }

.login-title { font-size: 28px; letter-spacing: -.04em; margin-bottom: 8px; }
.login-subtitle { color: var(--muted); font-size: 14px; margin-bottom: 32px; }

.role-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  background: #eef3ec;
  border-radius: 10px;
  margin-bottom: 28px;
}

.role-tab {
  padding: 10px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  transition: all var(--transition);
}

.role-tab.active { background: var(--paper); color: var(--green); box-shadow: var(--shadow-sm); }

.field-group { margin-bottom: 20px; }

.field-group label {
  display: block;
  color: #647069;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 7px;
}

.field-group input {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--line);
  background: #fbfcfa;
  border-radius: var(--radius-sm);
  font-size: 14px;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.field-group input:focus {
  border-color: #77a98a;
  box-shadow: 0 0 0 3px #e4f0e6;
}

.login-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  background: var(--green-pale);
  border-radius: var(--radius-sm);
  color: #3a6e54;
  font-size: 12px;
  line-height: 1.5;
  margin-top: 20px;
}

.login-hint strong { font-weight: 700; }

.btn-primary {
  width: 100%;
  padding: 14px;
  border-radius: var(--radius-sm);
  background: var(--green);
  color: white;
  font-size: 14px;
  font-weight: 700;
  transition: background var(--transition), transform var(--transition);
}
.btn-primary:hover { background: var(--green-dark); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: .6; cursor: not-allowed; }

.login-error {
  padding: 12px 14px;
  background: var(--red-bg);
  color: #984637;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-bottom: 20px;
  display: none;
}
.login-error.visible { display: block; }

/* ==================== Buttons ==================== */

.button {
  padding: 11px 17px;
  border-radius: var(--radius-sm);
  background: var(--green);
  color: white;
  font-size: 13px;
  font-weight: 700;
  transition: background var(--transition), transform var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}
.button:hover { background: var(--green-dark); transform: translateY(-1px); }
.button:active { transform: translateY(0); }
.button:disabled { opacity: .55; cursor: not-allowed; transform: none; }

.button.secondary { background: var(--paper); color: var(--green); border: 1px solid var(--line); }
.button.secondary:hover { background: var(--green-pale); }

.button.danger { background: var(--red); }
.button.danger:hover { background: #a84d3c; }

.button.ghost { background: transparent; color: var(--muted); }
.button.ghost:hover { background: var(--line-soft); color: var(--ink); }

.button.full { width: 100%; justify-content: center; }

.text-button { background: none; color: var(--green); font-weight: 700; font-size: 12px; padding: 0; transition: color var(--transition); }
.text-button:hover { color: var(--green-dark); }
.text-button:disabled { opacity: .5; cursor: not-allowed; }

/* ==================== Toolbar & Tables ==================== */

.toolbar { display: flex; gap: 9px; flex-wrap: wrap; margin-bottom: 18px; align-items: center; }

.search-input, .select-input {
  border: 1px solid var(--line);
  background: #fbfcfa;
  border-radius: var(--radius-sm);
  outline: none;
  font-size: 13px;
  padding: 10px 12px;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.search-input { flex: 1; min-width: 180px; }
.search-input:focus, .select-input:focus { border-color: #77a98a; box-shadow: 0 0 0 3px #e4f0e6; }

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

.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }

.data-table th {
  color: var(--muted-2);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 10px;
  font-weight: 700;
  text-align: left;
  padding: 10px 10px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.data-table th[data-sort] { cursor: pointer; user-select: none; }
.data-table th[data-sort]:hover { color: var(--green); }

.data-table td { padding: 13px 10px; border-bottom: 1px solid var(--line-soft); white-space: nowrap; }
.data-table tbody tr:hover { background: #fafcf9; }
.data-table tbody tr:last-child td { border-bottom: 0; }

.badge {
  display: inline-flex;
  border-radius: 99px;
  padding: 4px 10px;
  background: var(--green-light);
  color: #337353;
  font-size: 10px;
  font-weight: 700;
}
.badge.warn { background: var(--yellow-bg); color: #986d22; }
.badge.error { background: var(--red-bg); color: #984637; }
.badge.info { background: var(--blue-bg); color: #2c6390; }

.small-avatar {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  background: var(--green-light);
  color: var(--green);
  border-radius: 50%;
  font-size: 10px;
  font-weight: 700;
  margin-right: 8px;
  vertical-align: middle;
}

.empty-state { text-align: center; color: var(--muted); padding: 40px 10px; font-size: 13px; }

/* ==================== Forms ==================== */

.form-layout { display: grid; grid-template-columns: 1.55fr .72fr; gap: 20px; align-items: start; }

.form-panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}

.form-section + .form-section { border-top: 1px solid var(--line); margin-top: 26px; padding-top: 25px; }
.section-title { font-size: 15px; margin-bottom: 5px; }
.section-copy { font-size: 12px; color: var(--muted); margin-bottom: 22px; }

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

.field { display: grid; gap: 7px; }
.field.full { grid-column: 1 / -1; }

.field label { color: #647069; font-size: 12px; font-weight: 700; }

.field input, .field select, .field textarea {
  padding: 12px 11px;
  width: 100%;
  border: 1px solid var(--line);
  background: #fbfcfa;
  border-radius: var(--radius-sm);
  outline: none;
  font-size: 14px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.field textarea { resize: vertical; min-height: 80px; font-family: inherit; }

.field input:focus, .field select:focus, .field textarea:focus {
  border-color: #77a98a;
  box-shadow: 0 0 0 3px #e4f0e6;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 22px;
  margin-top: 26px;
}

/* ==================== Info Card ==================== */

.info-card {
  background: var(--green);
  color: white;
  border-radius: var(--radius);
  padding: 24px;
}

.info-card h2 { font-size: 17px; margin-bottom: 10px; }
.info-card p { color: #c2d7ca; font-size: 13px; line-height: 1.65; }

.info-list { display: grid; gap: 15px; margin-top: 24px; }
.info-list li { display: flex; gap: 10px; color: #d4e6da; font-size: 12px; line-height: 1.45; }
.info-list li > span:first-child { font-weight: 700; color: #9dd0ae; }
.info-list b { color: #9dd0ae; }

/* ==================== Notice ==================== */

.notice {
  padding: 13px 15px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  line-height: 1.5;
  display: none;
  margin-top: 16px;
}
.notice.visible { display: block; }
.notice.success { background: var(--green-pale); color: #286847; }
.notice.error { background: var(--red-bg); color: #984637; }
.notice.warn { background: var(--yellow-bg); color: #986d22; }

/* ==================== Toast ==================== */

.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  z-index: 9999;
  transform: translateY(100px);
  opacity: 0;
  transition: transform .3s ease, opacity .3s ease;
  box-shadow: var(--shadow-lg);
  max-width: 360px;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast-success { background: var(--green); color: white; }
.toast-error { background: var(--red); color: white; }
.toast-info { background: var(--blue); color: white; }

/* ==================== Modal ==================== */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(22,52,38,.4);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}

.modal-overlay.visible { opacity: 1; pointer-events: auto; }

.modal {
  background: var(--paper);
  border-radius: var(--radius);
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 28px;
  transform: translateY(20px);
  transition: transform var(--transition);
}

.modal-overlay.visible .modal { transform: translateY(0); }

.modal-large { max-width: 640px; }

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 24px;
}

.modal-header h2 { font-size: 20px; letter-spacing: -.03em; }
.modal-header p { color: var(--muted); font-size: 13px; margin-top: 4px; }

.modal-close {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--muted);
  font-size: 18px;
  transition: background var(--transition);
  flex-shrink: 0;
}
.modal-close:hover { background: var(--line-soft); color: var(--ink); }

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

/* ==================== Pin Display ==================== */

.pin-display {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: var(--green-pale);
  border-radius: var(--radius-sm);
  margin: 20px 0;
}

.pin-number {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: .15em;
  color: var(--green);
  font-family: 'DM Sans', monospace;
}

.pin-copy {
  padding: 8px 14px;
  background: var(--green);
  color: white;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
  transition: background var(--transition);
}
.pin-copy:hover { background: var(--green-dark); }

.pin-info { flex: 1; font-size: 12px; color: #3a6e54; line-height: 1.5; }
.pin-info strong { font-weight: 700; }

/* ==================== Cards Grid ==================== */

.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }

.card-item {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  transition: transform var(--transition), box-shadow var(--transition);
  position: relative;
}

.card-item:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

.card-item-header { display: flex; justify-content: space-between; align-items: start; margin-bottom: 12px; gap: 10px; }
.card-item h3 { font-size: 16px; letter-spacing: -.02em; }
.card-item-desc { color: var(--muted); font-size: 12px; line-height: 1.5; margin-bottom: 16px; }
.card-item-meta { display: flex; gap: 16px; font-size: 11px; color: var(--muted-2); }
.card-item-meta strong { color: var(--ink); font-size: 16px; display: block; font-weight: 700; }

.card-menu { position: absolute; top: 16px; right: 16px; }

.menu-trigger {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: var(--muted);
  font-size: 18px;
  transition: background var(--transition);
}
.menu-trigger:hover { background: var(--line-soft); }

/* ==================== Agent Form Select ==================== */

.form-select-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; margin-bottom: 24px; }

.form-select-card {
  padding: 20px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  background: var(--paper);
}

.form-select-card:hover { border-color: #b5cbbb; box-shadow: var(--shadow); }
.form-select-card.selected { border-color: var(--green); background: var(--green-pale); }

.form-select-card h3 { font-size: 15px; margin-bottom: 6px; }
.form-select-card p { font-size: 12px; color: var(--muted); line-height: 1.5; margin-bottom: 12px; }
.form-select-card .meta { font-size: 11px; color: var(--muted-2); display: flex; gap: 12px; }

/* ==================== Tabs ==================== */

.tabs { display: flex; gap: 4px; padding: 4px; background: #eef3ec; border-radius: 10px; margin-bottom: 24px; flex-wrap: wrap; }
.tab { padding: 9px 16px; border-radius: 7px; font-size: 13px; font-weight: 600; color: var(--muted); transition: all var(--transition); }
.tab.active { background: var(--paper); color: var(--green); box-shadow: var(--shadow-sm); }
.tab:hover:not(.active) { color: var(--ink); }

/* ==================== Utilities ==================== */

.section-gap { margin-top: 28px; }
.hidden { display: none !important; }

/* ==================== Responsive ==================== */

@media (max-width: 1024px) {
  .form-layout { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .welcome-shell, .login-shell { grid-template-columns: 1fr; }
  .welcome-panel, .login-side { min-height: 280px; padding: 32px 24px; }
  .welcome-panel { justify-content: center; }
  .welcome-panel::after, .login-side::after { width: 280px; height: 280px; right: -120px; top: -60px; }
  .welcome-copy { max-width: none; }
  .role-panel { padding: 32px 24px; }

  .form-panel { padding: 20px 16px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-actions { flex-direction: column-reverse; }
  .form-actions .button { width: 100%; justify-content: center; }

  .toolbar { flex-direction: column; align-items: stretch; }
  .search-input, .select-input { width: 100%; }

  .modal { padding: 22px 18px; }
  .modal-actions { flex-direction: column-reverse; }
  .modal-actions .button { width: 100%; justify-content: center; }

  .toast { left: 16px; right: 16px; bottom: 16px; max-width: none; }

  .role-card { grid-template-columns: 38px 1fr 18px; gap: 12px; padding: 18px 16px; }
  .role-icon { width: 36px; height: 36px; font-size: 18px; }
  .role-card h3 { font-size: 16px; }

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

@media (max-width: 480px) {
  .data-table { font-size: 12px; }
  .data-table th, .data-table td { padding: 10px 6px; }
  h1 { font-size: 40px; }
  .login-side-content { max-width: none; }
  .role-grid { gap: 12px; }
}

/* Scrollbar */
.modal::-webkit-scrollbar { width: 5px; }
.modal::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); border-radius: 99px; }

/* =========================
   DATAKOLEKTA LANDING HERO
   ========================= */

.landing-hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 80px 6vw;
  background:
    radial-gradient(circle at 75% 30%, rgba(13, 148, 136, 0.12), transparent 35%),
    #f7faf9;
  overflow: hidden;
}

.hero-content {
  width: min(1250px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  align-items: center;
  gap: 50px;
}

.hero-copy {
  position: relative;
  z-index: 2;
}

.hero-badge {
  display: inline-flex;
  padding: 7px 12px;
  border-radius: 999px;
  background: #e7f5f2;
  color: #087f73;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.hero-copy h1 {
  margin: 20px 0;
  font-size: clamp(42px, 5vw, 70px);
  line-height: 1.02;
  letter-spacing: -0.045em;
  color: var(--ink, #17211d);
}

.hero-copy h1 span {
  display: block;
  color: #087f73;
}

.hero-copy p {
  max-width: 570px;
  margin: 0 0 30px;
  color: var(--muted, #68736d);
  font-size: 18px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 25px;
}

.hero-actions a {
  text-decoration: none;
}

.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  color: var(--muted, #68736d);
  font-size: 13px;
  font-weight: 600;
}

.hero-visual {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(23, 33, 29, 0.18);
  transform: rotate(1deg);
}

.hero-visual img {
  display: block;
  width: 100%;
  height: auto;
}

/* Mobile */
@media (max-width: 850px) {
  .landing-hero {
    min-height: auto;
    padding: 55px 20px;
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .hero-copy {
    text-align: center;
  }

  .hero-copy p {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-points {
    justify-content: center;
  }

  .hero-visual {
    transform: none;
    border-radius: 18px;
  }
}

/* ==================== Authentication UI ==================== */

.auth-mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  background: #eef3ec;
  border-radius: 10px;
  margin-bottom: 30px;
}

.auth-mode-tab {
  padding: 10px 12px;
  border-radius: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  transition: all var(--transition);
}

.auth-mode-tab:hover {
  color: var(--ink);
}

.auth-mode-tab.active {
  background: var(--paper);
  color: var(--green);
  box-shadow: var(--shadow-sm);
}

.field-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 62px;
}

.password-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  padding: 4px;
  color: var(--green);
  font-size: 11px;
  font-weight: 700;
}

.password-toggle:hover {
  color: var(--green-dark);
}

.login-footer-action {
  display: flex;
  justify-content: center;
  gap: 5px;
  margin-top: 24px;
  color: var(--muted);
  font-size: 12px;
}

.login-footer-action a {
  color: var(--green);
  font-weight: 700;
}

.login-footer-action a:hover {
  color: var(--green-dark);
}

@media (max-width: 480px) {

  .auth-mode-tabs {
    margin-bottom: 24px;
  }

  .login-footer-action {
    flex-wrap: wrap;
  }

}

/* =========================================================
   SIGNUP / ONBOARDING
   ========================================================= */

.signup-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 42% 58%;
  background: var(--bg);
}

.signup-side {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 36px 48px;
  background: var(--green);
  color: #fff;
  overflow: hidden;
}

.signup-side::after {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  right: -180px;
  bottom: -180px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 50%;
  box-shadow:
    0 0 0 70px rgba(255,255,255,.025),
    0 0 0 140px rgba(255,255,255,.018);
  pointer-events: none;
}

.signup-side .brand {
  position: relative;
  z-index: 1;
  color: #fff;
}

.signup-side-content {
  position: relative;
  z-index: 1;
  max-width: 430px;
  margin: auto 0;
  padding: 80px 0;
}

.signup-side-content h1 {
  margin: 14px 0 20px;
  max-width: 400px;
  font-size: clamp(38px, 4vw, 58px);
  line-height: 1.02;
  letter-spacing: -2px;
}

.signup-side-content h1 em {
  color: #bce3ce;
  font-style: normal;
}

.signup-side-content p {
  max-width: 400px;
  color: rgba(255,255,255,.72);
  font-size: 15px;
  line-height: 1.8;
}

.signup-benefits {
  display: grid;
  gap: 14px;
  margin-top: 36px;
}

.signup-benefit {
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(255,255,255,.9);
  font-size: 13px;
}

.benefit-icon {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255,255,255,.12);
  color: #c5ead5;
  font-size: 12px;
  font-weight: 800;
}

.signup-main {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 48px;
  overflow-y: auto;
}

.signup-card {
  width: min(100%, 650px);
  padding: 24px 0;
}

.signup-progress {
  display: flex;
  align-items: center;
  margin: 34px 0 36px;
}

.signup-progress-step {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  opacity: .65;
  transition: all var(--transition);
}

.signup-progress-step > span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--paper);
  font-size: 12px;
  font-weight: 800;
}

.signup-progress-step strong,
.signup-progress-step small {
  display: block;
}

.signup-progress-step strong {
  font-size: 12px;
  color: var(--ink);
}

.signup-progress-step small {
  margin-top: 2px;
  font-size: 10px;
  color: var(--muted);
}

.signup-progress-step.active,
.signup-progress-step.complete {
  opacity: 1;
}

.signup-progress-step.active > span {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.signup-progress-step.complete > span {
  border-color: var(--green);
  background: var(--green-light);
  color: var(--green);
}

.signup-progress-line {
  height: 1px;
  flex: 1;
  min-width: 30px;
  margin: 0 16px;
  background: var(--line);
}

.signup-heading {
  margin-bottom: 28px;
}

.signup-step-label {
  color: var(--green);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.3px;
}

.signup-heading h1 {
  margin: 8px 0 8px;
  color: var(--ink);
  font-size: 30px;
  letter-spacing: -1px;
}

.signup-heading p {
  margin: 0;
  max-width: 480px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.signup-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.signup-card .field-group {
  margin-bottom: 20px;
}

.field-help {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.signup-next-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
}

.signup-next-button span {
  font-size: 15px;
  transition: transform var(--transition);
}

.signup-next-button:hover span {
  transform: translateX(3px);
}

.workspace-url-field {
  display: flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  transition:
    border-color var(--transition),
    box-shadow var(--transition);
}

.workspace-url-field:focus-within {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(30,91,73,.08);
}

.workspace-url-field > span {
  padding-left: 14px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.workspace-url-field input {
  min-width: 0;
  flex: 1;
  border: 0 !important;
  box-shadow: none !important;
  padding-left: 4px;
}

.signup-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 28px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--green-pale);
}

.signup-summary-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 9px;
  background: var(--green);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
}

.signup-summary strong,
.signup-summary span {
  display: block;
}

.signup-summary strong {
  color: var(--ink);
  font-size: 13px;
}

.signup-summary span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.signup-actions {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
}

.btn-secondary {
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  transition: all var(--transition);
}

.btn-secondary:hover {
  border-color: #c5d1c7;
  background: var(--bg);
}

.signup-error {
  display: none;
  margin-bottom: 20px;
  padding: 11px 13px;
  border: 1px solid #efcaca;
  border-radius: 8px;
  background: #fff5f5;
  color: #a33a3a;
  font-size: 12px;
  line-height: 1.5;
}

.signup-error.visible {
  display: block;
}

.signup-success {
  text-align: center;
  padding: 30px 0;
}

.signup-success-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 24px;
  border-radius: 50%;
  background: var(--green-light);
  color: var(--green);
  font-size: 28px;
  font-weight: 800;
}

.signup-success h1 {
  margin: 10px 0 12px;
  color: var(--ink);
  font-size: 32px;
  letter-spacing: -1px;
}

.signup-success p {
  max-width: 440px;
  margin: 0 auto 28px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
}

.signup-success-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: auto;
  padding-left: 24px;
  padding-right: 24px;
  text-decoration: none;
}

.signup-success-button span {
  transition: transform var(--transition);
}

.signup-success-button:hover span {
  transform: translateX(3px);
}


/* ==================== RESPONSIVE ==================== */

@media (max-width: 900px) {

  .signup-shell {
    grid-template-columns: 1fr;
  }

  .signup-side {
    display: none;
  }

  .signup-main {
    padding: 36px 24px;
  }

  .signup-card {
    max-width: 650px;
  }

}


@media (max-width: 600px) {

  .signup-main {
    align-items: flex-start;
    padding: 24px 18px;
  }

  .signup-progress {
    margin: 28px 0 30px;
  }

  .signup-progress-step strong {
    display: none;
  }

  .signup-progress-step small {
    display: none;
  }

  .signup-progress-line {
    margin: 0 10px;
  }

  .signup-field-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .signup-heading h1 {
    font-size: 26px;
  }

  .signup-actions {
    grid-template-columns: 1fr;
  }

  .btn-secondary {
    order: 2;
  }

}