/* --- Mensajes automáticos de WhatsApp --- */
[hidden] {
    display: none !important;
}

.muted {
    color: var(--text-muted);
}

.mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.text-error {
    color: var(--error);
}

/* Ajustes de componentes compartidos para esta página */
.wa-page .header-status {
    flex-wrap: wrap;
    border-left: 4px solid var(--success);
}

.wa-page .header-status .status-icon-ring {
    background: var(--success-bg);
    color: var(--success);
}

.wa-page .header-status.is-paused {
    border-left-color: #ffb020;
}

.wa-page .header-status.is-paused .status-icon-ring {
    background: rgba(255, 176, 32, 0.1);
    color: #ffb020;
}

.header-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.wa-page .summary-cards,
.wa-page .tabs-container {
    flex-wrap: wrap;
}

.wa-page .summary-card {
    min-width: 10rem;
}

.wa-page button.tab {
    font-family: inherit;
}

/* Login */
.login-view {
    min-height: calc(100vh - 6rem);
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 2.5rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}

.login-card .status-icon-ring {
    background: rgba(138, 43, 226, 0.12);
    color: var(--primary-light);
    margin: 0 auto;
}

.login-card h2 {
    text-align: center;
    font-size: 1.6rem;
}

.login-card > p.muted {
    text-align: center;
    line-height: 1.45;
}

.form-error {
    color: var(--error);
    background: var(--error-bg);
    border: 1px solid rgba(255, 23, 68, 0.2);
    padding: 0.6rem 0.8rem;
    border-radius: 8px;
    font-size: 0.9rem;
}

/* Formularios */
.input {
    width: 100%;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: var(--text-main);
    font: inherit;
    font-size: 0.95rem;
    padding: 0.6rem 0.8rem;
    transition: var(--transition);
    color-scheme: dark;
}

.input::placeholder {
    color: rgba(160, 158, 181, 0.6);
}

.input:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(138, 43, 226, 0.25);
}

.textarea {
    resize: vertical;
    min-height: 5rem;
    line-height: 1.45;
}

.input-time {
    width: auto;
    min-width: 7.5rem;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    min-width: 0;
}

.field-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.form-grid,
.messages-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

/* Botones */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.65rem 1.2rem;
    border-radius: 10px;
    border: 1px solid transparent;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-main);
    font: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.btn i {
    font-size: 1.15rem;
}

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

.btn-primary {
    background: var(--primary);
    border-color: var(--primary-light);
    box-shadow: 0 4px 15px rgba(138, 43, 226, 0.3);
}

.btn-primary:not(:disabled):hover {
    background: #9b45ec;
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.1);
}

.btn-ghost:not(:disabled):hover {
    background: rgba(255, 255, 255, 0.1);
}

.btn-ghost.active {
    border-color: var(--primary-light);
    color: var(--primary-light);
    background: rgba(138, 43, 226, 0.12);
}

.btn-danger-ghost {
    background: transparent;
    color: var(--error);
    border-color: rgba(255, 23, 68, 0.25);
}

.btn-danger-ghost:hover {
    background: var(--error-bg);
}

.btn-sm {
    padding: 0.45rem 0.8rem;
    font-size: 0.85rem;
}

.btn-icon {
    padding: 0;
    width: 2.4rem;
    height: 2.4rem;
}

.btn-block {
    width: 100%;
}

.push-right {
    margin-left: auto;
}

/* Switch */
.switch {
    position: relative;
    display: inline-flex;
    flex-shrink: 0;
    cursor: pointer;
}

.switch input {
    position: absolute;
    inset: 0;
    opacity: 0;
    margin: 0;
    cursor: pointer;
}

.switch-track {
    position: relative;
    width: 2.75rem;
    height: 1.5rem;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.15);
    transition: var(--transition);
}

.switch-track::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: calc(1.5rem - 6px);
    height: calc(1.5rem - 6px);
    border-radius: 50%;
    background: #fff;
    transition: var(--transition);
}

.switch input:checked + .switch-track {
    background: var(--success);
}

.switch input:checked + .switch-track::after {
    transform: translateX(1.25rem);
}

.switch input:focus-visible + .switch-track {
    box-shadow: 0 0 0 3px rgba(138, 43, 226, 0.4);
}

.switch-lg .switch-track {
    width: 3.5rem;
    height: 1.9rem;
}

.switch-lg .switch-track::after {
    width: calc(1.9rem - 6px);
    height: calc(1.9rem - 6px);
}

.switch-lg input:checked + .switch-track::after {
    transform: translateX(1.6rem);
}

/* Control segmentado */
.segmented {
    display: inline-flex;
    flex-shrink: 0;
    gap: 2px;
    padding: 3px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
}

