/*
 * DAMAYO V2 — escala tipografica transversal
 * Se carga despues de los estilos de cada modulo para mantener una jerarquia
 * legible sin perder la expresion minimalista del sistema visual SPH.
 */
:root {
  --type-micro: .75rem;
  --type-caption: .8125rem;
  --type-small: .8125rem;
  --type-control: .875rem;
  --type-body: .9375rem;
}

body {
  font-size: var(--type-body);
}

button,
input,
select,
textarea {
  font-size: var(--type-control) !important;
}

label {
  font-size: var(--type-small) !important;
  line-height: 1.4;
}

small {
  font-size: var(--type-caption) !important;
  line-height: 1.45;
}

/* Navegacion, contexto y estados globales */
.module-brand small,
.brand small,
.section-kicker,
.eyebrow,
.dialog-kicker,
.module-hero span,
.company-period-hero > div:nth-child(2) > span {
  font-size: var(--type-micro);
}

.module-session,
.module-session a,
.module-session button,
.module-version,
.workspace-session,
.workspace-session a,
.workspace-session button,
.environment-badge,
.header-status,
.user-name,
.user-role {
  font-size: var(--type-caption);
}

.breadcrumbs,
.message {
  font-size: var(--type-small);
}

/* Heroes, indicadores y cabeceras */
.module-hero p,
.company-period-hero p {
  font-size: var(--type-body);
  line-height: 1.55;
}

.hero-button {
  font-size: var(--type-control);
}

.metric-grid span {
  font-size: var(--type-small);
}

.metric-grid strong {
  font-size: 1.5rem;
}

.metric-grid small {
  font-size: var(--type-caption);
  line-height: 1.35;
}

.catalog-panel header p,
.portfolio-section header p,
.months-section header p,
.form-card header p,
.user-form-card > header p,
.mail-config > header p,
.test-card > p,
.company-form-card header p {
  font-size: var(--type-small);
  line-height: 1.5;
}

/* Campos, filtros y acciones */
.catalog-filters input,
.catalog-filters select,
.catalog-filters button,
.form-card input,
.form-card textarea,
.form-card select,
.employee-form-card input,
.employee-form-card select,
.employee-form-card textarea,
.mail-config input,
.mail-config select,
.test-card input,
.company-form-card input,
.company-form-card select,
.company-form-card textarea {
  font-size: var(--type-control);
}

.form-card label,
.field-grid label,
.confirm-page label,
.employee-form-card label,
.mail-config label,
.test-card label,
.switch-control,
.company-form-card label {
  font-size: var(--type-small);
}

.user-form-card footer a,
.user-form-card footer button,
.detail-actions a,
.detail-actions button,
.confirm-page form a,
.confirm-page form button,
.mail-config button,
.test-card button,
.queue-card button,
.company-form-card button,
.company-form-card footer a,
.app-dialog button {
  font-size: var(--type-small);
}

/* Listados y tablas */
.company-table th {
  font-size: var(--type-small) !important;
}

.company-table td,
.company-table td > strong {
  font-size: var(--type-small) !important;
  line-height: 1.45;
}

.company-table td strong,
.company-identity strong {
  font-size: var(--type-control) !important;
}

.company-table td > small,
.company-table td small,
.company-identity small,
.row-actions a,
.row-actions button,
.row-actions span {
  font-size: var(--type-caption);
}

.usage-badge,
.usage-muted,
.status-badge {
  font-size: var(--type-micro);
}

.safety-note {
  font-size: var(--type-small);
}

/* Formularios de usuarios y colaboradores */
.auth-notice,
.access-panel > p,
.access-scope-panel > legend small,
.choice-columns label,
.credential-note {
  font-size: var(--type-small);
  line-height: 1.5;
}

.tag-list span,
.tag-list em,
.user-form-card legend small,
.user-form-card footer p,
.employee-form-card .helptext,
.employee-form-card .field-help,
.employee-form-card footer p,
.access-choice-list small,
.detail-grid dt,
.event-list span,
.errorlist,
.empty-choice {
  font-size: var(--type-caption);
  line-height: 1.45;
}

.choice-columns h2 {
  font-size: var(--type-body);
}

.access-panel h2,
.access-scope-panel h2 {
  font-size: 1rem;
}

.access-choice-list label,
.detail-grid dd {
  font-size: var(--type-control);
}

