:root {
  color-scheme: light;
  --bg: #f5f6f3;
  --panel: #ffffff;
  --panel-soft: #fafaf8;
  --text: #20211d;
  --muted: #6f746b;
  --line: #e0e2dc;
  --line-strong: #c9cdc3;
  --green: #16744c;
  --green-soft: #e7f4ed;
  --yellow: #9a6700;
  --yellow-soft: #fff1cf;
  --red: #b43b2f;
  --red-soft: #fde8e4;
  --blue: #2f5f9f;
  --blue-soft: #e7eef8;
  --accent: #8b5e34;
  --accent-soft: #f2ebe2;
  --shadow: 0 22px 70px rgba(34, 36, 31, 0.13);
  --shadow-soft: 0 8px 28px rgba(34, 36, 31, 0.07);
  --ease-fluid: cubic-bezier(0.165, 0.84, 0.44, 1);
  --ease-fluid-in: cubic-bezier(0.77, 0, 0.175, 1);
  --modal-from-x: 0px;
  --modal-from-y: 0px;
  --modal-from-scale-x: 0.72;
  --modal-from-scale-y: 0.72;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  font: inherit;
}

[hidden] {
  display: none !important;
}

.app-shell {
  width: min(1240px, calc(100% - 40px));
  margin: 0 auto;
  padding: 32px 0 48px;
}

.topbar,
.toolbar,
.data-notice,
.summary-grid {
  margin-bottom: 16px;
}

.topbar,
.toolbar,
.data-notice,
.summary-grid,
.table-wrap {
  animation: contentIn 820ms var(--ease-fluid) both;
}

.toolbar {
  animation-delay: 90ms;
}

.data-notice {
  animation-delay: 150ms;
}

.summary-grid {
  animation-delay: 210ms;
}

.table-wrap {
  animation-delay: 280ms;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfbf8 100%);
  box-shadow: var(--shadow-soft);
  padding: 22px 24px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(1.65rem, 2.5vw, 2.45rem);
  line-height: 1.1;
  font-weight: 760;
}

h2 {
  font-size: 1.22rem;
  font-weight: 760;
}

.today {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  padding: 8px 12px;
  font-size: 0.86rem;
  font-weight: 800;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px 170px 155px 155px 190px;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: var(--shadow-soft);
  padding: 14px;
}

.search-field,
.filter-field {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

input,
select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  padding: 0 12px;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 16px) 19px, calc(100% - 11px) 19px;
  background-repeat: no-repeat;
  background-size: 5px 5px, 5px 5px;
  padding-right: 34px;
}

input::placeholder {
  color: #9a9f95;
}

button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid rgba(47, 95, 159, 0.34);
  outline-offset: 2px;
}

input:focus,
select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(47, 95, 159, 0.12);
}

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

.data-notice {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  color: var(--muted);
  padding: 11px 14px;
  font-size: 0.86rem;
  font-weight: 750;
}

.summary-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfbf8 100%);
  box-shadow: var(--shadow-soft);
  padding: 15px;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.summary-item:hover {
  border-color: var(--line-strong);
  box-shadow: 0 12px 30px rgba(34, 36, 31, 0.08);
  transform: translateY(-1px);
}

.summary-item strong {
  display: block;
  margin-top: 6px;
  color: var(--text);
  font-size: 1.65rem;
  line-height: 1;
}

.attendance-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfbf8 100%);
  box-shadow: var(--shadow-soft);
  padding: 15px 20px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.attendance-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  flex: 0 0 auto;
  margin: 0;
}

.attendance-stats {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  flex: 1;
}