.segmented-option {
    background: transparent;
    border: 0;
    border-radius: 8px;
    color: var(--text-muted);
    font: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.4rem 0.8rem;
    cursor: pointer;
    transition: var(--transition);
}

.segmented-option:hover {
    color: var(--text-main);
}

.segmented-option.active {
    background: var(--primary);
    color: #fff;
}

/* Tarjetas de sección */
.panel-card {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
}

.panel-card-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.panel-card-header > i {
    font-size: 1.5rem;
    color: var(--primary-light);
    background: rgba(138, 43, 226, 0.12);
    padding: 0.5rem;
    border-radius: 10px;
}

.panel-card-header h3 {
    font-size: 1.15rem;
    margin-bottom: 0.2rem;
}

.panel-card-header p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.form-section-header {
    margin-bottom: 0.75rem;
}

.form-section-header h4 {
    font-size: 1rem;
    margin-bottom: 0.15rem;
}

.form-section-header p {
    font-size: 0.85rem;
}

/* Días de la semana */
.day-list {
    display: flex;
    flex-direction: column;
}

.day-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.day-row:last-child {
    border-bottom: 0;
}

.day-label {
    width: 6.5rem;
    flex-shrink: 0;
    font-weight: 600;
}

.day-row.is-custom .day-label {
    color: var(--primary-light);
}

.time-range {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.time-sep {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.row-panel {
    flex-basis: 100%;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    border-left: 3px solid var(--primary-light);
}

/* Excepciones */
.exceptions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.exception-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 12px;
}

.exception-row.is-past {
    opacity: 0.6;
}

.exception-date {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.exception-date .input {
    width: auto;
}

.exception-weekday {
    min-width: 4.5rem;
    font-size: 0.85rem;
    text-transform: capitalize;
}

.exception-note {
    flex: 1;
    min-width: 10rem;
    width: auto;
}

.add-btn {
    align-self: flex-start;
}

.empty-text {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    padding: 0.15rem 0.5rem;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
    white-space: nowrap;
}

.tag-warning {
    background: rgba(255, 176, 32, 0.12);
    color: #ffb020;
}

/* Insignias */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.3rem 0.7rem;
    border-radius: 50px;
    background: rgba(138, 43, 226, 0.15);
    color: var(--primary-light);
    border: 1px solid rgba(176, 102, 255, 0.25);
    white-space: nowrap;
}

.badge.muted {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    border-color: var(--border-color);
}

.badge.warning {
    background: rgba(255, 176, 32, 0.12);
    color: #ffb020;
    border-color: rgba(255, 176, 32, 0.3);
}

/* Chats */
.chat-toolbar {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.search-box {
    position: relative;
    flex: 1;
}

.search-box i {
    position: absolute;
    left: 0.8rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-box .input {
    padding-left: 2.3rem;
}

.chat-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.chat-card {
    position: relative;
    overflow: hidden;
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    transition: var(--transition);
}

.chat-card::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 4px;
    background: var(--success);
}

.chat-card.is-disabled::before {
    background: #ffb020;
}

.chat-card.expanded {
    border-color: rgba(176, 102, 255, 0.3);
}

.chat-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    cursor: pointer;
}

.chat-card-header:hover {
    background: rgba(255, 255, 255, 0.03);
}

.chat-card-header:focus-visible {
    outline: 2px solid var(--primary-light);
    outline-offset: -2px;
}

.chat-card-header > .chevron-icon {
    font-size: 1.5rem;
    color: var(--text-muted);
}

.chat-card.expanded .chevron-icon {
    transform: rotate(90deg);
}

.chat-heading {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.chat-name {
    font-size: 1.1rem;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-id {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.chat-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-left: auto;
}

.chat-card-body {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    animation: fadeIn 0.3s ease-out;
}

.chat-card-footer {
    display: flex;
    justify-content: flex-end;
}

/* Selector de chats de WhatsApp */
.picker-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    border-color: rgba(176, 102, 255, 0.3);
    animation: fadeIn 0.3s ease-out;
}

.picker-card .panel-card-header {
    margin-bottom: 0;
}

.picker-actions {
    display: flex;
    gap: 0.5rem;
    margin-left: auto;
}

.picker-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 24rem;
    overflow-y: auto;
    padding-right: 0.25rem;
}

.picker-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1rem;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 12px;
}

.picker-row.is-unavailable {
    opacity: 0.6;
}

