/*
 * Estilos base de Trabia 360. Los colores de texto cumplen contraste AA (4,5:1) sobre su fondo y los
 * bordes de los controles, 3:1. El color nunca es la única forma de decir algo: siempre va con texto.
 */
:root {
    --t360-ink: #172033;
    --t360-ink-soft: #4b5565;
    --t360-bg: #f4f6f8;
    --t360-surface: #ffffff;
    --t360-surface-alt: #f4f6f8;
    --t360-surface-hover: #eaeff6;
    --t360-line: #dde3ec;
    --t360-line-strong: #8a94a6;
    /* Colores del logo: azul marino y verde. El verde del logo no llega a 3:1 sobre blanco: solo adorna
       (barras, puntos); para texto verde se usa su tono oscuro. */
    --t360-brand: #01334f;
    --t360-brand-strong: #00233a;
    --t360-brand-soft: #e5edf2;
    --t360-brand-ink: #ffffff;
    --t360-accent: #93b048;
    --t360-accent-soft: #eef4e1;
    --t360-accent-ink: #4a5f1e;
    --t360-focus: #b35c00;
    --t360-danger-surface: #fdecea;
    --t360-danger-ink: #8a1c13;
    --t360-warning-surface: #7a3e00;
    --t360-warning-ink: #ffffff;
    --t360-success-soft: #eef4e1;
    --t360-success-ink: #3f5418;
    --t360-amber-soft: #fff1d6;
    --t360-amber-ink: #7f4600;
    --t360-neutral-soft: #edf0f4;
    --t360-neutral-ink: #3d4656;
    --t360-radius: 0.75rem;
    --t360-radius-small: 0.5rem;
    --t360-shadow: 0 1px 2px rgba(16, 24, 40, 0.05), 0 1px 3px rgba(16, 24, 40, 0.08);
    --t360-shadow-raised: 0 12px 32px rgba(16, 24, 40, 0.16), 0 2px 6px rgba(16, 24, 40, 0.08);
    --t360-sidebar-width: 16.5rem;
    --t360-topbar-height: 3.75rem;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-size: 100%;
}

body {
    margin: 0;
    color: var(--t360-ink);
    background: var(--t360-bg);
    font-family: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

h1 {
    color: var(--t360-brand);
    font-size: 1.625rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.25;
    margin: 0 0 1.25rem;
}

h2 {
    font-size: 1.1875rem;
    font-weight: 650;
    line-height: 1.3;
    margin: 1.75rem 0 0.75rem;
}

h3 {
    font-size: 1.0625rem;
    margin: 0 0 0.5rem;
}

a {
    color: var(--t360-brand);
    text-underline-offset: 0.15em;
}

a:hover {
    color: var(--t360-brand-strong);
}

:focus-visible {
    outline: 3px solid var(--t360-focus);
    outline-offset: 2px;
}

main:focus {
    outline: none;
}

.t360-icon {
    width: 1.25rem;
    height: 1.25rem;
    flex: none;
}

.t360-skip {
    position: absolute;
    left: 0.5rem;
    top: -4rem;
    z-index: 100;
    padding: 0.75rem 1rem;
    background: var(--t360-surface);
    color: var(--t360-brand);
    border: 2px solid var(--t360-brand);
    border-radius: var(--t360-radius-small);
}

.t360-skip:focus {
    top: 0.5rem;
}

/* El aviso de sesión de soporte va en la cabecera fija, así que no desaparece al desplazarse. */
.t360-impersonation {
    padding: 0.5rem 1rem;
    background: var(--t360-warning-surface);
    color: var(--t360-warning-ink);
    font-weight: 600;
    text-align: center;
}

/* ---- Marco: menú lateral, barra superior y contenido ---- */

.t360-app {
    min-height: 100vh;
}

.t360-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 90;
    width: min(18rem, 86vw);
    display: flex;
    flex-direction: column;
    background: var(--t360-surface);
    border-right: 1px solid var(--t360-line);
    overflow-y: auto;
    transform: translateX(-100%);
    visibility: hidden;
    transition: transform 0.2s ease, visibility 0.2s;
}

.t360-menu-open .t360-sidebar {
    transform: none;
    visibility: visible;
    box-shadow: var(--t360-shadow-raised);
}

.t360-scrim {
    position: fixed;
    inset: 0;
    z-index: 85;
    background: rgba(15, 23, 42, 0.45);
}

.t360-sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: var(--t360-topbar-height);
    padding: 0.75rem 0.75rem 0.75rem 1.125rem;
    border-bottom: 1px solid var(--t360-line);
}

.t360-logo {
    display: block;
    width: 2.25rem;
    height: 2.25rem;
    flex: none;
    object-fit: contain;
}

/* La pantalla de carga, antes de que arranque la aplicación. */
.t360-splash {
    display: block;
    width: min(20rem, 70vw);
    height: auto;
    margin: 18vh auto 1.5rem;
}

.t360-brand {
    flex: 1;
    min-width: 0;
    font-size: 1rem;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.t360-nav {
    padding: 0.75rem 0.75rem 2rem;
}

.t360-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.125rem;
}

.t360-nav-list[hidden] {
    display: none;
}

.t360-nav a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 2.75rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--t360-radius-small);
    color: var(--t360-ink-soft);
    font-weight: 500;
    text-decoration: none;
}

.t360-nav a:hover {
    background: var(--t360-surface-hover);
    color: var(--t360-ink);
}

.t360-nav a.active {
    background: var(--t360-brand-soft);
    color: var(--t360-brand-strong);
    font-weight: 650;
    box-shadow: inset 3px 0 0 var(--t360-accent);
}

.t360-nav-group {
    margin-top: 1rem;
}