.attendance-stat {
  flex: 1;
  min-width: 140px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 18px;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.attendance-stat span {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
}

.attendance-stat strong {
  display: block;
  margin-top: 5px;
  font-size: 1.65rem;
  line-height: 1;
}

.attendance-stat.stat-good { border-color: var(--green); background: var(--green-soft); }
.attendance-stat.stat-good strong { color: var(--green); }

.attendance-stat.stat-warn { border-color: var(--yellow); background: var(--yellow-soft); }
.attendance-stat.stat-warn strong { color: var(--yellow); }

.attendance-stat.stat-bad { border-color: var(--red); background: var(--red-soft); }
.attendance-stat.stat-bad strong { color: var(--red); }

.attendance-stat.stat-neutral { border-color: var(--blue); background: var(--blue-soft); }
.attendance-stat.stat-neutral strong { color: var(--blue); }

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow-soft);
}

table {
  width: 100%;
  min-width: 1080px;
  border-collapse: collapse;
}

th,
td {
  padding: 15px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

th {
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
}

tbody tr {
  animation: rowIn 420ms cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: var(--row-delay, 0ms);
  transition: background 150ms ease, transform 150ms ease;
}

tbody tr:hover {
  background: #fbfbf8;
  transform: translateY(-1px);
}

tr:last-child td {
  border-bottom: 0;
}

.person {
  display: grid;
  gap: 3px;
}

.person span,
.muted {
  color: var(--muted);
  font-size: 0.86rem;
}

.name-button {
  width: fit-content;
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  padding: 0;
  text-align: left;
  font-size: 0.98rem;
  font-weight: 760;
}

.name-button:hover {
  color: var(--blue);
  text-decoration: underline;
}

.status-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 116px;
  min-height: 36px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0 12px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 850;
  overflow: hidden;
  transition: transform 520ms var(--ease-fluid), box-shadow 520ms var(--ease-fluid), filter 520ms var(--ease-fluid);
}

.status-button::before {
  content: "";
  position: absolute;
  inset: -120% auto -120% -70%;
  width: 52%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.7), transparent);
  opacity: 0;
  transform: rotate(18deg) translateX(-80%);
  transition: opacity 240ms ease, transform 760ms var(--ease-fluid);
}

.status-button:hover::before {
  opacity: 1;
  transform: rotate(18deg) translateX(420%);
}

.status-button > * {
  position: relative;
  z-index: 1;
}

.status-button small {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  font-size: 0.74rem;
}

.status-button.valid {
  border-color: rgba(20, 122, 70, 0.22);
  background: var(--green-soft);
  color: var(--green);
}

.status-button.warning {
  border-color: rgba(154, 100, 0, 0.22);
  background: var(--yellow-soft);
  color: var(--yellow);
}

.status-button.expired {
  border-color: rgba(180, 35, 24, 0.22);
  background: var(--red-soft);
  color: var(--red);
}

.status-button.neutral {
  border-color: rgba(23, 92, 211, 0.22);
  background: var(--blue-soft);
  color: var(--blue);
}

.status-button:hover {
  filter: brightness(0.99);
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(34, 36, 31, 0.08);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: color-mix(in srgb, #0b1012 48%, transparent);
  backdrop-filter: blur(0);
  animation: backdropIn 720ms var(--ease-fluid) both;
  z-index: 50;
}

.modal-backdrop.is-closing {
  animation: backdropOut 420ms var(--ease-fluid-in) both;
}

.modal-backdrop.is-preparing {
  opacity: 0;
  pointer-events: none;
}

.modal-backdrop.is-preparing,
.modal-backdrop.is-preparing .modal,
.modal-backdrop.is-preparing .modal-body > * {
  animation: none;
  opacity: 0;
}

.modal {
  position: relative;
  width: min(1080px, calc(100vw - 28px));
  display: flex;
  flex-direction: column;
  max-height: min(860px, calc(100vh - 28px));
  overflow: hidden;
  border-radius: 8px;
  background: color-mix(in srgb, #f7f3ea 86%, transparent);
  box-shadow: 0 36px 110px rgba(8, 10, 9, 0.34);
  border: 1px solid rgba(255, 255, 255, 0.62);
  backdrop-filter: blur(32px) saturate(1.18);
  animation: modalIn 900ms var(--ease-fluid) both;
  transform-origin: 50% 46%;
  will-change: transform, opacity, filter;
}

.modal::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.52), rgba(255, 255, 255, 0.08) 32%, transparent 58%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.2), transparent 26%);
  opacity: 0.72;
  z-index: 0;
}

