* {
    box-sizing: border-box;
}

:root {
    --bg: #020617;
    --bg-soft: #07111f;
    --panel: #0f172a;
    --panel-2: #111827;
    --panel-3: #1e293b;
    --card: rgba(15, 23, 42, 0.88);
    --card-soft: rgba(2, 6, 23, 0.55);
    --topbar: rgba(2, 6, 23, 0.90);
    --sidebar: rgba(15, 23, 42, 0.78);
    --field-bg: #020617;
    --line: rgba(148, 163, 184, 0.22);
    --line-strong: #334155;
    --muted: #94a3b8;
    --text: #f8fafc;
    --soft: #cbd5e1;
    --chip-text: #dbeafe;
    --blue: #2563eb;
    --cyan: #06b6d4;
    --green: #22c55e;
    --red: #ef4444;
    --yellow: #facc15;
    --shadow: rgba(0, 0, 0, 0.30);
}

html.theme-light {
    --bg: #eef3f9;
    --bg-soft: #e4ecf6;
    --panel: #f7f9fc;
    --panel-2: #edf2f8;
    --panel-3: #d9e3f0;
    --card: rgba(247, 249, 252, 0.96);
    --card-soft: rgba(241, 246, 252, 0.98);
    --topbar: rgba(245, 248, 252, 0.96);
    --sidebar: rgba(238, 244, 251, 0.96);
    --field-bg: #f8fafc;
    --line: rgba(30, 41, 59, 0.16);
    --line-strong: #b8c7d9;
    --muted: #52657e;
    --text: #071226;
    --soft: #24364d;
    --chip-text: #0f3a7c;
    --shadow: rgba(15, 23, 42, 0.10);
}

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
}

body {
    overflow-x: hidden;
}

button,
input,
textarea,
select {
    font-family: inherit;
}

a {
    color: inherit;
}

.mired-empty-layout {
    min-height: 100vh;
    background: var(--bg);
}

/* LOGIN */
.mired-login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    background: radial-gradient(circle at top left, rgba(37, 99, 235, 0.28), transparent 34%), radial-gradient(circle at bottom right, rgba(14, 165, 233, 0.18), transparent 32%), #020617;
}

.mired-login-shell {
    width: min(980px, 100%);
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 28px;
    align-items: stretch;
}

.mired-login-brand {
    border: 1px solid var(--line);
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.86));
    border-radius: 28px;
    padding: 42px;
    color: var(--text);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.mired-logo-dot {
    width: 62px;
    height: 62px;
    border-radius: 20px;
    display: grid;
    place-items: center;
    font-weight: 900;
    font-size: 28px;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 18px 45px rgba(37, 99, 235, 0.42);
    margin-bottom: 24px;
}

.mired-login-brand h1 {
    font-size: 52px;
    line-height: 1;
    margin: 0 0 16px 0;
    font-weight: 800;
}

.mired-login-brand p {
    color: var(--soft);
    font-size: 18px;
    max-width: 520px;
    margin: 0;
}

.mired-brand-points {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 32px;
}

.mired-brand-points span,
.mired-chip {
    padding: 9px 13px;
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.12);
    border: 1px solid rgba(96, 165, 250, 0.28);
    color: var(--chip-text);
    font-size: 13px;
}

.mired-login-card {
    border: 1px solid var(--line);
    background: var(--card);
    border-radius: 28px;
    padding: 34px;
    color: var(--text);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
}

.mired-card-header h2 {
    margin: 0;
    font-size: 30px;
    font-weight: 800;
}

.mired-card-header p {
    margin: 8px 0 24px 0;
    color: var(--muted);
}

.mired-field {
    margin-bottom: 18px;
}

.mired-field label {
    display: block;
    color: var(--soft);
    font-size: 14px;
    margin-bottom: 8px;
}

.mired-field input,
.mired-field textarea,
.mired-field select {
    width: 100%;
    min-height: 46px;
    border-radius: 14px;
    border: 1px solid var(--line-strong);
    background: var(--field-bg);
    color: var(--text);
    padding: 0 14px;
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.mired-field textarea {
    min-height: 108px;
    padding: 14px;
    resize: vertical;
}

.mired-field input:focus,
.mired-field textarea:focus,
.mired-field select:focus {
    border-color: #38bdf8;
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.14);
}

.mired-field input:disabled,
.mired-field textarea:disabled,
.mired-field select:disabled {
    opacity: 0.65;
}

.mired-login-button,
.mired-primary-button {
    width: 100%;
    min-height: 48px;
    border: 0;
    border-radius: 15px;
    background: linear-gradient(135deg, var(--blue), #0284c7);
    color: var(--text);
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 18px 40px rgba(37, 99, 235, 0.34);
}

.mired-login-button:disabled,
.mired-primary-button:disabled {
    cursor: not-allowed;
    opacity: 0.72;
}

.mired-secondary-button,
.mired-ghost-button {
    min-height: 40px;
    border-radius: 13px;
    border: 1px solid rgba(148, 163, 184, 0.26);
    background: var(--card);
    color: var(--text);
    padding: 0 16px;
    font-weight: 700;
    cursor: pointer;
}

.mired-ghost-button {
    background: transparent;
}

.mired-spinner {
    width: 17px;
    height: 17px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: var(--text);
    animation: mired-spin 0.75s linear infinite;
}

@keyframes mired-spin {
    to { transform: rotate(360deg); }
}

.mired-alert {
    padding: 12px 14px;
    border-radius: 14px;
    margin-bottom: 18px;
    font-size: 14px;
}

.mired-alert.error {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(248, 113, 113, 0.35);
    color: #fecaca;
}

.mired-alert.success {
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(74, 222, 128, 0.35);
    color: #bbf7d0;
}

.mired-alert.info {
    background: rgba(59, 130, 246, 0.12);
    border: 1px solid rgba(96, 165, 250, 0.30);
    color: #bfdbfe;
}

.mired-login-footer {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid rgba(148, 163, 184, 0.16);
    text-align: center;
}

.mired-login-footer p {
    margin: 0;
    color: var(--text);
    font-weight: 700;
}

.mired-login-footer span {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    font-size: 13px;
}

/* APP LAYOUT */
.mired-app-page {
    min-height: 100vh;
    background: radial-gradient(circle at top left, rgba(37, 99, 235, 0.16), transparent 32%), var(--bg);
    color: var(--text);
}

.mired-topbar {
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    border-bottom: 1px solid var(--line);
    background: var(--topbar);
    backdrop-filter: blur(14px);
    position: sticky;
    top: 0;
    z-index: 10;
}

.mired-brand-inline {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 900;
    font-size: 20px;
}

.mired-brand-inline .dot {
    width: 38px;
    height: 38px;
    border-radius: 13px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.30);
}