.t360-nav-group-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 2.25rem;
    padding: 0.25rem 0.75rem;
    border: 0;
    border-radius: var(--t360-radius-small);
    background: transparent;
    color: var(--t360-ink-soft);
    font: inherit;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
}

.t360-nav-group-toggle:hover {
    background: var(--t360-surface-hover);
    color: var(--t360-ink);
}

.t360-nav-chevron {
    width: 1rem;
    height: 1rem;
    transition: transform 0.15s ease;
}

.t360-nav-group-toggle[aria-expanded="false"] .t360-nav-chevron {
    transform: rotate(-90deg);
}

.t360-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.t360-top {
    position: sticky;
    top: 0;
    z-index: 50;
}

.t360-topbar {
    display: flex;
    align-items: center;
    gap: 0.5rem 1rem;
    min-height: var(--t360-topbar-height);
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: saturate(180%) blur(8px);
    border-bottom: 1px solid var(--t360-line);
}

.t360-breadcrumbs {
    flex: 1;
    min-width: 0;
}

.t360-breadcrumbs ol {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 0.9375rem;
    color: var(--t360-ink-soft);
    min-width: 0;
}

.t360-breadcrumbs li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
    white-space: nowrap;
}

.t360-breadcrumbs li:last-child {
    overflow: hidden;
}

.t360-breadcrumbs li + li::before {
    content: "";
    width: 0.4rem;
    height: 0.4rem;
    flex: none;
    border-top: 1.5px solid currentColor;
    border-right: 1.5px solid currentColor;
    transform: rotate(45deg);
    margin-right: 0.15rem;
}

.t360-breadcrumbs a {
    color: var(--t360-ink-soft);
    text-decoration: none;
}

.t360-breadcrumbs a:hover {
    color: var(--t360-brand);
    text-decoration: underline;
}

.t360-breadcrumbs [aria-current="page"] {
    color: var(--t360-ink);
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
}

.t360-user {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-left: auto;
}

main {
    flex: 1;
    min-width: 0;
    width: 100%;
    max-width: 92rem;
    padding: 1.5rem 1rem 3rem;
}

.t360-standalone {
    max-width: 40rem;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* ---- Botones ---- */

.t360-button,
.t360-icon-button,
.t360-usermenu-button,
.t360-usermenu-item {
    font: inherit;
    cursor: pointer;
}

.t360-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 2.75rem;
    padding: 0.5rem 1.125rem;
    border: 1px solid var(--t360-brand);
    border-radius: var(--t360-radius-small);
    background: var(--t360-brand);
    color: var(--t360-brand-ink);
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.08);
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.t360-button:hover {
    background: var(--t360-brand-strong);
    border-color: var(--t360-brand-strong);
    color: var(--t360-brand-ink);
}

.t360-button .t360-icon {
    width: 1.125rem;
    height: 1.125rem;
}

.t360-button-secondary {
    background: var(--t360-surface);
    border-color: var(--t360-line-strong);
    color: var(--t360-brand);
}

.t360-button-secondary:hover {
    background: var(--t360-brand-soft);
    border-color: var(--t360-brand);
    color: var(--t360-brand-strong);
}

.t360-button-danger {
    background: var(--t360-danger-ink);
    border-color: var(--t360-danger-ink);
    color: #ffffff;
}

.t360-button-danger:hover {
    background: #6e140d;
    border-color: #6e140d;
}

.t360-button:disabled,
.t360-button:disabled:hover {
    background: var(--t360-surface-alt);
    border-color: var(--t360-line);
    color: var(--t360-ink-soft);
    box-shadow: none;
    cursor: not-allowed;
}

.t360-icon-button {
    position: relative;
    display: inline-grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    flex: none;
    padding: 0;
    border: 0;
    border-radius: var(--t360-radius-small);
    background: transparent;
    color: var(--t360-ink-soft);
    text-decoration: none;
}

.t360-icon-button:hover {
    background: var(--t360-surface-hover);
    color: var(--t360-ink);
}

.t360-icon-button:disabled {
    color: var(--t360-line-strong);
    background: transparent;
    cursor: not-allowed;
}

.t360-bell-count {
    position: absolute;
    top: 0.3rem;
    right: 0.25rem;
    min-width: 1.125rem;
    height: 1.125rem;
    padding: 0 0.3rem;
    border-radius: 999px;
    background: var(--t360-danger-ink);
    color: #ffffff;
    font-size: 0.6875rem;
    font-weight: 700;
    line-height: 1.125rem;
    text-align: center;
}

/* ---- Menú del usuario ---- */

.t360-usermenu {
    position: relative;
}

.t360-usermenu-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 2.75rem;
    padding: 0.25rem 0.5rem 0.25rem 0.25rem;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--t360-ink);
    font-weight: 600;
}

.t360-usermenu-button:hover {
    background: var(--t360-surface-hover);
}

.t360-usermenu-button .t360-icon {
    width: 1rem;
    height: 1rem;
    color: var(--t360-ink-soft);
}

/* En el teléfono el nombre no se ve, pero sigue dando nombre al botón. */
.t360-usermenu-name {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    max-width: 12rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.t360-usermenu-scrim {
    position: fixed;
    inset: 0;
    z-index: 65;
}

.t360-usermenu-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 0.5rem);
    z-index: 70;
    width: min(18rem, calc(100vw - 2rem));
    padding: 0.5rem;
    background: var(--t360-surface);
    border: 1px solid var(--t360-line);
    border-radius: var(--t360-radius);
    box-shadow: var(--t360-shadow-raised);
}

.t360-usermenu-who {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.5rem 0.75rem;
    margin-bottom: 0.25rem;
    border-bottom: 1px solid var(--t360-line);
    overflow-wrap: anywhere;
}

.t360-usermenu-who strong,
.t360-usermenu-who .t360-hint {
    display: block;
}