.modal > * {
  position: relative;
  z-index: 1;
}

.modal-backdrop.is-closing .modal {
  animation: modalOut 460ms var(--ease-fluid-in) both;
}

.modal-header {
  flex: 0 0 auto;
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, #f7f3ea 78%, transparent);
  padding: 22px 24px;
}

.icon-button {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  cursor: pointer;
  font-size: 1.35rem;
  line-height: 1;
  transition: background 140ms ease, color 140ms ease;
}

.icon-button:hover {
  background: var(--panel-soft);
  color: var(--text);
}

.modal-body {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  gap: 14px;
  overflow-y: scroll;
  overscroll-behavior: contain;
  background: color-mix(in srgb, #f7f3ea 74%, transparent);
  padding: 20px 24px 24px;
  scrollbar-gutter: stable;
}

.modal-body > * {
  animation: contentIn 720ms var(--ease-fluid) both;
  animation-delay: 220ms;
}

.modal-body > *:nth-child(2) {
  animation-delay: 300ms;
}

.modal-body > *:nth-child(3) {
  animation-delay: 380ms;
}

.modal-body::-webkit-scrollbar {
  width: 10px;
}

.modal-body::-webkit-scrollbar-thumb {
  border: 3px solid #f7f3ea;
  border-radius: 999px;
  background: #c9bca8;
}

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

.summary-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 11px 12px;
  font-size: 0.86rem;
  font-weight: 800;
}

.summary-pill strong {
  font-size: 1.05rem;
}

.summary-pill.valid {
  border-color: rgba(22, 116, 76, 0.12);
  background: var(--green-soft);
  color: var(--green);
}

.summary-pill.warning {
  border-color: rgba(154, 103, 0, 0.12);
  background: var(--yellow-soft);
  color: var(--yellow);
}

.summary-pill.expired {
  border-color: rgba(180, 59, 47, 0.12);
  background: var(--red-soft);
  color: var(--red);
}

.summary-pill.neutral {
  border-color: rgba(47, 95, 159, 0.12);
  background: var(--blue-soft);
  color: var(--blue);
}

.detail-list {
  display: grid;
  gap: 10px;
}

.detail-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 13px;
  transition: border-color 520ms var(--ease-fluid), box-shadow 520ms var(--ease-fluid), transform 520ms var(--ease-fluid), background 520ms var(--ease-fluid);
}

.detail-row:hover {
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 12px 28px rgba(34, 36, 31, 0.07);
  transform: translateY(-1px);
}

.detail-row.valid {
  border-left: 4px solid var(--green);
}

.detail-row.warning {
  border-left: 4px solid var(--yellow);
}

.detail-row.expired {
  border-left: 4px solid var(--red);
}

.detail-row.neutral {
  border-left: 4px solid var(--blue);
}

.detail-row h3 {
  margin: 0 0 4px;
  font-size: 0.98rem;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 12px;
  color: var(--muted);
  font-size: 0.86rem;
}

.small-badge {
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 0.76rem;
  font-weight: 800;
}

.small-badge.valid {
  background: var(--green-soft);
  color: var(--green);
}

.small-badge.warning {
  background: var(--yellow-soft);
  color: var(--yellow);
}

.small-badge.expired {
  background: var(--red-soft);
  color: var(--red);
}

.small-badge.neutral {
  background: var(--blue-soft);
  color: var(--blue);
}

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

.point-kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.kpi-alert {
  color: var(--red);
}

.point-kpis span {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  color: var(--muted);
  padding: 9px 10px;
  font-size: 0.82rem;
}

.point-kpis strong {
  color: var(--text);
}

.point-marks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.point-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-soft);
  padding: 6px 9px;
  transition: border-color 520ms var(--ease-fluid), transform 520ms var(--ease-fluid), background 520ms var(--ease-fluid);
}