.mired-top-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mired-shell {
    display: grid;
    grid-template-columns: 270px 1fr;
    min-height: calc(100vh - 68px);
}

.mired-sidebar {
    padding: 22px;
    border-right: 1px solid var(--line);
    background: var(--sidebar);
}

.mired-nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 14px;
    border-radius: 16px;
    color: var(--chip-text);
    text-decoration: none;
    font-weight: 700;
    margin-bottom: 8px;
    border: 1px solid transparent;
}

.mired-nav-link:hover,
.mired-nav-link.active {
    background: rgba(37, 99, 235, 0.16);
    border-color: rgba(96, 165, 250, 0.24);
}

.mired-content {
    padding: 30px;
}

.mired-page-title {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.mired-page-title h1 {
    margin: 0;
    font-size: 34px;
    font-weight: 900;
}

.mired-page-title p {
    margin: 6px 0 0 0;
    color: var(--muted);
}

.mired-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.mired-two-col {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) 360px;
    gap: 18px;
}

.mired-card {
    border: 1px solid var(--line);
    background: var(--card);
    border-radius: 24px;
    padding: 22px;
    box-shadow: 0 20px 55px var(--shadow);
}

.mired-card h2,
.mired-card h3 {
    margin-top: 0;
}

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

.mired-kpi {
    font-size: 34px;
    font-weight: 900;
    margin: 8px 0 0 0;
}

.mired-community-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.mired-community-card,
.mired-post-card {
    border: 1px solid rgba(148, 163, 184, 0.20);
    background: var(--card-soft);
    border-radius: 20px;
    padding: 18px;
}

.mired-community-card h3,
.mired-post-card h3 {
    margin: 0 0 8px 0;
}

.mired-card-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 16px;
}

.mired-post-composer {
    margin-bottom: 18px;
}

.mired-post-meta {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 10px;
}

.mired-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 260px;
    color: var(--soft);
}

@media (max-width: 1020px) {
    .mired-shell {
        grid-template-columns: 1fr;
    }

    .mired-sidebar {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .mired-two-col,
    .mired-grid,
    .mired-community-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .mired-login-shell {
        grid-template-columns: 1fr;
    }

    .mired-login-brand {
        display: none;
    }

    .mired-login-card {
        padding: 26px;
    }
}


/* BRAND / LOGO */
.mired-brand-logo {
    width: 42px;
    height: 42px;
    border-radius: 0;
    object-fit: contain;
    background: transparent;
    box-shadow: none;
}

.mired-login-logo {
    width: 84px;
    height: 84px;
    border-radius: 0;
    object-fit: contain;
    background: transparent;
    box-shadow: none;
    margin-bottom: 24px;
}

.mired-card-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.mired-chip.success {
    background: rgba(34, 197, 94, 0.12);
    border-color: rgba(74, 222, 128, 0.35);
    color: #bbf7d0;
}

.mired-tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.mired-tab {
    min-height: 40px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    background: var(--card-soft);
    color: var(--soft);
    padding: 0 16px;
    font-weight: 800;
    cursor: pointer;
}

.mired-tab.active {
    background: rgba(37, 99, 235, 0.22);
    border-color: rgba(96, 165, 250, 0.45);
    color: var(--text);
}

.mired-profile-header {
    display: flex;
    align-items: center;
    gap: 18px;
}

.mired-avatar-large {
    width: 96px;
    height: 96px;
    border-radius: 28px;
    overflow: hidden;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    color: var(--text);
    font-size: 32px;
    font-weight: 900;
    box-shadow: 0 18px 45px rgba(37, 99, 235, 0.30);
}

.mired-avatar-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

@media (max-width: 760px) {
    .mired-profile-header,
    .mired-card-title-row {
        align-items: flex-start;
        flex-direction: column;
    }

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


/* WPF-inspired polish + theme */
.mired-topbar,
.mired-sidebar,
.mired-card,
.mired-community-card,
.mired-post-card,
.mired-login-card,
.mired-login-brand {
    border-color: var(--line);
}

.mired-app-page {
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.13), transparent 30%),
        linear-gradient(180deg, var(--bg), var(--bg-soft));
}

html.theme-light .mired-app-page,
html.theme-light .mired-empty-layout,
html.theme-light .mired-login-page {
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.12), transparent 28%),
        linear-gradient(180deg, #f8fbff, #edf4ff);
}

html.theme-light .mired-login-brand,
html.theme-light .mired-login-card,
html.theme-light .mired-card,
html.theme-light .mired-community-card,
html.theme-light .mired-post-card {
    background: var(--card);
    color: var(--text);
}

html.theme-light .mired-field input,
html.theme-light .mired-field textarea,
html.theme-light .mired-field select {
    background: var(--field-bg);
    color: var(--text);
}

html.theme-light .mired-secondary-button,
html.theme-light .mired-ghost-button,
html.theme-light .mired-tab {
    background: rgba(255, 255, 255, 0.82);
    color: var(--text);
}

html.theme-light .mired-nav-link {
    color: #1e3a8a;
}

.mired-theme-button {
    min-height: 40px;
    border-radius: 13px;
    border: 1px solid rgba(96, 165, 250, 0.32);
    background: rgba(37, 99, 235, 0.12);
    color: var(--text);
    padding: 0 14px;
    font-weight: 800;
    cursor: pointer;
}

.mired-theme-button:hover,
.mired-secondary-button:hover,
.mired-ghost-button:hover,
.mired-tab:hover {
    border-color: rgba(56, 189, 248, 0.60);
    transform: translateY(-1px);
}

.mired-public-id,
.mired-private-id {
    display: none !important;
}

.mired-icon-clean {
    background: transparent !important;
    box-shadow: none !important;
}

/* Mi Red refinamiento WPF + modo claro mate */
:root {
    --enter-blue: #155bd4;
    --leave-red: #911409;
    --wpf-cyan: #67e8f9;
    --wpf-panel: #172033;
    --wpf-panel-dark: #0b1220;
    --wpf-border: #263555;
}