.t360-usermenu-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    min-height: 2.75rem;
    padding: 0.5rem 0.75rem;
    border: 0;
    border-radius: var(--t360-radius-small);
    background: transparent;
    color: var(--t360-ink);
    text-align: left;
    text-decoration: none;
}

.t360-usermenu-item:hover {
    background: var(--t360-surface-hover);
    color: var(--t360-ink);
}

.t360-usermenu-item .t360-icon {
    color: var(--t360-ink-soft);
}

.t360-avatar {
    display: inline-grid;
    place-items: center;
    width: 2.25rem;
    height: 2.25rem;
    flex: none;
    border-radius: 999px;
    background: var(--t360-brand-soft);
    color: var(--t360-brand-strong);
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.t360-avatar-photo {
    object-fit: cover;
    padding: 0;
}

/* Seis fondos para las iniciales, siempre el mismo para la misma persona; todos con contraste AA. */
.t360-avatar-tone-1 {
    background: var(--t360-success-soft);
    color: var(--t360-success-ink);
}

.t360-avatar-tone-2 {
    background: var(--t360-amber-soft);
    color: var(--t360-amber-ink);
}

.t360-avatar-tone-3 {
    background: #f1e7fb;
    color: #5b2a86;
}

.t360-avatar-tone-4 {
    background: #fde7ef;
    color: #8a1f4a;
}

.t360-avatar-tone-5 {
    background: #ddf2f4;
    color: #0e5c66;
}

.t360-avatar-xl {
    width: 5.5rem;
    height: 5.5rem;
    border-radius: 1rem;
    font-size: 1.75rem;
}

.t360-profile-head {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.t360-profile-head p {
    margin: 0;
}

.t360-profile-name {
    font-size: 1.25rem;
    font-weight: 700;
}

.t360-avatar-large {
    width: 2.75rem;
    height: 2.75rem;
    font-size: 0.9375rem;
}

/* ---- Cabecera de página ---- */

.t360-page-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.t360-page-head h1 {
    margin: 0;
}

.t360-page-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.t360-eyebrow {
    margin: 0 0 0.25rem;
    color: var(--t360-ink-soft);
    font-size: 0.9375rem;
    font-weight: 500;
}

/* ---- Tarjetas, paneles y avisos ---- */

.t360-card {
    background: var(--t360-surface);
    border: 1px solid var(--t360-line);
    border-radius: var(--t360-radius);
    box-shadow: var(--t360-shadow);
    padding: 1.25rem 1.5rem;
    max-width: 48rem;
}

.t360-card > h2:first-child,
.t360-card > h3:first-child {
    margin-top: 0;
}

.t360-problem {
    background: var(--t360-danger-surface);
    color: var(--t360-danger-ink);
    border: 1px solid #f1b9b3;
    border-left: 4px solid var(--t360-danger-ink);
    border-radius: var(--t360-radius-small);
    padding: 1rem 1.25rem;
    max-width: 48rem;
    margin-bottom: 1rem;
}

.t360-problem h2,
.t360-problem-title {
    margin-top: 0;
    font-size: 1.0625rem;
}

.t360-problem a {
    color: var(--t360-danger-ink);
}

.t360-problem-reference {
    font-size: 0.875rem;
}

.t360-loading {
    color: var(--t360-ink-soft);
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
}

.t360-notice {
    background: var(--t360-brand-soft);
    border: 1px solid #c4d6ee;
    border-left: 4px solid var(--t360-brand);
    border-radius: var(--t360-radius-small);
    padding: 0.75rem 1rem;
    max-width: 48rem;
    overflow-wrap: anywhere;
}

.t360-hint {
    font-size: 0.875rem;
    color: var(--t360-ink-soft);
}

.t360-section {
    margin-bottom: 1.5rem;
}

.t360-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
}

.t360-confirm {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.t360-details {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.25rem 1.5rem;
    margin: 0;
}

.t360-details dt {
    font-weight: 600;
    color: var(--t360-ink-soft);
    font-size: 0.9375rem;
}

.t360-details dd {
    margin: 0 0 0.75rem;
    overflow-wrap: anywhere;
}

.t360-list {
    margin: 0;
    padding-left: 1.25rem;
}

.t360-steps {
    display: grid;
    gap: 0.75rem;
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.t360-mono {
    font-family: ui-monospace, "Cascadia Mono", Consolas, "Liberation Mono", monospace;
    font-size: 0.875rem;
    overflow-wrap: anywhere;
}

/* ---- Tablas ---- */

.t360-table-wrapper {
    /* Los textos ocultos (posición absoluta) se quedan dentro de la región y no desbordan la página. */
    position: relative;
    overflow-x: auto;
    background: var(--t360-surface);
    border: 1px solid var(--t360-line);
    border-radius: var(--t360-radius);
    box-shadow: var(--t360-shadow);
}

.t360-table {
    border-collapse: collapse;
    width: 100%;
}

.t360-table caption {
    text-align: left;
    font-weight: 650;
    padding: 0.875rem 1rem;
}

.t360-table th,
.t360-table td {
    text-align: left;
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--t360-line);
    vertical-align: top;
}

.t360-table thead th {
    background: #f8fafc;
    color: var(--t360-ink-soft);
    font-size: 0.8125rem;
    font-weight: 650;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.t360-table th {
    color: var(--t360-ink-soft);
}

.t360-table tbody tr:hover td,
.t360-table tbody tr:hover th {
    background: #f9fbfd;
}

/* Una persona en una tabla: su avatar y su nombre. */
.t360-person {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 400;
    color: var(--t360-ink);
}

/* ---- Etiquetas de estado ---- */

.t360-badge {
    display: inline-block;
    padding: 0.125rem 0.625rem;
    border-radius: 999px;
    background: var(--t360-neutral-soft);
    color: var(--t360-neutral-ink);
    font-size: 0.8125rem;
    font-weight: 600;
    white-space: nowrap;
}

.t360-tone-success {
    background: var(--t360-success-soft);
    color: var(--t360-success-ink);
}

.t360-tone-warning {
    background: var(--t360-amber-soft);
    color: var(--t360-amber-ink);
}

.t360-tone-danger {
    background: var(--t360-danger-surface);
    color: var(--t360-danger-ink);
}

.t360-tone-neutral {
    background: var(--t360-neutral-soft);
    color: var(--t360-neutral-ink);
}

.t360-tone-info {
    background: var(--t360-brand-soft);
    color: var(--t360-brand-strong);
}

/* ---- Formularios ---- */

.t360-form {
    display: grid;
    gap: 1.125rem;
    max-width: 34rem;
}

.t360-field {
    display: grid;
    gap: 0.375rem;
}

.t360-field label {
    font-weight: 600;
    font-size: 0.9375rem;
}

.t360-field input,
.t360-field select,
.t360-field textarea {
    min-height: 2.75rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--t360-line-strong);
    border-radius: var(--t360-radius-small);
    font: inherit;
    color: var(--t360-ink);
    background: var(--t360-surface);
    width: 100%;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.t360-field input:hover,
.t360-field select:hover,
.t360-field textarea:hover {
    border-color: var(--t360-ink-soft);
}

.t360-field input:focus,
.t360-field select:focus,
.t360-field textarea:focus {
    border-color: var(--t360-brand);
    box-shadow: 0 0 0 3px rgba(1, 51, 79, 0.15);
}

.t360-fieldset {
    border: 1px solid var(--t360-line);
    border-radius: var(--t360-radius-small);
    background: var(--t360-surface);
    padding: 0.75rem 1rem;
    margin: 0;
    display: grid;
    gap: 0.25rem;
}

.t360-fieldset legend {
    font-weight: 600;
    padding: 0 0.25rem;
}

.t360-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 2.75rem;
}

.t360-check input {
    width: 1.25rem;
    height: 1.25rem;
    accent-color: var(--t360-brand);
}

.t360-field-error {
    display: grid;
    gap: 0.125rem;
    color: var(--t360-danger-ink);
    font-size: 0.875rem;
    font-weight: 600;
}

.t360-field [aria-invalid="true"] {
    border-color: var(--t360-danger-ink);
    border-width: 2px;
}

.t360-pager-status {
    align-self: center;
}

/* ---- Cifras ---- */

.t360-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    list-style: none;
    margin: 0 0 1.5rem;
    padding: 0;
}

.t360-metrics li {
    background: var(--t360-surface);
    border: 1px solid var(--t360-line);
    border-radius: var(--t360-radius);
    box-shadow: var(--t360-shadow);
    padding: 0.875rem 1.125rem;
    min-width: 9rem;
    color: var(--t360-ink-soft);
}

.t360-metrics strong {
    display: block;
    font-size: 1.625rem;
    color: var(--t360-ink);
}

/* ---- Página de inicio: widgets ---- */

.t360-widgets {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    list-style: none;
    margin: 0 0 2rem;
    padding: 0;
}

.t360-widget {
    min-width: 0;
}

.t360-widget-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--t360-surface);
    border: 1px solid var(--t360-line);
    border-radius: 0.875rem;
    box-shadow: var(--t360-shadow);
}