.point-chip:hover {
  border-color: var(--line-strong);
  background: #fff;
  transform: translateY(-1px);
}

.point-chip strong {
  font-size: 0.86rem;
}

.point-chip small,
.empty-text {
  color: var(--muted);
  font-size: 0.78rem;
}

.empty-text {
  margin: 10px 0 0;
}

.loading-state {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  color: var(--muted);
  padding: 18px;
  font-weight: 800;
}

.loading-state.error {
  background: var(--red-soft);
  color: var(--red);
}

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

.profile-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  border: 1px solid #d8ccb9;
  border-radius: 8px;
  background: #efe6d8;
  box-shadow: none;
  padding: 22px;
}

.profile-avatar {
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  border: 1px solid #2a2a25;
  border-radius: 50%;
  background: #20211d;
  color: #f7f3ea;
  font-weight: 850;
}

.profile-hero-main {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.profile-hero-main span,
.profile-hero-main p {
  color: #6b6255;
  font-size: 0.84rem;
}

.profile-hero-main strong {
  font-size: clamp(1.45rem, 2.6vw, 2.12rem);
  font-weight: 760;
  line-height: 1.03;
  overflow-wrap: anywhere;
}

.profile-hero-main p {
  margin: 0;
}

.profile-status-pill {
  align-self: start;
  border: 1px solid #d8ccb9;
  border-radius: 999px;
  background: #f7f3ea;
  color: #2a2a25;
  padding: 8px 11px;
  font-size: 0.78rem;
  font-weight: 850;
}

.profile-metric.email-metric {
  grid-column: span 3;
}

.profile-metric,
.profile-list-item,
.profile-kpis span {
  border: 1px solid #d8ccb9;
  border-radius: 8px;
  background: #fbf8f1;
  box-shadow: none;
  transition: border-color 520ms var(--ease-fluid), box-shadow 520ms var(--ease-fluid), transform 520ms var(--ease-fluid), background 520ms var(--ease-fluid);
}

.profile-metric:hover,
.profile-list-item:hover,
.profile-kpis span:hover {
  border-color: #c7b796;
  background: rgba(255, 252, 246, 0.9);
  box-shadow: 0 12px 30px rgba(68, 54, 36, 0.08);
  transform: translateY(-1px);
}

.profile-metric {
  display: grid;
  align-content: space-between;
  gap: 8px;
  min-height: 96px;
  padding: 14px;
}

.profile-metric span,
.profile-list-item span,
.profile-list-item p,
.profile-kpis span {
  color: #70675a;
  font-size: 0.8rem;
}

.profile-metric strong {
  color: #20211d;
  font-size: 1.05rem;
  font-weight: 760;
  overflow-wrap: anywhere;
}

.profile-section {
  display: grid;
  gap: 14px;
  border: 1px solid #d8ccb9;
  border-radius: 8px;
  background: #f1e8da;
  padding: 16px;
}

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

.profile-section-heading h3 {
  margin: 0;
  color: #20211d;
  font-size: 1.18rem;
  font-weight: 760;
}

.profile-list {
  display: grid;
  gap: 10px;
}

.profile-list-item {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  padding: 14px;
}

.profile-list-item strong {
  display: block;
  margin-top: 2px;
  color: #20211d;
  font-size: 0.96rem;
  font-weight: 760;
}

.profile-list-item p {
  margin: 4px 0 0;
  overflow-wrap: anywhere;
}

.timeline-index {
  min-width: 34px;
  color: #8b5e34;
  font-size: 0.86rem;
  font-weight: 850;
  line-height: 1.4;
}

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

.profile-kpis span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 14px;
  font-weight: 800;
}

.profile-kpis strong {
  color: var(--text);
}

@keyframes rowIn {
  from {
    opacity: 0;
    translate: 0 8px;
  }

  to {
    opacity: 1;
    translate: 0 0;
  }
}

@keyframes contentIn {
  from {
    opacity: 0;
    filter: blur(6px);
    translate: 0 10px;
  }

  to {
    opacity: 1;
    filter: blur(0);
    translate: 0 0;
  }
}