html.theme-light .mired-app-page,
html.theme-light .mired-empty-layout,
html.theme-light .mired-login-page {
    background:
        radial-gradient(circle at top left, rgba(21, 91, 212, 0.12), transparent 30%),
        linear-gradient(180deg, #eef3f9, #e5edf7);
}

html.theme-light .mired-card,
html.theme-light .mired-community-card,
html.theme-light .mired-post-card,
html.theme-light .mired-sidebar,
html.theme-light .mired-topbar {
    box-shadow: 0 18px 46px rgba(15, 23, 42, 0.08);
}

html.theme-light .mired-muted,
html.theme-light .mired-page-title p,
html.theme-light .mired-card p {
    color: #52657e;
}

html.theme-light .mired-brand-logo,
html.theme-light .mired-login-logo {
    filter: brightness(0) saturate(100%) invert(13%) sepia(33%) saturate(1370%) hue-rotate(180deg) brightness(88%) contrast(94%);
}

.mired-brand-logo,
.mired-login-logo {
    background: transparent !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.mired-two-col.mired-feed-home {
    grid-template-columns: 1fr;
}

.mired-mvp-card {
    display: none !important;
}

.mired-community-list.compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mired-community-card.wpf-card {
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 16px;
    min-height: 162px;
    border: 1px solid var(--wpf-border);
    background:
        linear-gradient(145deg, rgba(23, 32, 51, 0.86), rgba(11, 18, 32, 0.92));
    border-radius: 18px;
    padding: 18px;
    overflow: hidden;
}

html.theme-light .mired-community-card.wpf-card {
    background:
        linear-gradient(145deg, rgba(248, 250, 252, 0.98), rgba(232, 239, 249, 0.94));
    border-color: rgba(21, 91, 212, 0.18);
}

.mired-community-card.wpf-card::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(circle at top right, rgba(21, 91, 212, 0.18), transparent 34%);
}

.mired-community-icon {
    width: 54px;
    height: 54px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    background: #0f766e;
    border: 1px solid rgba(103, 232, 249, 0.22);
    font-size: 25px;
    box-shadow: 0 14px 34px rgba(15, 118, 110, 0.22);
    z-index: 1;
}

.mired-community-body {
    min-width: 0;
    z-index: 1;
}

.mired-community-card.wpf-card h3 {
    margin: 0 0 5px 0;
    font-size: 24px;
    line-height: 1.12;
    letter-spacing: -0.02em;
}

.mired-community-meta {
    color: var(--wpf-cyan);
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 8px;
}

html.theme-light .mired-community-meta {
    color: #155bd4;
}

.mired-community-description {
    color: var(--soft);
    margin: 0 0 14px 0;
    min-height: 38px;
}

.mired-community-card.wpf-card .mired-brand-points {
    margin-top: 0;
}

.mired-card-actions.wpf-actions {
    align-items: center;
    margin-top: 14px;
}

.mired-action-button {
    min-height: 38px;
    border-radius: 12px;
    padding: 0 16px;
    font-weight: 850;
    cursor: pointer;
    transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.mired-action-button:hover {
    transform: translateY(-1px);
}

.mired-action-enter {
    border: 1.5px solid var(--enter-blue);
    background: rgba(21, 91, 212, 0.14);
    color: #dbeafe;
}

html.theme-light .mired-action-enter {
    background: rgba(21, 91, 212, 0.08);
    color: #0b3486;
}

.mired-action-join {
    border: 1.5px solid var(--enter-blue);
    background: linear-gradient(135deg, #155bd4, #0e91d8);
    color: white;
    box-shadow: 0 12px 26px rgba(21, 91, 212, 0.24);
}

.mired-action-leave {
    border: 1.5px solid var(--leave-red);
    background: rgba(145, 20, 9, 0.10);
    color: #fecaca;
}

html.theme-light .mired-action-leave {
    background: rgba(145, 20, 9, 0.05);
    color: #7f1d1d;
}

.mired-member-pill {
    position: absolute;
    right: 18px;
    top: 18px;
    z-index: 2;
    padding: 7px 12px;
    border-radius: 999px;
    color: #bbf7d0;
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(74, 222, 128, 0.34);
    font-size: 12px;
    font-weight: 800;
}

html.theme-light .mired-member-pill {
    color: #166534;
    background: rgba(34, 197, 94, 0.10);
}

.mired-kpi-card {
    min-height: 116px;
}

.mired-community-detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 18px;
}

.mired-wpf-community-header {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 16px;
    align-items: center;
    margin-bottom: 18px;
    border: 1px solid var(--wpf-border);
    background: linear-gradient(145deg, rgba(23, 32, 51, 0.86), rgba(11, 18, 32, 0.92));
    border-radius: 18px;
    padding: 18px;
}

html.theme-light .mired-wpf-community-header {
    background: linear-gradient(145deg, rgba(248, 250, 252, 0.98), rgba(232, 239, 249, 0.94));
    border-color: rgba(21, 91, 212, 0.18);
}

.mired-wpf-community-header h1 {
    margin: 0;
    font-size: 30px;
}

.mired-wpf-composer {
    border: 1px solid var(--wpf-border);
    background: var(--card);
    border-radius: 18px;
    padding: 16px;
    margin-bottom: 16px;
}

.mired-composer-row {
    display: grid;
    grid-template-columns: 48px 1fr;
    gap: 14px;
}

.mired-mini-avatar {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    background: #0f766e;
    display: grid;
    place-items: center;
    color: white;
    font-weight: 900;
}

.mired-post-card.wpf-post {
    background: rgba(23, 32, 51, 0.80);
    border-color: var(--wpf-border);
}

html.theme-light .mired-post-card.wpf-post {
    background: rgba(248, 250, 252, 0.98);
    border-color: rgba(21, 91, 212, 0.14);
}

.mired-side-action-list {
    display: grid;
    gap: 14px;
    margin-top: 16px;
}

.mired-side-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: var(--card-soft);
    padding: 12px 14px;
}

.mired-side-icon {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    font-size: 20px;
}

@media (max-width: 1020px) {
    .mired-community-detail-grid,
    .mired-two-col.mired-feed-home,
    .mired-community-list.compact {
        grid-template-columns: 1fr;
    }

    .mired-wpf-community-header {
        grid-template-columns: auto 1fr;
    }

    .mired-wpf-community-header .mired-card-actions {
        grid-column: 1 / -1;
    }
}

/* Community interaction layer: reactions, comments, attachments */
.mired-wpf-composer .mired-primary-button,
.mired-publish-small {
    width: auto;
    min-width: 132px;
    min-height: 36px;
    border-radius: 12px;
    padding: 0 20px;
    margin-left: auto;
    border: 1.5px solid #0891b2;
    background: transparent;
    color: var(--text);
    box-shadow: none;
    font-weight: 850;
    cursor: pointer;
}

.mired-publish-small:hover {
    border-color: #67e8f9;
    background: rgba(8, 145, 178, 0.14);
}

.mired-publish-small:disabled {
    opacity: .65;
    cursor: not-allowed;
}

.mired-composer-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
}