.t360-widgets-editing .t360-widget-card {
    border: 1px dashed var(--t360-brand);
    box-shadow: none;
}

.t360-widget-head {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1rem 0.5rem 1.25rem;
}

.t360-widget-head h2 {
    flex: 1;
    min-width: 0;
    margin: 0;
    font-size: 1rem;
    font-weight: 650;
}

.t360-widget-icon {
    display: grid;
    place-items: center;
    width: 2.25rem;
    height: 2.25rem;
    flex: none;
    border-radius: 0.625rem;
    background: var(--t360-brand-soft);
    color: var(--t360-brand);
}

.t360-widget-link {
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
    padding: 0 0.5rem;
    border-radius: var(--t360-radius-small);
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
}

.t360-widget-link:hover {
    background: var(--t360-brand-soft);
    text-decoration: underline;
}

.t360-widget-tools {
    display: flex;
    gap: 0.125rem;
}

.t360-widget-body {
    flex: 1;
    padding: 0.25rem 1.25rem 1.25rem;
}

.t360-widget-body .t360-problem {
    padding: 0.75rem 1rem;
    margin: 0;
}

.t360-widget-body .t360-actions {
    margin-bottom: 0;
}

.t360-widget-empty {
    margin: 0.5rem 0 0;
    color: var(--t360-ink-soft);
}

.t360-widget-figure {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0.25rem 0 0.5rem;
    color: var(--t360-ink-soft);
}

.t360-widget-figure strong {
    color: var(--t360-ink);
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}

.t360-widget-state {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.25rem 0;
    font-size: 1.0625rem;
    font-weight: 650;
}

.t360-dot {
    width: 0.75rem;
    height: 0.75rem;
    flex: none;
    border-radius: 999px;
    background: var(--t360-line-strong);
}

.t360-dot-Working {
    background: #1e8e3e;
    box-shadow: 0 0 0 4px rgba(30, 142, 62, 0.18);
}

.t360-dot-OnBreak {
    background: #c27c00;
    box-shadow: 0 0 0 4px rgba(194, 124, 0, 0.18);
}

.t360-widget-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.t360-widget-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0;
    border-top: 1px solid var(--t360-line);
}

.t360-widget-list li:first-child {
    border-top: 0;
}

.t360-widget-list li > span:not(.t360-badge):not(.t360-widget-icon-round):not(.t360-avatar):not(.t360-event-date):not(.t360-celebration-icon) {
    flex: 1;
    min-width: 0;
}

.t360-widget-list li > .t360-widget-primary {
    flex: 1;
}

