.messaging-panel { max-width: 1180px; color: var(--text-primary, #172033); }
.messaging-panel h1 { font-size: 26px; font-weight: 700; margin: 0 0 18px; }
.messaging-panel [hidden], #navMessaging[hidden] { display: none !important; }
.msg-tabs { display: flex; gap: 24px; border-bottom: 1px solid #cbd5e1; margin-bottom: 24px; }
.msg-tabs button { border: 0; border-bottom: 3px solid transparent; padding: 12px 0; color: inherit; background: transparent; font: inherit; cursor: pointer; }
.msg-tabs button[aria-selected=true] { color: #00236f; border-bottom-color: #00236f; font-weight: 700; }
.msg-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.messaging-panel fieldset { min-width: 0; border: 1px solid #cbd5e1; border-radius: 8px; padding: 22px; margin: 0 0 20px; }
.messaging-panel legend { font-size: 17px; font-weight: 700; padding: 0 8px; }
.messaging-panel label { display: block; font-size: 13px; font-weight: 600; margin: 0 0 16px; }
.messaging-panel input:not([type=checkbox]), .messaging-panel select, .messaging-panel textarea { width: 100%; display: block; margin-top: 6px; padding: 10px 12px; border: 1px solid #94a3b8; border-radius: 6px; font: inherit; color: inherit; background: var(--bg-card, #fff); box-sizing: border-box; }
.messaging-panel textarea { min-height: 180px; resize: vertical; line-height: 1.6; }
.messaging-panel input[type=checkbox] { margin-right: 8px; accent-color: #00236f; }
.messaging-panel button { font: inherit; cursor: pointer; }
.msg-primary { background: #00236f; color: #fff; border: 1px solid #00236f; padding: 10px 18px; border-radius: 6px; font-weight: 600 !important; }
.msg-secondary { background: var(--bg-card, #fff); color: inherit; border: 1px solid #94a3b8; padding: 9px 14px; border-radius: 6px; }
.messaging-panel button:disabled { opacity: .55; cursor: wait; }
.messaging-panel :focus-visible { outline: 3px solid #0d9488; outline-offset: 3px; }
.msg-hint { color: var(--text-secondary, #475569); font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.msg-feedback { min-height: 24px; color: #006a61; margin: 16px 0; overflow-wrap: anywhere; }
.msg-error { color: #b91c1c; }
.msg-status-row { display: flex; align-items: center; gap: 10px; margin: 12px 0 16px; padding: 10px 12px; border-radius: 6px; background: var(--bg-subtle, #f8fafc); border: 1px solid #cbd5e1; }
.msg-status-label { font-size: 13px; font-weight: 600; color: var(--text-primary, #172033); }
.msg-status-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.msg-status-badge.connected { background: #dcfce7; color: #166534; border: 1px solid #86efac; }
.msg-status-badge.disconnected { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.msg-status-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: currentColor; }
.msg-inline { display: flex; gap: 12px; align-items: end; flex-wrap: wrap; }
.msg-inline label { flex: 1 1 180px; }
.msg-inline button { margin-bottom: 16px; }
#msgQr { display: block; width: 240px; height: 240px; max-width: 100%; margin: 16px 0; background: white; }
.msg-table-wrap { overflow-x: auto; }
.messaging-panel table { width: 100%; border-collapse: collapse; font-size: 13px; }
.messaging-panel th, .messaging-panel td { text-align: left; padding: 12px 10px; border-bottom: 1px solid #cbd5e1; vertical-align: middle; }
.messaging-panel th { font-weight: 700; color: var(--text-secondary, #475569); }
.messaging-panel dialog { max-width: 460px; width: calc(100% - 48px); padding: 24px; border: 1px solid #94a3b8; border-radius: 10px; color: inherit; background: var(--bg-card, white); }
.messaging-panel dialog::backdrop { background: #0f172a80; }
@media (max-width: 760px) { .msg-grid { grid-template-columns: minmax(0, 1fr); gap: 0; } .messaging-panel fieldset { padding: 16px; } .msg-tabs { gap: 20px; } }
@media (max-width: 540px) { #msgTest { display: flex; flex-direction: column; align-items: stretch; } #msgTest label { flex: none; } #msgTest button { align-self: flex-start; } }