.mired-attach-button {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    background: transparent;
    color: var(--soft);
    padding: 0 12px;
    font-weight: 800;
    cursor: pointer;
}

.mired-attach-button:hover {
    border-color: rgba(103, 232, 249, .55);
    color: var(--text);
}

.mired-attach-button input {
    display: none;
}

.mired-attach-button img {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

.mired-mini-avatar,
.mired-post-avatar,
.mired-comment-avatar {
    overflow: hidden;
}

.mired-mini-avatar img,
.mired-post-avatar img,
.mired-comment-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mired-post-header {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 12px;
}

.mired-post-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mired-post-avatar {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    background: #0f766e;
    color: white;
    display: grid;
    place-items: center;
    font-weight: 900;
    flex: 0 0 auto;
}

.mired-post-author strong {
    display: block;
    color: var(--text);
}

.mired-post-author span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    margin-top: 2px;
}

.mired-post-content {
    color: var(--text);
    white-space: pre-wrap;
    margin: 12px 0 0 0;
    line-height: 1.5;
}

.mired-reaction-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.mired-reaction-button {
    min-height: 38px;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: transparent;
    color: var(--text);
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-weight: 850;
    cursor: pointer;
}

.mired-reaction-button:hover,
.mired-reaction-button.active {
    border-color: rgba(103, 232, 249, 0.55);
    background: rgba(59, 130, 246, 0.12);
}

.mired-reaction-button img {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

.mired-reaction-button strong {
    color: var(--soft);
    margin-left: 1px;
}

.mired-attachments-list,
.mired-pending-files {
    margin-top: 14px;
    display: grid;
    gap: 10px;
}

.mired-pending-files {
    padding: 12px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: var(--card-soft);
}

.mired-pending-file,
.mired-attachment-card {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.38);
}

html.theme-light .mired-pending-file,
html.theme-light .mired-attachment-card {
    background: rgba(248, 250, 252, 0.72);
}

.mired-pending-file strong,
.mired-attachment-card strong {
    display: block;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mired-pending-file span,
.mired-attachment-card span,
.mired-attachment-info span {
    color: var(--muted);
    font-size: 12px;
}

.mired-file-icon {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    font-size: 23px;
}

.mired-file-icon.image-backed img,
.mired-side-icon img {
    width: 26px;
    height: 26px;
    object-fit: contain;
}

.mired-attachment-info {
    min-width: 0;
}

.mired-attachment-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.mired-attachment-actions .mired-action-button {
    min-height: 34px;
    padding: 0 12px;
    font-size: 13px;
}

.mired-preview-box {
    margin-top: 14px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.48);
    padding: 12px;
}

html.theme-light .mired-preview-box {
    background: rgba(248, 250, 252, 0.80);
}

.mired-preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.mired-preview-box img,
.mired-preview-box video,
.mired-preview-box iframe {
    width: 100%;
    max-height: 460px;
    border: 0;
    border-radius: 12px;
    object-fit: contain;
    background: #020617;
}

.mired-preview-box iframe {
    height: 520px;
}

.mired-icon-button {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: transparent;
    color: var(--text);
    display: grid;
    place-items: center;
    cursor: pointer;
    font-weight: 900;
}

.mired-icon-button.danger {
    border-color: rgba(145, 20, 9, .50);
    color: #fecaca;
}

html.theme-light .mired-icon-button.danger {
    color: #7f1d1d;
}

.mired-comments-box {
    margin-top: 14px;
    border: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.38);
    border-radius: 16px;
    padding: 12px;
}

html.theme-light .mired-comments-box {
    background: rgba(248, 250, 252, 0.70);
}

.mired-comment-row {
    display: grid;
    grid-template-columns: 34px 1fr;
    gap: 10px;
    margin-bottom: 10px;
}

.mired-comment-avatar {
    width: 30px;
    height: 30px;
    border-radius: 999px;
    background: #334155;
    color: white;
    display: grid;
    place-items: center;
    font-size: 11px;
    font-weight: 900;
}

.mired-comment-avatar.current {
    background: #0f766e;
}

.mired-comment-body {
    border-radius: 12px;
    background: var(--panel);
    padding: 9px 11px;
}

html.theme-light .mired-comment-body {
    background: #edf4ff;
}

.mired-comment-body > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.mired-comment-body strong {
    color: var(--text);
}

.mired-comment-body span {
    color: var(--muted);
    font-size: 11px;
}

.mired-comment-body p {
    margin: 5px 0 0 0;
    color: var(--soft);
}

.mired-new-comment-row {
    display: grid;
    grid-template-columns: 34px 1fr auto;
    gap: 10px;
    align-items: center;
    margin-top: 12px;
}

.mired-new-comment-row input {
    min-height: 38px;
    border-radius: 13px;
    border: 1px solid var(--line-strong);
    background: var(--field-bg);
    color: var(--text);
    padding: 0 12px;
    outline: none;
}

.mired-comment-button {
    min-height: 38px;
    border-radius: 12px;
    border: 1.5px solid #fca23a;
    background: transparent;
    color: var(--text);
    padding: 0 14px;
    font-weight: 850;
    cursor: pointer;
}

.mired-comment-button:hover {
    background: rgba(252, 162, 58, .12);
}

.mired-side-icon img {
    display: block;
}

html.theme-light .mired-side-icon img,
html.theme-light .mired-attach-button img,
html.theme-light .mired-file-icon.image-backed img,
html.theme-light .mired-reaction-button img {
    filter: none;
}

@media (max-width: 760px) {
    .mired-composer-row,
    .mired-new-comment-row,
    .mired-attachment-card,
    .mired-pending-file {
        grid-template-columns: 1fr;
    }

    .mired-composer-actions,
    .mired-attachment-actions {
        justify-content: flex-start;
    }
}

/* Inline media rendering for Mi Red Web */
.mired-alert.info {
    background: rgba(14, 165, 233, .12);
    border-color: rgba(14, 165, 233, .35);
    color: var(--soft);
}

.mired-inline-image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
    margin: 14px 0 4px;
}