.t360-widget-primary {
    display: block;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.t360-widget-secondary {
    display: block;
    font-size: 0.875rem;
    color: var(--t360-ink-soft);
}

.t360-widget-unread .t360-widget-primary {
    color: var(--t360-ink);
}

.t360-widget-icon-round {
    display: grid;
    place-items: center;
    width: 2.25rem;
    height: 2.25rem;
    flex: none;
    border-radius: 999px;
    background: var(--t360-surface-alt);
    color: var(--t360-ink-soft);
}

.t360-widget-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr));
    gap: 0.75rem;
    list-style: none;
    margin: 0.25rem 0 0;
    padding: 0;
}

.t360-widget-tiles li {
    padding: 0.875rem 1rem;
    border-radius: 0.625rem;
    background: var(--t360-surface-alt);
    color: var(--t360-ink-soft);
    font-size: 0.875rem;
}

.t360-widget-tiles strong {
    display: block;
    color: var(--t360-ink);
    font-size: 1.375rem;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
}

.t360-progress {
    width: 100%;
    height: 0.625rem;
    border: 0;
    border-radius: 999px;
    background: var(--t360-neutral-soft);
    overflow: hidden;
    appearance: none;
}

.t360-progress::-webkit-progress-bar {
    background: var(--t360-neutral-soft);
    border-radius: 999px;
}

.t360-progress::-webkit-progress-value {
    background: var(--t360-brand);
    border-radius: 999px;
}

.t360-progress::-moz-progress-bar {
    background: var(--t360-brand);
    border-radius: 999px;
}

.t360-shortcuts {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(7rem, 1fr));
    gap: 0.75rem;
    list-style: none;
    margin: 0.25rem 0 0;
    padding: 0;
}

.t360-shortcuts a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    height: 100%;
    padding: 1rem 0.5rem;
    border-radius: 0.625rem;
    background: var(--t360-surface-alt);
    color: var(--t360-ink);
    font-size: 0.875rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
}

.t360-shortcuts a:hover {
    background: var(--t360-brand-soft);
    color: var(--t360-brand-strong);
}

.t360-shortcut-icon {
    display: grid;
    place-items: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 999px;
    background: var(--t360-surface);
    color: var(--t360-brand);
    box-shadow: var(--t360-shadow);
}

.t360-catalog {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr));
    gap: 0.75rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.t360-catalog-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--t360-surface);
    border: 1px solid var(--t360-line);
    border-radius: var(--t360-radius);
}

.t360-catalog-text {
    flex: 1;
    min-width: 0;
    display: grid;
    gap: 0.125rem;
}

/* ---- Pantallas grandes ---- */

@media (min-width: 40rem) {
    .t360-usermenu-name {
        position: static;
        width: auto;
        height: auto;
        overflow: hidden;
        clip-path: none;
        text-overflow: ellipsis;
    }

    .t360-widgets {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .t360-widget-wide {
        grid-column: span 2;
    }

    .t360-details {
        grid-template-columns: 12rem 1fr;
    }
}

@media (max-width: 39.99rem) {
    /* En el teléfono, solo los dos últimos pasos de las migas. */
    .t360-breadcrumbs li:not(:nth-last-child(-n + 2)) {
        display: none;
    }

    .t360-breadcrumbs li:nth-last-child(2)::before {
        display: none;
    }
}

@media (min-width: 64rem) {
    .t360-app {
        display: grid;
        grid-template-columns: var(--t360-sidebar-width) minmax(0, 1fr);
    }

    .t360-sidebar {
        position: sticky;
        top: 0;
        width: auto;
        height: 100vh;
        transform: none;
        visibility: visible;
        transition: none;
        z-index: auto;
    }

    .t360-menu-toggle,
    .t360-menu-close,
    .t360-scrim {
        display: none;
    }

    .t360-topbar {
        padding: 0.5rem 2rem;
    }

    main {
        padding: 2rem 2rem 3rem;
    }
}

@media (min-width: 90rem) {
    .t360-widgets {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

/* ---- Organigrama: cada persona bajo su responsable, unidas por líneas ---- */

.t360-org-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem 2rem;
    margin-bottom: 1.5rem;
}

.t360-org-head p {
    margin: 0;
}

.t360-org-title {
    margin: 0;
    font-size: 2.25rem;
    font-weight: 800;
    letter-spacing: 0.01em;
    text-transform: uppercase;
}

.t360-org-company {
    color: var(--t360-brand);
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
}

.t360-org-summary {
    max-width: 34rem;
    margin-top: 0.5rem !important;
    color: var(--t360-ink-soft);
}

.t360-org-tools {
    display: grid;
    gap: 0.25rem;
    min-width: min(100%, 22rem);
}

.t360-org-tools .t360-actions {
    margin: 0.25rem 0 0;
}

.t360-org-zoom {
    display: inline-flex;
    align-items: center;
    gap: 0.125rem;
    margin-left: 0.25rem;
}

.t360-org-zoom-level {
    min-width: 3.25rem;
    text-align: center;
    font-size: 0.875rem;
    font-variant-numeric: tabular-nums;
}

.t360-org-canvas {
    --t360-org-line: var(--t360-ink);
    overflow: auto;
    padding: 2rem 1.5rem;
    background: var(--t360-surface);
    border: 1px solid var(--t360-line);
    border-radius: var(--t360-radius);
    box-shadow: var(--t360-shadow);
}

.t360-org-tree,
.t360-org-children {
    display: flex;
    justify-content: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

.t360-org-tree {
    width: max-content;
    min-width: 100%;
}

.t360-org-children {
    position: relative;
    padding-top: 1.5rem;
}

/* La línea que baja del responsable hasta la barra de sus personas. */
.t360-org-children::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    height: 1.5rem;
    border-left: 2px solid var(--t360-org-line);
}

.t360-org-node {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem 0.5rem 0;
}

.t360-org-tree > .t360-org-node {
    padding-top: 0;
}

/* La barra horizontal y la línea que baja hasta cada persona, con las esquinas redondeadas. */
.t360-org-children > .t360-org-node::before,
.t360-org-children > .t360-org-node::after {
    content: "";
    position: absolute;
    top: 0;
    right: 50%;
    width: 50%;
    height: 1.5rem;
    border-top: 2px solid var(--t360-org-line);
}

.t360-org-children > .t360-org-node::after {
    right: auto;
    left: 50%;
    border-left: 2px solid var(--t360-org-line);
}

.t360-org-children > .t360-org-node:first-child::before,
.t360-org-children > .t360-org-node:last-child::after {
    border: 0;
}

.t360-org-children > .t360-org-node:last-child::before {
    border-right: 2px solid var(--t360-org-line);
    border-top-right-radius: 0.75rem;
}

.t360-org-children > .t360-org-node:first-child::after {
    border-top-left-radius: 0.75rem;
}

.t360-org-children > .t360-org-node:only-child::before {
    display: none;
}

.t360-org-children > .t360-org-node:only-child::after {
    border: 0;
    border-left: 2px solid var(--t360-org-line);
    border-radius: 0;
}

.t360-org-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.125rem;
    width: 10.5rem;
    padding: 0.5rem;
    border-radius: 1rem;
    text-align: center;
}

.t360-avatar.t360-org-photo {
    width: 5.5rem;
    height: 5.5rem;
    margin-bottom: 0.5rem;
    border: 2px solid var(--t360-org-line);
    border-radius: 1rem;
    font-size: 1.625rem;
}

.t360-avatar.t360-org-photo-small {
    width: 2.75rem;
    height: 2.75rem;
    border: 2px solid var(--t360-org-line);
    border-radius: 0.75rem;
    font-size: 0.875rem;
}

.t360-org-role {
    display: block;
    font-size: 0.8125rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    line-height: 1.25;
    text-transform: uppercase;
}

.t360-org-name {
    display: block;
    font-size: 0.875rem;
}

.t360-org-team {
    display: block;
    color: var(--t360-ink-soft);
    font-size: 0.75rem;
}

.t360-org-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    min-height: 2rem;
    margin-top: 0.375rem;
    padding: 0.125rem 0.625rem;
    border: 1px solid var(--t360-line-strong);
    border-radius: 999px;
    background: var(--t360-surface);
    color: var(--t360-ink);
    font: inherit;
    font-size: 0.8125rem;
    font-weight: 650;
    cursor: pointer;
}

