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

:root {
  --bg: #f2f4f8;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --ink: #0f172a;
  --ink-soft: #334155;
  --ink-muted: #64748b;
  --brand: #0d9488;
  --brand-dark: #0f766e;
  --brand-soft: #dff6f3;
  --accent: #1d4ed8;
  --accent-soft: #e8efff;
  --line: #dbe3ee;
  --danger: #dc2626;
  --shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
  --r: 16px;
  --r-lg: 28px;
  --max: 1200px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Manrope', sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 5% 0%, #d7efe9 0%, transparent 28%),
    radial-gradient(circle at 95% 10%, #dfe8ff 0%, transparent 24%),
    var(--bg);
  line-height: 1.6;
}

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

nav {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(10px);
  background: rgba(242, 244, 248, 0.9);
  border-bottom: 1px solid rgba(219, 227, 238, 0.8);
}

.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.logo svg {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  box-shadow: 0 8px 18px rgba(13, 148, 136, 0.3);
}

.nav-links {
  display: flex;
  gap: 22px;
  align-items: center;
}

.nav-links a {
  text-decoration: none;
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 0.95rem;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}

.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  padding: 10px 12px;
  cursor: pointer;
  line-height: 1;
}

.lang-btn .flag {
  font-size: 0.95rem;
  line-height: 1;
}

.lang-btn.active {
  background: var(--ink);
  color: #fff;
}

.nav-links .cta {
  background: var(--ink);
  color: #fff;
  padding: 10px 16px;
  border-radius: 10px;
}

.nav-links .login-btn {
  background: #fff;
  border: 1px solid var(--line);
  padding: 10px 16px;
  border-radius: 10px;
  color: var(--ink);
}

.hero {
  padding: 88px 0 64px;
}

.hero-grid {
  display: grid;
  gap: 32px;
  grid-template-columns: 1.2fr 1fr;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2rem, 5vw, 3.6rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.hero p {
  color: var(--ink-soft);
  font-size: 1.05rem;
  max-width: 62ch;
  margin-bottom: 24px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  text-decoration: none;
  font-weight: 700;
  border-radius: 11px;
  padding: 12px 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
}

.btn.primary { background: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-dark); }
.btn.ghost { background: #fff; color: var(--ink); border-color: var(--line); }

.hero-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero-card-top {
  background: linear-gradient(120deg, #0f766e, #1d4ed8);
  padding: 24px;
  color: #fff;
}

.hero-card-top h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.35rem;
  margin-bottom: 8px;
}

.hero-card-top p {
  color: rgba(255, 255, 255, 0.9);
  margin: 0;
  font-size: 0.95rem;
}

.hero-card-body {
  padding: 20px 24px 24px;
}

.metric {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
}

.metric:last-child { border-bottom: 0; }
.metric strong { color: var(--brand-dark); }

section {
  padding: 72px 0;
}

.section-head {
  margin-bottom: 26px;
}

.section-head h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.55rem, 3vw, 2.3rem);
  margin-bottom: 10px;
}

.section-head p {
  color: var(--ink-muted);
  max-width: 72ch;
}

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

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 20px;
  box-shadow: 0 5px 18px rgba(15, 23, 42, 0.04);
}

.card h3 {
  font-size: 1.05rem;
  margin-bottom: 8px;
}

.card p {
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.platform {
  background: var(--surface-soft);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

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

.platform-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 22px;
}

.platform-card .tag {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

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

.gallery figure {
  margin: 0;
  overflow: hidden;
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: #fff;
}

.gallery img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

.gallery figcaption {
  padding: 10px 12px;
  font-size: 0.85rem;
  color: var(--ink-muted);
}

.cta-box {
  background: linear-gradient(130deg, #0f172a, #1e293b);
  color: #fff;
  border-radius: 24px;
  padding: 42px 30px;
  text-align: center;
  box-shadow: var(--shadow);
}

.cta-box h2 {
  font-family: 'Space Grotesk', sans-serif;
  margin-bottom: 10px;
  font-size: clamp(1.5rem, 3vw, 2.25rem);
}

.cta-box p {
  color: #d7e0ef;
  margin-bottom: 18px;
}

footer {
  border-top: 1px solid var(--line);
  padding: 28px 0;
  color: var(--ink-muted);
  font-size: 0.88rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

/* Login */
.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr;
}

.login-main {
  display: grid;
  place-items: center;
  padding: 48px 24px;
}

.login-grid {
  width: 100%;
  max-width: 980px;
  display: grid;
  gap: 24px;
  grid-template-columns: 1.1fr 1fr;
  align-items: stretch;
}

.login-intro {
  background: linear-gradient(120deg, #0f766e, #1d4ed8);
  color: #fff;
  border-radius: var(--r-lg);
  padding: 34px;
  box-shadow: var(--shadow);
}

.login-intro h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin-bottom: 12px;
}

.login-intro p {
  color: rgba(255, 255, 255, 0.92);
  margin-bottom: 10px;
}

.login-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 28px;
  box-shadow: var(--shadow);
}

.login-card h2 {
  font-family: 'Space Grotesk', sans-serif;
  margin-bottom: 8px;
  font-size: 1.5rem;
}

.login-card .subline {
  color: var(--ink-muted);
  margin-bottom: 20px;
  font-size: 0.94rem;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.form-row label {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ink-soft);
}

.form-row input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 12px 14px;
  font-size: 0.96rem;
  color: var(--ink);
  background: #fff;
}

.form-row input:focus {
  outline: 2px solid transparent;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.12);
}

