:root {
  --tm-ink: #17262f;
  --tm-muted: #5c6f7c;
  --tm-line: #d7e0e5;
  --tm-panel: #ffffff;
  --tm-soft: #f3f7f8;
  --tm-accent: #0f6f72;
  --tm-accent-dark: #0b5056;
  --tm-sand: #f2eadc;
}

.tm-shell {
  margin: 24px 0;
}

.tm-enfold-block {
  max-width: 1180px;
  margin-right: auto;
  margin-left: auto;
}

.tm-panel {
  padding: 24px;
  border: 1px solid var(--tm-line);
  border-radius: 22px;
  background: #fff;
}

.tm-auth-shell,
.tm-portal-shell {
  max-width: 1080px;
}

.tm-auth-panel {
  max-width: 760px;
  margin: 0 auto;
}

.tm-panel-header h2,
.tm-panel-header h3,
.tm-panel-header h4 {
  margin: 0 0 8px;
  color: var(--tm-ink);
}

.tm-panel-header p {
  margin: 0 0 18px;
  color: var(--tm-muted);
}

.tm-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.tm-card {
  overflow: hidden;
  border: 1px solid var(--tm-line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(23, 38, 47, 0.08);
}

.tm-card-media img {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.tm-card-body {
  padding: 18px;
}

.tm-card-body h3 {
  margin: 0 0 8px;
  color: var(--tm-ink);
  font-size: 24px;
  line-height: 1.15;
}

.tm-card-meta {
  margin: 0 0 12px;
  color: var(--tm-muted);
  font-size: 14px;
}

.tm-card-copy {
  color: var(--tm-muted);
}

.tm-card-copy p:last-child {
  margin-bottom: 0;
}

.tm-card-actions {
  margin-top: 16px;
}

.tm-auth-cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tm-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.tm-form-grid p {
  margin: 0;
}

.tm-form-grid label {
  display: block;
  color: var(--tm-ink);
  font-weight: 600;
}

.tm-form-grid input,
.tm-form-grid select,
.tm-form-grid textarea {
  width: 100%;
  margin-top: 8px;
  padding: 11px 12px;
  border: 1px solid var(--tm-line);
  border-radius: 12px;
  background: #fff;
  color: var(--tm-ink);
  box-sizing: border-box;
}

.tm-form-grid input:focus,
.tm-form-grid select:focus,
.tm-form-grid textarea:focus {
  outline: none;
  border-color: var(--tm-accent);
  box-shadow: 0 0 0 4px rgba(15, 111, 114, 0.12);
}

.tm-form-grid textarea {
  min-height: 132px;
}

.tm-form-actions,
.tm-field-full {
  grid-column: 1 / -1;
}

.tm-password-panel {
  padding: 18px;
  border: 1px solid var(--tm-line);
  border-radius: 18px;
  background:
    radial-gradient(circle at top right, rgba(15, 111, 114, 0.08), transparent 36%),
    linear-gradient(180deg, #fbfdfd 0%, #f3f7f8 100%);
}

.tm-auth-support {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--tm-line);
}

.tm-auth-support h3 {
  margin: 0 0 8px;
  color: var(--tm-ink);
  font-size: 20px;
}

.tm-auth-support p {
  margin: 0 0 16px;
  color: var(--tm-muted);
}

.tm-auth-tabs {
  display: grid;
  gap: 18px;
}

.tm-auth-tabs__nav {
  display: inline-flex;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--tm-line);
  border-radius: 999px;
  background: var(--tm-soft);
}

.tm-auth-tabs__tab {
  min-width: 132px;
  padding: 10px 18px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--tm-muted);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.tm-auth-tabs__tab.is-active {
  background: var(--tm-accent);
  color: #fff;
  box-shadow: 0 10px 20px rgba(15, 111, 114, 0.22);
}

.tm-auth-tabs__panel {
  display: block;
}

.tm-auth-panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.tm-auth-login-form {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--tm-line);
  border-radius: 18px;
  background:
    radial-gradient(circle at top left, rgba(15, 111, 114, 0.08), transparent 34%),
    linear-gradient(180deg, #ffffff 0%, #f7fbfb 100%);
}

.tm-auth-login-form__field {
  margin: 0;
}

.tm-auth-login-form__field label {
  display: block;
  margin-bottom: 8px;
  color: var(--tm-ink);
  font-weight: 600;
}

.tm-auth-login-form__field input[type="text"],
.tm-auth-login-form__field input[type="password"] {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--tm-line);
  border-radius: 12px;
  background: #fff;
  color: var(--tm-ink);
  box-sizing: border-box;
}