.t360-org-toggle:hover {
    background: var(--t360-brand-soft);
    border-color: var(--t360-brand);
}

.t360-org-toggle .t360-icon {
    width: 1rem;
    height: 1rem;
}

.t360-org-chevron {
    transition: transform 0.15s ease;
}

.t360-org-toggle[aria-expanded="true"] .t360-org-chevron {
    transform: rotate(180deg);
}

.t360-org-match {
    background: var(--t360-brand-soft);
    box-shadow: 0 0 0 2px var(--t360-brand);
}

/* Muchas personas sin nadie a su cargo: en columna, en un recuadro, para no alargar la fila. */
.t360-org-stack {
    position: relative;
    display: grid;
    gap: 0.25rem;
    min-width: 15rem;
    margin: 1.5rem 0 0;
    padding: 0.5rem;
    list-style: none;
    background: var(--t360-surface);
    border: 2px solid var(--t360-org-line);
    border-radius: 1rem;
}

.t360-org-stack::before {
    content: "";
    position: absolute;
    top: calc(-1.5rem - 2px);
    left: 50%;
    height: 1.5rem;
    border-left: 2px solid var(--t360-org-line);
}

.t360-org-stack-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.375rem 0.5rem;
    border-radius: 0.75rem;
    text-align: left;
}

.t360-org-stack-item > span:last-child {
    min-width: 0;
    overflow-wrap: anywhere;
}

@media (max-width: 39.99rem) {
    /* En el teléfono, una lista sangrada: cada persona debajo de su responsable. */
    .t360-org-title {
        font-size: 1.75rem;
    }

    .t360-org-canvas {
        padding: 1rem;
    }

    /* En el teléfono es una lista, siempre a tamaño normal. */
    .t360-org-zoom {
        display: none;
    }

    .t360-org-tree {
        zoom: 1 !important;
    }

    .t360-org-tree,
    .t360-org-children {
        display: block;
        width: auto;
        min-width: 0;
    }

    .t360-org-children {
        margin-left: 1rem;
        padding: 0 0 0 0.5rem;
        border-left: 2px solid var(--t360-org-line);
    }

    .t360-org-children::before,
    .t360-org-children > .t360-org-node::before,
    .t360-org-children > .t360-org-node::after,
    .t360-org-stack::before {
        display: none;
    }

    .t360-org-node {
        align-items: stretch;
        padding: 0.5rem 0 0;
    }

    .t360-org-card {
        display: grid;
        grid-template-columns: auto 1fr;
        align-items: center;
        column-gap: 0.75rem;
        width: auto;
        text-align: left;
    }

    .t360-org-card > :not(.t360-org-photo) {
        grid-column: 2;
    }

    .t360-org-card > .t360-org-toggle {
        justify-self: start;
    }

    .t360-avatar.t360-org-photo {
        grid-row: span 4;
        width: 3.5rem;
        height: 3.5rem;
        margin: 0;
        font-size: 1.125rem;
    }

    .t360-org-stack {
        min-width: 0;
        margin: 0.5rem 0 0 1rem;
    }
}

/* ---- Portal: novedades, eventos y celebraciones ---- */

.t360-visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.t360-portal {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
}