.password-field {
  position: relative;
}

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

.password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.password-toggle:hover {
  background: rgba(15, 23, 42, 0.06);
}

.password-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.password-toggle svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.password-toggle .icon-eye-closed {
  display: none;
}

.password-toggle[aria-pressed="true"] .icon-eye-open {
  display: none;
}

.password-toggle[aria-pressed="true"] .icon-eye-closed {
  display: block;
}

.form-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.link {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}

.link:hover { text-decoration: underline; }

.form-note {
  margin-top: 14px;
  font-size: 0.84rem;
  color: var(--ink-muted);
}

.stub-alert {
  border: 1px dashed #f5c2c7;
  background: #fff1f2;
  color: var(--danger);
  padding: 10px 12px;
  border-radius: 11px;
  font-size: 0.88rem;
  margin-bottom: 18px;
}

.dashboard-page {
  min-height: 100vh;
}

.dashboard-main {
  padding-top: 42px;
  padding-bottom: 56px;
}

.dashboard-main section {
  padding: 0;
}

.dashboard-main .section-head {
  margin-bottom: 14px;
}

.section-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.section-head-row h1 {
  margin: 0;
}

.dashboard-main .cards-3 {
  gap: 14px;
  margin-bottom: 14px;
}

.dashboard-kpis {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.role-badge {
  background: var(--brand-soft);
  color: var(--brand-dark);
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 700;
  font-size: 0.82rem;
}

.metric-card p {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--ink);
  margin-top: 6px;
}

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

.metric-side {
  padding-right: 12px;
}

.metric-side + .metric-side {
  border-left: 1px solid var(--line);
  padding-left: 12px;
  padding-right: 0;
}

.table-wrap {
  margin-top: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: 0 5px 18px rgba(15, 23, 42, 0.04);
  overflow: visible;
}

.success-alert {
  border: 1px solid #99f6e4;
  background: #f0fdfa;
  color: #134e4a;
}

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

.inline-form-grid .full {
  grid-column: 1 / -1;
}

.form-row select,
.form-row textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 12px 14px;
  font-size: 0.96rem;
  color: var(--ink);
  background: #fff;
  font-family: inherit;
}

.form-row select:focus,
.form-row textarea:focus {
  outline: 2px solid transparent;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.12);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 80;
}

.modal-backdrop.is-open {
  display: flex;
}

.modal-dialog {
  width: min(760px, 100%);
  max-height: 90vh;
  overflow: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  padding: 18px;
}

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

.modal-head h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.2rem;
  margin: 0;
}

.modal-close {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
}

.table-wrap h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.2rem;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.table-subline {
  font-size: 0.88rem;
  color: var(--ink-soft);
  padding: 10px 20px 0;
}

.customer-row {
  cursor: pointer;
}

.customer-row.is-selected td {
  background: #ecfeff;
}

.customer-row:focus-visible td {
  outline: 2px solid #14b8a6;
  outline-offset: -2px;
}

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

.overview-table th,
.overview-table td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
}

.overview-table th {
  color: var(--ink-soft);
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  background: #f8fafc;
}

.overview-table tbody tr:hover {
  background: #f8fbff;
}

.overview-table tbody tr:last-child td {
  border-bottom: 0;
}

.table-btn {
  padding: 8px 12px;
  border-radius: 9px;
  font-size: 0.8rem;
  white-space: nowrap;
}

.limit-inline-form {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.limit-inline-input {
  width: 110px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 1rem;
  font-weight: 600;
}

.limit-inline-btn {
  padding: 6px 9px;
  font-size: 0.74rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.limit-missing-note {
  font-size: 0.78rem;
  color: var(--ink-soft);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 76px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.status-pill-active {
  color: #166534;
  background: #dcfce7;
  border-color: #86efac;
}

.status-pill-inactive {
  color: #991b1b;
  background: #fee2e2;
  border-color: #fca5a5;
}

.row-actions {
  position: relative;
  display: inline-block;
  z-index: 30;
}

.row-action-toggle {
  cursor: pointer;
}

.row-action-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 10;
  min-width: 220px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 12px 20px rgba(15, 23, 42, 0.12);
  padding: 8px;
}

.row-action-menu form + form {
  margin-top: 4px;
}

.row-action-item {
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ink);
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
}

.row-action-item:hover {
  background: #f1f5f9;
}

.row-action-item.danger {
  color: #b91c1c;
}

.row-action-item.danger:hover {
  background: #fef2f2;
}

@media (max-width: 980px) {
  .hero-grid,
  .cards-3,
  .gallery,
  .platform-grid,
  .login-grid {
    grid-template-columns: 1fr;
  }

  .nav-links a:not(.cta):not(.login-btn) { display: none; }
  .lang-switch { display: inline-flex; }
  .overview-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
  .inline-form-grid {
    grid-template-columns: 1fr;
  }
  .section-head-row {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .nav-inner,
  .wrap {
    padding-left: 16px;
    padding-right: 16px;
  }

  .login-card,
  .login-intro {
    padding: 22px;
  }

  .form-meta {
    flex-direction: column;
    align-items: flex-start;
  }
}