.mired-inline-image-button {
    border: 1px solid var(--line);
    background: var(--field-bg);
    border-radius: 16px;
    padding: 0;
    overflow: hidden;
    min-height: 220px;
    cursor: pointer;
    box-shadow: var(--shadow-soft);
}

.mired-inline-image-button img {
    width: 100%;
    height: 100%;
    max-height: 440px;
    object-fit: cover;
    display: block;
}

.mired-inline-image-button:hover {
    border-color: var(--accent);
    transform: translateY(-1px);
}

.mired-preview-box img {
    max-height: 70vh;
    object-fit: contain;
    background: #020617;
}

html.theme-light .mired-preview-box img {
    background: #e5edf7;
}

/* Menús de acciones, edición y paneles premium */
.mired-menu-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.mired-dots-button {
    width: 36px;
    height: 34px;
    border-radius: 12px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--muted);
    font-size: 20px;
    font-weight: 900;
    cursor: pointer;
    display: grid;
    place-items: center;
}

.mired-dots-button:hover {
    border-color: var(--line-strong);
    background: rgba(59, 130, 246, .10);
    color: var(--text);
}

.mired-dots-button.compact {
    width: 28px;
    height: 28px;
    font-size: 15px;
}

.mired-floating-menu {
    position: absolute;
    top: 38px;
    right: 0;
    z-index: 25;
    min-width: 190px;
    border-radius: 14px;
    border: 1px solid var(--line-strong);
    background: var(--card);
    box-shadow: var(--shadow);
    padding: 8px;
}

.mired-floating-menu.compact {
    min-width: 140px;
    top: 30px;
}

.mired-floating-menu button {
    width: 100%;
    min-height: 34px;
    display: flex;
    align-items: center;
    gap: 9px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--text);
    font-weight: 760;
    cursor: pointer;
    padding: 7px 9px;
    text-align: left;
}

.mired-floating-menu button:hover {
    background: rgba(59, 130, 246, .14);
}

.mired-floating-menu button.danger {
    color: #fecaca;
}

html.theme-light .mired-floating-menu button.danger {
    color: #911409;
}

.mired-inline-editor,
.mired-inline-comment-editor {
    margin-top: 14px;
    border-radius: 15px;
    border: 1px solid var(--line);
    background: rgba(2, 6, 23, .30);
    padding: 12px;
}

html.theme-light .mired-inline-editor,
html.theme-light .mired-inline-comment-editor {
    background: rgba(237, 244, 255, .82);
}

.mired-inline-editor textarea {
    width: 100%;
    min-height: 92px;
    border-radius: 13px;
    border: 1px solid var(--line-strong);
    background: var(--field-bg);
    color: var(--text);
    padding: 12px;
    outline: none;
    resize: vertical;
}

.mired-inline-editor > div,
.mired-inline-comment-editor {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.mired-inline-editor > div {
    margin-top: 10px;
}

.mired-inline-comment-editor input {
    flex: 1;
    min-width: 220px;
    min-height: 36px;
    border-radius: 12px;
    border: 1px solid var(--line-strong);
    background: var(--field-bg);
    color: var(--text);
    padding: 0 12px;
    outline: none;
}

.mired-comment-button.ghost {
    border-color: var(--line-strong);
}

.mired-comment-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.mired-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: grid;
    place-items: center;
    padding: 22px;
    background: rgba(2, 6, 23, .72);
    backdrop-filter: blur(12px);
}

.mired-modal-card {
    width: min(560px, 100%);
    max-height: min(760px, calc(100vh - 44px));
    overflow: auto;
    border-radius: 24px;
    border: 1px solid var(--line-strong);
    background: var(--card);
    color: var(--text);
    box-shadow: var(--shadow);
    padding: 22px;
}

.mired-modal-card.summary {
    width: min(720px, 100%);
}

.mired-modal-card.forgot {
    width: min(460px, 100%);
}

.mired-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.mired-modal-header h2 {
    margin: 0;
    font-size: 28px;
}

.mired-modal-header p {
    margin: 5px 0 0;
    color: var(--muted);
}

.mired-forgot-button {
    width: 100%;
    min-height: 38px;
    margin-top: 10px;
    border: 0;
    background: transparent;
    color: var(--accent);
    font-weight: 850;
    cursor: pointer;
}

.mired-summary-section {
    margin-top: 16px;
}

.mired-summary-section h3 {
    color: var(--accent-soft);
    font-size: 16px;
    margin: 0 0 10px;
}

.mired-summary-list {
    display: grid;
    gap: 10px;
}

.mired-summary-row {
    width: 100%;
    display: grid;
    grid-template-columns: 38px 1fr auto auto;
    gap: 12px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--panel);
    padding: 12px;
    color: var(--text);
    text-align: left;
}

.mired-summary-row.button-row {
    cursor: pointer;
}

.mired-summary-row.button-row:hover {
    border-color: var(--accent);
    transform: translateY(-1px);
}

.mired-summary-row img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.mired-summary-row div {
    min-width: 0;
}

.mired-summary-row strong {
    display: block;
    color: var(--text);
    font-weight: 850;
}

.mired-summary-row span,
.mired-summary-row small {
    display: block;
    color: var(--muted);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mired-summary-row em {
    min-width: 34px;
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(21, 91, 212, .16);
    border: 1px solid rgba(21, 91, 212, .35);
    color: var(--text);
    font-style: normal;
    font-weight: 900;
    text-align: center;
}

.mired-at-symbol {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: grid !important;
    place-items: center;
    border: 1px solid var(--accent);
    color: var(--accent-soft) !important;
}

.mired-action-danger {
    border-color: #911409 !important;
    color: #fecaca !important;
    background: rgba(145, 20, 9, .12) !important;
}

html.theme-light .mired-action-danger {
    color: #7f1d1d !important;
}

.mired-side-action.clickable {
    width: 100%;
    cursor: pointer;
    text-align: left;
}

.mired-side-action.clickable:hover {
    border-color: var(--accent);
    background: rgba(59, 130, 246, .12);
}

.mired-loading.compact {
    min-height: 90px;
}

@media (max-width: 760px) {
    .mired-summary-row {
        grid-template-columns: 34px 1fr;
    }

    .mired-summary-row .mired-action-button,
    .mired-summary-row em {
        grid-column: 2;
        justify-self: start;
    }
}

.mired-password-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

    .mired-password-wrap input {
        width: 100%;
        padding-right: 52px;
    }

.mired-password-toggle {
    position: absolute;
    right: 10px;
    width: 34px;
    height: 34px;
    border: 0;
    background: transparent;
    cursor: pointer;
    display: grid;
    place-items: center;
    opacity: 0.78;
}

    .mired-password-toggle:hover {
        opacity: 1;
    }

    .mired-password-toggle img {
        width: 21px;
        height: 21px;
        object-fit: contain;
    }

.mired-author-link {
    border: 0;
    background: transparent;
    color: var(--text);
    font-weight: 800;
    padding: 0;
    cursor: pointer;
    text-align: left;
}

    .mired-author-link:hover {
        color: #38bdf8;
        text-decoration: underline;
    }

.mired-search-card {
    margin-bottom: 18px;
}

    .mired-search-card label {
        display: block;
        color: var(--muted);
        font-weight: 700;
        margin-bottom: 8px;
    }

.mired-search-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: center;
}