.t360-portal-main h2,
.t360-portal-side h2 {
    margin-top: 0;
}

.t360-news-list,
.t360-event-list,
.t360-important-list {
    display: grid;
    gap: 1rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.t360-news-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
    padding: 1rem;
    background: var(--t360-surface);
    border: 1px solid var(--t360-line);
    border-radius: var(--t360-radius);
    box-shadow: var(--t360-shadow);
}

.t360-news-important {
    border-left: 4px solid var(--t360-amber-ink);
}

.t360-news-item h3 {
    margin: 0.25rem 0;
    font-size: 1.125rem;
}

.t360-news-item h3 a {
    color: var(--t360-ink);
    text-decoration: none;
}

.t360-news-item h3 a:hover {
    color: var(--t360-brand);
    text-decoration: underline;
}

.t360-news-item p {
    margin: 0.25rem 0;
}

.t360-news-cover {
    width: 100%;
    max-height: 12rem;
    object-fit: cover;
    border-radius: var(--t360-radius-small);
}

.t360-news-cover-large {
    max-height: 22rem;
    margin-bottom: 1rem;
}

.t360-news-excerpt {
    color: var(--t360-ink-soft);
}

.t360-event-list li {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    padding: 0.75rem;
    background: var(--t360-surface);
    border: 1px solid var(--t360-line);
    border-radius: var(--t360-radius);
}

.t360-event-list li > span:last-child {
    display: grid;
    gap: 0.25rem;
    justify-items: start;
    min-width: 0;
}

.t360-event-date {
    display: grid;
    place-items: center;
    width: 3.25rem;
    min-height: 3.25rem;
    flex: none;
    border-radius: 0.625rem;
    background: var(--t360-brand-soft);
    color: var(--t360-brand-strong);
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.1;
    text-transform: uppercase;
}

.t360-event-date strong {
    font-size: 1.375rem;
}

.t360-important {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1rem;
    padding: 1rem 1.25rem;
    background: var(--t360-amber-soft);
    border: 1px solid #f0d49c;
    border-left: 4px solid var(--t360-amber-ink);
    border-radius: var(--t360-radius);
}

.t360-important-icon {
    display: grid;
    place-items: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 999px;
    background: var(--t360-surface);
    color: var(--t360-amber-ink);
}

.t360-important-text {
    display: grid;
    flex: 1;
    min-width: 12rem;
}

.t360-important .t360-actions {
    margin: 0;
}

.t360-celebration-icon {
    color: var(--t360-brand);
}

.t360-article {
    max-width: 52rem;
}

.t360-rich p,
.t360-rich ul {
    margin: 0 0 0.875rem;
}

.t360-rich ul {
    padding-left: 1.25rem;
}

.t360-editor {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
    align-items: start;
}

.t360-preview h3 {
    font-size: 1.25rem;
}

.t360-audience-targets {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr));
    gap: 0 1rem;
    max-height: 16rem;
    overflow-y: auto;
    padding: 0.25rem 0.5rem;
    border: 1px solid var(--t360-line);
    border-radius: var(--t360-radius-small);
}

@media (min-width: 64rem) {
    .t360-portal {
        grid-template-columns: minmax(0, 1fr) 22rem;
    }

    .t360-news-item {
        grid-template-columns: 14rem minmax(0, 1fr);
    }

    .t360-news-item:not(:has(.t360-news-cover)) {
        grid-template-columns: minmax(0, 1fr);
    }

    .t360-news-item .t360-news-cover {
        height: 100%;
        max-height: 10rem;
    }

    .t360-editor {
        grid-template-columns: minmax(0, 34rem) minmax(0, 1fr);
    }
}

/* ---- Lista de avisos ---- */

.t360-notices {
    list-style: none;
    margin: 0;
    padding: 0;
}

.t360-notices > li {
    margin-bottom: 0.75rem;
}

.t360-notices h2 {
    font-size: 1.1rem;
    margin: 0 0 0.25rem;
}

.t360-notice-unread {
    border-left: 4px solid var(--t360-brand);
}

/* ---- Fichaje: pensado para usarse con una mano en el teléfono ---- */

.t360-punch {
    text-align: center;
}

.t360-punch-state {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 0.25rem;
}

.t360-punch-worked {
    margin: 0 0 1rem;
    color: var(--t360-ink-soft);
}

.t360-punch-actions {
    display: grid;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.t360-punch-button {
    min-height: 4.5rem;
    font-size: 1.35rem;
    width: 100%;
}

.t360-punch .t360-field {
    text-align: left;
}

.t360-time-entry {
    display: block;
    white-space: nowrap;
}

/* Calendario de equipo en cuadrícula: una fila por persona y una columna por día. */
.t360-grid th,
.t360-grid td {
    padding: 0.25rem;
    text-align: center;
    min-width: 1.75rem;
}

.t360-grid th[scope="row"],
.t360-grid thead th:first-child {
    text-align: left;
    white-space: nowrap;
    position: sticky;
    left: 0;
    background: var(--t360-surface);
    z-index: 1;
}

.t360-grid thead th span {
    display: block;
    line-height: 1.2;
}

.t360-grid-weekend {
    background: var(--t360-surface-alt);
}

.t360-grid-holiday {
    background: var(--t360-neutral-soft);
}

.t360-grid-away {
    background: var(--t360-accent-soft);
    color: var(--t360-accent-ink);
    font-weight: 600;
}

.t360-grid-pending {
    background: repeating-linear-gradient(45deg, var(--t360-warning-surface), var(--t360-warning-surface) 4px, var(--t360-surface) 4px, var(--t360-surface) 8px);
    color: var(--t360-warning-ink);
}

/* Cuadrantes de turnos: el color acompaña al código del turno, nunca lo sustituye. */
.t360-shift {
    display: inline-block;
    min-width: 2rem;
    padding: 0.125rem 0.25rem;
    border-radius: var(--t360-radius-small);
    font-weight: 600;
}

.t360-shift-blue { background: var(--t360-accent-soft); color: var(--t360-accent-ink); }
.t360-shift-green { background: var(--t360-success-soft); color: var(--t360-success-ink); }
.t360-shift-orange { background: var(--t360-amber-soft); color: var(--t360-amber-ink); }
.t360-shift-purple { background: var(--t360-brand-soft); color: var(--t360-brand-ink); }
.t360-shift-red { background: var(--t360-danger-surface); color: var(--t360-danger-ink); }
.t360-shift-teal { background: var(--t360-success-soft); color: var(--t360-success-ink); outline: 1px dashed currentColor; }
.t360-shift-yellow { background: var(--t360-warning-surface); color: var(--t360-warning-ink); }
.t360-shift-gray { background: var(--t360-neutral-soft); color: var(--t360-neutral-ink); }

.t360-roster td {
    min-width: 4.5rem;
}

.t360-roster select {
    width: 100%;
    min-width: 4rem;
}

/* Portal de empleo: público, sin menú. */
.t360-public {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--t360-bg);
}