.role-card span,
.role-card small,
.event-list p {
  font-size: var(--type-small);
}

/* Correo corporativo */
.service-state {
  font-size: var(--type-caption) !important;
}

.mail-secret,
.queue-card article strong,
.queue-empty strong {
  font-size: var(--type-small);
}

.mail-secret small,
.config-section > span,
.config-section > small,
.config-section p,
.config-note,
.delivery-note,
.mail-config .helptext,
.test-card small,
.queue-card > header > span,
.queue-card article small,
.queue-card article em,
.queue-empty p {
  font-size: var(--type-caption);
  line-height: 1.5;
}

.config-section h3 {
  font-size: 1rem;
}

/* Marketing: tarjetas conservan su densidad, la informacion sigue legible */
.portfolio-card > p,
.portfolio-card dt,
.month-card em,
.plan-status,
.month-card p,
.month-card form button,
.restricted-action,
.review-list-item > .review-correlative,
.review-status,
.review-tag,
.participant-badge,
.collaboration-state {
  font-size: var(--type-micro);
}

.portfolio-card dd,
.portfolio-card footer,
.year-count,
.month-card > header > span,
.month-card p strong,
.month-card > a,
.review-list-item > span,
.review-list-item > small,
.review-panel p,
.review-panel small,
.review-panel dt,
.visual-viewer small,
.visual-viewer figcaption,
.keyboard-shortcuts {
  font-size: var(--type-caption);
  line-height: 1.45;
}

.review-list-item > strong,
.review-panel label,
.review-panel button,
.review-panel input,
.review-panel select,
.review-panel textarea,
.review-panel dd {
  font-size: var(--type-small);
}

.month-card.is-current-month h3::after {
  font-size: var(--type-micro);
}

/* El alta de colaboradores usa una escala deliberadamente mas comoda. */
.employee-form-card .field-grid label,
.employee-form-card label {
  font-size: var(--type-small) !important;
}

.employee-form-card input,
.employee-form-card select,
.employee-form-card textarea {
  min-height: 44px;
  font-size: var(--type-control) !important;
  font-weight: 400;
  line-height: 1.35;
}

.employee-form-card input::placeholder,
.employee-form-card textarea::placeholder {
  color: #75869a;
  font-size: var(--type-control);
  font-weight: 500;
}

.module-brand small,
.brand small,
.product-brand small {
  font-size: var(--type-micro) !important;
}

/* Portada y administracion */
.section-count,
.module-state,
.module-card small,
.module-card footer,
.module-group > header .eyebrow {
  font-size: var(--type-micro);
}

.modules-section > header p,
.module-card p,
.module-group > header p,
.app-dialog p {
  font-size: var(--type-control);
  line-height: 1.5;
}

.admin-section-card > span {
  font-size: var(--type-caption);
}

.admin-section-card > small,
.company-form-section > p {
  font-size: var(--type-small);
  line-height: 1.55;
}

.company-form-section > span,
.company-form-section .section-kicker {
  font-size: var(--type-micro);
}

.company-form-card .helptext,
.company-form-card .field-help {
  font-size: var(--type-caption);
  line-height: 1.45;
}

/* Acceso */
.auth-card > p,
.auth-card label,
.auth-card form > p {
  font-size: var(--type-small);
}

.auth-card button {
  font-size: var(--type-control);
}

.creation-summary span {
  font-size: var(--type-micro);
}

.creation-summary strong {
  font-size: var(--type-small);
}

/* Product name and release: the version is secondary, never a second brand. */
.product-wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: var(--brand-version-gap);
  white-space: nowrap;
}
.product-wordmark__version {
  color: var(--brand-version-color);
  font-size: var(--brand-version-size);
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0;
  text-transform: none;
}

/* Shared action role. Text links styled as buttons use the same scale as buttons. */
button, input[type="submit"], input[type="button"], input[type="reset"] {
  font-family: var(--font-ui);
  font-weight: var(--weight-action);
}
:is(.intake-button, .assets-button, .case-button, .cash-button, .button,
    .button-primary, .button-secondary, .button-quiet, .hero-button,
    .primary-button, .secondary-button, .primary-dialog-button, .secondary-dialog-button,
    .photo-select-button, .logo-select-button, .btn) {
  font-family: var(--font-ui);
  font-size: var(--size-action) !important;
  font-weight: var(--weight-action);
}