.mired-input {
    width: 100%;
    height: 46px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: var(--input-bg);
    color: var(--text);
    padding: 0 14px;
    outline: none;
}

    .mired-input:focus {
        border-color: #38bdf8;
        box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.13);
    }

.mired-user-results {
    display: grid;
    gap: 12px;
}

.mired-user-row {
    display: grid;
    grid-template-columns: 54px 1fr auto;
    gap: 14px;
    align-items: center;
    padding: 16px;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: var(--card);
}

.mired-avatar-button,
.mired-contact-avatar {
    width: 46px;
    height: 46px;
    border-radius: 16px;
    border: 1px solid rgba(56, 189, 248, 0.35);
    background: linear-gradient(135deg, #155bd4, #0284c7);
    color: white;
    font-weight: 900;
    display: grid;
    place-items: center;
}

.mired-avatar-button {
    cursor: pointer;
}

.mired-user-info p {
    margin: 4px 0 0 0;
    color: var(--muted);
}

.mired-user-actions {
    display: flex;
    gap: 10px;
}

.mired-chat-grid {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 18px;
    min-height: calc(100vh - 190px);
}

.mired-chat-contacts,
.mired-chat-panel {
    min-height: 620px;
}

.mired-panel-title-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 16px;
}

    .mired-panel-title-row h2 {
        margin: 0;
    }

.mired-contact-list {
    display: grid;
    gap: 10px;
}

.mired-contact-row {
    width: 100%;
    display: grid;
    grid-template-columns: 46px 1fr auto;
    gap: 12px;
    align-items: center;
    text-align: left;
    padding: 12px;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: var(--panel);
    color: var(--text);
    cursor: pointer;
}

    .mired-contact-row:hover,
    .mired-contact-row.active {
        border-color: #38bdf8;
        background: rgba(37, 99, 235, 0.16);
    }

.mired-contact-info {
    min-width: 0;
}

    .mired-contact-info strong,
    .mired-contact-info small {
        display: block;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .mired-contact-info small {
        margin-top: 4px;
        color: var(--muted);
    }

.mired-contact-row em {
    min-width: 24px;
    height: 24px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: #155bd4;
    color: white;
    font-style: normal;
    font-weight: 900;
    font-size: 12px;
}

.mired-chat-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
}

    .mired-chat-header h2 {
        margin: 0;
    }

    .mired-chat-header p {
        margin: 4px 0 0 0;
        color: var(--muted);
    }