.tm-auth-login-form__field input[type="text"]:focus,
.tm-auth-login-form__field input[type="password"]:focus {
  outline: none;
  border-color: var(--tm-accent);
  box-shadow: 0 0 0 4px rgba(15, 111, 114, 0.12);
}

.tm-auth-login-form__footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.tm-auth-login-form__remember {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--tm-muted);
  font-size: 14px;
}

.tm-auth-login-form__remember input {
  margin: 0;
}

.tm-auth-login-form__link {
  color: var(--tm-accent-dark);
  font-weight: 600;
  text-decoration: none;
}

.tm-auth-login-form__link:hover,
.tm-auth-login-form__link:focus {
  text-decoration: underline;
}

.tm-auth-login-form__actions {
  margin: 0;
}

.tm-auth-login-form__actions .tm-button {
  width: 100%;
}

.tm-password-panel__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

#tm-password-strength {
  margin-top: 14px;
}

.tm-password-meter__header {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tm-password-meter__eyebrow {
  color: var(--tm-muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.tm-password-meter__status {
  color: var(--tm-ink);
  font-size: 14px;
  line-height: 1.4;
}

.tm-password-meter__bar {
  position: relative;
  height: 10px;
  margin-top: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(23, 38, 47, 0.08);
}

.tm-password-meter__fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: #9aa8b1;
  transition: width 160ms ease, background-color 160ms ease;
}

.tm-password-meter__checks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.tm-password-meter__checks li {
  position: relative;
  padding-left: 24px;
  color: var(--tm-muted);
  font-size: 13px;
  font-weight: 600;
}

.tm-password-meter__checks li::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 0;
  width: 15px;
  height: 15px;
  border: 1px solid currentColor;
  border-radius: 999px;
  opacity: 0.45;
}

.tm-password-meter__checks li.is-met {
  color: var(--tm-ink);
}

.tm-password-meter__checks li.is-met::before {
  background: currentColor;
  box-shadow: inset 0 0 0 3px #fff;
  opacity: 1;
}

.tm-password-meter__hint,
.tm-password-meter__match {
  margin: 12px 0 0;
  font-size: 13px;
  font-weight: 600;
}

.tm-password-meter__hint {
  color: var(--tm-muted);
}

.tm-password-meter__match {
  color: #1f7a43;
}

.tm-password-meter.has-mismatch .tm-password-meter__match {
  color: #d63638;
}

.tm-password-meter.is-empty .tm-password-meter__fill {
  background: #9aa8b1;
}

.tm-password-meter.is-weak .tm-password-meter__fill {
  background: #d63638;
}

.tm-password-meter.is-fair .tm-password-meter__fill {
  background: #d97a1d;
}

.tm-password-meter.is-good .tm-password-meter__fill {
  background: #d0a100;
}

.tm-password-meter.is-strong .tm-password-meter__fill {
  background: #1f7a43;
}

.tm-button[disabled],
.tm-link-button a[aria-disabled="true"] {
  opacity: 0.6;
  cursor: not-allowed;
}

.tm-button,
.tm-link-button a {
  cursor: pointer;
}

.tm-button-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--tm-line);
  border-radius: 10px;
  background: var(--tm-soft);
  color: var(--tm-ink);
  text-decoration: none;
}

.tm-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
}

.tm-chip {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--tm-accent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.tm-chip-subtle {
  background: #eee;
  color: var(--tm-muted);
}

.tm-alert {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-left: 4px solid #c97a2b;
  border-radius: 10px;
  background: #fff;
  color: #7a541e;
}

.tm-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0 0 18px;
}

.tm-inline-form {
  margin: 0;
}

.tm-table-wrap {
  overflow-x: auto;
  margin: 0 0 18px;
  border: 1px solid var(--tm-line);
  border-radius: 16px;
}

.tm-data-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

.tm-data-table th,
.tm-data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #e8eef1;
  text-align: left;
  vertical-align: top;
}

.tm-data-table th {
  background: #f8f8f8;
  color: var(--tm-ink);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.tm-disclosure {
  margin-top: 18px;
  border: 1px solid var(--tm-line);
  border-radius: 16px;
  background: #fff;
}

.tm-disclosure summary {
  padding: 14px 16px;
  color: var(--tm-ink);
  font-weight: 700;
  cursor: pointer;
}

.tm-disclosure form {
  padding: 0 16px 16px;
}

@media (max-width: 700px) {
  .tm-panel {
    padding: 18px;
    border-radius: 18px;
  }

  .tm-form-grid {
    grid-template-columns: 1fr;
  }
}
