/* Screen-specific layout that does not generalise into a component. */

/* ---- Login ------------------------------------------------------------- */
.login {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: var(--s-6);
  background: var(--surface-2);
}
.login-card {
  width: min(400px, 100%);
  padding: var(--s-8);
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-2xl);
  box-shadow: var(--shadow-3);
  animation: rise var(--d-slow) var(--ease);
}
.login-card .brand { justify-content: center; padding-bottom: var(--s-6); }

/* ---- Dashboard: one instrument strip, not four cards ------------------- */
.stat-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-1);
  overflow: hidden;
}
.stat {
  padding: var(--s-4) var(--s-5);
  border-left: 1px solid var(--hairline);
  min-width: 0;
}
.stat:first-child { border-left: 0; }
.stat-label { font-size: var(--t-12); color: var(--ink-3); }
.stat-value {
  font-size: var(--t-28);
  font-weight: var(--w-semibold);
  letter-spacing: -0.025em;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
  margin-top: var(--s-1);
}
.stat-meta { font-size: var(--t-11); color: var(--ink-3); margin-top: 2px; }
@media (max-width: 860px) {
  .stat-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--hairline); }
}
@media (max-width: 460px) {
  .stat-strip { grid-template-columns: minmax(0, 1fr); }
  .stat { border-left: 0; }
  .stat + .stat { border-top: 1px solid var(--hairline); }
}

.dash-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--s-5);
  align-items: start;
}

.account-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--s-1) var(--s-4);
  padding: var(--s-3) var(--s-5);
  border-bottom: 1px solid var(--hairline);
}
.account-row:last-child { border-bottom: 0; }
.account-row .bar { grid-column: 1 / -1; margin-top: var(--s-1); }

.activity { display: flex; flex-direction: column; }
.activity-item {
  display: flex;
  gap: var(--s-3);
  padding: var(--s-3) var(--s-5);
  border-bottom: 1px solid var(--hairline);
  font-size: var(--t-13);
}
.activity-item:last-child { border-bottom: 0; }
.activity-time { margin-left: auto; color: var(--ink-3); font-size: var(--t-11); white-space: nowrap; }

/* ---- Contacts / lists ---------------------------------------------------- */
.contacts-layout {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  gap: var(--s-5);
  align-items: start;
}
@media (max-width: 900px) { .contacts-layout { grid-template-columns: minmax(0, 1fr); } }
.list-item {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  width: 100%;
  padding: 7px var(--s-3);
  border-radius: var(--r-md);
  font-size: var(--t-13);
  color: var(--ink-2);
  text-align: left;
  transition: background var(--d-fast) var(--ease), color var(--d-fast) var(--ease);
}
.list-item:hover { background: var(--surface-hover); color: var(--ink); }
.list-item[aria-current="true"] { background: var(--accent-soft); color: var(--accent-ink); font-weight: var(--w-semibold); }
.attrs { display: flex; flex-wrap: wrap; gap: var(--s-1); }
.attr {
  font-family: var(--font-mono);
  font-size: var(--t-11);
  padding: 1px 6px;
  border-radius: var(--r-sm);
  background: var(--surface-3);
  color: var(--ink-2);
}

.dropzone {
  display: grid;
  place-items: center;
  gap: var(--s-2);
  padding: var(--s-10) var(--s-5);
  border: 1.5px dashed var(--hairline-strong);
  border-radius: var(--r-lg);
  background: var(--surface-2);
  text-align: center;
  transition: border-color var(--d-fast) var(--ease), background var(--d-fast) var(--ease);
}
.dropzone[data-over="true"] { border-color: var(--accent); background: var(--accent-soft); }

/* ---- Templates ----------------------------------------------------------- */
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(248px, 1fr)); gap: var(--s-4); }
.tpl-card {
  display: flex;
  flex-direction: column;
  text-align: left;
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  background: var(--surface);
  overflow: hidden;
  box-shadow: var(--shadow-1);
  transition: box-shadow var(--d-base) var(--ease), border-color var(--d-base) var(--ease);
}
.tpl-card:hover { box-shadow: var(--shadow-2); border-color: var(--hairline-strong); }
.tpl-thumb {
  height: 132px;
  border-bottom: 1px solid var(--hairline);
  background: #fff;
  overflow: hidden;
  position: relative;
}
.tpl-thumb iframe {
  width: 250%; height: 250%;
  border: 0;
  transform: scale(0.4);
  transform-origin: 0 0;
  pointer-events: none;
}
.tpl-meta { padding: var(--s-3) var(--s-4); }