.mired-chat-messages {
    height: 470px;
    overflow-y: auto;
    padding: 18px 4px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mired-chat-bubble {
    max-width: 72%;
    padding: 12px 14px;
    border-radius: 18px;
    border: 1px solid var(--border);
}

    .mired-chat-bubble.mine {
        align-self: flex-end;
        background: linear-gradient(135deg, #155bd4, #0284c7);
        color: white;
    }

    .mired-chat-bubble.theirs {
        align-self: flex-start;
        background: var(--panel);
        color: var(--text);
    }

    .mired-chat-bubble p {
        margin: 0;
    }

    .mired-chat-bubble span {
        display: block;
        margin-top: 6px;
        font-size: 11px;
        opacity: 0.72;
        text-align: right;
    }

.mired-chat-composer {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}

    .mired-chat-composer input {
        width: 100%;
        height: 46px;
        border-radius: 15px;
        border: 1px solid var(--border);
        background: var(--input-bg);
        color: var(--text);
        padding: 0 14px;
        outline: none;
    }

.mired-empty-state {
    color: var(--muted);
    padding: 18px;
    border-radius: 18px;
    border: 1px dashed var(--border);
    background: rgba(15, 23, 42, 0.24);
}

    .mired-empty-state.large {
        min-height: 520px;
        display: grid;
        place-items: center;
        text-align: center;
    }

@media (max-width: 1100px) {
    .mired-chat-grid {
        grid-template-columns: 1fr;
    }

    .mired-chat-contacts,
    .mired-chat-panel {
        min-height: auto;
    }
}

@media (max-width: 760px) {
    .mired-search-row,
    .mired-user-row,
    .mired-chat-composer {
        grid-template-columns: 1fr;
    }

    .mired-user-actions {
        flex-direction: column;
    }
}

.mired-action-added {
    background: rgba(20, 184, 166, 0.14) !important;
    border-color: rgba(20, 184, 166, 0.55) !important;
    color: #99f6e4 !important;
    cursor: default !important;
}

.mired-message-row {
    display: flex;
    align-items: flex-end;
    gap: 10px;
}

    .mired-message-row.mine {
        justify-content: flex-end;
    }

    .mired-message-row.theirs {
        justify-content: flex-start;
    }

.mired-message-avatar {
    width: 34px;
    height: 34px;
    border-radius: 13px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #0f766e, #0891b2);
    color: white;
    font-weight: 900;
    font-size: 12px;
    flex-shrink: 0;
}

.mired-chat-bubble.mine {
    background: linear-gradient(135deg, #155bd4, #0284c7);
    color: white;
    border-color: rgba(56, 189, 248, 0.35);
}

.mired-chat-bubble.theirs {
    background: #111827;
    color: var(--text);
    border-color: var(--border);
}

.mired-chat-panel {
    background: radial-gradient(circle at top left, rgba(37, 99, 235, 0.10), transparent 34%), radial-gradient(circle at bottom right, rgba(14, 165, 233, 0.08), transparent 32%), var(--card);
}

.mired-chat-messages {
    background: linear-gradient(rgba(2, 6, 23, 0.80), rgba(2, 6, 23, 0.80)), url("/images/chat-bg.png");
    background-size: 420px;
    background-position: center;
    border-radius: 18px;
    border: 1px solid var(--border);
}

.mired-pending-files {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

    .mired-pending-files span {
        padding: 7px 10px;
        border-radius: 999px;
        border: 1px solid var(--border);
        background: var(--panel);
        color: var(--text);
        font-size: 12px;
        font-weight: 700;
    }

.mired-chat-attachments {
    display: grid;
    gap: 8px;
    margin-top: 10px;
}

.mired-chat-attachment {
    display: grid;
    grid-template-columns: 32px 1fr;
    gap: 10px;
    align-items: center;
    padding: 10px;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    background: rgba(2, 6, 23, 0.32);
    color: inherit;
    text-decoration: none;
}

    .mired-chat-attachment strong,
    .mired-chat-attachment small {
        display: block;
    }

    .mired-chat-attachment small {
        opacity: 0.75;
        margin-top: 3px;
    }

/* Mi Red Web - chat premium, perfil premium y controles modernos */
.mired-chat-grid.premium {
    grid-template-columns: 380px minmax(0, 1fr);
}

.mired-chat-contacts.premium,
.mired-chat-panel.premium-panel {
    border-radius: 26px;
}

.mired-chat-peer {
    display: flex;
    align-items: center;
    gap: 14px;
}

.mired-chat-peer-avatar {
    width: 58px;
    height: 58px;
    border-radius: 20px;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: linear-gradient(135deg, #155bd4, #0891b2);
    color: white;
    font-weight: 900;
    box-shadow: 0 12px 28px rgba(21, 91, 212, .25);
}

.mired-chat-peer-avatar img,
.mired-message-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mired-chat-header.premium {
    align-items: center;
    border-bottom-color: rgba(96, 165, 250, .20);
}

.mired-chat-style-panel {
    margin: 12px 0;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(2, 6, 23, .24);
    padding: 10px 12px;
    color: var(--soft);
}

.mired-chat-style-panel summary {
    cursor: pointer;
    font-weight: 850;
}

.mired-chat-style-panel > div {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-top: 12px;
}

.mired-chat-style-panel label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 750;
}

.mired-chat-style-panel input[type="color"] {
    width: 36px;
    height: 28px;
    border: 0;
    background: transparent;
    padding: 0;
}

.mired-chat-messages.premium-bg {
    min-height: 520px;
    height: 56vh;
    padding: 22px;
    background-image:
        radial-gradient(circle at top left, rgba(37, 99, 235, .12), transparent 28%),
        radial-gradient(circle at bottom right, rgba(14, 165, 233, .10), transparent 30%);
}

.mired-message-avatar {
    overflow: hidden;
}

.mired-chat-bubble {
    line-height: 1.45;
    box-shadow: 0 12px 28px rgba(0,0,0,.16);
}

.mired-chat-time {
    font-size: 11px !important;
    opacity: .72;
}

.mired-chat-composer.premium-composer {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 46px 46px 46px;
    gap: 10px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(2, 6, 23, .38);
}

.mired-chat-composer.premium-composer input {
    border-radius: 16px;
    background: var(--field-bg);
}

.mired-chat-icon-action {
    width: 46px;
    height: 46px;
    border-radius: 16px;
    border: 1px solid rgba(96, 165, 250, .22);
    background: rgba(15, 23, 42, .82);
    display: grid;
    place-items: center;
    cursor: pointer;
    padding: 0;
}

.mired-chat-icon-action:hover {
    border-color: rgba(103, 232, 249, .55);
    transform: translateY(-1px);
}

.mired-chat-icon-action img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.mired-chat-icon-action.file-picker input {
    display: none;
}

.mired-chat-icon-action.send {
    background: linear-gradient(135deg, #155bd4, #0284c7);
}

.mired-chat-attachment.premium-file {
    grid-template-columns: auto minmax(0, 1fr) auto;
    background: rgba(2, 6, 23, .32);
}

.mired-chat-image-button {
    width: 140px;
    max-width: 38vw;
    border: 0;
    border-radius: 14px;
    overflow: hidden;
    padding: 0;
    background: transparent;
    cursor: pointer;
}

.mired-chat-image-button img,
.mired-chat-inline-image {
    width: 100%;
    max-height: 180px;
    object-fit: cover;
    display: block;
}

.mired-public-hero {
    position: relative;
    margin-bottom: 22px;
}

.mired-public-cover {
    height: 170px;
    border-radius: 28px 28px 0 0;
    background:
        radial-gradient(circle at 20% 20%, rgba(37, 99, 235, .38), transparent 34%),
        linear-gradient(135deg, #020617, #0f172a 52%, #155bd4);
    border: 1px solid var(--line);
    border-bottom: 0;
}

.mired-public-main-card {
    display: grid;
    grid-template-columns: 140px minmax(0, 1fr);
    gap: 22px;
    align-items: end;
    margin-top: -70px;
    padding: 0 28px 28px;
    border: 1px solid var(--line);
    border-top: 0;
    border-radius: 0 0 28px 28px;
    background: var(--card);
    box-shadow: 0 24px 70px var(--shadow);
}

.mired-profile-avatar-xl {
    width: 140px;
    height: 140px;
    border-radius: 34px;
    border: 5px solid var(--bg);
    background: linear-gradient(135deg, #155bd4, #06b6d4);
    display: grid;
    place-items: center;
    overflow: hidden;
    color: white;
    font-size: 38px;
    font-weight: 900;
    box-shadow: 0 18px 45px rgba(0,0,0,.28);
}

.mired-profile-avatar-xl img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mired-public-info h1 {
    margin: 0;
    font-size: clamp(32px, 4vw, 54px);
    letter-spacing: -.03em;
}

.mired-public-info p {
    margin: 8px 0 16px;
    color: var(--muted);
    font-size: 17px;
}

.mired-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.mired-profile-premium-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 18px;
}

.mired-profile-about-card p {
    color: var(--soft);
    line-height: 1.65;
}

.mired-profile-facts {
    display: grid;
    gap: 12px;
    margin-top: 20px;
}

.mired-profile-facts div {
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--card-soft);
    padding: 14px;
}

.mired-profile-facts strong,
.mired-profile-facts span {
    display: block;
}

.mired-profile-facts span {
    color: var(--muted);
    margin-top: 4px;
}

.mired-profile-connect-card .full,
.mired-secondary-button.full,
.mired-ghost-button.full {
    width: 100%;
    margin-top: 10px;
}

@media (max-width: 900px) {
    .mired-chat-grid.premium,
    .mired-profile-premium-grid,
    .mired-public-main-card {
        grid-template-columns: 1fr;
    }

    .mired-public-main-card {
        align-items: start;
    }

    .mired-chat-composer.premium-composer {
        grid-template-columns: 1fr 42px 42px 42px;
    }
}

:root {
    --border: var(--line);
    --input-bg: var(--field-bg);
    --accent: #38bdf8;
    --accent-soft: #67e8f9;
    --shadow-soft: 0 16px 36px rgba(0,0,0,.18);
}

.mired-chat-bubble p {
    color: inherit;
}

.mired-chat-attachment strong,
.mired-chat-attachment small {
    color: inherit;
}

.mired-chat-composer-wrap {
    position: relative;
}

.mired-emoji-picker-host {
    position: absolute;
    right: 96px;
    bottom: 66px;
    z-index: 40;
}

.mired-emoji-picker {
    width: 390px;
    max-height: 430px;
    border-radius: 22px;
    background: var(--card);
    border: 1px solid var(--border);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.48);
    padding: 16px;
    color: var(--text);
}

.mired-emoji-header {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: flex-start;
    margin-bottom: 12px;
}

    .mired-emoji-header h3 {
        margin: 0;
        font-size: 22px;
        font-weight: 900;
    }

    .mired-emoji-header p {
        margin: 4px 0 0 0;
        color: var(--muted);
        font-size: 13px;
    }

.mired-emoji-close {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--panel);
    color: var(--text);
    cursor: pointer;
    font-weight: 900;
}

.mired-emoji-search {
    width: 100%;
    height: 42px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: var(--input-bg);
    color: var(--text);
    padding: 0 12px;
    outline: none;
    margin-bottom: 12px;
}

    .mired-emoji-search:focus {
        border-color: #38bdf8;
        box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.14);
    }

.mired-emoji-grid {
    max-height: 300px;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
    padding-right: 4px;
}

.mired-emoji-item {
    height: 46px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: var(--panel);
    cursor: pointer;
    font-size: 22px;
    font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif;
}

    .mired-emoji-item:hover {
        border-color: #38bdf8;
        background: rgba(37, 99, 235, 0.18);
        transform: translateY(-1px);
    }

@media (max-width: 760px) {
    .mired-emoji-picker-host {
        right: 0;
        left: 0;
        bottom: 70px;
    }

    .mired-emoji-picker {
        width: 100%;
    }

    .mired-emoji-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

.mired-nav-badge {
    margin-left: auto;
    min-width: 22px;
    height: 22px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: #ef4444;
    color: white;
    font-size: 12px;
    font-weight: 900;
    padding: 0 7px;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.18);
}

.mired-news-list {
    display: grid;
    gap: 16px;
}

.mired-news-card {
    position: relative;
    overflow: hidden;
}

    .mired-news-card.unread::before {
        content: "";
        position: absolute;
        top: 22px;
        right: 22px;
        width: 12px;
        height: 12px;
        border-radius: 999px;
        background: #ef4444;
        box-shadow: 0 0 0 5px rgba(239, 68, 68, 0.18);
    }

.mired-news-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

    .mired-news-head > div {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    .mired-news-head small {
        color: var(--muted);
    }

.mired-news-card h2 {
    margin: 0 0 8px 0;
    font-size: 26px;
}

.mired-news-content {
    margin-top: 14px;
    color: var(--soft);
    line-height: 1.65;
    white-space: pre-wrap;
}

.mired-community-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
}

.mired-community-icon {
    width: 56px;
    height: 56px;
    min-width: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 26px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.08);
}

    .mired-community-icon.has-image {
        background: white !important;
        padding: 6px;
    }

    .mired-community-icon img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        border-radius: 12px;
        display: block;
    }