@keyframes backdropIn {
  from {
    opacity: 0;
    backdrop-filter: blur(0);
  }

  to {
    opacity: 1;
    backdrop-filter: blur(18px);
  }
}

@keyframes backdropOut {
  from {
    opacity: 1;
    backdrop-filter: blur(18px);
  }

  to {
    opacity: 0;
    backdrop-filter: blur(0);
  }
}

@keyframes modalIn {
  0% {
    opacity: 0;
    clip-path: inset(48% 48% 48% 48%);
    filter: blur(24px);
    transform:
      translate3d(var(--modal-from-x), var(--modal-from-y), 0)
      scale(var(--modal-from-scale-x), var(--modal-from-scale-y));
  }

  58% {
    clip-path: inset(0 0 0 0);
    filter: blur(3px);
  }

  76% {
    opacity: 1;
    transform: translate3d(0, -2px, 0) scale(1.006, 1.006);
  }

  100% {
    opacity: 1;
    clip-path: inset(0 0 0 0);
    filter: blur(0);
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@keyframes modalOut {
  0% {
    opacity: 1;
    clip-path: inset(0 0 0 0);
    filter: blur(0);
    transform: translate3d(0, 0, 0) scale(1);
  }

  100% {
    opacity: 0;
    clip-path: inset(8% 8% 8% 8%);
    filter: blur(18px);
    transform: translate3d(0, 18px, 0) scale(0.96);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }

  tbody tr,
  tbody tr:hover,
  .summary-item:hover,
  .status-button:hover,
  .detail-row:hover,
  .point-chip:hover,
  .profile-metric:hover,
  .profile-list-item:hover,
  .profile-kpis span:hover {
    transform: none;
  }
}

/* ── Login page ──────────────────────────────────────────── */

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-shell {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-card {
  width: min(420px, 100%);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 40px;
  animation: contentIn 700ms var(--ease-fluid) both;
}

.login-header {
  margin-bottom: 32px;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.login-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.login-field label {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.login-field input {
  min-height: 48px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--panel-soft);
  color: var(--text);
  padding: 0 14px;
  font-size: 1rem;
  outline: none;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.login-field input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(47, 95, 159, 0.12);
}

.login-error {
  border: 1px solid rgba(180, 59, 47, 0.3);
  border-radius: 8px;
  background: var(--red-soft);
  color: var(--red);
  padding: 11px 14px;
  font-size: 0.88rem;
  font-weight: 600;
}

.login-btn {
  min-height: 48px;
  border: none;
  border-radius: 8px;
  background: var(--text);
  color: var(--panel);
  font-size: 1rem;
  font-weight: 760;
  cursor: pointer;
  transition: opacity 150ms ease, transform 150ms ease;
}

.login-btn:hover:not(:disabled) {
  opacity: 0.87;
  transform: translateY(-1px);
}

.login-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* ── User info in topbar ─────────────────────────────────── */

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-email {
  font-size: 0.82rem;
  font-weight: 600;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 720px) {
  .app-shell {
    width: min(100% - 20px, 1240px);
    padding-top: 18px;
  }

  .topbar,
  .toolbar {
    grid-template-columns: 1fr;
  }

  .topbar {
    display: grid;
    align-items: start;
    padding: 18px;
  }

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

  .modal {
    width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
  }

  .modal-header,
  .modal-body {
    padding-left: 16px;
    padding-right: 16px;
  }

  .modal-summary {
    grid-template-columns: 1fr;
  }

  .point-kpis {
    grid-template-columns: repeat(2, 1fr);
  }

  .detail-row {
    grid-template-columns: 1fr;
  }

  .profile-grid,
  .profile-kpis {
    grid-template-columns: 1fr;
  }

  .profile-hero {
    grid-template-columns: 1fr;
  }

  .profile-status-pill {
    width: fit-content;
  }

  .profile-metric.email-metric {
    grid-column: auto;
  }
}