.picker-info {
    display: flex;
    flex: 1 1 12rem;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

.picker-info strong {
    overflow-wrap: anywhere;
}

.picker-info .chat-id {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.picker-row > :last-child {
    margin-left: auto;
}

.picker-meta {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.picker-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 0;
}

.link-btn {
    align-self: flex-start;
    background: none;
    border: 0;
    padding: 0;
    color: var(--primary-light);
    font: inherit;
    font-size: 0.9rem;
    cursor: pointer;
}

.link-btn:hover {
    text-decoration: underline;
}

/* Selector de destinatarios */
.chooser {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.chooser-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.chooser-toolbar .search-box {
    flex: 1 1 14rem;
}

.chooser-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
    gap: 0.5rem;
    max-height: 18rem;
    overflow-y: auto;
    padding-right: 0.25rem;
}

.chooser-list > .notice,
.chooser-list > .picker-status {
    grid-column: 1 / -1;
}

.chooser-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 0.8rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition);
}

.chooser-row:hover {
    background: rgba(255, 255, 255, 0.06);
}

.chooser-row.is-checked {
    border-color: rgba(176, 102, 255, 0.45);
    background: rgba(138, 43, 226, 0.12);
}

.chooser-row input {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
    accent-color: var(--primary);
}

.chooser-row:has(input:disabled) {
    opacity: 0.5;
    cursor: not-allowed;
}

.chooser-name {
    flex: 1;
    min-width: 0;
    font-size: 0.9rem;
    overflow-wrap: anywhere;
}

.chooser-count {
    font-size: 0.85rem;
}

/* Editor de mensaje */
.composer {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
}

.composer > .segmented {
    align-self: flex-start;
}

.media-block {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 12rem;
    align-items: start;
    gap: 1rem;
}

.media-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 7rem;
    padding: 0.5rem;
    border: 1px dashed rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    font-size: 0.8rem;
    text-align: center;
}

.media-preview img {
    max-width: 100%;
    max-height: 10rem;
    border-radius: 8px;
}

.send-layout {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.send-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem 1rem;
    margin-top: 1.25rem;
}

.send-hint {
    flex: 1;
    min-width: 12rem;
    font-size: 0.85rem;
}

/* Resultados de envío */
.result-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.result-row {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.6rem 0.8rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    font-size: 0.9rem;
}