.mired-system-banner {
    margin: 0 0 18px 0;
    padding: 14px 18px;
    border-radius: 18px;
    background: rgba(37, 99, 235, 0.14);
    border: 1px solid rgba(59, 130, 246, 0.55);
    color: #e5edff;
    display: flex;
    gap: 12px;
    align-items: center;
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.22);
}

    .mired-system-banner strong {
        color: #ffffff;
        font-weight: 800;
    }

    .mired-system-banner span {
        color: #cbd5e1;
        font-size: 0.94rem;
    }

    .mired-system-banner.maintenance {
        background: rgba(250, 204, 21, 0.14);
        border-color: rgba(250, 204, 21, 0.55);
    }

        .mired-system-banner.maintenance strong {
            color: #fde68a;
        }

.mired-rich-post-text,
.mired-rich-comment-text {
    color: var(--mired-text);
    line-height: 1.55;
    white-space: normal;
    word-break: break-word;
}

.mired-rich-link {
    color: #38bdf8;
    font-weight: 800;
    text-decoration: none;
}

    .mired-rich-link:hover {
        text-decoration: underline;
    }

.mired-mention-link {
    color: #60a5fa;
    font-weight: 900;
    text-decoration: none;
}

    .mired-mention-link:hover {
        text-decoration: underline;
    }

.mired-rich-chat-text {
    margin: 0;
    line-height: 1.45;
    white-space: normal;
    word-break: break-word;
}

    .mired-rich-chat-text .mired-rich-link,
    .mired-chat-bubble .mired-rich-link {
        color: #e0f2fe;
        font-weight: 900;
        text-decoration: underline;
        text-underline-offset: 3px;
    }

    .mired-rich-chat-text .mired-mention-link,
    .mired-chat-bubble .mired-mention-link {
        color: #bfdbfe;
        font-weight: 900;
        text-decoration: none;
    }

        .mired-rich-chat-text .mired-mention-link:hover,
        .mired-rich-chat-text .mired-rich-link:hover {
            filter: brightness(1.2);
         }

.mired-composer-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 20px;
}

.mired-attach-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 42px;
    padding: 9px 16px;
    border: 1px solid #334155;
    border-radius: 14px;
    background: #0b1220;
    color: #ffffff;
    font-weight: 900;
    cursor: pointer;
    transition: 0.18s ease;
    overflow: hidden;
}

    .mired-attach-button:hover {
        border-color: #38bdf8;
        background: #111827;
        transform: translateY(-1px);
    }

    .mired-attach-button img {
        width: 32px;
        height: 32px;
        object-fit: contain;
        display: block;
        flex-shrink: 0;
    }

    .mired-attach-button span {
        display: inline-flex;
        align-items: center;
        line-height: 1;
    }

    .mired-attach-button input[type="file"] {
        position: absolute;
        inset: 0;
        opacity: 0;
        cursor: pointer;
    }