@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap");

:root {
  color-scheme: light;
  --ink: #171719;
  --ink-soft: #4f5056;
  --muted: #85868d;
  --stroke: #e7e5e2;
  --canvas: #fbfbfc;
  --paper: #fff;
  --blush: #ffe7ee;
  --sky: #eaf3ff;
  --mint: #e4f8ef;
  --lemon: #fff4c9;
  --lilac: #f0e9ff;
  --peach: #ffe8d5;
  --sage: #4b7d63;
  --danger: #b63c5c;
  --shadow: 0 18px 48px rgba(23, 23, 25, 0.08);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0; min-height: 100vh; background: var(--canvas); color: var(--ink);
  font-family: Manrope, ui-sans-serif, system-ui, sans-serif;
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.partner-shell { min-height: 100vh; }
.partner-header {
  height: 74px;
  padding: 0 max(24px, calc((100vw - 1240px) / 2));
  border-bottom: 1px solid var(--stroke);
  background: rgba(255,255,255,.96);
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.brand { display: flex; align-items: center; gap: 11px; color: inherit; text-decoration: none; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 14px; background: var(--blush);
  border: 1px solid rgba(0,0,0,.05); display: grid; place-items: center;
  font-size: 17px; font-weight: 800;
}
.brand strong, .brand small { display: block; }
.brand strong { font-size: 16px; font-weight: 800; }
.brand small { color: var(--muted); font-size: 12px; font-weight: 600; }
.header-actions { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 12px; }

main { max-width: 1240px; margin: 0 auto; padding: 34px 24px 64px; }
.login-layout {
  min-height: calc(100vh - 142px);
  border: 1px solid var(--stroke);
  border-radius: 20px;
  overflow: hidden;
  background: var(--paper);
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(360px, .82fr);
}
.login-intro {
  padding: clamp(40px, 6vw, 76px);
  background: var(--lemon) url("./assets/tira-world-map.png") center / cover no-repeat;
  display: flex; flex-direction: column; justify-content: flex-end;
}
.eyebrow { margin: 0 0 8px; color: var(--sage); font-size: 11px; font-weight: 800; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 14px; font-size: clamp(37px, 5vw, 60px); line-height: 1.04; font-weight: 800; }
h2 { margin-bottom: 0; font-size: 24px; line-height: 1.16; font-weight: 800; }
h3 { font-size: 16px; font-weight: 800; }
.login-intro > p:not(.eyebrow) { max-width: 590px; color: var(--ink-soft); font-size: 16px; line-height: 1.6; }
.trust-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.trust-row span {
  padding: 7px 10px; border: 1px solid rgba(0,0,0,.07); border-radius: 999px;
  background: rgba(255,255,255,.66); font-size: 11px; font-weight: 700;
}

.login-form, .panel { background: var(--paper); }
.login-form {
  padding: clamp(34px, 5vw, 62px);
  display: flex; flex-direction: column; justify-content: center; gap: 16px;
}
.login-form > div { margin-bottom: 7px; }
.login-form > div p:last-child { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.admin-link { margin-top: 3px; color: var(--muted); font-size: 12px; font-weight: 700; text-align: center; }
.portal-links { display: grid; gap: 8px; margin-top: 3px; }

label { display: grid; gap: 7px; color: var(--ink-soft); font-size: 12px; font-weight: 700; }
input, select, textarea {
  width: 100%; min-height: 43px; padding: 10px 12px; border: 1px solid var(--stroke);
  border-radius: 12px; background: #f7f7f9; color: var(--ink); outline: none;
}
input:focus, select:focus, textarea:focus {
  border-color: #aaa8a5; background: #fff; box-shadow: 0 0 0 3px rgba(23,23,25,.05);
}
textarea { min-height: 108px; resize: vertical; }

.primary-button, .quiet-button {
  min-height: 43px; border: 0; border-radius: 12px; padding: 10px 15px; font-weight: 800;
}
.primary-button { color: #fff; background: var(--ink); }
.primary-button:hover { background: #303034; }
.quiet-button { color: #315f4a; background: var(--mint); }
.quiet-button:hover { background: #d8f2e6; }

.workspace { display: grid; gap: 23px; }
.workspace-heading, .panel-heading, .record-heading {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.workspace-heading h1 { margin-bottom: 0; font-size: 31px; }
.message { min-height: 0; margin: 0; color: #315f4a; font-size: 13px; font-weight: 700; }
.message:not(:empty) { padding: 11px 14px; border: 1px solid #c8e7d8; border-radius: 12px; background: var(--mint); }
.message.error:not(:empty) { color: var(--danger); border-color: #f1c7d2; background: #fff0f4; }

.summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.summary-item {
  min-height: 132px; padding: 19px; border: 1px solid rgba(0,0,0,.045);
  border-radius: 16px; background: var(--sky); display: flex; flex-direction: column;
}
.summary-item:nth-child(2) { background: var(--mint); }
.summary-item:nth-child(3) { background: var(--lilac); }
.summary-item:nth-child(4) { background: var(--peach); }
.summary-item span { color: var(--ink-soft); font-size: 12px; font-weight: 700; }
.summary-item strong { margin-top: auto; font-size: 29px; line-height: 1; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--stroke); }
.tab {
  padding: 12px 15px; border: 0; border-bottom: 2px solid transparent;
  color: var(--muted); background: transparent; font-size: 13px; font-weight: 800;
}
.tab:hover { color: var(--ink); }
.tab.active { color: var(--ink); border-bottom-color: var(--ink); }
.tab-panel { display: grid; gap: 14px; }

.panel { padding: 21px; border: 1px solid var(--stroke); border-radius: 16px; }
.panel-heading { padding-bottom: 16px; border-bottom: 1px solid var(--stroke); }
.panel-heading h2, .panel-heading h3 { margin-bottom: 0; }
.panel-heading p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.panel-heading span { color: var(--muted); font-size: 11px; font-weight: 700; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding-top: 17px; }
.form-grid .full, .form-actions { grid-column: 1 / -1; }
.form-actions { display: flex; justify-content: flex-end; }

.record-list { display: grid; gap: 9px; padding-top: 14px; }
.record { padding: 15px; border: 1px solid var(--stroke); border-radius: 14px; }
.record-heading h3 { margin-bottom: 4px; font-size: 14px; }
.record p { margin-bottom: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.status {
  padding: 5px 9px; border-radius: 999px; color: #315f4a;
  background: var(--mint); font-size: 10px; font-weight: 800;
}
.status.pending, .status.trial { color: #7a5a00; background: var(--lemon); }
.empty-state {
  padding: 28px; border: 1px dashed #d8d6d3; border-radius: 14px;
  background: #fafafa; color: var(--muted); font-size: 13px; line-height: 1.55; text-align: center;
}

@media (max-width: 900px) {
  .login-layout { grid-template-columns: 1fr; }
  .login-intro { min-height: 400px; }
  .summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .partner-header { height: auto; padding: 15px 16px; align-items: flex-start; }
  .header-actions { align-items: flex-end; flex-direction: column; }
  main { padding: 20px 12px 48px; }
  .login-layout { border-radius: 16px; }
  .login-intro { min-height: 350px; padding: 28px; }
  .login-form { padding: 28px; }
  .summary-grid, .form-grid { grid-template-columns: 1fr; }
  .tabs { overflow-x: auto; }
  .tab { white-space: nowrap; }
}
