:root {
  --ink: #07142f;
  --muted: #61708a;
  --line: #dbe5f2;
  --blue: #246bfe;
  --cyan: #48d4ff;
  --green: #22b86a;
  --danger: #de4146;
  --paper: #f4f8fd;
  --card: #ffffff;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background: radial-gradient(circle at top left, rgba(72, 212, 255, .16), transparent 34%), var(--paper);
  font-family: "Manrope", Arial, sans-serif;
}

a { color: inherit; }

.client-top {
  position: sticky;
  top: 0;
  z-index: 5;
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 clamp(18px, 5vw, 56px);
  background: rgba(255, 255, 255, .86);
  border-bottom: 1px solid rgba(219, 229, 242, .86);
  backdrop-filter: blur(18px);
}

.client-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
  font-size: 28px;
  font-weight: 900;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-block;
  flex: 0 0 auto;
  background: url("kality-logo.png?v=6") center/contain no-repeat;
}

.brand-mark span {
  display: none;
}

.client-top nav {
  display: flex;
  align-items: center;
  gap: 12px;
}

.client-top a:not(.client-brand),
.client-top button,
button,
.primary-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border: 0;
  border-radius: 12px;
  color: white;
  background: var(--blue);
  font: inherit;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
}

.client-top a:not(.client-brand) {
  color: #24426f;
  background: #edf3ff;
}

.soft-link {
  color: #24426f;
  background: #edf3ff;
}

button:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.client-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 34px auto 70px;
}

.auth-grid,
.grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 440px);
  gap: 22px;
  align-items: start;
}

.auth-copy {
  min-height: 460px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(26px, 5vw, 58px);
  color: white;
  background: linear-gradient(135deg, #071b42, #123568 58%, #246bfe);
  border-radius: 26px;
}

.auth-copy span,
.dashboard-head span {
  color: var(--cyan);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.auth-copy h1,
.dashboard-head h1 {
  margin: 12px 0;
  font-size: clamp(34px, 5vw, 64px);
  line-height: .98;
  letter-spacing: -.04em;
}

.auth-copy p,
.dashboard-head p,
.muted {
  color: var(--muted);
  line-height: 1.65;
}

.auth-copy p { color: rgba(255, 255, 255, .74); max-width: 620px; }

.panel,
.dashboard-head {
  padding: clamp(20px, 3vw, 30px);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 18px 50px rgba(7, 20, 47, .07);
}

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

.panel h2,
.panel h1 {
  margin: 0 0 16px;
  letter-spacing: -.03em;
}

.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.section-heading h2 { margin-bottom: 6px; }

.count-pill {
  min-width: max-content;
  padding: 7px 11px;
  color: #144d9c;
  background: #e8f1ff;
  border: 1px solid #b9d4ff;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.form {
  display: grid;
  gap: 14px;
}

.google-login-button {
  width: 100%;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 14px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(7, 20, 47, .06);
}

.google-login-button span {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: #4285f4;
  border-radius: 50%;
  font-weight: 900;
}

.auth-separator {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.auth-separator::before,
.auth-separator::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--line);
}

label {
  display: grid;
  gap: 7px;
  color: #24426f;
  font-size: 13px;
  font-weight: 900;
}

input,
select,
textarea {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  background: #fbfdff;
  font: inherit;
}

textarea {
  min-height: 150px;
  padding-top: 12px;
  resize: vertical;
}

.switch { color: var(--muted); }
.switch a { color: var(--blue); font-weight: 900; }

.flash {
  margin-bottom: 18px;
  padding: 14px 16px;
  color: #0f5132;
  background: #dcf8ea;
  border: 1px solid #a8e8c7;
  border-radius: 14px;
  font-weight: 800;
}

.flash.error,
.warning {
  color: #842029;
  background: #fff3f3;
  border-color: #f3c2c5;
}

.verified-panel {
  margin-bottom: 18px;
  color: #0f5132;
  background: #f0fff7;
  border-color: #a8e8c7;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
}

.tabs a {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  padding: 0 16px;
  color: #24426f;
  background: white;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-weight: 900;
  text-decoration: none;
}

.tabs a.active {
  color: white;
  background: var(--blue);
  border-color: var(--blue);
}

.intervention-list,
.table {
  display: grid;
  gap: 12px;
}

.client-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 18px;
}

.intervention-card,
.table article {
  padding: 16px;
  background: #f8fbff;
  border: 1px solid var(--line);
  border-radius: 15px;
}

.intervention-card > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.intervention-card strong,
.table strong {
  overflow-wrap: anywhere;
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  color: #144d9c;
  background: #e8f1ff;
  border: 1px solid #b9d4ff;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.status-new { color: #144d9c; background: #e8f1ff; border-color: #b9d4ff; }
.status-progress { color: #795300; background: #fff5cc; border-color: #ffd978; }
.status-done { color: #08703c; background: #e7f8ee; border-color: #9fe0b9; }
.status-cancelled { color: #9d1c24; background: #ffe8ea; border-color: #ffb8be; }

.message-box {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.message-box summary {
  cursor: pointer;
  color: var(--blue);
  font-weight: 900;
}

.compact-form { margin-top: 12px; }
.compact-form textarea { min-height: 110px; }

dl {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0 0;
}

dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

dd {
  margin: 4px 0 0;
  overflow-wrap: anywhere;
}

.table article {
  display: grid;
  grid-template-columns: 180px 110px 150px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.table p { margin: 0; color: var(--muted); overflow-wrap: anywhere; }

@media (max-width: 800px) {
  .client-top { align-items: flex-start; flex-direction: column; padding-top: 16px; padding-bottom: 16px; }
  .auth-grid,
  .grid-2 { grid-template-columns: 1fr; }
  .auth-copy { min-height: auto; }
  .dashboard-head { align-items: flex-start; flex-direction: column; }
  .section-heading { display: grid; }
  .client-search { grid-template-columns: 1fr; }
  dl { grid-template-columns: 1fr 1fr; }
  .table article { grid-template-columns: 1fr; }
}