.result-row > i {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.result-row.ok > i {
    color: var(--success);
}

.result-row.error > i {
    color: var(--error);
}

.result-row.pending > i {
    color: var(--text-muted);
}

.result-error {
    font-size: 0.8rem;
    overflow-wrap: anywhere;
}

.message-summary {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    white-space: pre-line;
    overflow-wrap: anywhere;
}

.toolbar-text {
    flex: 1;
    font-size: 0.9rem;
}

.list-title {
    margin-top: 0.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.badge.success {
    background: var(--success-bg);
    color: var(--success);
    border-color: rgba(0, 230, 118, 0.25);
}

.badge.danger {
    background: var(--error-bg);
    color: var(--error);
    border-color: rgba(255, 23, 68, 0.25);
}

/* Agenda */
.agenda-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

.agenda-toolbar .input {
    width: auto;
}

.agenda-caption {
    font-weight: 600;
}

.agenda-caption::first-letter {
    text-transform: uppercase;
}

.agenda-hint {
    font-size: 0.9rem;
    margin-top: -0.75rem;
}

.agenda-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.agenda-row {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(10rem, 14rem) minmax(0, 1fr);
    align-items: center;
    gap: 1rem 1.5rem;
    padding: 1.25rem 1.5rem;
    background: rgba(20, 15, 40, 0.5);
    border: 1px solid var(--border-color);
    border-radius: 16px;
}

.agenda-row::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 4px;
    background: var(--success);
}

.agenda-row.is-off {
    opacity: 0.75;
}

.agenda-row.is-off::before {
    background: rgba(255, 255, 255, 0.15);
}

.agenda-chat {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
    min-width: 0;
}

.agenda-chat strong {
    max-width: 100%;
}

.agenda-chat strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.agenda-sends {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
    gap: 1rem 1.5rem;
}

.agenda-send {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    min-width: 0;
}

.agenda-send > div {
    min-width: 0;
}

.time-chip {
    flex-shrink: 0;
    padding: 0.3rem 0.6rem;
    border-radius: 8px;
    background: var(--success-bg);
    color: var(--success);
    font-size: 0.85rem;
    font-weight: 700;
    white-space: nowrap;
}

.time-chip.despedida {
    background: rgba(176, 102, 255, 0.15);
    color: var(--primary-light);
}

.send-type {
    display: block;
    margin-bottom: 0.15rem;
    color: var(--text-muted);
    font-size: 0.75rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.send-text {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 0.9rem;
    line-height: 1.4;
    white-space: pre-line;
}

.source-tag {
    margin-top: 0.4rem;
    padding: 0.2rem 0.6rem;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    font-size: 0.75rem;
}

/* Avisos y estados vacíos */
.notice {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-radius: 12px;
    font-weight: 600;
}

.notice i {
    font-size: 1.4rem;
}

.notice.warning {
    background: rgba(255, 176, 32, 0.1);
    color: #ffb020;
    border: 1px solid rgba(255, 176, 32, 0.25);
}

.notice.error {
    background: var(--error-bg);
    color: var(--error);
    border: 1px solid rgba(255, 23, 68, 0.25);
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 3rem 1rem;
    color: var(--text-muted);
    text-align: center;
}

.empty-state i {
    font-size: 2.5rem;
}

/* Barra de guardado */
.wa-editor {
    padding-bottom: 9rem;
}

.save-bar {
    position: fixed;
    z-index: 20;
    bottom: 1.5rem;
    left: calc(280px + 4rem);
    right: 4rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem 1.5rem;
    padding: 1rem 1.5rem;
    background: rgba(30, 22, 56, 0.95);
    backdrop-filter: var(--glass-blur);
    border: 1px solid rgba(176, 102, 255, 0.35);
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
    animation: fadeIn 0.3s ease-out;
}

.save-bar.has-errors {
    border-color: rgba(255, 23, 68, 0.45);
}

.save-bar-info {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 0;
}

.save-errors {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    max-height: 6rem;
    overflow-y: auto;
    color: var(--error);
    font-size: 0.85rem;
}

.save-errors:empty {
    display: none;
}

.save-bar-actions {
    display: flex;
    gap: 0.75rem;
    margin-left: auto;
}

/* Notificación */
.toast {
    position: fixed;
    z-index: 30;
    top: 1.5rem;
    right: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    max-width: calc(100vw - 3rem);
    padding: 0.9rem 1.2rem;
    border-radius: 12px;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    font-weight: 600;
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: var(--transition);
}

.toast.visible {
    opacity: 1;
    transform: translateY(0);
}

.toast i {
    font-size: 1.4rem;
}

.toast.success {
    border-color: rgba(0, 230, 118, 0.35);
}

.toast.success i {
    color: var(--success);
}

.toast.error {
    border-color: rgba(255, 23, 68, 0.35);
}

.toast.error i {
    color: var(--error);
}

@media (max-width: 1024px) {
    .save-bar {
        left: calc(80px + 2rem);
        right: 2rem;
    }
}

@media (max-width: 768px) {
    .wa-page .header-status {
        padding: 1.25rem;
    }

    .wa-page .header-status .status-icon-ring {
        width: 48px;
        height: 48px;
    }

    .wa-page .status-text-content {
        flex: 1;
        min-width: 0;
    }

    .wa-page .status-text-content h2 {
        font-size: 1.25rem;
    }

    .wa-page .status-text-content .subtitle {
        font-size: 0.85rem;
    }

    .wa-page .top-header {
        margin-bottom: 1.5rem;
    }

    .wa-page .summary-cards {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.75rem;
        margin-bottom: 1.5rem;
    }

    .wa-page .summary-card {
        min-width: 0;
        padding: 1rem 0.5rem;
    }

    .wa-page .summary-card h3 {
        font-size: 0.75rem;
    }

    .wa-page .summary-card p {
        font-size: 1.6rem;
    }

    .wa-page .tabs-container {
        gap: 0.5rem;
        margin-bottom: 1.5rem;
    }

    .wa-page .tab {
        padding: 0.6rem 1rem;
    }

    .header-actions {
        width: 100%;
        margin-left: 0;
        justify-content: space-between;
    }

    .panel-card {
        padding: 1.25rem;
    }

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

    .agenda-sends,
    .media-block {
        grid-template-columns: minmax(0, 1fr);
    }

    .day-label {
        width: 100%;
    }

    .time-range {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
        width: 100%;
    }

    .input-time {
        width: 100%;
        min-width: 0;
        padding: 0.6rem;
        font-size: 0.85rem;
    }

    .exception-row {
        padding: 0.75rem 0.6rem;
    }

    .chat-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .chat-card-header {
        flex-wrap: wrap;
        padding: 1rem 1.25rem;
    }

    .chat-heading {
        flex: 1;
    }

    .chat-badges {
        order: 3;
        flex-basis: 100%;
        justify-content: flex-start;
        margin-left: 0;
    }

    .chat-card-body {
        padding: 1.25rem;
    }

    .agenda-row {
        grid-template-columns: minmax(0, 1fr);
        padding: 1rem 1.25rem;
    }

    .save-bar {
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
        padding: 0.9rem 1rem;
    }

    .save-bar-actions {
        width: 100%;
    }

    .save-bar-actions .btn {
        flex: 1 1 auto;
        padding: 0.65rem 0.75rem;
    }
}
