/* =========================================================================
   Smart Intake — page polish (loads after polish.css)
   Scope: Tasks workspace, Submissions, Meetings, Intake, Form builder,
   Telegram compose. Visual only — no layout or behaviour changes.
   ========================================================================= */

/* =========================================================================
   4 — Tasks / Gerente workspace
   ========================================================================= */

.container--gerente {
    padding-top: var(--space-4);
}

.gerente-shell {
    gap: var(--space-5);
}

/* Three columns: glass panels with login-style depth */
.gerente-rail.glass,
.gerente-center.glass,
.gerente-info-shell .gerente-info.glass {
    background: rgba(255, 255, 255, 0.58);
    backdrop-filter: blur(var(--glass-blur)) saturate(140%);
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(140%);
    border: 1px solid rgba(255, 255, 255, 0.58);
    box-shadow:
        0 10px 32px rgba(30, 61, 88, 0.12),
        0 2px 0 rgba(255, 255, 255, 0.48) inset;
}

.gerente-rail__head {
    padding-bottom: var(--space-2);
    border-bottom: 1px solid rgba(30, 61, 88, 0.08);
    margin-bottom: var(--space-2);
}

.gerente-rail .picker__filter-pill {
    background: rgba(5, 125, 205, 0.12);
    color: var(--primary, #057dcd);
    border: 1px solid rgba(5, 125, 205, 0.22);
    font-weight: 700;
}

.gerente-rail__item a {
    background: rgba(255, 255, 255, 0.55);
    border: 1.5px solid rgba(30, 61, 88, 0.10);
    transition:
        border-color 0.16s ease,
        background 0.16s ease,
        box-shadow 0.16s ease,
        transform 0.16s ease;
}

.gerente-rail__item a:hover {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(5, 125, 205, 0.28);
    box-shadow: 0 4px 12px rgba(5, 125, 205, 0.10);
    transform: translateY(-1px);
}

.gerente-rail__item--active a {
    border-color: var(--primary, #057dcd);
    background: rgba(5, 125, 205, 0.10);
    box-shadow:
        inset 3px 0 0 var(--primary, #057dcd),
        0 4px 14px rgba(5, 125, 205, 0.14);
}

.gerente-center__h1 {
    font-weight: 700;
    letter-spacing: -0.025em;
}

.gerente-pill {
    background: rgba(255, 255, 255, 0.65);
    border-color: rgba(30, 61, 88, 0.14);
}

.gerente-pill--accent {
    background: rgba(5, 125, 205, 0.12);
    border-color: rgba(5, 125, 205, 0.32);
    color: var(--primary, #057dcd);
}

.gerente-center__drop {
    background: rgba(255, 255, 255, 0.45);
    border: 2px dashed rgba(5, 125, 205, 0.28);
    border-radius: var(--radius-lg);
    transition:
        border-color 0.15s ease,
        background 0.15s ease,
        box-shadow 0.15s ease;
}

.gerente-center__drop--active {
    border-color: var(--primary, #057dcd);
    background: rgba(5, 125, 205, 0.08);
    box-shadow: 0 0 0 3px rgba(5, 125, 205, 0.12);
}

.gerente-workflow-canvas {
    background-color: rgba(255, 255, 255, 0.72);
    background-image: radial-gradient(rgba(5, 125, 205, 0.12) 1px, transparent 1px);
    border: 1px solid rgba(255, 255, 255, 0.65);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.gerente-chip {
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(30, 61, 88, 0.14);
    box-shadow: 0 1px 3px rgba(30, 61, 88, 0.06);
}

.gerente-info__filters input[type="search"],
.gerente-info__filters select,
.gerente-sidebar__seat-select {
    background: rgba(255, 255, 255, 0.82);
    border: 1.5px solid rgba(30, 61, 88, 0.14);
}

.gerente-info__filters input:focus,
.gerente-info__filters select:focus,
.gerente-sidebar__seat-select:focus {
    border-color: var(--primary, #057dcd);
    box-shadow: 0 0 0 3px rgba(5, 125, 205, 0.14);
    outline: none;
}

.gerente-info__list,
.gerente-sidebar__submissions,
.gerente-sidebar__form-list {
    background: rgba(255, 255, 255, 0.50);
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: var(--radius-md);
}

.gerente-sidebar__form-row--draggable:hover,
.gerente-info__row:hover {
    background: rgba(5, 125, 205, 0.06);
}

.gerente-info__toggle {
    background: rgba(255, 255, 255, 0.55);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 2px 8px rgba(30, 61, 88, 0.08);
}

/* Task inbox + console (same family) */
.task-inbox__card {
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.55);
    box-shadow: 0 2px 8px rgba(30, 61, 88, 0.06);
    transition:
        border-color 0.16s ease,
        box-shadow 0.16s ease,
        transform 0.16s ease;
}

.task-inbox__card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(30, 61, 88, 0.12);
    border-color: rgba(5, 125, 205, 0.28);
}

.task-console__chip {
    background: rgba(255, 255, 255, 0.62);
    transition: border-color 0.15s ease, background 0.15s ease;
}

.task-console__chip--active {
    background: rgba(5, 125, 205, 0.12);
    border-color: var(--primary, #057dcd);
    color: var(--primary, #057dcd);
}

.task-console__table tbody tr {
    transition: background 0.12s ease;
}

.task-console__table tbody tr:hover {
    background: rgba(5, 125, 205, 0.06);
}

.task-console-stats__item {
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 1px 3px rgba(30, 61, 88, 0.06);
}

/* =========================================================================
   5 — Submissions console + Meetings
   ========================================================================= */

.submissions-console__head h1 {
    font-weight: 700;
    letter-spacing: -0.025em;
}

.submissions-console__filters input,
.submissions-console__filters select {
    padding: 10px 12px;
    border: 1.5px solid rgba(30, 61, 88, 0.14);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.82);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.submissions-console__filters input:focus,
.submissions-console__filters select:focus {
    border-color: var(--primary, #057dcd);
    box-shadow: 0 0 0 3px rgba(5, 125, 205, 0.14);
    outline: none;
}

.submissions-table-wrap.glass,
.submissions-console.glass {
    border-color: rgba(255, 255, 255, 0.58);
}

.submissions-table thead th {
    background: rgba(255, 255, 255, 0.45);
    font-weight: 700;
    color: var(--text-secondary, #2d4660);
}

.submissions-table tbody tr {
    transition: background 0.12s ease;
}

.submissions-table tbody tr:hover {
    background: rgba(5, 125, 205, 0.07);
}

.status-pill {
    box-shadow: 0 1px 2px rgba(30, 61, 88, 0.06);
}

.submission-detail__ai.glass,
.q-compare.glass,
.audit-strip.glass {
    border-color: rgba(255, 255, 255, 0.58);
}

.audit-strip__table tbody tr:hover {
    background: rgba(5, 125, 205, 0.05);
}

/* Meetings */
.meetings-detail-kicker {
    color: var(--primary, #057dcd);
    opacity: 0.85;
    letter-spacing: 0.06em;
}

.meetings-detail-hero h1,
.meetings-calendar-mount .fc-toolbar-title {
    font-weight: 700;
    letter-spacing: -0.025em;
}

.meetings-calendar-wrap.glass {
    border-color: rgba(255, 255, 255, 0.58);
}

.meetings-calendar-mount .fc-button-primary {
    background: linear-gradient(145deg, var(--primary, #057dcd), #0369a1);
    border-color: rgba(5, 125, 205, 0.35);
    box-shadow: 0 2px 8px rgba(5, 125, 205, 0.22);
}

.meetings-calendar-mount .fc-button-primary:not(:disabled):hover {
    filter: brightness(1.06);
}

.meetings-calendar-mount .fc-button-primary:not(:disabled):active,
.meetings-calendar-mount .fc-button-primary:not(:disabled).fc-button-active {
    background: #0369a1;
}

.meetings-calendar-mount .fc-event {
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(30, 61, 88, 0.12);
}

.meetings-detail-panel.glass,
.meetings-log-card.glass,
.meetings-form-card.glass,
.meetings-history-card.glass {
    border-color: rgba(255, 255, 255, 0.58);
    transition: box-shadow 0.2s ease;
}

.meetings-detail-panel:hover {
    box-shadow:
        0 12px 28px rgba(30, 61, 88, 0.12),
        0 2px 0 rgba(255, 255, 255, 0.5) inset;
}

.meetings-pill--ok {
    background: rgba(62, 138, 107, 0.18);
    border: 1px solid rgba(62, 138, 107, 0.28);
}

.meetings-pill--danger {
    background: rgba(157, 74, 74, 0.14);
    border: 1px solid rgba(157, 74, 74, 0.24);
}

.meetings-log-table tbody tr:hover,
.meetings-history-table tbody tr:hover {
    background: rgba(5, 125, 205, 0.06);
}

.meetings-field__control:focus {
    box-shadow: 0 0 0 3px rgba(5, 125, 205, 0.14);
}

/* -----------------------------------------------------------------------
   Meeting detail — restyled "Event details" + "Attendees" panels
   ----------------------------------------------------------------------- */

.meetings-info-card {
    padding: 24px;
}

.meetings-info-card__title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 18px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--primary, #057dcd);
}

.meetings-info-card__title-icon {
    font-size: 16px;
    line-height: 1;
}

.meetings-info-card__count {
    margin-left: auto;
    padding: 2px 10px;
    border-radius: 999px;
    background: rgba(5, 125, 205, 0.10);
    color: var(--primary, #057dcd);
    font-size: 12px;
    font-weight: 700;
}

.meetings-info-list {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.meetings-info-row {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(30, 61, 88, 0.08);
    border-radius: 12px;
}

.meetings-info-row__icon {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: linear-gradient(145deg, rgba(5, 125, 205, 0.16), rgba(5, 125, 205, 0.06));
    color: var(--primary, #057dcd);
    font-size: 18px;
    line-height: 1;
}

.meetings-info-row__body {
    min-width: 0;
    flex: 1 1 auto;
}

.meetings-info-row__label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(30, 61, 88, 0.65);
    margin-bottom: 2px;
}

.meetings-info-row__value {
    margin: 0;
    font-size: 15px;
    line-height: 1.5;
    color: var(--text, #1e3d58);
    word-break: break-word;
}

.meetings-info-row--block .meetings-detail-notes {
    margin-top: 4px;
    font-size: 14px;
    line-height: 1.6;
    white-space: pre-line;
}

/* -----------------------------------------------------------------------
   Attendee chips (right panel of the detail page)
   ----------------------------------------------------------------------- */

.meetings-attendee-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 10px;
}

.meetings-attendee-chip {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(30, 61, 88, 0.08);
}

.meetings-attendee-chip--organizer {
    background: linear-gradient(145deg, rgba(5, 125, 205, 0.12), rgba(5, 125, 205, 0.04));
    border-color: rgba(5, 125, 205, 0.22);
}

.meetings-attendee-chip__avatar {
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, var(--primary, #057dcd), #0369a1);
    color: #ffffff;
    font-weight: 700;
    font-size: 13px;
}

.meetings-attendee-chip__body {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    font-size: 14px;
}

.meetings-attendee-chip .meetings-attendee-name {
    font-weight: 600;
}

.meetings-attendee-empty {
    padding: 14px;
    border-radius: 12px;
    background: rgba(30, 61, 88, 0.04);
    text-align: center;
    font-size: 14px;
}

.meetings-rsvp-msg {
    display: inline-block;
    margin-top: 2px;
    font-style: italic;
}

/* -----------------------------------------------------------------------
   Personal events — pill, hero accent, dedicated card
   ----------------------------------------------------------------------- */

.meetings-pill--personal {
    background: rgba(51, 65, 85, 0.16);
    border: 1px solid rgba(51, 65, 85, 0.32);
    color: #1f2937;
}

.meetings-pill--shared {
    background: rgba(15, 118, 110, 0.16);
    border: 1px solid rgba(15, 118, 110, 0.32);
    color: #0f766e;
}

.meetings-detail-hero--personal {
    background:
        linear-gradient(135deg, rgba(51, 65, 85, 0.10), rgba(255, 255, 255, 0.85));
    border-color: rgba(51, 65, 85, 0.22);
}

.meetings-personal-card {
    border: 1px solid rgba(51, 65, 85, 0.18);
    background: linear-gradient(150deg, rgba(248, 250, 252, 0.95), rgba(241, 245, 249, 0.92));
}

.meetings-shared-card {
    border: 1px solid rgba(15, 118, 110, 0.22);
    background: linear-gradient(150deg, rgba(236, 253, 245, 0.95), rgba(240, 253, 250, 0.92));
}

.meetings-attendee-chip--shared {
    background: rgba(15, 118, 110, 0.08);
    border-color: rgba(15, 118, 110, 0.22);
}

.meetings-attendee-chip--shared .meetings-attendee-chip__avatar {
    background: linear-gradient(145deg, #0f766e, #0b5f59);
}

.meetings-field--shared {
    border: 1px dashed rgba(15, 118, 110, 0.32);
    border-radius: 12px;
    padding: 14px 16px;
    background: linear-gradient(140deg, rgba(15, 118, 110, 0.07), rgba(255, 255, 255, 0.85));
}

.meetings-personal-note {
    margin: 0 0 10px;
    font-size: 14px;
    line-height: 1.55;
}

.meetings-personal-tip {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
}

/* -----------------------------------------------------------------------
   Form — "Personal event" toggle row
   ----------------------------------------------------------------------- */

.meetings-field--toggle {
    background: linear-gradient(140deg, rgba(51, 65, 85, 0.08), rgba(255, 255, 255, 0.85));
    border: 1px dashed rgba(51, 65, 85, 0.30);
    border-radius: 12px;
    padding: 14px 16px;
}

.meetings-field__toggle-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.meetings-field__toggle-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.meetings-field__check {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: #334155;
}

.meetings-field--disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* =========================================================================
   6 — Intake screen, form builder, Telegram compose
   ========================================================================= */

/* Intake header strip */
.intake-header.glass,
.intake-header--organized.glass {
    border-color: rgba(255, 255, 255, 0.58);
    margin-bottom: var(--space-4);
}

.intake-header__title,
.intake-header h1.intake-header__title {
    font-weight: 700;
    letter-spacing: -0.02em;
}

.intake-header__pill,
.intake-header__chip {
    background: rgba(255, 255, 255, 0.65);
    border: 1px solid rgba(30, 61, 88, 0.12);
    box-shadow: 0 1px 2px rgba(30, 61, 88, 0.05);
}

.intake-workflow-progress.glass {
    border-color: rgba(255, 255, 255, 0.58);
    margin-bottom: var(--space-4);
}

.intake-workflow-progress__step--done {
    background: rgba(62, 138, 107, 0.10);
    border-radius: var(--radius-md);
}

/* Question cards */
.qcard.glass {
    border-color: rgba(255, 255, 255, 0.58);
    transition:
        border-color 0.18s ease,
        box-shadow 0.18s ease,
        transform 0.18s ease;
}

.qcard:hover {
    box-shadow:
        0 10px 28px rgba(30, 61, 88, 0.10),
        0 2px 0 rgba(255, 255, 255, 0.5) inset;
}

.qcard:focus-within {
    border-color: var(--primary, #057dcd);
    box-shadow:
        0 0 0 3px rgba(5, 125, 205, 0.14),
        0 8px 24px rgba(30, 61, 88, 0.10);
}

.qcard--required {
    border-left-width: 4px;
    border-left-color: var(--primary, #057dcd);
}

/* Sticky submit bar — floating glass dock */
.intake-actions.glass {
    border-radius: var(--radius-xl);
    border-color: rgba(255, 255, 255, 0.62);
    box-shadow:
        0 12px 40px rgba(30, 61, 88, 0.18),
        0 2px 0 rgba(255, 255, 255, 0.55) inset;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(20px) saturate(150%);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
}

.intake-actions__collapse-toggle {
    background: rgba(5, 125, 205, 0.10);
    color: var(--primary, #057dcd);
}

.intake-actions__collapse-toggle:hover {
    background: rgba(5, 125, 205, 0.18);
}

/* Session toolbar */
.intake-session-toolbar.glass {
    border-color: rgba(255, 255, 255, 0.58);
    margin-bottom: var(--space-4);
}

/* Form builder */
.form-builder-row {
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: var(--radius-md);
    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease,
        transform 0.15s ease;
}

.form-builder-row:hover {
    border-color: rgba(5, 125, 205, 0.22);
    box-shadow: 0 4px 12px rgba(5, 125, 205, 0.08);
}

.form-builder-card.glass {
    border-color: rgba(255, 255, 255, 0.58);
}

.form-builder-workflow-block {
    border-top-color: rgba(30, 61, 88, 0.10);
}

/* Telegram compose — moved from inline template styles */
.send-tg-shell {
    display: flex;
    flex-direction: row;
    max-width: min(1180px, 100%);
    margin: 0 auto;
    gap: 0;
    align-items: stretch;
    min-height: 52vh;
}

.send-tg-main {
    flex: 1;
    min-width: 0;
}

.send-tg-side {
    display: flex;
    flex-direction: row;
    flex-shrink: 0;
    align-items: stretch;
    position: relative;
    z-index: 2;
    gap: 6px;
}

.send-tg-side__tab {
    align-self: flex-start;
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    padding: 0;
    margin: 12px 0 0 0;
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 4px 12px rgba(5, 125, 205, 0.14);
    cursor: pointer;
    font-size: 13px;
    line-height: 1;
    color: var(--primary, #057dcd);
    display: flex;
    align-items: center;
    justify-content: center;
    transition:
        background 0.18s ease,
        box-shadow 0.18s ease,
        transform 0.18s ease;
    order: 0;
}

.send-tg-side__tab:hover {
    background: #fff;
    box-shadow: 0 6px 16px rgba(5, 125, 205, 0.22);
    transform: translateY(-1px);
}

.send-tg-side__arrow {
    display: inline-block;
    transition: transform 0.28s ease;
}

.send-tg-side.is-closed .send-tg-side__arrow {
    transform: rotate(180deg);
}

.send-tg-side__inner {
    order: 1;
    width: 270px;
    overflow: hidden;
    transition: width 0.32s ease, opacity 0.24s ease, padding 0.32s ease;
    background: rgba(255, 255, 255, 0.58);
    backdrop-filter: blur(12px) saturate(140%);
    -webkit-backdrop-filter: blur(12px) saturate(140%);
    border: 1px solid rgba(255, 255, 255, 0.58);
    border-radius: 0 var(--radius-lg, 12px) var(--radius-lg, 12px) 0;
    padding: 12px 12px 12px 10px;
    max-height: min(78vh, 640px);
    box-shadow: 0 8px 24px rgba(30, 61, 88, 0.10);
}

.send-tg-side.is-closed .send-tg-side__inner {
    width: 0;
    opacity: 0;
    padding-left: 0;
    padding-right: 0;
    border: none;
    pointer-events: none;
}

.send-tg-side__scroll {
    overflow-y: auto;
    max-height: min(72vh, 600px);
    padding-right: 4px;
}

.send-tg-side__live {
    margin: 0 0 10px;
    font-size: 11px;
    color: var(--text-secondary, #2d4660);
    opacity: 0.72;
    line-height: 1.35;
}

.send-tg-side__section-title {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: var(--ink, #1e3d58);
    margin: 0 0 8px;
    padding-bottom: 4px;
    border-bottom: 1px solid rgba(30, 61, 88, 0.10);
}

.send-tg-side__group-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
    color: var(--primary, #057dcd);
    margin: 0 0 2px;
}

.send-tg-chip {
    display: inline-block;
    margin: 0 6px 6px 0;
    padding: 5px 10px;
    font-size: 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(30, 61, 88, 0.12);
    box-shadow: 0 1px 3px rgba(30, 61, 88, 0.06);
    cursor: grab;
    user-select: none;
    max-width: 100%;
    vertical-align: middle;
    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease,
        transform 0.15s ease;
}

.send-tg-chip:hover {
    border-color: rgba(5, 125, 205, 0.28);
    box-shadow: 0 3px 8px rgba(5, 125, 205, 0.12);
}

.send-tg-chip--block {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    max-width: 100%;
    white-space: normal;
    border-radius: var(--radius-md);
}

.send-tg-chip--block .send-tg-chip__line {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.send-tg-chip__name {
    font-weight: 600;
    font-size: 12px;
}

.send-tg-chip__meta {
    font-size: 10px;
    opacity: 0.72;
    margin-top: 2px;
}

.send-tg-chip:active {
    cursor: grabbing;
}

.send-tg {
    width: 100%;
}

.send-tg.glass,
section.send-tg.glass {
    padding: var(--space-5);
    border-radius: var(--radius-lg);
    border-color: rgba(255, 255, 255, 0.58);
}

.send-tg .field {
    display: block;
    margin-bottom: var(--space-4);
}

.send-tg .field__hint {
    display: block;
    font-size: 12px;
    margin-top: 4px;
    opacity: 0.68;
}

.send-tg .actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: var(--space-4) 0;
    align-items: center;
}

.tg-composer {
    margin-top: 4px;
}

.tg-composer__toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px;
    margin-bottom: 8px;
}

.tg-composer__tool-label {
    font-size: 11px;
    font-weight: 600;
    opacity: 0.75;
}

.tg-composer__format {
    display: flex;
    gap: 6px;
}

.tg-composer__fmt {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
}

.tg-composer__editor {
    min-height: 200px;
    max-height: 360px;
    overflow-y: auto;
    padding: 12px 14px;
    outline: none;
    line-height: 1.5;
    position: relative;
}

.tg-composer__editor[data-empty="1"]:not(:focus)::before {
    content: attr(data-placeholder);
    color: rgba(30, 61, 88, 0.45);
    pointer-events: none;
    position: absolute;
    left: 14px;
    top: 12px;
}

.tg-composer__editor[data-empty="1"]:focus::before {
    content: none;
}

.send-tg .field__label {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    opacity: 0.65;
}

.send-tg select,
.send-tg textarea {
    width: 100%;
    padding: 12px 14px;
    border-radius: var(--radius-md, 10px);
    border: 1.5px solid rgba(30, 61, 88, 0.14);
    background: rgba(255, 255, 255, 0.88);
    font: inherit;
    color: var(--ink, #1e3d58);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.send-tg select:focus,
.send-tg textarea:focus {
    border-color: var(--primary, #057dcd);
    box-shadow: 0 0 0 3px rgba(5, 125, 205, 0.14);
    outline: none;
}

.send-tg textarea {
    min-height: 160px;
    resize: vertical;
}

.tg-composer__select,
.tg-composer__fmt {
    border: 1.5px solid rgba(30, 61, 88, 0.14);
    background: rgba(255, 255, 255, 0.88);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.tg-composer__fmt:hover {
    background: rgba(5, 125, 205, 0.10);
    border-color: rgba(5, 125, 205, 0.28);
}

.tg-composer__editor-wrap {
    border: 1.5px solid rgba(30, 61, 88, 0.14);
    border-radius: var(--radius-md, 10px);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.tg-composer__editor-wrap:focus-within {
    border-color: var(--primary, #057dcd);
    box-shadow: 0 0 0 3px rgba(5, 125, 205, 0.14);
}

/* =========================================================================
   New task page
   ========================================================================= */

.task-create-page {
    max-width: 760px;
    margin: 0 auto;
}

.task-create-back {
    margin: 0 0 var(--space-3);
}

.task-create-hero {
    background:
        linear-gradient(145deg,
            rgba(5, 125, 205, 0.10) 0%,
            rgba(67, 176, 241, 0.05) 100%),
        rgba(255, 255, 255, 0.58);
    border: 1px solid rgba(255, 255, 255, 0.62);
    box-shadow:
        0 12px 32px rgba(30, 61, 88, 0.14),
        0 2px 0 rgba(255, 255, 255, 0.55) inset;
    padding: var(--space-5) var(--space-6);
    margin-bottom: var(--space-4);
}

.task-create-kicker {
    margin: 0 0 var(--space-1);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--primary, #057dcd);
    opacity: 0.95;
}

.task-create-hero h1 {
    margin: 0 0 var(--space-2);
    font-size: var(--fs-2xl);
    font-weight: 700;
    letter-spacing: -0.028em;
}

.task-create-hero .dashboard-hero__sub {
    margin: 0;
    line-height: 1.55;
    color: var(--text-secondary, #2d4660);
    max-width: 56ch;
}

.task-create-card.picker {
    padding: var(--space-6);
    background: rgba(255, 255, 255, 0.62);
    border: 1px solid rgba(255, 255, 255, 0.62);
    box-shadow:
        0 10px 32px rgba(30, 61, 88, 0.12),
        0 2px 0 rgba(255, 255, 255, 0.50) inset;
}

.task-create-card .task-create-form {
    max-width: none;
    gap: var(--space-4);
}

.task-create-card .field {
    gap: 6px;
}

.task-create-card .field__label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--ink, #1e3d58);
    opacity: 0.72;
}

.task-create-card .reports-req {
    color: var(--primary, #057dcd);
    font-weight: 700;
    margin-left: 4px;
}

.task-create-card input[type="text"],
.task-create-card input[type="date"],
.task-create-card input[type="number"],
.task-create-card select,
.task-create-card textarea {
    width: 100%;
    padding: 11px 14px;
    font: inherit;
    font-size: 15px;
    border: 1.5px solid rgba(30, 61, 88, 0.16);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.85);
    color: var(--ink, #1e3d58);
    transition:
        border-color 0.15s ease,
        background 0.15s ease,
        box-shadow 0.15s ease;
}

.task-create-card input:focus,
.task-create-card select:focus,
.task-create-card textarea:focus {
    border-color: var(--primary, #057dcd);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(5, 125, 205, 0.14);
    outline: none;
}

.task-create-card textarea {
    min-height: 110px;
    resize: vertical;
    line-height: 1.5;
}

.task-create-card .field__help {
    margin: 0;
    font-size: 12px;
    color: var(--text-secondary, #2d4660);
    opacity: 0.75;
    line-height: 1.4;
}

.task-create-card .field__error {
    margin: 0;
    font-size: 13px;
    color: var(--danger-ink, #9d4a4a);
    font-weight: 600;
}

.task-create-banner {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    font-size: 13px;
    line-height: 1.45;
    margin: 0 0 var(--space-4);
    box-shadow: 0 2px 8px rgba(30, 61, 88, 0.06);
}

.task-create-banner::before {
    content: "!";
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    font-size: 12px;
    font-weight: 800;
    line-height: 20px;
    text-align: center;
    border-radius: 50%;
    background: rgba(160, 122, 54, 0.30);
    color: var(--warning-ink, #a07a36);
}

.task-create-banner--error {
    background: rgba(220, 80, 80, 0.10);
    color: #b91c1c;
    border: 1px solid rgba(220, 80, 80, 0.28);
}

.task-create-banner--error::before {
    content: "✕";
    background: rgba(220, 80, 80, 0.24);
    color: #b91c1c;
}

.task-create-card .task-handoff__row {
    margin-top: var(--space-3);
    padding-top: var(--space-4);
    border-top: 1px solid rgba(30, 61, 88, 0.10);
    justify-content: flex-end;
    gap: var(--space-2);
}

.task-create-card .task-handoff__row .btn--primary {
    min-width: 140px;
    padding: 12px 22px;
    font-size: 15px;
}

@media (max-width: 720px) {
    .task-create-hero {
        padding: var(--space-4) var(--space-5);
    }

    .task-create-card.picker {
        padding: var(--space-5);
    }

    .task-create-card .task-handoff__row {
        justify-content: stretch;
    }

    .task-create-card .task-handoff__row .btn--primary {
        width: 100%;
    }
}

@media (prefers-reduced-motion: no-preference) {
    .task-create-page > .task-create-hero {
        animation: ssi-rise 0.42s cubic-bezier(0.22, 1, 0.36, 1) both;
    }

    .task-create-page > .task-create-card {
        animation: ssi-rise 0.46s cubic-bezier(0.22, 1, 0.36, 1) 0.06s both;
    }
}

/* Page entrance — workspace + heavy pages */
@media (prefers-reduced-motion: no-preference) {
    .gerente-shell,
    .submissions-console,
    .meetings-shell .dashboard-hero,
    .meetings-calendar-wrap,
    .intake-header,
    .intake-cards .qcard,
    .send-tg-shell {
        animation: ssi-rise 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
    }

    .intake-cards .qcard:nth-child(2) { animation-delay: 0.04s; }
    .intake-cards .qcard:nth-child(3) { animation-delay: 0.08s; }
}

/* =========================================================================
   12 — Personal "Remind me" reminders
   ========================================================================= */

.reminders-shell {
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
}

.reminders-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    flex-wrap: wrap;
}

.reminders-hero__actions {
    display: flex;
    gap: var(--space-2);
}

.rem-banner {
    padding: 14px 18px;
    border-radius: var(--radius-md);
    font-size: 14px;
    line-height: 1.55;
}

.rem-banner--warn {
    background: rgba(160, 122, 54, 0.12);
    border: 1px solid rgba(160, 122, 54, 0.30);
    color: #6f4e1a;
}

.rem-banner--info {
    background: rgba(5, 125, 205, 0.10);
    border: 1px solid rgba(5, 125, 205, 0.28);
    color: #0c4a6e;
}

.rem-banner code {
    background: rgba(255, 255, 255, 0.55);
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 12.5px;
}

.rem-card {
    padding: var(--space-5);
    background: rgba(255, 255, 255, 0.62);
    border: 1px solid rgba(255, 255, 255, 0.62);
    box-shadow:
        0 10px 32px rgba(30, 61, 88, 0.10),
        0 2px 0 rgba(255, 255, 255, 0.50) inset;
    border-radius: var(--radius-lg);
}

.rem-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-4);
}

.rem-card__title {
    margin: 0;
    font-size: var(--fs-lg);
    font-weight: 700;
    color: var(--ink, #1e3d58);
    letter-spacing: -0.012em;
}

.rem-card__count {
    font-size: 12px;
    font-weight: 700;
    padding: 2px 10px;
    background: rgba(5, 125, 205, 0.12);
    color: var(--primary, #057dcd);
    border-radius: 999px;
}

.rem-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.rem-list--history .rem-row {
    opacity: 0.85;
}

.rem-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-4);
    padding: 14px 16px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(30, 61, 88, 0.10);
    transition: border-color 0.15s ease, transform 0.15s ease;
}

.rem-row:hover {
    border-color: rgba(5, 125, 205, 0.30);
}

.rem-row--due {
    border-color: rgba(220, 80, 80, 0.40);
    background: rgba(255, 240, 240, 0.85);
}

.rem-row--sent {
    background: rgba(240, 248, 244, 0.78);
    border-color: rgba(20, 110, 70, 0.18);
}

.rem-row--cancelled {
    background: rgba(248, 248, 248, 0.78);
}

.rem-row__body {
    flex: 1 1 auto;
    min-width: 0;
}

.rem-row__title {
    margin: 0 0 4px;
    font-size: 16px;
    font-weight: 700;
    color: var(--ink, #1e3d58);
    word-break: break-word;
}

.rem-row__note {
    margin: 0 0 6px;
    font-size: 13.5px;
    line-height: 1.5;
    color: var(--text-secondary, #2d4660);
    word-break: break-word;
}

.rem-row__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
    font-size: 12.5px;
}

/* Sub-cards inside a reminder row (instructions / links / people / comments). */
.rem-mini-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
    margin: 12px 0 0;
}

.rem-mini {
    padding: 10px 12px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.65);
    border: 1px solid rgba(30, 61, 88, 0.10);
}

.rem-mini__title {
    margin: 0 0 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink, #1e3d58);
    opacity: 0.78;
    display: flex;
    align-items: center;
    gap: 4px;
}

.rem-mini__body {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-secondary, #2d4660);
    word-break: break-word;
}

.rem-mini__links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 13px;
}

.rem-mini__links a {
    color: var(--primary, #057dcd);
    text-decoration: none;
    word-break: break-all;
}

.rem-mini__links a:hover {
    text-decoration: underline;
}

.rem-people-chip {
    display: inline-block;
    margin: 2px 4px 2px 0;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    background: rgba(5, 125, 205, 0.10);
    color: var(--primary, #057dcd);
}

/* Language switcher in the topbar (sits inside .topbar__nav-main) */
.topbar__lang {
    display: inline-flex;
    align-items: center;
    margin-left: 6px;
}

.topbar__lang select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background:
        rgba(255, 255, 255, 0.12)
        url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path fill='white' d='M0 0l5 6 5-6z'/></svg>")
        no-repeat right 8px center;
    background-size: 8px 5px;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.30);
    border-radius: 999px;
    padding: 5px 24px 5px 12px;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    line-height: 1.2;
    opacity: 0.92;
    transition: background 140ms ease, opacity 140ms ease;
}

.topbar__lang select:hover,
.topbar__lang select:focus {
    background-color: rgba(255, 255, 255, 0.20);
    opacity: 1;
    outline: none;
}

.topbar__lang select option {
    color: #1e3d58;
    background: #fff;
}

.rem-row__actions {
    display: flex;
    flex-shrink: 0;
    gap: 6px;
    align-items: flex-start;
}

.rem-inline {
    display: inline-block;
    margin: 0;
}

.rem-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 10px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 0.01em;
}

.rem-pill--time {
    background: rgba(5, 125, 205, 0.12);
    color: var(--primary, #057dcd);
}

.rem-pill--note {
    background: rgba(120, 120, 130, 0.12);
    color: #4d5260;
}

.rem-pill--due {
    background: rgba(220, 80, 80, 0.18);
    color: #b91c1c;
}

.rem-pill--ok {
    background: rgba(20, 110, 70, 0.14);
    color: #146e46;
}

.rem-pill--cancel {
    background: rgba(120, 120, 130, 0.18);
    color: #4d5260;
}

.rem-pill--err {
    background: rgba(160, 122, 54, 0.22);
    color: #6f4e1a;
    cursor: help;
}

.rem-empty {
    margin: 0;
    padding: var(--space-3) 0;
    color: var(--text-secondary, #2d4660);
    opacity: 0.85;
    text-align: center;
}

.rem-btn--warn:hover {
    color: #b91c1c !important;
}

/* Reminder form */

.rem-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.rem-form-card {
    padding: var(--space-4) var(--space-5);
    background: rgba(255, 255, 255, 0.62);
    border: 1px solid rgba(255, 255, 255, 0.62);
    box-shadow:
        0 8px 24px rgba(30, 61, 88, 0.08),
        0 2px 0 rgba(255, 255, 255, 0.50) inset;
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.rem-form-card--accent {
    background: rgba(255, 255, 255, 0.80);
    border-color: rgba(5, 125, 205, 0.32);
    box-shadow:
        0 12px 32px rgba(5, 125, 205, 0.10),
        0 2px 0 rgba(255, 255, 255, 0.55) inset;
}

.rem-form-card__head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.rem-form-card__icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(5, 125, 205, 0.12);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.rem-form-card__title {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: var(--ink, #1e3d58);
}

.rem-form-card__sub {
    margin: 2px 0 0;
    font-size: 12.5px;
    color: var(--text-secondary, #2d4660);
    opacity: 0.85;
    line-height: 1.45;
}

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

.rem-field__label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ink, #1e3d58);
    opacity: 0.72;
}

.rem-field__hint {
    font-size: 12px;
    color: var(--text-secondary, #2d4660);
    opacity: 0.78;
    line-height: 1.4;
}

.rem-field__control {
    width: 100%;
    padding: 11px 14px;
    font: inherit;
    font-size: 15px;
    border: 1.5px solid rgba(30, 61, 88, 0.16);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.85);
    color: var(--ink, #1e3d58);
    transition:
        border-color 0.15s ease,
        background 0.15s ease,
        box-shadow 0.15s ease;
}

.rem-field__control:focus {
    border-color: var(--primary, #057dcd);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(5, 125, 205, 0.14);
    outline: none;
}

.rem-field__control--textarea {
    min-height: 110px;
    resize: vertical;
    line-height: 1.5;
}

.rem-form__actions {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-2);
    margin-top: var(--space-2);
}

@media (max-width: 640px) {
    .rem-row {
        flex-direction: column;
        align-items: stretch;
    }

    .rem-row__actions {
        justify-content: flex-end;
    }

    .rem-form__actions {
        flex-direction: column-reverse;
    }

    .rem-form__actions .btn {
        width: 100%;
    }
}


/* ============================================================
   Materials inventory — picture-first card grid + gallery.
   ============================================================
   Reuses `reports-*` tokens for filters, hero, badges, table,
   and adds a tile grid (`materials-grid`) that puts the
   primary photo front-and-center on the list view, plus a
   dense gallery on the detail page.
*/

.materials-shell {
    /* Match other shell pages — tighter top spacing under the topbar. */
}

.materials-hero {
    align-items: center;
}

/* ---- List: card grid ---- */
.materials-grid {
    display: grid;
    gap: var(--space-4);
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    margin-top: var(--space-4);
}

.materials-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: var(--radius-lg, 14px);
    text-decoration: none;
    color: inherit;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.materials-card:hover,
.materials-card:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(5, 125, 205, 0.18);
}

.materials-card--archived {
    opacity: 0.65;
}

.materials-card__thumb {
    position: relative;
    aspect-ratio: 16 / 10;
    background: linear-gradient(135deg, rgba(67, 176, 241, 0.10), rgba(5, 125, 205, 0.06));
    overflow: hidden;
}

.materials-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.materials-card__thumb-empty {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(30, 61, 88, 0.30);
}

.materials-card__count,
.materials-card__archived {
    position: absolute;
    top: 8px;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.materials-card__count { right: 8px; }
.materials-card__archived {
    left: 8px;
    background: rgba(180, 60, 60, 0.85);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.materials-card__body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: var(--space-3);
}

.materials-card__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}

.materials-card__title {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    line-height: 1.3;
    color: var(--ink, #1e3d58);
    word-break: break-word;
}

.materials-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin: 0;
    font-size: 12.5px;
}

.materials-card__meta div {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}

.materials-card__meta dt {
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
    color: rgba(30, 61, 88, 0.55);
    margin: 0;
}

.materials-card__meta dd {
    margin: 0;
    color: var(--ink, #1e3d58);
    font-weight: 500;
}

.materials-card__sn {
    font-family: var(--mono, ui-monospace, "SF Mono", Menlo, monospace);
    font-size: 12px;
    background: rgba(5, 125, 205, 0.10);
    padding: 1px 6px;
    border-radius: 4px;
}

.materials-card__comments {
    margin: 0;
    font-size: 13px;
    color: rgba(30, 61, 88, 0.75);
    line-height: 1.4;
}

.materials-card__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: auto;
    padding-top: 6px;
    font-size: 11.5px;
    color: rgba(30, 61, 88, 0.55);
    border-top: 1px solid rgba(30, 61, 88, 0.08);
}

/* ---- Detail page ---- */
.materials-defn dt {
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 11px;
    color: rgba(30, 61, 88, 0.6);
}

.materials-comments {
    white-space: pre-wrap;
    background: rgba(5, 125, 205, 0.05);
    border-left: 3px solid rgba(5, 125, 205, 0.30);
    padding: 10px 12px;
    border-radius: 0 8px 8px 0;
}

.materials-gallery-card {
    margin-top: var(--space-4);
}

.materials-gallery {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: var(--space-3);
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

.materials-gallery__item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.materials-gallery__link {
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 10px;
    background: rgba(5, 125, 205, 0.06);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.materials-gallery__link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.25s ease;
}

.materials-gallery__link:hover img {
    transform: scale(1.04);
}

.materials-gallery__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    font-size: 12px;
}

.materials-gallery__name {
    color: var(--ink, #1e3d58);
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Reuse reports-badge color variants for new categories. */
.reports-badge--device     { background: rgba(5, 125, 205, 0.14);  color: #057dcd; }
.reports-badge--furniture  { background: rgba(180, 130, 50, 0.14); color: #a36a14; }
.reports-badge--consumable { background: rgba(150, 60, 180, 0.14); color: #7c2db5; }
.reports-badge--equipment  { background: rgba(40, 150, 80, 0.14);  color: #2c8a4f; }

@media (max-width: 600px) {
    .materials-grid {
        grid-template-columns: 1fr;
    }
    .materials-gallery {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* =====================================================================
   Material detail page — restyled hero + grouped mini cards.
   The old layout was a flat dl/table; this version splits the data into
   visual cards (Identification, Location, Comments, Photos, Documents,
   History) and pulls the first photo into a hero strip on the left.
   All classes are namespaced "mat-" to avoid colliding with the list
   page classes (".materials-*").
   ===================================================================== */

.mat-hero {
    display: grid;
    grid-template-columns: minmax(220px, 320px) 1fr;
    gap: 28px;
    padding: 22px;
    margin-bottom: 22px;
    align-items: stretch;
}
.mat-hero--archived { opacity: 0.85; }

.mat-hero__media {
    position: relative;
    min-height: 220px;
}
.mat-hero__photo {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 220px;
    border-radius: 14px;
    overflow: hidden;
    background: rgba(5, 125, 205, 0.06);
    border: 1px solid rgba(5, 125, 205, 0.12);
    box-shadow: 0 8px 24px rgba(5, 125, 205, 0.10);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.mat-hero__photo:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 32px rgba(5, 125, 205, 0.18);
}
.mat-hero__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.mat-hero__photo--empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: rgba(30, 61, 88, 0.45);
    background:
        repeating-linear-gradient(45deg,
            rgba(5, 125, 205, 0.04) 0 12px,
            rgba(5, 125, 205, 0.08) 12px 24px);
    cursor: default;
}
.mat-hero__photo--empty:hover { transform: none; box-shadow: 0 8px 24px rgba(5, 125, 205, 0.10); }
.mat-hero__photo--empty span { font-size: 0.85rem; }

.mat-hero__body {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
}
.mat-hero__top {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.mat-hero__title {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--ink, #1e3d58);
    line-height: 1.2;
    margin: 0;
    word-break: break-word;
}
.mat-hero__stats {
    list-style: none;
    margin: 0;
    padding: 10px 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 22px;
    background: rgba(5, 125, 205, 0.05);
    border: 1px solid rgba(5, 125, 205, 0.12);
    border-radius: 12px;
    width: fit-content;
}
.mat-hero__stats li {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}
.mat-hero__stat-value {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary, #057dcd);
}
.mat-hero__stat-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(30, 61, 88, 0.6);
    margin-top: 2px;
}
.mat-hero__actions {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: auto;
    padding-top: 4px;
}

/* Two-column row for Identification + Location cards */
.mat-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.mat-card {
    padding: 18px 20px;
    margin-bottom: 16px;
}
.mat-card--note    { background: linear-gradient(180deg, rgba(255, 244, 200, 0.55), rgba(255, 244, 200, 0.20)); }
.mat-card--gallery { }
.mat-card--docs    { }
.mat-card--history { background: rgba(5, 125, 205, 0.04); }

.mat-card__head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px dashed rgba(5, 125, 205, 0.18);
}
.mat-card__icon {
    font-size: 1.05rem;
    line-height: 1;
}
.mat-card__title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--ink, #1e3d58);
    margin: 0;
    flex: 1;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.mat-card__count {
    display: inline-flex;
    min-width: 22px;
    padding: 0 8px;
    height: 20px;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--primary, #057dcd);
    background: rgba(5, 125, 205, 0.12);
    border-radius: 999px;
}

/* Field grid inside each card. Uses 2 columns so the data feels card-like
   rather than a dense reference table. */
.mat-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 18px;
    margin: 0;
}
.mat-fields--inline { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mat-field {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 6px 0;
    min-width: 0;
}
.mat-field--wide { grid-column: span 2; }
.mat-field--full { grid-column: 1 / -1; }
.mat-field dt {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(30, 61, 88, 0.55);
}
.mat-field dd {
    margin: 0;
    color: var(--ink, #1e3d58);
    line-height: 1.45;
    word-break: break-word;
}
.mat-field__big {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary, #057dcd);
}

.mat-note {
    margin: 0;
    padding: 12px 14px;
    background: rgba(255, 248, 220, 0.7);
    border-left: 3px solid #d4a017;
    border-radius: 8px;
    color: #4a3b15;
    line-height: 1.55;
    font-size: 0.95rem;
    white-space: pre-wrap;
}

.mat-empty {
    margin: 6px 0 0;
    padding: 18px;
    text-align: center;
    color: rgba(30, 61, 88, 0.6);
    background: rgba(5, 125, 205, 0.04);
    border: 1px dashed rgba(5, 125, 205, 0.20);
    border-radius: 10px;
    font-size: 0.9rem;
}
.mat-empty a {
    color: var(--primary, #057dcd);
    font-weight: 600;
    text-decoration: none;
}
.mat-empty a:hover { text-decoration: underline; }

/* Photo gallery — bigger tiles than the old materials-gallery, with a
   floating delete button that only appears on hover. */
.mat-gallery {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
}
.mat-gallery__item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.mat-gallery__link {
    position: relative;
    display: block;
    aspect-ratio: 4 / 3;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(5, 125, 205, 0.05);
    border: 1px solid rgba(5, 125, 205, 0.12);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.mat-gallery__link:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(5, 125, 205, 0.18);
}
.mat-gallery__link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.mat-gallery__delete {
    position: absolute;
    top: 6px;
    right: 6px;
    margin: 0;
    opacity: 0;
    transition: opacity 0.15s ease;
}
.mat-gallery__link:hover .mat-gallery__delete,
.mat-gallery__delete:focus-within { opacity: 1; }
.mat-gallery__delete-btn {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: none;
    background: rgba(220, 38, 38, 0.92);
    color: #fff;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
}
.mat-gallery__delete-btn:hover { background: #b91c1c; }
.mat-gallery__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 0.78rem;
    line-height: 1.2;
    min-width: 0;
}
.mat-gallery__name {
    color: var(--ink, #1e3d58);
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Documents — list of rows, one per file, instead of a table. */
.mat-docs {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.mat-doc {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(5, 125, 205, 0.12);
    border-radius: 10px;
    transition: background 0.15s ease, border-color 0.15s ease;
}
.mat-doc:hover {
    background: rgba(5, 125, 205, 0.06);
    border-color: rgba(5, 125, 205, 0.22);
}
.mat-doc__icon {
    font-size: 1.4rem;
    line-height: 1;
}
.mat-doc__body { min-width: 0; }
.mat-doc__name {
    font-weight: 600;
    color: var(--ink, #1e3d58);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.mat-doc__meta {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
    color: rgba(30, 61, 88, 0.6);
    font-size: 0.78rem;
    margin-top: 2px;
}
.mat-doc__actions {
    display: inline-flex;
    gap: 6px;
    align-items: center;
}

@media (max-width: 900px) {
    .mat-hero {
        grid-template-columns: 1fr;
    }
    .mat-grid {
        grid-template-columns: 1fr;
    }
    .mat-fields,
    .mat-fields--inline {
        grid-template-columns: 1fr;
    }
    .mat-doc {
        grid-template-columns: auto 1fr;
    }
    .mat-doc__actions {
        grid-column: 1 / -1;
        justify-content: flex-end;
    }
}

/* =====================================================================
   Status / condition / warranty / maintenance pills.
   Distinct color families so a quick glance tells the user what's wrong.
   ===================================================================== */

.mat-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: 0.02em;
    background: rgba(75, 85, 99, 0.14);
    color: #374151;
    white-space: nowrap;
}

/* Status — operational state */
.mat-pill--status-in_use       { background: rgba(40, 150, 80, 0.16);  color: #2c8a4f; }
.mat-pill--status-in_storage   { background: rgba(5, 125, 205, 0.14);  color: #057dcd; }
.mat-pill--status-on_loan      { background: rgba(180, 130, 50, 0.14); color: #a36a14; }
.mat-pill--status-under_repair { background: rgba(234, 88, 12, 0.18);  color: #b4530a; }
.mat-pill--status-disposed     { background: rgba(75, 85, 99, 0.16);   color: #4b5563; }

/* Condition — physical health */
.mat-pill--cond-new      { background: rgba(40, 150, 80, 0.18);  color: #1f7a44; }
.mat-pill--cond-good     { background: rgba(40, 150, 80, 0.10);  color: #2c8a4f; }
.mat-pill--cond-fair     { background: rgba(234, 179, 8, 0.20);  color: #92660a; }
.mat-pill--cond-broken   { background: rgba(220, 38, 38, 0.16);  color: #b91c1c; }
.mat-pill--cond-retired  { background: rgba(75, 85, 99, 0.16);   color: #4b5563; }

/* Generic semantic pills used by Procurement / Maintenance */
.mat-pill--ok    { background: rgba(40, 150, 80, 0.16);  color: #2c8a4f; }
.mat-pill--warn  { background: rgba(220, 38, 38, 0.14);  color: #b91c1c; }

/* Form section headings between fieldsets in the Materials form. */
.mat-form-section {
    grid-column: 1 / -1;
    margin: 18px 0 8px;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--ink, #1e3d58);
    padding-bottom: 6px;
    border-bottom: 1px dashed rgba(5, 125, 205, 0.18);
}
.mat-form-section:first-of-type { margin-top: 4px; }

/* Polish for native date inputs used in Procurement / Maintenance.
   Default browser styling is harsh (gray "mm/dd/yyyy" placeholder, tiny
   calendar icon). We keep the native picker — fully cross-browser — but
   tint the calendar icon to match the brand and make the placeholder
   text less shouty. */
.materials-shell input[type="date"],
.materials-shell input[type="datetime-local"] {
    color: var(--ink, #1e3d58);
    cursor: pointer;
}
.materials-shell input[type="date"]::-webkit-calendar-picker-indicator,
.materials-shell input[type="datetime-local"]::-webkit-calendar-picker-indicator {
    opacity: 0.55;
    cursor: pointer;
    filter: invert(40%) sepia(72%) saturate(960%) hue-rotate(178deg) brightness(95%) contrast(95%);
    transition: opacity 0.15s ease, transform 0.15s ease;
}
.materials-shell input[type="date"]:hover::-webkit-calendar-picker-indicator,
.materials-shell input[type="datetime-local"]:hover::-webkit-calendar-picker-indicator {
    opacity: 1;
    transform: scale(1.05);
}
.materials-shell input[type="date"]::-webkit-datetime-edit-text,
.materials-shell input[type="date"]::-webkit-datetime-edit-month-field,
.materials-shell input[type="date"]::-webkit-datetime-edit-day-field,
.materials-shell input[type="date"]::-webkit-datetime-edit-year-field {
    color: rgba(30, 61, 88, 0.85);
    padding: 0 1px;
}
.materials-shell input[type="date"]:not(:focus):in-range::-webkit-datetime-edit-year-field,
.materials-shell input[type="date"]:not(:focus):in-range::-webkit-datetime-edit-month-field,
.materials-shell input[type="date"]:not(:focus):in-range::-webkit-datetime-edit-day-field {
    color: var(--ink, #1e3d58);
}

/* Number input — strip Firefox spin buttons, keep the value centered
   visually with the date inputs in the same row. */
.materials-shell input[type="number"]::-webkit-outer-spin-button,
.materials-shell input[type="number"]::-webkit-inner-spin-button {
    opacity: 0.4;
}
.materials-shell input[type="number"]:hover::-webkit-outer-spin-button,
.materials-shell input[type="number"]:hover::-webkit-inner-spin-button {
    opacity: 0.9;
}

/* Form-level group cards.
   Wraps each `.reports-form__grid` that follows a `.mat-form-section`
   in a slightly tinted panel so Procurement / Maintenance / Notes feel
   like grouped boxes instead of one continuous form blob. */
.materials-shell .reports-form .reports-form__grid {
    padding: 14px 16px;
    background: rgba(5, 125, 205, 0.04);
    border: 1px solid rgba(5, 125, 205, 0.10);
    border-radius: 14px;
    margin-bottom: 6px;
}
.materials-shell .reports-form .mat-form-section {
    /* Pull the heading out of the panel by removing its bottom border;
       the panel below provides its own visual boundary now. */
    border-bottom: none;
    margin-bottom: 6px;
    padding-bottom: 0;
    grid-column: auto;
}

/* =====================================================================
   Printable QR labels for the Materials inventory.
   The on-screen view shows a toolbar + size picker + a 4-up preview
   sheet. ``@media print`` strips everything except the labels and
   pins them to physical millimetres so the printer scales correctly.
   ===================================================================== */

.mat-print-toolbar {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 18px;
    align-items: center;
    padding: 18px 22px;
    margin-bottom: 14px;
}
.mat-print-toolbar__title { margin: 0; font-size: 1.15rem; font-weight: 700; color: var(--ink, #1e3d58); }
.mat-print-toolbar__hint  { margin: 4px 0 0; color: rgba(30, 61, 88, 0.65); font-size: 0.9rem; }
.mat-print-toolbar__actions { display: inline-flex; gap: 10px; align-items: center; flex-wrap: wrap; }

.mat-print-sizer {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 18px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}
.mat-print-sizer__label { font-weight: 700; color: var(--ink, #1e3d58); }
.mat-print-sizer__options { display: inline-flex; gap: 8px; flex-wrap: wrap; }

.mat-size-btn {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    padding: 8px 14px;
    border: 1px solid rgba(5, 125, 205, 0.20);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.7);
    color: var(--ink, #1e3d58);
    cursor: pointer;
    font: inherit;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}
.mat-size-btn span { font-size: 0.72rem; color: rgba(30, 61, 88, 0.6); }
.mat-size-btn strong { font-size: 0.9rem; }
.mat-size-btn:hover { background: rgba(5, 125, 205, 0.05); border-color: rgba(5, 125, 205, 0.35); }
.mat-size-btn.is-active {
    background: rgba(5, 125, 205, 0.12);
    border-color: var(--primary, #057dcd);
    color: var(--primary, #057dcd);
}

/* The on-screen preview sheet. Each ``.mat-label`` is rendered at the
   exact requested mm size; we just lay them out as a wrapping flex so
   you see what gets printed. */
.mat-print-sheet {
    display: flex;
    flex-wrap: wrap;
    gap: 8mm;
    padding: 8mm;
    margin-bottom: 14px;
    background: #f4f7fa;
    border-radius: 14px;
}
.mat-label {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 3mm;
    width: var(--label-w, 60mm);
    height: var(--label-h, 40mm);
    padding: 2.5mm;
    background: #fff;
    border: 1px dashed rgba(0, 0, 0, 0.35);
    border-radius: 2mm;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
    color: #111;
    box-sizing: border-box;
    overflow: hidden;
}
.mat-label__qr {
    width: 100%;
    height: 100%;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.mat-label__qr svg {
    width: 100%;
    height: 100%;
    display: block;
}
.mat-label__body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.6mm;
    min-width: 0;
    overflow: hidden;
}
.mat-label__brand {
    font-size: 1.8mm;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #057dcd;
}
.mat-label__code {
    font-family: ui-monospace, "SFMono-Regular", "Menlo", monospace;
    font-size: 4mm;
    font-weight: 800;
    color: #057dcd;
    line-height: 1;
}
.mat-label__title {
    font-size: 2.6mm;
    font-weight: 700;
    color: #111;
    line-height: 1.1;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    word-break: break-word;
}
.mat-label__sn {
    font-size: 2mm;
    color: #444;
    line-height: 1.1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.mat-label__hint {
    font-size: 1.7mm;
    color: #666;
    margin-top: auto;
    text-align: right;
}

.mat-print-tip {
    padding: 16px 22px;
}
.mat-print-tip h3 { margin: 0 0 8px; font-size: 0.95rem; color: var(--ink, #1e3d58); }
.mat-print-tip ul { margin: 0; padding-left: 20px; color: rgba(30, 61, 88, 0.8); font-size: 0.9rem; line-height: 1.55; }
.mat-print-tip li { margin-bottom: 4px; }

/* Detail-page mini QR card. Shows the QR at a comfortable scan size
   (~140 px) next to a short blurb + the print/download actions. */
.mat-card--qr { background: rgba(5, 125, 205, 0.04); }
.mat-qr-card {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 18px;
    align-items: center;
}
.mat-qr-card__img {
    display: block;
    width: 160px;
    height: 160px;
    padding: 10px;
    background: #fff;
    border: 1px solid rgba(5, 125, 205, 0.18);
    border-radius: 14px;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.mat-qr-card__img:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(5, 125, 205, 0.18);
}
.mat-qr-card__img img { width: 100%; height: 100%; display: block; }
.mat-qr-card__body { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.mat-qr-card__lead { margin: 0; line-height: 1.5; color: var(--ink, #1e3d58); }
.mat-qr-card__actions {
    list-style: none;
    margin: 0;
    padding: 0;
    display: inline-flex;
    flex-wrap: wrap;
    gap: 8px;
}

@media (max-width: 700px) {
    .mat-qr-card { grid-template-columns: 1fr; justify-items: center; text-align: center; }
}

/* The print-only ruleset. We hide every layout chrome element
   (topbar nav, toolbars, the .glass page background, page padding)
   and show the labels at *exact* mm sizes. ``size: auto`` lets
   the user choose paper in the print dialog. */
@media print {
    @page {
        margin: 6mm;
    }

    body, .container, .mat-print-shell {
        background: #fff !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    /* Hide every non-label part of the page. */
    .topbar, .topbar-nav, .topnav, header, footer,
    .no-print, .mat-print-toolbar, .mat-print-sizer, .mat-print-tip,
    .messages, .alert, nav, .glass.dashboard-hero, .navbar {
        display: none !important;
    }

    /* The 4-up sheet just becomes a normal flow with the labels in it. */
    .mat-print-sheet {
        background: transparent !important;
        padding: 0 !important;
        margin: 0 !important;
        gap: 4mm !important;
        border-radius: 0 !important;
    }
    .mat-label {
        box-shadow: none !important;
        border: 1px dashed #999 !important;
        background: #fff !important;
        page-break-inside: avoid;
    }
    /* Force the QR to print solid black even on grayscale printers. */
    .mat-label__qr svg path,
    .mat-label__qr svg rect {
        fill: #000 !important;
    }
}

/* =====================================================================
   Calendar-style date blocks (Warranty until, Maintenance dates).
   Renders the day number large with month/weekday next to it so it
   reads as a date at a glance instead of a YYYY-MM-DD line.
   ===================================================================== */

.mat-date {
    display: inline-flex;
    align-items: stretch;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 12px;
    background: rgba(5, 125, 205, 0.08);
    border: 1px solid rgba(5, 125, 205, 0.18);
    color: var(--ink, #1e3d58);
    line-height: 1.1;
}
.mat-date__day {
    font-size: 1.7rem;
    font-weight: 800;
    color: var(--primary, #057dcd);
    align-self: center;
    min-width: 2ch;
    text-align: center;
}
.mat-date__rest {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
}
.mat-date__month {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.mat-date__weekday {
    font-size: 0.72rem;
    color: rgba(30, 61, 88, 0.6);
    text-transform: capitalize;
}
.mat-date--ok {
    background: rgba(40, 150, 80, 0.10);
    border-color: rgba(40, 150, 80, 0.25);
}
.mat-date--ok .mat-date__day { color: #2c8a4f; }
.mat-date--warn {
    background: rgba(220, 38, 38, 0.08);
    border-color: rgba(220, 38, 38, 0.22);
}
.mat-date--warn .mat-date__day { color: #b91c1c; }

/* Date + status pill on the same row inside Procurement. */
.mat-date-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

/* Maintenance card uses a 2-column layout where each cell stacks
   label / date block / pill instead of using the dl rows. */
.mat-maint-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}
.mat-maint-cell {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(5, 125, 205, 0.12);
    border-radius: 12px;
}
.mat-maint-cell__label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(30, 61, 88, 0.55);
}
.mat-maint-cell__empty {
    margin: 0;
    color: rgba(30, 61, 88, 0.55);
    font-size: 0.9rem;
    font-style: italic;
}
.mat-maint-cell__pill { align-self: flex-start; }

@media (max-width: 700px) {
    .mat-maint-grid {
        grid-template-columns: 1fr;
    }
}