.t360-public-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--t360-surface);
    border-bottom: 1px solid var(--t360-line);
}

.t360-public-company {
    font-weight: 650;
    color: var(--t360-brand);
}

.t360-public-main {
    flex: 1;
    width: 100%;
    max-width: 48rem;
    margin: 0 auto;
    padding: 1.5rem 1rem;
}

.t360-public-footer {
    padding: 1rem;
    text-align: center;
    color: var(--t360-ink-soft);
    font-size: 0.875rem;
}

.t360-job-list {
    list-style: none;
    padding: 0;
    display: grid;
    gap: 0.75rem;
}

.t360-job-list h2 {
    margin: 0 0 0.25rem;
    font-size: 1.125rem;
}

/* Texto escrito por la empresa: se respetan sus saltos de línea. */
.t360-pre-line {
    white-space: pre-line;
}

/* ---- Trabajando: el símbolo de Trabia animado ----
   El símbolo respira en el centro con un brillo verde; alrededor, un arco azul que se estira y se encoge
   mientras gira y un arco verde, más corto, que gira en sentido contrario. */
.t360-busy-mark {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 4.5rem;
    height: 4.5rem;
    flex: none;
}

.t360-busy-mark-small {
    width: 1.5rem;
    height: 1.5rem;
}

.t360-busy-ring {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    animation: t360-busy-spin 2.4s linear infinite;
}

.t360-busy-track,
.t360-busy-arc {
    fill: none;
}

.t360-busy-track {
    stroke: var(--t360-line);
    stroke-width: 3;
}

.t360-busy-arc {
    stroke-linecap: round;
    transform-origin: 50px 50px;
}

.t360-busy-arc-brand {
    stroke: var(--t360-brand);
    stroke-width: 5;
    stroke-dasharray: 1 277;
    animation: t360-busy-dash 1.6s ease-in-out infinite;
}

.t360-busy-arc-accent {
    stroke: var(--t360-accent);
    stroke-width: 4;
    stroke-dasharray: 48 178;
    animation: t360-busy-counter 1.2s linear infinite;
}

.t360-busy-logo {
    position: relative;
    width: 52%;
    height: 52%;
    object-fit: contain;
    animation: t360-busy-breathe 1.6s ease-in-out infinite;
}

.t360-busy-mark-small .t360-busy-track,
.t360-busy-mark-small .t360-busy-arc-accent {
    display: none;
}

.t360-busy-mark-small .t360-busy-arc-brand {
    stroke-width: 9;
}

.t360-busy-mark-small .t360-busy-logo {
    width: 50%;
    height: 50%;
}

@keyframes t360-busy-spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes t360-busy-counter {
    to {
        transform: rotate(-360deg);
    }
}

@keyframes t360-busy-dash {
    0% {
        stroke-dasharray: 1 277;
        stroke-dashoffset: 0;
    }

    50% {
        stroke-dasharray: 150 277;
        stroke-dashoffset: -40;
    }

    100% {
        stroke-dasharray: 150 277;
        stroke-dashoffset: -276;
    }
}

@keyframes t360-busy-breathe {
    0%,
    100% {
        transform: scale(0.88);
        filter: drop-shadow(0 0 0 rgba(147, 176, 72, 0));
    }

    50% {
        transform: scale(1);
        filter: drop-shadow(0 0 0.45rem rgba(147, 176, 72, 0.65));
    }
}

/* Cubre la pantalla mientras una acción tarda: se ve qué pasa y nadie pulsa dos veces. */
.t360-activity {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(244, 246, 248, 0.72);
    backdrop-filter: blur(2px);
    animation: t360-activity-in 0.18s ease-out;
}

.t360-activity-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.875rem;
    padding: 1.5rem 2rem;
    background: var(--t360-surface);
    border: 1px solid var(--t360-line);
    border-radius: var(--t360-radius);
    box-shadow: var(--t360-shadow-raised);
    max-width: 20rem;
    text-align: center;
}

.t360-activity-text {
    color: var(--t360-ink);
    font-weight: 600;
}

@keyframes t360-activity-in {
    from {
        opacity: 0;
    }
}

/* Con «reducir movimiento» del sistema, nada gira: el símbolo late despacio. */
@media (prefers-reduced-motion: reduce) {
    .t360-busy-ring,
    .t360-busy-arc,
    .t360-activity {
        animation: none;
    }

    .t360-busy-arc-brand {
        stroke-dasharray: 90 277;
    }

    .t360-busy-logo {
        animation: t360-busy-fade 2.4s ease-in-out infinite;
    }
}

@keyframes t360-busy-fade {
    50% {
        opacity: 0.55;
    }
}
