﻿:root {
    --bg: #f5f7ff;
    --bg-soft: #eef2ff;
    --panel: #ffffff;
    --panel-border: #e1e8ff;
    --text: #1f2a44;
    --text-soft: #64708b;

    --primary: #3156ff;
    --primary-strong: #233ed6;
    --secondary: #0ea5e9;

    --success: #0f9f6e;
    --danger: #df3f5f;
    --warning: #c98a14;

    --shadow-sm: 0 8px 20px rgba(26, 50, 112, 0.08);
    --shadow-md: 0 18px 40px rgba(26, 50, 112, 0.14);
    --shadow-lg: 0 24px 70px rgba(26, 50, 112, 0.18);

    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;

    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-7: 32px;

    --transition: 0.22s ease;
}

* {
    box-sizing: border-box;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
    white-space: nowrap;
}

html,
body {
    margin: 0;
    padding: 0;
    font-family: "Segoe UI", "Nunito Sans", "Trebuchet MS", sans-serif;
    color: var(--text);
    background: var(--bg);
}

body.app-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background:
        radial-gradient(circle at 15% 20%, #dbe6ff 0%, transparent 30%),
        radial-gradient(circle at 85% 10%, #d7f3ff 0%, transparent 28%),
        linear-gradient(180deg, #f7f9ff 0%, #f1f5ff 45%, #eef2ff 100%);
}

a {
    color: inherit;
    text-decoration: none;
}

.bg-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(20px);
    pointer-events: none;
    opacity: 0.6;
    z-index: 0;
}

.orb-a {
    width: 220px;
    height: 220px;
    top: 72px;
    left: -70px;
    background: #b9c9ff;
}

.orb-b {
    width: 290px;
    height: 290px;
    top: 220px;
    right: -110px;
    background: #bdefff;
}

.orb-c {
    width: 200px;
    height: 200px;
    bottom: 40px;
    left: 20%;
    background: #d5dcff;
}

.header {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(12px);
    background: rgba(255, 255, 255, 0.8);
    border-bottom: 1px solid rgba(172, 189, 255, 0.35);
}

.header-container {
    max-width: 1220px;
    margin: 0 auto;
    padding: var(--space-4) var(--space-5);
    display: grid;
    grid-template-columns: 170px minmax(110px, 150px) 1fr auto;
    align-items: center;
    gap: var(--space-4);
}

.logo h1 {
    margin: 0;
}

.logo a {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: 0.2px;
    color: var(--primary);
}

.nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.nav a {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    height: 36px;
    padding: 0 13px;
    border-radius: 999px;
    color: #445067;
    font-weight: 700;
    line-height: 1;
    border: 1px solid transparent;
    transition: all var(--transition);
}

.nav a:hover {
    color: var(--primary);
    background: #ecf1ff;
    border-color: #d6e0ff;
}

.nav a.active {
    color: #fff;
    border-color: transparent;
    background: linear-gradient(120deg, var(--primary), var(--secondary));
    box-shadow: 0 10px 24px rgba(49, 86, 255, 0.3);
}

.header-search-form {
    width: 100%;
    margin: 0;
}

.header-search-form input[type="search"] {
    width: 100%;
    height: 36px;
    border: 1px solid #d3ddfa;
    border-radius: 999px;
    background: #fff;
    color: var(--text);
    padding: 0 13px;
    font-size: 14px;
    outline: none;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.header-search-form input[type="search"]:focus {
    border-color: #86a3ff;
    box-shadow: 0 0 0 4px rgba(49, 86, 255, 0.12);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.user-pill {
    padding: 7px 13px;
    border-radius: 999px;
    background: #eef3ff;
    border: 1px solid #d6e0ff;
    color: #3c4f7c;
    font-weight: 700;
    font-size: 13px;
}

.user-pill-name {
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-pill-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    flex: 0 0 22px;
}

.user-pill-avatar-img {
    object-fit: cover;
    border: 1px solid #d2ddff;
}

.user-pill-avatar-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(120deg, var(--primary), var(--secondary));
}

.user-menu a {
    color: #546283;
    font-weight: 700;
    font-size: 14px;
    transition: color var(--transition);
}

.user-menu a:hover {
    color: var(--primary);
}

.user-action-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid transparent;
    color: #546283;
    background: transparent;
    transition: all var(--transition);
    text-decoration: none;
    font-size: 16px;
}

.user-action-icon:hover {
    color: var(--primary);
    background: rgba(49, 86, 255, 0.08);
    border-color: rgba(49, 86, 255, 0.18);
}

.notification-link {
    position: relative;
}

.notification-menu {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.notif-count {
    position: absolute;
    top: -3px;
    right: -5px;
    min-width: 16px;
    height: 16px;
    border-radius: 999px;
    background: #ef476f;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.9);
    font-size: 10px;
    line-height: 16px;
    text-align: center;
    padding: 0 3px;
    font-weight: 800;
}

.notification-drawer {
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    width: min(360px, 88vw);
    background: #fff;
    border: 1px solid #dce5ff;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(8px);
    transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
    z-index: 70;
}

.notification-menu.is-open .notification-drawer {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.notification-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-2);
    padding: 12px 14px;
    border-bottom: 1px solid #edf2ff;
}

.notification-drawer-header strong {
    font-size: 14px;
    color: #2f3e62;
}

.notification-drawer-counter {
    font-size: 11px;
    font-weight: 700;
    color: #2149d1;
    background: #eaf0ff;
    border: 1px solid #d6e1ff;
    border-radius: 999px;
    padding: 4px 8px;
    white-space: nowrap;
}

.notification-drawer-list {
    max-height: 320px;
    overflow: auto;
    padding: 10px;
    display: grid;
    gap: 8px;
}

.notification-drawer-item {
    display: block;
    border: 1px solid #e5ebff;
    border-radius: 12px;
    background: #fbfcff;
    padding: 10px 11px;
    color: #334262;
    transition: border-color var(--transition), background var(--transition);
}

.notification-drawer-item:hover {
    border-color: #c8d6ff;
    background: #f3f7ff;
    color: #334262;
}

.notification-drawer-item.unread {
    border-color: rgba(49, 86, 255, 0.45);
    background: rgba(49, 86, 255, 0.08);
}

.notification-drawer-item-title {
    display: block;
    font-weight: 700;
    font-size: 13px;
    line-height: 1.3;
}

.notification-drawer-item-message {
    display: -webkit-box;
    margin-top: 4px;
    color: #607094;
    font-size: 12px;
    line-height: 1.4;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.notification-drawer-item-date {
    display: block;
    margin-top: 6px;
    color: #7a88a8;
    font-size: 11px;
}

.notification-drawer-empty {
    margin: 0;
    border: 1px dashed #d7e1ff;
    border-radius: 12px;
    background: #f9fbff;
    color: #69789b;
    font-size: 12px;
    padding: 12px;
    text-align: center;
}

.notification-drawer-footer {
    border-top: 1px solid #edf2ff;
    padding: 10px 12px 12px;
    display: flex;
    justify-content: flex-end;
}

.profile-menu {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.profile-menu-trigger-row {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
}

.user-pill-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 36px;
    padding-top: 0;
    padding-bottom: 0;
    border: 1px solid #d6e0ff;
    cursor: pointer;
    font-family: inherit;
    line-height: 1;
    transition: all var(--transition);
}

.user-pill-btn:hover {
    color: var(--primary);
    background: #e6eeff;
    border-color: #c2d3ff;
}

.profile-toggle-caret {
    font-size: 11px;
    opacity: 0.8;
}

.profile-drawer {
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    width: 180px;
    background: #fff;
    border: 1px solid #dce5ff;
    border-radius: 14px;
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(8px);
    transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
    z-index: 70;
    overflow: hidden;
}

.profile-menu.is-open .profile-drawer {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.profile-drawer a {
    display: block;
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 700;
    color: #415170;
    border-bottom: 1px solid #edf2ff;
}

.profile-drawer a:last-child {
    border-bottom: 0;
}

.profile-drawer a:hover {
    background: #f2f6ff;
    color: var(--primary);
}

.main-container {
    position: relative;
    z-index: 2;
    max-width: 1220px;
    margin: var(--space-7) auto 0;
    padding: 0 var(--space-5) var(--space-7);
}

.app-page .main-container {
    flex: 1 0 auto;
    width: 100%;
}

.footer {
    position: relative;
    z-index: 2;
    margin-top: var(--space-7);
    padding: var(--space-6) var(--space-4);
    border-top: 1px solid rgba(172, 189, 255, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-4);
    color: #6a7794;
    font-size: 13px;
    background: rgba(255, 255, 255, 0.75);
    white-space: nowrap;
}

.app-page .footer {
    margin-top: auto;
}

.footer p {
    margin: 0;
}

.footer-admin-link {
    display: inline-block;
    margin-top: 10px;
    font-weight: 700;
    color: var(--primary);
    transition: color var(--transition);
}

.footer-admin-link:hover {
    color: var(--primary-strong);
}

.admin-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: var(--space-5);
    align-items: stretch;
    min-height: calc(100vh - 170px);
}

.admin-sidebar {
    position: sticky;
    top: calc(70px + var(--space-4));
    align-self: start;
    background: var(--panel);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: var(--space-5);
    min-height: calc(100vh - 170px);
}

.admin-sidebar h2 {
    margin-top: 0;
    margin-bottom: var(--space-4);
    font-size: 18px;
    color: var(--primary);
}

.admin-sidebar nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.admin-sidebar nav li {
    margin-bottom: var(--space-2);
}

.admin-sidebar nav a {
    display: block;
    padding: 12px 14px;
    border-radius: 14px;
    color: #3b4a6b;
    font-weight: 700;
    border: 1px solid transparent;
    transition: all var(--transition);
}

.admin-sidebar nav a:hover,
.admin-sidebar nav a.active {
    color: var(--primary);
    background: rgba(49, 86, 255, 0.08);
    border-color: #d6e0ff;
}

.admin-content {
    display: block;
}

.admin-home-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-4);
    margin-top: var(--space-5);
}

.admin-card {
    display: block;
    padding: var(--space-5);
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, #ffffff, #f8faff);
    border: 1px solid #dce4ff;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
    color: inherit;
}

.admin-card:hover {
    transform: translateY(-2px);
    border-color: #c5d5ff;
    box-shadow: 0 18px 35px rgba(49, 86, 255, 0.12);
}

.admin-card h3 {
    margin-top: 0;
    margin-bottom: var(--space-2);
}

.admin-home-grid p {
    margin: 0;
    color: var(--text-soft);
}

.admin-analytics-section {
    margin-top: var(--space-6);
    scroll-margin-top: 120px;
}

@media (max-width: 980px) {
    .header-container {
        grid-template-columns: 1fr;
    }

    .header-search-form {
        order: 2;
        width: 100%;
    }

    .nav {
        order: 3;
    }

    .user-menu {
        order: 4;
        justify-content: flex-end;
    }

    .main-container {
        padding: 0 var(--space-4) var(--space-6);
    }

    .admin-layout {
        grid-template-columns: 1fr;
    }

    .admin-sidebar {
        position: relative;
        top: auto;
        margin-bottom: var(--space-5);
    }
}

/* ---------- Surface cards ---------- */
.form-container,
.detail-container,
.calendar-container,
.dashboard-container,
.meetings-container,
.users-container,
.logs-container,
.profile-container,
.forum-container,
.chat-container,
.methodology-container,
.notifications-container,
.search-container,
.section-proximas,
.section-actions,
.profile-section {
    background: var(--panel);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.dashboard-container,
.meetings-container,
.users-container,
.logs-container,
.profile-container,
.forum-container,
.chat-container,
.methodology-container,
.notifications-container,
.search-container,
.calendar-container,
.form-container,
.detail-container {
    padding: var(--space-6);
}

h1,
h2,
h3 {
    margin-top: 0;
    color: #253557;
    letter-spacing: 0.1px;
}

h1 {
    font-size: clamp(26px, 3vw, 33px);
    margin-bottom: var(--space-5);
}

h2 {
    font-size: clamp(20px, 2.3vw, 25px);
    margin-bottom: var(--space-4);
}

h3 {
    font-size: clamp(17px, 2vw, 21px);
    margin-bottom: var(--space-3);
}

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

/* ---------- Flash ---------- */
.flash-message {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-5);
    font-weight: 700;
    border: 1px solid transparent;
    box-shadow: var(--shadow-sm);
    transition: opacity 0.25s ease;
}

.flash-success {
    color: #106046;
    background: #dcfce7;
    border-color: #a7f3d0;
}

.flash-error {
    color: #8f1538;
    background: #ffe1ea;
    border-color: #ffc1d2;
}

.flash-warning {
    color: #8a5e10;
    background: #fff3d8;
    border-color: #ffe2a9;
}

.flash-info {
    color: #0f4f66;
    background: #dcf5ff;
    border-color: #b5e8ff;
}

.flash-close {
    border: 0;
    background: transparent;
    cursor: pointer;
    color: inherit;
    font-size: 18px;
    font-weight: 800;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    border: 1px solid #d5def8;
    border-radius: 12px;
    padding: 10px 15px;
    background: #fff;
    color: #304062;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition);
}

.btn:hover {
    transform: translateY(-1px);
    border-color: #bcc9ef;
    box-shadow: 0 8px 22px rgba(69, 93, 155, 0.16);
}

.btn-primary {
    border-color: transparent;
    color: #fff;
    background: linear-gradient(120deg, var(--primary), var(--secondary));
}

.btn-primary:hover {
    box-shadow: 0 12px 28px rgba(41, 77, 227, 0.32);
}

.btn-secondary {
    color: #fff;
    background: linear-gradient(120deg, #64748b, #4f5e79);
    border-color: transparent;
}

.btn-small {
    padding: 7px 10px;
    font-size: 12px;
    border-radius: 10px;
}

.btn-danger {
    color: #fff;
    background: linear-gradient(120deg, #ef476f, #d22f55);
    border-color: transparent;
}

.btn-block {
    width: 100%;
}

/* ---------- Forms ---------- */
.form-group {
    margin-bottom: var(--space-4);
}

.form-group label {
    display: block;
    margin-bottom: var(--space-2);
    font-size: 13px;
    font-weight: 700;
    color: #3b4a6b;
}

.form-group input,
.form-group textarea,
.form-group select,
.search-form input,
.search-form select,
.filter-form input,
.filter-form select {
    width: 100%;
    border: 1px solid #d3ddfa;
    border-radius: 12px;
    background: #fff;
    color: var(--text);
    padding: 11px 12px;
    font-size: 14px;
    outline: none;
    transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus,
.search-form input:focus,
.search-form select:focus,
.filter-form input:focus,
.filter-form select:focus {
    border-color: #86a3ff;
    box-shadow: 0 0 0 4px rgba(49, 86, 255, 0.12);
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.form-group small {
    display: block;
    margin-top: var(--space-1);
    color: var(--text-soft);
    font-size: 12px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-4);
}

.form-actions,
.button-group,
.toolbar,
.calendar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
}

.form-actions {
    margin-top: var(--space-5);
}

.meetings-toolbar {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-5);
}

.meetings-section-header {
    margin-bottom: var(--space-5);
}

.meetings-section-title-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: var(--space-4);
}

.meetings-section-header h1 {
    margin-bottom: 0;
}

.meetings-section-header p {
    margin: var(--space-2) 0 0;
}

.meetings-section-top-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: var(--space-3);
    flex-wrap: nowrap;
}

.meetings-inline-search {
    margin: 0;
    display: block;
    width: clamp(180px, 24vw, 300px);
}

.meetings-inline-search input[type="text"] {
    width: 100%;
    min-width: 0;
}

.meetings-new-btn {
    white-space: nowrap;
}

.meetings-view-toggle,
.task-view-switch {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px;
    border: 1px solid #d8e1fb;
    border-radius: 999px;
    background: #f4f7ff;
    width: fit-content;
    margin-inline: auto;
}

.meetings-view-link,
.task-view-btn {
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
    color: #3b4d79;
    border-radius: 999px;
    padding: 7px 14px;
    border: 1px solid transparent;
    background: transparent;
    box-shadow: none;
    line-height: 1.2;
    transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.meetings-view-link:hover,
.task-view-btn:hover {
    background: #e7eeff;
    color: #3b4d79;
    box-shadow: none;
    transform: none;
}

.meetings-view-link.is-active,
.task-view-btn.is-active {
    color: #fff;
    background: linear-gradient(135deg, #3b63ff, #2441c8);
    border-color: #2340be;
    box-shadow: 0 7px 16px rgba(43, 77, 214, 0.22);
}

.meetings-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 280px));
    gap: var(--space-4);
}

.meetings-cards-grid .proxima-reunion-card,
.meetings-cards-grid .proxima-card-inner {
    min-height: 460px;
}

.meetings-cards-grid .proxima-card-face {
    overflow: visible;
}

.meetings-cards-grid .proxima-reunion-title {
    min-height: calc(1.3em * 3);
    display: block;
    overflow: visible;
    -webkit-line-clamp: unset;
    -webkit-box-orient: unset;
}

.meetings-cards-grid .proxima-reunion-meta {
    margin-top: auto;
}

.meetings-cards-grid .proxima-card-hint {
    margin-top: var(--space-2);
}

.meetings-card-status {
    display: flex;
    justify-content: center;
    margin-bottom: 6px;
}

.meetings-card-back-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.meetings-card-back-actions .btn-small {
    min-height: 34px;
}

.meeting-card {
    border: 1px solid #d9e4ff;
    border-radius: 16px;
    background: #fbfdff;
    padding: 12px;
    display: grid;
    gap: 10px;
    transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.meeting-card:hover {
    border-color: #abc0ff;
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(57, 76, 132, 0.14);
}

.meeting-card.is-context-open {
    border-color: #8ea9ff;
    box-shadow: 0 14px 28px rgba(57, 76, 132, 0.2);
}

.meeting-card-main {
    display: grid;
    gap: 8px;
}

.meeting-card-head {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 8px;
}

.meeting-card-head h3 {
    margin: 0;
    color: #2d4378;
    font-size: 16px;
}

.meeting-card-main p {
    margin: 0;
    color: #4f638f;
    font-size: 13px;
}

.meeting-card-context-btn {
    width: 30px;
    height: 30px;
    border: 1px solid #d1ddff;
    border-radius: 8px;
    background: #fff;
    color: #415a92;
    cursor: pointer;
    font-weight: 700;
}

.meeting-card-context-btn:hover {
    border-color: #9fb4ff;
    background: #eff4ff;
}

.meeting-card-hint {
    margin: 0;
    border: 1px dashed #d4e1ff;
    border-radius: 10px;
    background: #f7faff;
    color: #5f7099;
    font-size: 12px;
    padding: 6px 8px;
}

.meeting-card-context {
    display: none;
    border-top: 1px solid #e4ebff;
    padding-top: 10px;
    gap: 8px;
}

.meeting-card.is-context-open .meeting-card-context {
    display: grid;
}

.meeting-card-context-head {
    display: grid;
    gap: 2px;
}

.meeting-card-context-head strong {
    font-size: 13px;
    color: #2b4074;
}

.meeting-card-context-head small {
    color: #62749f;
    font-size: 12px;
}

.meeting-card-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
}

.meeting-card-actions .inline-form {
    margin: 0;
}

.meeting-card-actions .btn-small {
    width: 100%;
    min-width: 0;
}

.search-form,
.filter-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: var(--space-3);
    width: 100%;
}

.search-form-inline {
    display: inline-grid;
}

.list-summary {
    margin-top: 20px;
    color: #666;
}

.is-hidden {
    display: none !important;
}

.section-block-sm {
    margin-bottom: 18px;
}

.section-block-md {
    margin-top: 18px;
    margin-bottom: 18px;
}

.section-note-reset {
    margin: 0;
}

.form-actions-top-sm {
    margin-top: 14px;
}

.checkbox-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: var(--space-2);
    background: linear-gradient(180deg, #f8faff, #f3f6ff);
    border: 1px solid #dde6ff;
    border-radius: var(--radius-md);
    padding: var(--space-4);
}

.checkbox-label {
    margin: 0;
    padding: var(--space-2) var(--space-3);
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    color: #3f5075;
    background: #fff;
    border: 1px solid #e4ebff;
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.checkbox-label input {
    width: 16px;
    height: 16px;
}

/* ---------- Dashboard ---------- */
.dashboard-container h1 {
    margin-bottom: var(--space-6);
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--space-4);
    margin-bottom: var(--space-6);
}

.stat-card {
    position: relative;
    overflow: hidden;
    border: 1px solid #dce4ff;
    border-radius: var(--radius-md);
    padding: var(--space-5);
    background: linear-gradient(180deg, #ffffff, #f8faff);
    box-shadow: var(--shadow-sm);
}

.stat-card::after {
    content: "";
    position: absolute;
    top: -30px;
    right: -30px;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: rgba(49, 86, 255, 0.08);
}

.stat-card h3 {
    margin: 0 0 var(--space-2);
    font-size: 34px;
    color: var(--primary);
}

.stat-card p {
    margin: 0;
    color: var(--text-soft);
    font-weight: 600;
}

.section-proximas,
.section-actions {
    padding: var(--space-5);
    margin-bottom: var(--space-5);
}

.section-proximas h2,
.section-actions h2 {
    margin-bottom: var(--space-4);
}

.proximas-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 230px));
    gap: var(--space-4);
    justify-content: center;
}

.proxima-reunion-card {
    position: relative;
    min-height: 300px;
    perspective: 1200px;
    transition: transform 0.16s ease;
}

.proxima-reunion-card.is-context-open {
    z-index: 24;
}

.proxima-card-inner {
    position: relative;
    min-height: 300px;
    transform-style: preserve-3d;
    transition: transform 0.34s ease;
}

.proxima-reunion-card.is-context-open .proxima-card-inner {
    transform: rotateY(180deg);
}

.proxima-card-face {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    border: 1px solid #dbe5ff;
    border-radius: 18px;
    background: #fff;
    padding: var(--space-5);
    box-shadow: var(--shadow-sm);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.proxima-card-front {
    z-index: 2;
}

.proxima-card-back {
    transform: rotateY(180deg);
}

.proxima-card-back-head strong {
    display: block;
    font-size: 14px;
    color: #2a3e79;
}

.proxima-card-back-head small {
    color: #6375a1;
    font-size: 12px;
}

.proxima-card-back-note {
    margin: 0;
    font-size: 12px;
    color: #5f7099;
}

.proxima-card-hint {
    margin: auto 0 0;
    font-size: 12px;
    color: #5f7099;
    border: 1px dashed #d4e1ff;
    border-radius: 10px;
    background: #f7faff;
    padding: 8px 10px;
}

.proxima-reunion-card:hover .proxima-card-front {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(57, 76, 132, 0.14);
}

.proxima-reunion-card.is-context-open:hover .proxima-card-front {
    transform: none;
}

.proxima-reunion-title {
    margin: 0;
    text-align: center;
    font-size: 18px;
    line-height: 1.3;
    min-height: calc(1.3em * 2);
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.proxima-reunion-meta {
    margin: 0;
    display: grid;
    gap: 10px;
}

.proxima-reunion-row {
    display: grid;
    grid-template-columns: 92px 1fr;
    gap: var(--space-2);
    align-items: start;
}

.proxima-reunion-meta dt {
    margin: 0;
    font-size: 13px;
    font-weight: 800;
    color: #3d4f79;
}

.proxima-reunion-meta dd {
    margin: 0;
    font-size: 13px;
    color: #526284;
    word-break: break-word;
}

.proxima-reunion-actions {
    margin-top: auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-2);
    width: 100%;
}

.proxima-reunion-actions .inline-form {
    margin: 0;
    width: 100%;
}

.proxima-reunion-actions .btn-small {
    width: 100%;
    min-width: 0;
    min-height: 32px;
    height: auto;
    padding: 0 6px;
    font-size: 11px;
    white-space: normal;
    text-align: center;
    overflow-wrap: anywhere;
    line-height: 1.25;
}

/* ---------- Inner surfaces ---------- */
.table,
.detail-section,
.calendar-navigation,
.calendar,
.notification-item,
.search-result-list li,
.chat-sidebar,
.chat-main,
.task-history-item {
    box-shadow: var(--shadow-sm);
}

/* ---------- Table ---------- */
.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: #fff;
    border: 1px solid #dce4ff;
    border-radius: 14px;
    overflow: hidden;
}

.table thead th {
    background: #f5f8ff;
    color: #304062;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    font-weight: 800;
    padding: 13px 12px;
    border-bottom: 1px solid #e0e8ff;
}

.table td {
    padding: 12px;
    border-bottom: 1px solid #edf1ff;
    color: #2f3f60;
    vertical-align: middle;
}

.table tbody tr:last-child td {
    border-bottom: 0;
}

.table tbody tr:hover {
    background: #f9fbff;
}

.table-compact td,
.table-compact th {
    font-size: 13px;
    padding: 10px;
}

.inline-form {
    display: inline-flex;
    gap: var(--space-2);
    margin-left: var(--space-2);
    vertical-align: middle;
}

.pagination {
    margin-top: var(--space-5);
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.pagination .active {
    background: linear-gradient(120deg, var(--primary), var(--secondary));
    color: #fff;
    border-color: transparent;
}

/* ---------- Badges ---------- */
.badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 4px 11px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 800;
}

.badge-planificada { background: #dbe7ff; color: #294bb0; }
.badge-en_progreso { background: #fff1d7; color: #9b6500; }
.badge-completada { background: #dbf8ea; color: #0f8059; }
.badge-cancelada { background: #ffdce5; color: #a62a4a; }
.badge-confirmada { background: #dbf8ea; color: #0f8059; }
.badge-pendiente { background: #fff1d7; color: #9b6500; }
.badge-rechazada { background: #ffdce5; color: #a62a4a; }
.badge-activo { background: #dbf8ea; color: #0f8059; }
.badge-inactivo { background: #e9edf8; color: #5b6584; }

.badge-en_revision { background: #e7ecff; color: #394cb7; }
.badge-bloqueada { background: #ffe2d8; color: #ad4b1f; }

.badge-prio-baja { background: #e8f8f0; color: #0c7a55; }
.badge-prio-media { background: #e8eeff; color: #2f4ab3; }
.badge-prio-alta { background: #fff0d5; color: #a46206; }
.badge-prio-critica { background: #ffdce5; color: #9f2346; }

/* ---------- Detail ---------- */
.detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    margin-bottom: var(--space-5);
}

.detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    margin-bottom: var(--space-5);
}

.detail-content {
    display: grid;
    gap: var(--space-5);
}

.detail-section {
    border: 1px solid #dde5ff;
    border-radius: var(--radius-md);
    padding: var(--space-5);
    background: linear-gradient(180deg, #ffffff, #f9fbff);
}

.detail-list {
    margin: 0;
    display: grid;
    grid-template-columns: 170px 1fr;
    gap: var(--space-3) var(--space-4);
}

.detail-list dt {
    font-weight: 800;
    color: #394b72;
}

.detail-list dd {
    margin: 0;
    color: #526284;
}

.minuta-content {
    padding: var(--space-4);
    border-radius: 14px;
    border: 1px solid #dde5ff;
    background: #f8faff;
}

.minuta-content pre {
    margin: 0;
    font-family: Consolas, "Courier New", monospace;
    font-size: 13px;
    line-height: 1.55;
    white-space: pre-wrap;
}

/* ---------- Calendar ---------- */
.calendar-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-5);
    padding: var(--space-4) var(--space-5);
    background: linear-gradient(135deg, rgba(49, 86, 255, 0.12), rgba(14, 165, 233, 0.12));
    border-radius: var(--radius-md);
}

.current-month {
    font-size: 22px;
    font-weight: 900;
    color: var(--primary-strong);
}

.calendar {
    border: 1px solid #b3c4ff;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: #f4f8ff;
}

.calendar-table {
    width: 100%;
    border-collapse: collapse;
}

.calendar-table th {
    text-align: center;
    padding: 14px 12px;
    background: #dbe7ff;
    color: #1f3b7c;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.calendar-table td {
    height: 98px;
    border: 1px solid #d7e4ff;
    vertical-align: top;
    padding: 0;
    background: #f7fbff;
}

.calendar-table td.empty {
    background: #edf4ff;
}

.calendar-day-btn {
    width: 100%;
    height: 100%;
    border: 0;
    background: transparent;
    text-align: left;
    padding: 12px;
    cursor: pointer;
    transition: background var(--transition), transform var(--transition);
}

.calendar-day-btn:hover {
    background: #dde7ff;
    transform: translateY(-1px);
}

.calendar-day.today .calendar-day-btn {
    background: #fff2b8;
}

.calendar-day.has-meetings .calendar-day-btn {
    background: #d7e7ff;
}

.day-number {
    font-size: 14px;
    font-weight: 900;
    color: var(--primary-strong);
}

.day-indicator {
    margin-top: 6px;
    color: var(--primary-strong);
    font-size: 20px;
    line-height: 1;
}

.reunion-item {
    border: 1px solid #dee7ff;
    border-radius: 12px;
    background: #f9fbff;
    padding: 12px;
    margin-bottom: 10px;
}

.reunion-item-meta {
    margin-top: 5px;
    color: #5a6a8f;
    font-size: 13px;
}

.calendar-day-status {
    border: 1px solid #d8e6ff;
    border-radius: 12px;
    background: #f7fbff;
    color: #38507c;
    padding: 12px;
    margin-bottom: var(--space-3);
}

.calendar-day-status.is-available {
    border-color: #b8e7cf;
    background: #eefcf4;
    color: #1f6f4e;
}

.calendar-day-note {
    margin: 0 0 var(--space-3);
    color: #5e6d90;
    font-size: 13px;
}

.calendar-day-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: var(--space-3);
}

.calendar-modal-toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: var(--space-2);
    align-items: center;
    border: 1px solid #d9e5ff;
    border-radius: 12px;
    background: #f7fbff;
    padding: 10px 12px;
    margin-bottom: var(--space-3);
}

.calendar-modal-toolbar-info {
    display: grid;
    gap: 2px;
}

.calendar-modal-toolbar-info strong {
    font-size: 13px;
    color: #304a83;
}

.calendar-modal-toolbar-info small {
    color: #6074a4;
    font-size: 12px;
}

.calendar-view-switch {
    display: flex;
    gap: 6px;
}

.calendar-view-switch .btn {
    min-width: 88px;
}

.calendar-modal-cards {
    margin-top: var(--space-2);
}

.calendar-meetings-list {
    margin-top: var(--space-2);
    display: grid;
    gap: 10px;
}

.calendar-list-item {
    border: 1px solid #dce6ff;
    border-radius: 14px;
    background: #fbfdff;
    padding: 12px;
    display: grid;
    gap: 8px;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.calendar-list-item.is-context-open {
    border-color: #9fb8ff;
    box-shadow: 0 12px 24px rgba(57, 76, 132, 0.12);
}

.calendar-list-item-main {
    display: grid;
    gap: 6px;
}

.calendar-list-item-main p {
    margin: 0;
    color: #4f638f;
    font-size: 13px;
}

.calendar-list-item-head {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    align-items: center;
}

.calendar-list-item-head h3 {
    margin: 0;
    color: #2d4378;
    font-size: 15px;
}

.calendar-list-item-head span {
    color: #405687;
    font-size: 12px;
    font-weight: 700;
    border: 1px solid #d8e3ff;
    border-radius: 999px;
    padding: 3px 9px;
    background: #eef4ff;
}

.calendar-list-item-open {
    width: fit-content;
    border: 1px dashed #c9d8ff;
    border-radius: 999px;
    background: #f7faff;
    color: #3a5290;
    font-size: 12px;
    font-weight: 700;
    padding: 5px 10px;
    cursor: pointer;
}

.calendar-list-item-open:hover {
    border-color: #97b1ff;
    background: #edf4ff;
    color: #2444a8;
}

.calendar-list-item-context {
    display: none;
    border-top: 1px solid #e6edff;
    padding-top: 10px;
    gap: 8px;
}

.calendar-list-item.is-context-open .calendar-list-item-context {
    display: grid;
}

.calendar-list-item-context-head {
    display: grid;
    gap: 2px;
}

.calendar-list-item-context-head strong {
    font-size: 13px;
    color: #2b4074;
}

.calendar-list-item-context-head small {
    color: #6476a0;
    font-size: 12px;
}

.calendar-list-item-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
}

.calendar-list-item-actions .inline-form {
    margin: 0;
}

.calendar-list-item-actions .btn-small {
    width: 100%;
    min-width: 0;
}

.calendar-modal-form {
    margin-top: var(--space-3);
}

.calendar-modal-form .form-actions {
    justify-content: flex-end;
}

.calendar-attendees-list {
    max-height: 220px;
    overflow: auto;
}

.calendar-form-error {
    margin: 0 0 var(--space-3);
    border: 1px solid #f5bcc9;
    border-radius: 12px;
    background: #fff4f7;
    color: #a03a55;
    padding: 10px 12px;
    font-size: 13px;
}

.calendar-form-error.is-hidden {
    display: none;
}

.btn.is-disabled {
    opacity: 0.6;
    pointer-events: none;
}

/* ---------- Profile ---------- */
.profile-sections {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-5);
}

.profile-section {
    padding: var(--space-5);
}

.profile-section h2 {
    margin-bottom: var(--space-4);
}

.profile-recovery-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: var(--space-3);
    margin-bottom: var(--space-4);
}

.profile-recovery-stat {
    border: 1px solid #d9e3ff;
    border-radius: 12px;
    background: #f7f9ff;
    padding: var(--space-3);
}

.profile-recovery-stat span {
    display: block;
    color: var(--text-soft);
    font-size: 12px;
    margin-bottom: 4px;
}

.profile-recovery-stat strong {
    color: #30497f;
    font-size: 16px;
}

.profile-recovery-form {
    margin-bottom: var(--space-4);
}

.profile-recovery-codes {
    border: 1px dashed #c7d7ff;
    border-radius: 14px;
    background: #f9fbff;
    padding: var(--space-4);
}

.profile-recovery-codes h3 {
    margin-bottom: var(--space-2);
    font-size: 15px;
}

.profile-recovery-codes ul {
    margin: var(--space-3) 0;
    padding-left: 18px;
    display: grid;
    gap: 6px;
}

.profile-recovery-codes code {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.4px;
}

/* ---------- Login ---------- */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-5);
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 16% 18%, rgba(144, 170, 255, 0.78), transparent 30%),
        radial-gradient(circle at 82% 12%, rgba(124, 217, 255, 0.76), transparent 27%),
        linear-gradient(145deg, #eaf0ff 0%, #dce8ff 42%, #d7f0ff 100%);
    background-size: 260% 260%;
    animation: login-bg-drift 8s linear infinite;
    will-change: background-position;
}

.login-page::before,
.login-page::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    filter: blur(20px);
    opacity: 0.7;
    pointer-events: none;
    will-change: transform;
}

.login-page::before {
    width: 420px;
    height: 420px;
    left: -150px;
    top: -40px;
    background: radial-gradient(circle, rgba(92, 127, 255, 0.5), rgba(92, 127, 255, 0));
    animation: login-orb-left 6.8s ease-in-out infinite;
}

.login-page::after {
    width: 500px;
    height: 500px;
    right: -180px;
    bottom: -90px;
    background: radial-gradient(circle, rgba(35, 177, 236, 0.45), rgba(35, 177, 236, 0));
    animation: login-orb-right 8s ease-in-out infinite;
}

.login-container {
    width: 100%;
    max-width: 430px;
    position: relative;
    z-index: 1;
}

.login-box {
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(179, 198, 255, 0.6);
    border-radius: 24px;
    padding: 34px 28px;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(6px);
}

.login-brand {
    display: flex;
    justify-content: center;
    margin-bottom: var(--space-3);
}

.login-brand-mark {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    background:
        radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.9), transparent 46%),
        linear-gradient(145deg, #3156ff, #0ea5e9);
    border: 1px solid rgba(255, 255, 255, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 16px 30px rgba(39, 78, 206, 0.28);
    animation: login-logo-float 7s ease-in-out infinite;
}

.login-brand-core {
    color: #ffffff;
    font-size: 30px;
    font-weight: 900;
    letter-spacing: 0.02em;
}

.login-title {
    margin-bottom: 6px;
    text-align: center;
    color: #2445bf;
    font-size: 30px;
    letter-spacing: 0.2px;
}

.login-subtitle {
    margin-bottom: var(--space-5);
    text-align: center;
    color: #4b5c84;
    font-size: 18px;
    font-weight: 700;
}

.login-box h1:not(.login-title) {
    margin-bottom: var(--space-2);
    text-align: center;
    color: #2445bf;
}

.login-box h2:not(.login-subtitle) {
    margin-bottom: var(--space-4);
    text-align: center;
    color: #4b5c84;
    font-size: 18px;
}

.login-form {
    display: grid;
    gap: var(--space-2);
}

.login-form .form-group {
    margin-bottom: 0;
}

.login-form input[type="text"],
.login-form input[type="password"] {
    height: 44px;
}

.login-form input::placeholder {
    color: #7a8cb8;
}

.login-password-wrap {
    position: relative;
}

.login-password-wrap input[type="password"],
.login-password-wrap input[type="text"] {
    padding-right: 46px;
}

.login-password-toggle {
    position: absolute;
    top: 50%;
    right: 10px;
    width: 28px;
    height: 28px;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #5970a6;
    cursor: pointer;
    transition: background var(--transition), color var(--transition), transform var(--transition);
}

.login-password-toggle:hover {
    color: #2749b1;
    background: #eef3ff;
}

.login-password-toggle:focus-visible {
    outline: 2px solid #86a3ff;
    outline-offset: 2px;
}

.login-password-icon {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.login-remember-wrap {
    margin-top: 2px;
    margin-bottom: 2px;
}

.login-form .login-remember {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    color: #4a5e8d;
    cursor: pointer;
    margin: 0;
}

.login-remember input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: #3156ff;
    flex: 0 0 16px;
}

.login-remember span {
    line-height: 1;
}

.login-footer {
    margin-top: var(--space-5);
    border-top: 1px solid #d8e3ff;
    padding-top: var(--space-4);
    font-size: 13px;
    color: #5b6f9f;
    text-align: center;
}

.login-footer p {
    margin: 0;
}

.login-footer a {
    color: #2f4fb4;
    font-weight: 700;
}

.login-footer a:hover {
    text-decoration: underline;
}

@keyframes login-bg-drift {
    0% { background-position: 0% 0%; }
    25% { background-position: 100% 0%; }
    50% { background-position: 100% 100%; }
    75% { background-position: 0% 100%; }
    100% { background-position: 0% 0%; }
}

@keyframes login-orb-left {
    0% { transform: translate3d(0, 0, 0) scale(1); }
    50% { transform: translate3d(120px, 40px, 0) scale(1.08); }
    100% { transform: translate3d(0, 0, 0) scale(1); }
}

@keyframes login-orb-right {
    0% { transform: translate3d(0, 0, 0) scale(1); }
    50% { transform: translate3d(-140px, -55px, 0) scale(1.1); }
    100% { transform: translate3d(0, 0, 0) scale(1); }
}

@keyframes login-logo-float {
    0% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
    100% { transform: translateY(0); }
}

/* ---------- Modal ---------- */
.app-modal {
    position: fixed;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition);
    z-index: 999;
}

.app-modal.is-open {
    opacity: 1;
    visibility: visible;
}

.app-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(20, 31, 55, 0.5);
    backdrop-filter: blur(4px);
}

.app-modal-dialog {
    position: relative;
    width: min(680px, calc(100% - 24px));
    margin: min(8vh, 70px) auto;
    background: #fff;
    border: 1px solid #dbe4ff;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    transform: translateY(16px) scale(0.98);
    transition: transform var(--transition);
}

.app-modal.is-open .app-modal-dialog {
    transform: translateY(0) scale(1);
}

.app-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-5) var(--space-6) var(--space-4);
    border-bottom: 1px solid #e5ebff;
}

.app-modal-header h3 {
    margin: 0;
    font-size: 20px;
}

.app-modal-close {
    border: 1px solid #d6dffb;
    background: #f4f7ff;
    border-radius: 10px;
    width: 34px;
    height: 34px;
    cursor: pointer;
    color: #445374;
    font-weight: 800;
}

.app-modal-body {
    padding: var(--space-5) var(--space-6);
    max-height: 62vh;
    overflow: auto;
}

.app-modal-footer {
    padding: var(--space-4) var(--space-6) var(--space-6);
    border-top: 1px solid #e5ebff;
    display: flex;
    justify-content: flex-end;
    gap: var(--space-3);
}

.no-data {
    margin: 0;
    border: 1px dashed #c7d5ff;
    border-radius: 12px;
    background: #f9fbff;
    color: #5d6d90;
    padding: 16px;
    text-align: center;
}

tr.inactive {
    opacity: 0.74;
    background: #f8f9fc;
}

tr.status-cancelada td {
    color: #a84a61;
    text-decoration: line-through;
}

tr.status-completada td {
    color: #2e7a61;
}

.my-attendance-row {
    background: rgba(49, 86, 255, 0.05);
}

/* ---------- Foro ---------- */
.forum-toolbar {
    margin-bottom: var(--space-5);
}

.forum-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    margin-bottom: var(--space-3);
}

.forum-header-row h1 {
    margin: 0;
    font-size: 2rem;
}

.forum-section-title-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: var(--space-4);
}

.forum-section-top-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: var(--space-3);
    flex-wrap: nowrap;
}

.forum-inline-search {
    margin: 0;
    display: block;
    width: clamp(210px, 30vw, 360px);
}

.forum-inline-search input[type="text"] {
    width: 100%;
    min-width: 0;
}

@media (max-width: 768px) {
    .forum-header-row {
        flex-direction: column;
        align-items: flex-start;
    }
}

.forum-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-5);
    align-items: start;
}

.forum-main {
    min-width: 0;
}

.forum-new-topic-btn {
    white-space: nowrap;
}

.forum-topic-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--space-4);
}

.forum-topic-card {
    border: 1px solid #dbe6ff;
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    box-shadow: 0 8px 22px rgba(57, 76, 132, 0.08);
    padding: 14px;
    display: grid;
    gap: 10px;
    transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.forum-topic-card:hover {
    transform: translateY(-2px);
    border-color: #becfff;
    box-shadow: 0 12px 24px rgba(57, 76, 132, 0.14);
}

.forum-topic-card.is-context-open {
    border-color: #9fb6ff;
    box-shadow: 0 0 0 2px rgba(72, 105, 210, 0.16), 0 12px 24px rgba(57, 76, 132, 0.14);
}

.forum-topic-row.is-context-open td {
    background: rgba(49, 86, 255, 0.07);
}

.forum-topic-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 8px;
}

.forum-topic-head-badges {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.forum-topic-pin,
.forum-topic-pin-inline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    border: 1px solid #ffd98a;
    background: #fff8e6;
    color: #a06d03;
    font-size: 12px;
    line-height: 1;
}

.forum-topic-pin-inline {
    width: 18px;
    height: 18px;
    font-size: 10px;
    margin-right: 6px;
    vertical-align: middle;
}

.forum-topic-head h3 {
    margin: 0;
    font-size: 16px;
    color: #2d4276;
    line-height: 1.3;
}

.forum-topic-status-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}

.forum-priority-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #d4ddfa;
    border-radius: 999px;
    padding: 4px 9px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    color: #3550a0;
    background: #eef3ff;
    white-space: nowrap;
}

.forum-priority-baja {
    border-color: #d6e8ff;
    background: #f3f9ff;
    color: #27618b;
}

.forum-priority-media {
    border-color: #d4ddfa;
    background: #eef3ff;
    color: #3550a0;
}

.forum-priority-alta {
    border-color: #ffd7b4;
    background: #fff3e8;
    color: #a75213;
}

.forum-priority-critica {
    border-color: #f3b7c7;
    background: #fff0f5;
    color: #b02852;
}

.forum-topic-unread {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #d4ddfa;
    border-radius: 999px;
    padding: 4px 9px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    color: #586ca0;
    background: #f6f8ff;
    white-space: nowrap;
}

.forum-topic-unread.has-unread {
    border-color: #92b8ff;
    background: #edf4ff;
    color: #1f4dae;
}

.forum-topic-description {
    margin: 0;
    color: #566892;
    font-size: 13px;
    line-height: 1.45;
    min-height: 54px;
}

.forum-topic-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.forum-topic-tag {
    display: inline-flex;
    align-items: center;
    border: 1px solid #d7e1ff;
    border-radius: 999px;
    background: #f4f7ff;
    color: #36549f;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    padding: 5px 9px;
}

.forum-topic-meta {
    margin: 0;
    display: grid;
    gap: 7px;
}

.forum-topic-meta > div {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 8px;
    align-items: start;
}

.forum-topic-meta dt {
    margin: 0;
    color: #3251ac;
    font-size: 12px;
    font-weight: 700;
}

.forum-topic-meta dd {
    margin: 0;
    color: #334b7a;
    font-size: 13px;
    line-height: 1.35;
}

.forum-topic-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 2px;
}

.forum-topic-actions .inline-form {
    margin: 0;
}

.forum-topic-hint {
    margin: 0;
    color: #6a7ea9;
    font-size: 12px;
    font-weight: 600;
}

.form-group .forum-topic-feature-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: #445b8e;
    font-weight: 700;
    font-size: 13px;
}

.form-group .forum-topic-feature-check input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: #3156ff;
}

.notification-list {
    display: grid;
    gap: var(--space-3);
}

.notification-item {
    border: 1px solid #dce5ff;
    border-radius: 14px;
    background: #fbfcff;
    padding: 14px;
}

.notification-item.unread {
    border-color: rgba(49, 86, 255, 0.45);
    background: rgba(49, 86, 255, 0.06);
}

.notification-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    margin-bottom: 8px;
}

.notification-header h3 {
    margin: 0;
    font-size: 16px;
}

.notification-actions {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: var(--space-3);
    flex-wrap: wrap;
}

.search-result-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
}

.search-result-list li {
    border: 1px solid #e3eaff;
    border-radius: 12px;
    padding: 10px 12px;
    background: #f9fbff;
    display: flex;
    justify-content: space-between;
    gap: var(--space-2);
    align-items: center;
}

.search-result-list a {
    font-weight: 700;
}

.search-result-list small {
    color: var(--text-soft);
}

.forum-aside {
    min-width: 0;
}

.forum-posts {
    display: grid;
    gap: var(--space-4);
}

.forum-post {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: var(--space-4);
    padding: 24px;
    border: 1px solid #e1e8ff;
    border-radius: 28px;
    background: #f8faff;
    box-shadow: 0 10px 24px rgba(108, 127, 186, 0.06);
    align-items: start;
}

.forum-post.mine {
    border-color: rgba(49, 86, 255, 0.35);
    background: rgba(232, 240, 255, 0.98);
}

.forum-post-side {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: var(--space-4);
    text-align: center;
    padding-right: var(--space-4);
    border-right: 1px solid #e8eef9;
}

.forum-post-side .forum-author-info {
    align-items: center;
}

.forum-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    font-size: 22px;
    font-weight: 900;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.18);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.forum-avatar-img {
    padding: 0;
    background: transparent;
    box-shadow: none;
}

.forum-avatar-img img {
    width: 72px;
    height: 72px;
    display: block;
    border-radius: 50%;
    object-fit: cover;
}

.profile-avatar-img,
.avatar-preview {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    border: 1px solid var(--panel-border);
    margin-top: var(--space-3);
}

.forum-author-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    justify-content: center;
}

.forum-author-info strong {
    font-size: 14px;
}

.forum-author-info span {
    font-size: 13px;
    color: var(--text-soft);
}

.forum-post-main {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.forum-post-meta {
    display: flex;
    justify-content: flex-end;
    color: var(--text-soft);
    font-size: 13px;
}

.forum-post-box {
    background: #ffffff;
    border: 1px solid #e4ecff;
    border-radius: 28px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    text-align: left !important;
    align-items: stretch;
    box-shadow: 0 10px 24px rgba(100, 117, 183, 0.06);
}

.forum-post-text {
    display: block;
    width: 100%;
    text-align: left !important;
    justify-content: flex-start;
    align-items: flex-start;
    background: #fbfcff;
    border: 1px solid #eef2ff;
    border-radius: 24px;
    padding: 24px;
    color: #1f2937;
    font-size: 15px;
    line-height: 1.95;
    white-space: pre-wrap;
}

.forum-attachments {
    padding: 18px 20px 20px;
    border: 1px solid #e2e7ff;
    border-radius: 24px;
    background: #fbfcff;
}

.forum-attachments strong {
    display: block;
    margin-bottom: 10px;
    color: #2f4fb4;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

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

.attachment-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid #e2e9ff;
    border-radius: 12px;
    background: #ffffff;
}

.attachment-list a {
    color: #244dff;
    text-decoration: none;
    font-weight: 600;
}

.attachment-list a:hover {
    text-decoration: underline;
}

.attachment-size {
    color: #6e7a99;
    font-size: 12px;
    white-space: nowrap;
}


/* ---------- Chat ---------- */
.chat-header {
    display: grid;
    gap: 10px;
    margin-bottom: var(--space-4);
}

.chat-section-title-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: var(--space-4);
}

.chat-header h1 {
    margin: 0;
}

.chat-header .text-soft {
    margin: 0;
}

.chat-section-top-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: nowrap;
}

.chat-section-top-actions input[type="text"] {
    width: clamp(210px, 28vw, 360px);
    border: 1px solid #d3ddfa;
    border-radius: 12px;
    background: #fff;
    color: var(--text);
    padding: 10px 12px;
    font-size: 14px;
    outline: none;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.chat-section-top-actions input[type="text"]:focus {
    border-color: #86a3ff;
    box-shadow: 0 0 0 4px rgba(49, 86, 255, 0.12);
}

.chat-new-chat-btn {
    white-space: nowrap;
}

.chat-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: var(--space-5);
    align-items: start;
}

.chat-compact-sidebar .chat-layout {
    grid-template-columns: 250px 1fr;
}

.chat-compact-sidebar .chat-user-item {
    padding: 8px 10px;
}

.chat-sidebar {
    border: 1px solid #dce4ff;
    border-radius: var(--radius-md);
    background: #f9fbff;
    overflow: visible;
}

.chat-search {
    padding: var(--space-3);
    border-bottom: 1px solid #e4eaff;
}

.chat-section-selector {
    margin-top: 10px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
}

.chat-section-selector-btn {
    border: 1px solid #d3ddfa;
    border-radius: 10px;
    background: #ffffff;
    color: #3f568d;
    font-size: 12px;
    font-weight: 700;
    padding: 7px 8px;
    cursor: pointer;
    text-align: center;
    transition: border-color var(--transition), background var(--transition), color var(--transition), transform var(--transition);
}

.chat-section-selector-btn:hover {
    border-color: #9eb3ff;
    background: #eef4ff;
    color: #2748ab;
    transform: translateY(-1px);
}

.chat-section-selector-btn.is-active {
    color: #ffffff;
    border-color: #2340be;
    background: linear-gradient(135deg, #3b63ff, #2441c8);
    box-shadow: 0 7px 16px rgba(43, 77, 214, 0.22);
}

.chat-search-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: var(--space-2);
    align-items: center;
}

.chat-archive-toggle {
    display: inline-block;
    margin-top: 8px;
    font-size: 12px;
    color: #4863b8;
    font-weight: 600;
}

.chat-search input {
    width: 100%;
    border: 1px solid #d3ddfa;
    border-radius: 12px;
    background: #fff;
    color: var(--text);
    padding: 10px 12px;
    font-size: 14px;
    outline: none;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.chat-search input:focus {
    border-color: #86a3ff;
    box-shadow: 0 0 0 4px rgba(49, 86, 255, 0.12);
}

.chat-open-all-btn {
    width: 40px;
    height: 40px;
    border: 1px solid #cfdcff;
    border-radius: 10px;
    background: #ffffff;
    color: #3a4a70;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    transition: all var(--transition);
}

.chat-open-all-btn:hover {
    border-color: #9fb4ff;
    background: #eff4ff;
    color: var(--primary);
}

.chat-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.chat-users-header {
    padding: 10px 12px;
    border-bottom: 1px solid #e6ecff;
    background: #f4f8ff;
}

.chat-users-header strong {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #4b5f8c;
}

.chat-users {
    max-height: 560px;
    overflow: auto;
    overflow-x: visible;
}

.chat-directory-section.is-hidden {
    display: none;
}

.chat-user-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: stretch;
    border-bottom: 1px solid #e9efff;
}

.chat-user-item {
    display: flex;
    justify-content: space-between;
    gap: var(--space-2);
    padding: 11px 12px;
    min-width: 0;
    transition: background var(--transition);
}

.chat-user-item:hover {
    background: #f1f5ff;
}

.chat-user-row.active .chat-user-item,
.chat-user-item.active {
    background: #e9f0ff;
}

.chat-user-item strong {
    display: block;
}

.chat-user-item small {
    color: var(--text-soft);
}

.chat-user-meta {
    text-align: right;
    display: grid;
    gap: 4px;
    justify-items: end;
    flex-shrink: 0;
}

.chat-user-actions {
    position: relative;
    display: flex;
    align-items: center;
    padding-right: 8px;
}

.chat-user-actions-toggle {
    width: 30px;
    height: 30px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: #5c6f99;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    transition: all var(--transition);
}

.chat-user-actions-toggle:hover {
    background: #eef3ff;
    border-color: #d8e3ff;
    color: #2f4fb4;
}

.chat-user-actions.is-open .chat-user-actions-toggle {
    background: #eef3ff;
    border-color: #d8e3ff;
}

.chat-user-actions-menu {
    display: none;
    position: absolute;
    top: calc(100% - 2px);
    right: 8px;
    width: 160px;
    border: 1px solid #d7e2ff;
    border-radius: 12px;
    background: #fff;
    box-shadow: var(--shadow-sm);
    z-index: 40;
    padding: 6px;
}

.chat-user-actions-menu.is-floating {
    position: fixed;
    top: 0;
    left: 0;
    right: auto;
    z-index: 1300;
    min-width: 170px;
}

.chat-user-actions.is-open .chat-user-actions-menu {
    display: block;
}

.chat-user-action-item {
    display: block;
    width: 100%;
    border: 0;
    background: transparent;
    text-align: left;
    color: #3f5078;
    font-size: 13px;
    font-weight: 600;
    border-radius: 8px;
    padding: 8px 10px;
    cursor: pointer;
}

.chat-user-action-item:hover {
    background: #f1f5ff;
    color: #2d4cb8;
}

.chat-user-action-form {
    margin: 0;
}

.chat-user-action-item.is-danger {
    color: #b83359;
}

.chat-user-action-item.is-danger:hover {
    background: #fff1f5;
    color: #a3264c;
}

.chat-all-users-list {
    display: grid;
    gap: var(--space-2);
    margin-top: var(--space-3);
}

.chat-all-user-item {
    display: grid;
    gap: 3px;
    border: 1px solid #dfe7ff;
    border-radius: 12px;
    background: #f9fbff;
    padding: 10px 12px;
}

.chat-all-user-item:hover {
    border-color: #c8d7ff;
    background: #f2f7ff;
}

.chat-all-user-item small {
    color: var(--text-soft);
}

.chat-contacts-modal,
.chat-settings-modal {
    display: grid;
    gap: 12px;
}

.chat-contacts-header,
.chat-settings-header {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 10px;
    align-items: center;
    border: 1px solid #dde7ff;
    border-radius: 12px;
    background: #f6f9ff;
    padding: 10px 12px;
}

.chat-modal-icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: #e9f0ff;
    border: 1px solid #d0dcff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #2f4fb4;
    font-size: 17px;
}

.chat-contacts-header strong,
.chat-settings-header strong {
    display: block;
    color: #2a3e79;
    font-size: 14px;
}

.chat-contacts-header small,
.chat-settings-header small {
    color: #6375a1;
    font-size: 12px;
}

.chat-contacts-list {
    max-height: 360px;
    overflow: auto;
    display: grid;
    gap: 8px;
    padding-right: 2px;
}

.chat-contact-row {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 10px;
    border: 1px solid #dfe7ff;
    border-radius: 12px;
    background: #fbfcff;
    padding: 10px 12px;
    transition: border-color var(--transition), background var(--transition), transform var(--transition);
}

.chat-contact-row:hover {
    border-color: #c4d4ff;
    background: #f2f7ff;
    transform: translateY(-1px);
}

.chat-contact-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: #edf3ff;
    border: 1px solid #d4e0ff;
    color: #3a58bb;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.chat-contact-main {
    display: grid;
    gap: 2px;
}

.chat-contact-main strong {
    color: #2f4068;
    font-size: 13px;
}

.chat-contact-main small {
    color: #65769e;
    font-size: 12px;
}

.chat-contact-open {
    color: #4f67ab;
    font-size: 16px;
    line-height: 1;
}

.chat-settings-grid {
    display: grid;
    gap: 10px;
}

.chat-settings-check {
    display: flex;
    align-items: center;
    gap: 9px;
    border: 1px solid #dbe5ff;
    border-radius: 10px;
    background: #fbfcff;
    padding: 10px 11px;
    color: #3e5079;
    font-size: 13px;
    font-weight: 600;
}

.chat-settings-check input[type="checkbox"] {
    width: 16px;
    height: 16px;
}

.chat-settings-inline {
    display: grid;
    gap: 6px;
    color: #3e5079;
    font-size: 13px;
    font-weight: 600;
}

.chat-settings-inline input[type="number"] {
    border: 1px solid #d3ddfa;
    border-radius: 10px;
    background: #fff;
    color: var(--text);
    padding: 8px 10px;
    font-size: 13px;
    outline: none;
}

.chat-settings-inline input[type="number"]:focus {
    border-color: #86a3ff;
    box-shadow: 0 0 0 4px rgba(49, 86, 255, 0.12);
}

.chat-settings-inline textarea,
.chat-settings-inline input[type="datetime-local"] {
    border: 1px solid #d3ddfa;
    border-radius: 10px;
    background: #fff;
    color: var(--text);
    padding: 8px 10px;
    font-size: 13px;
    outline: none;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.chat-settings-inline textarea {
    resize: vertical;
    min-height: 92px;
}

.chat-settings-inline textarea:focus,
.chat-settings-inline input[type="datetime-local"]:focus {
    border-color: #86a3ff;
    box-shadow: 0 0 0 4px rgba(49, 86, 255, 0.12);
}

.chat-settings-tools {
    display: flex;
    justify-content: flex-end;
}

.chat-main {
    border: 1px solid #dce4ff;
    border-radius: var(--radius-md);
    background: #fff;
    display: grid;
    grid-template-rows: auto minmax(0, 430px) auto auto;
    min-height: 640px;
    overflow: hidden;
}

.chat-peer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: var(--space-4) var(--space-5);
    border-bottom: 1px solid #e4eaff;
    background: #f7faff;
}

.chat-peer-main {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.chat-peer h3 {
    margin: 0;
}

.chat-peer small {
    color: var(--text-soft);
}

.chat-peer-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.chat-peer-context-btn {
    width: 34px;
    height: 34px;
    border: 1px solid #d1ddff;
    border-radius: 10px;
    background: #fff;
    color: #3f5489;
    cursor: pointer;
    font-weight: 700;
    line-height: 1;
}

.chat-peer-context-btn:hover {
    border-color: #9fb4ff;
    background: #eff4ff;
    color: #2a4bb2;
}

.chat-peer-buzz-btn {
    border-color: #e3d5a2;
    background: linear-gradient(180deg, #fff9e8, #f8ecc5);
    color: #8a6400;
}

.chat-peer-buzz-btn:hover {
    border-color: #dcb84e;
    background: linear-gradient(180deg, #fff4d2, #f5e3ad);
    color: #704f00;
}

.chat-messages-shell {
    position: relative;
    height: 100%;
    min-height: 0;
}

.chat-overlay {
    position: absolute;
    left: 12px;
    right: 12px;
    z-index: 6;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    padding: 0;
    pointer-events: none;
}

.chat-pinned-overlay {
    top: 10px;
}

.chat-scheduled-overlay {
    bottom: 12px;
}

.chat-scheduled-inline {
    margin-top: 4px;
}

.chat-scheduled-inline.is-empty {
    display: none;
}

.chat-overlay.is-empty {
    display: none;
}

.chat-overlay-head {
    display: flex;
    align-items: center;
    gap: 8px;
}

.chat-overlay-head strong {
    font-size: 12px;
    color: #304a83;
}

.chat-overlay-icon,
.chat-overlay-item-icon {
    width: 18px;
    height: 18px;
    border-radius: 999px;
    background: #eaf1ff;
    border: 1px solid #cfdcff;
    color: #2e4bb0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
}

.chat-overlay-list {
    display: grid;
    gap: 8px;
    max-height: none;
    overflow: visible;
    padding-right: 0;
    pointer-events: auto;
}

.chat-overlay-row {
    width: 100%;
    display: flex;
    justify-content: flex-start;
}

.chat-overlay-row.mine {
    justify-content: flex-end;
}

.chat-overlay-empty {
    margin: 0;
    color: #66779f;
    font-size: 12px;
}

.chat-messages {
    height: 100%;
    padding: 70px var(--space-4) var(--space-4);
    overflow-y: scroll;
    overflow-x: hidden;
    scrollbar-gutter: stable both-edges;
    scrollbar-width: thin;
    scrollbar-color: #9cb1f6 #edf2ff;
    background:
        linear-gradient(180deg, #fcfdff 0%, #f7faff 100%);
}

.chat-messages::-webkit-scrollbar {
    width: 11px;
}

.chat-messages::-webkit-scrollbar-track {
    background: #edf2ff;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #9cb1f6;
    border-radius: 999px;
    border: 2px solid #edf2ff;
}

.chat-bubble {
    max-width: 78%;
    margin-bottom: calc(var(--space-3) + 4px);
    border: 1px solid #dce5ff;
    background: #fff;
    border-radius: 14px;
    padding: 10px 12px;
    box-shadow: 0 8px 18px rgba(57, 76, 132, 0.08);
    position: relative;
}

.chat-bubble.has-reactions {
    margin-bottom: calc(var(--space-3) + 20px);
}

.chat-bubble.mine {
    margin-left: auto;
    border-color: #cfdcff;
    background: #edf3ff;
}

.chat-bubble header {
    display: flex;
    justify-content: space-between;
    padding-left: 24px;
    padding-right: 24px;
    margin-bottom: 6px;
}

.chat-bubble small {
    color: var(--text-soft);
}

.chat-bubble-status {
    margin-top: 8px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
}

.chat-bubble-status small {
    font-size: 11px;
    font-weight: 700;
}

.chat-bubble-check {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1;
}

.chat-bubble-status.is-sent small,
.chat-bubble-status.is-sent .chat-bubble-check {
    color: #7b8ab2;
}

.chat-bubble-status.is-delivered small,
.chat-bubble-status.is-delivered .chat-bubble-check {
    color: #536ea8;
}

.chat-bubble-status.is-read small,
.chat-bubble-status.is-read .chat-bubble-check {
    color: #2f4fb4;
}

.chat-send-form {
    position: relative;
    border-top: 1px solid #e4eaff;
    padding: var(--space-4);
    display: grid;
    gap: 10px;
}

.chat-send-main {
    display: grid;
    grid-template-columns: auto auto auto minmax(0, 1fr) auto;
    gap: 8px;
    align-items: start;
    border: 1px solid #d8e3ff;
    border-radius: 14px;
    background: linear-gradient(180deg, #ffffff, #f7faff);
    padding: 8px;
    box-shadow: 0 8px 18px rgba(57, 76, 132, 0.08);
}

.chat-message-input-stack {
    min-width: 0;
    display: grid;
    gap: 6px;
    align-self: start;
}

.chat-send-form textarea {
    height: 44px;
    min-height: 44px;
    max-height: 44px;
    border: 1px solid #cfdcff;
    border-radius: 12px;
    background: #ffffff;
    color: var(--text);
    padding: 10px 12px;
    font-size: 14px;
    line-height: 1.25;
    outline: none;
    resize: none;
    overflow-y: auto;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.chat-send-form textarea:focus {
    border-color: #6f8fff;
    box-shadow: 0 0 0 4px rgba(49, 86, 255, 0.15);
}

.chat-send-form textarea::placeholder {
    color: #6d7fa6;
}

.chat-send-submit {
    height: 44px;
    min-width: 88px;
    align-self: start;
}

.chat-input-icon-btn {
    width: 44px;
    height: 44px;
    border: 1px solid #c7d6ff;
    border-radius: 12px;
    background: linear-gradient(180deg, #ffffff, #f0f5ff);
    color: #3652a9;
    font-size: 18px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: start;
    transition: border-color var(--transition), background var(--transition), transform var(--transition), box-shadow var(--transition);
}

.chat-input-icon-btn:hover {
    border-color: #90a9ff;
    background: linear-gradient(180deg, #fdfdff, #e8f0ff);
    color: #2b49ad;
    box-shadow: 0 8px 16px rgba(53, 83, 175, 0.18);
    transform: translateY(-1px);
}

.chat-input-icon-btn:active {
    transform: translateY(0);
}

.chat-emoji-toggle-icon {
    font-size: 19px;
    line-height: 1;
}

.chat-attach-toggle-icon {
    font-size: 18px;
    line-height: 1;
}

.chat-schedule-toggle-icon {
    font-size: 16px;
    line-height: 1;
}

.chat-emoji-picker {
    position: absolute;
    left: 16px;
    bottom: 146px;
    width: min(360px, calc(100% - 32px));
    border: 1px solid #cfdcff;
    border-radius: 14px;
    background: linear-gradient(180deg, #ffffff, #f8fbff);
    box-shadow: 0 18px 34px rgba(52, 74, 129, 0.24);
    z-index: 11;
    padding: 10px;
    display: grid;
    gap: 8px;
    animation: chatEmojiDrawerIn 0.16s ease;
}

@keyframes chatEmojiDrawerIn {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.chat-emoji-drawer-head {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #dde7ff;
    border-radius: 10px;
    background: #f4f8ff;
    padding: 6px 8px;
}

.chat-emoji-drawer-icon {
    width: 24px;
    height: 24px;
    border-radius: 8px;
    background: #e9f0ff;
    border: 1px solid #d0dcff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.chat-emoji-drawer-head strong {
    color: #36509c;
    font-size: 13px;
}

.chat-emoji-drawer-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 6px;
}

.chat-emoji-btn {
    border: 1px solid #d2defe;
    border-radius: 8px;
    background: #ffffff;
    height: 34px;
    cursor: pointer;
    font-size: 16px;
    transition: border-color var(--transition), background var(--transition), transform var(--transition);
}

.chat-emoji-btn:hover {
    border-color: #9bb2ff;
    background: #ecf2ff;
    transform: translateY(-1px);
}

.chat-send-extras {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.chat-pinned-item,
.chat-scheduled-item {
    border: 1px solid #d6e2ff;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.96);
    padding: 6px 10px;
    font-size: 12px;
    color: #3f517d;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 6px 14px rgba(57, 76, 132, 0.12);
    backdrop-filter: blur(4px);
}

.chat-pinned-item {
    border-color: #ccd9ff;
    background: rgba(241, 246, 255, 0.96);
    cursor: pointer;
}

.chat-scheduled-item {
    border-color: #cfe0ff;
    background: rgba(238, 247, 255, 0.96);
    cursor: pointer;
}

.chat-pinned-item:focus-visible,
.chat-scheduled-item:focus-visible {
    outline: 2px solid #86a3ff;
    outline-offset: 1px;
}

.chat-bubble-focus {
    border-color: #7d98f8 !important;
    box-shadow: 0 0 0 4px rgba(74, 107, 232, 0.2), 0 10px 22px rgba(49, 77, 166, 0.22) !important;
    animation: chatBubbleFocusIn 0.35s ease;
}

@keyframes chatBubbleFocusIn {
    from {
        transform: translateY(-2px) scale(0.99);
    }
    to {
        transform: translateY(0) scale(1);
    }
}

.chat-attach-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.chat-send-extras input[type="datetime-local"] {
    width: min(220px, 100%);
}

.chat-attach-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-height: 28px;
}

.chat-attach-inline.is-empty {
    display: none;
}

.chat-attach-chip {
    max-width: 100%;
    border: 1px solid #ccdbff;
    border-radius: 999px;
    background: #f2f6ff;
    color: #3652a9;
    padding: 4px 9px;
    font-size: 12px;
    line-height: 1.2;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.chat-attach-chip-icon {
    width: 16px;
    height: 16px;
    border-radius: 999px;
    border: 1px solid #bcd0ff;
    background: #e5edff;
    color: #2f4fb4;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    flex: 0 0 auto;
}

.chat-attach-chip-text {
    min-width: 0;
    max-width: min(300px, 38vw);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-send-extras input[type="datetime-local"] {
    border: 1px solid #cfdcff;
    border-radius: 10px;
    background: #ffffff;
    color: #4a5678;
    padding: 9px 10px;
    font-size: 12px;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.chat-send-extras input[type="datetime-local"]:focus {
    border-color: #86a3ff;
    box-shadow: 0 0 0 4px rgba(49, 86, 255, 0.12);
}

.chat-scheduled-cancel {
    margin-left: 2px;
    border: 1px solid #edbecd;
    border-radius: 999px;
    background: #fff4f7;
    color: #9d3853;
    font-size: 11px;
    width: 22px;
    height: 22px;
    cursor: pointer;
}

.chat-scheduled-cancel:hover {
    background: #ffe8ef;
}

.chat-typing-indicator {
    min-height: 22px;
    padding: 0 16px 10px 16px;
    color: #4f6397;
    font-size: 12px;
    font-weight: 600;
}

.chat-reply-preview {
    border-left: 3px solid #9db2ff;
    background: #f2f6ff;
    border-radius: 8px;
    padding: 6px 8px;
    margin-bottom: 6px;
    font-size: 12px;
    color: #3f4f78;
}

.chat-bubble-attachments {
    display: grid;
    gap: 6px;
    margin-top: 8px;
}

.chat-attachment-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: max-content;
    max-width: 100%;
    border: 1px solid #d3ddfa;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 12px;
    color: #2c4ab0;
    background: #f5f8ff;
}

.chat-attachment-link.is-disabled {
    opacity: 0.62;
    color: #5e6e95;
    background: #eef3ff;
    border-color: #d4deff;
    cursor: not-allowed;
    text-decoration: none;
    pointer-events: none;
}

.chat-bubble-reactions {
    display: flex;
    gap: 6px;
    position: absolute;
    bottom: -16px;
    left: 10px;
    z-index: 4;
}

.chat-bubble.mine .chat-bubble-reactions {
    left: auto;
    right: 10px;
}

.chat-reaction-pill {
    border: 1px solid #cfdcff;
    border-radius: 999px;
    background: #ffffff;
    color: #3551a8;
    font-size: 13px;
    padding: 3px 8px;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 6px 14px rgba(57, 76, 132, 0.14);
    transition: border-color var(--transition), background var(--transition), transform var(--transition), color var(--transition);
}

.chat-reaction-pill.is-active {
    border-color: #294de0;
    background: linear-gradient(120deg, var(--primary), var(--secondary));
    color: #ffffff;
}

.chat-reaction-pill:hover {
    border-color: #9fb4ff;
    background: #f2f6ff;
    transform: translateY(-1px);
}

.chat-reaction-emoji {
    font-size: 16px;
    line-height: 1;
}

.chat-reaction-count {
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    color: #4760a6;
}

.chat-reaction-pill.is-active .chat-reaction-count {
    color: #ffffff;
}

.chat-bubble-hover-controls {
    position: absolute;
    top: 6px;
    left: 6px;
    right: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition);
}

.chat-bubble:hover .chat-bubble-hover-controls,
.chat-bubble:focus-within .chat-bubble-hover-controls,
.chat-bubble.is-controls-open .chat-bubble-hover-controls {
    opacity: 1;
    pointer-events: auto;
}

.chat-bubble-react-btn,
.chat-bubble-menu-btn {
    width: 26px;
    height: 26px;
    border: 1px solid #cfdcff;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.96);
    color: #3f568d;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 14px rgba(57, 76, 132, 0.14);
    transition: border-color var(--transition), background var(--transition), color var(--transition), transform var(--transition);
}

.chat-bubble-react-btn {
    font-size: 13px;
}

.chat-bubble-react-btn:hover,
.chat-bubble-menu-btn:hover {
    background: #eef4ff;
    border-color: #9eb3ff;
    color: #2748ab;
    transform: translateY(-1px);
}

.chat-bubble-react-btn:focus-visible,
.chat-bubble-menu-btn:focus-visible {
    outline: 2px solid #86a3ff;
    outline-offset: 1px;
}

.chat-reaction-menu {
    position: fixed;
    z-index: 1450;
    display: none;
    border: 1px solid #d5e1ff;
    border-radius: 999px;
    background: #ffffff;
    box-shadow: 0 16px 32px rgba(57, 76, 132, 0.2);
    padding: 6px 8px;
}

.chat-reaction-menu.is-open {
    display: block;
}

.chat-reaction-picker-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.chat-reaction-picker-btn {
    min-width: 34px;
    height: 34px;
    border: 1px solid #d5e0ff;
    border-radius: 999px;
    background: #f7faff;
    color: #3551a8;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 8px;
}

.chat-reaction-picker-btn:hover {
    background: #ecf3ff;
    border-color: #9eb3ff;
    transform: translateY(-1px);
}

.chat-reaction-picker-btn.is-more {
    font-size: 22px;
    font-weight: 700;
    color: #2f4fb4;
    background: #edf3ff;
}

@media (hover: none) and (pointer: coarse) {
    .chat-bubble .chat-bubble-hover-controls {
        opacity: 1;
        pointer-events: auto;
    }
}

.chat-group-reads {
    display: block;
    margin-top: 7px;
    color: #5f6f98;
    font-size: 11px;
}

.chat-context-menu {
    position: fixed;
    z-index: 1400;
    min-width: 210px;
    border: 1px solid #d7e2ff;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 14px 26px rgba(57, 76, 132, 0.2);
    padding: 6px;
    display: none;
}

.chat-context-menu.is-open {
    display: grid;
    gap: 4px;
}

.chat-context-menu.is-message-menu {
    min-width: 228px;
    width: 228px;
    max-width: min(280px, calc(100vw - 24px));
    gap: 2px;
    padding: 6px;
    border-color: #d5e1ff;
    background: #ffffff;
    box-shadow: 0 16px 32px rgba(57, 76, 132, 0.2);
}

.chat-context-item {
    display: block;
    width: 100%;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #3f5078;
    font-size: 13px;
    font-weight: 600;
    text-align: left;
    padding: 8px 10px;
    cursor: pointer;
}

.chat-context-item:hover {
    background: #f1f5ff;
    color: #2d4cb8;
}

.chat-context-item.is-danger {
    color: #b83359;
}

.chat-context-item.is-danger:hover {
    background: #fff1f5;
    color: #a3264c;
}

.chat-context-item.is-disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.chat-context-separator {
    height: 1px;
    margin: 3px 2px;
    background: #e7eeff;
}

.chat-message-menu-icon {
    width: 16px;
    text-align: center;
    font-size: 13px;
    line-height: 1;
    opacity: 0.9;
}

.chat-context-menu.is-message-menu .chat-context-item {
    display: grid;
    grid-template-columns: 16px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    border-radius: 10px;
    color: #334b7a;
    padding: 9px 10px;
    font-size: 14px;
    font-weight: 600;
}

.chat-context-menu.is-message-menu .chat-context-item:hover {
    background: #eef4ff;
    color: #2748ab;
}

.chat-context-menu.is-message-menu .chat-context-item.is-danger {
    color: #b83359;
}

.chat-context-menu.is-message-menu .chat-context-item.is-danger:hover {
    background: #fff1f5;
    color: #a3264c;
}

.chat-message-menu-list {
    display: grid;
    gap: 2px;
}

.chat-message-menu-reactions {
    display: flex;
    gap: 8px;
}

.chat-context-reaction-btn {
    border: 1px solid #cbd8ff;
    border-radius: 999px;
    background: #f4f7ff;
    color: #3954a6;
    font-size: 17px;
    line-height: 1;
    min-width: 38px;
    height: 34px;
    padding: 0 12px;
    cursor: pointer;
}

.chat-context-reaction-btn:hover {
    border-color: #9eb3ff;
    background: #eaf0ff;
    transform: translateY(-1px);
}

.chat-message-menu-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chat-context-item.chat-context-chip {
    display: inline-flex;
    align-items: center;
    width: auto;
    border: 1px solid #cad7fb;
    border-radius: 999px;
    background: #f8faff;
    color: #3551a8;
    text-align: center;
    padding: 7px 12px;
    line-height: 1.2;
}

.chat-context-item.chat-context-chip:hover {
    border-color: #9eb3ff;
    background: #edf3ff;
    color: #2746aa;
}

.chat-context-item.chat-context-chip.is-danger {
    border-color: #eab4c4;
    background: #fff5f8;
    color: #b23757;
}

.chat-context-item.chat-context-chip.is-danger:hover {
    border-color: #e18aa4;
    background: #ffeef3;
    color: #a0284a;
}

.chat-bubble-selected {
    outline: 2px dashed #8eb0ff;
    outline-offset: 2px;
}

.chat-settings-inline select {
    border: 1px solid #d3ddfa;
    border-radius: 10px;
    background: #fff;
    color: var(--text);
    padding: 8px 10px;
    font-size: 13px;
    outline: none;
}

.chat-global-compact .chat-bubble {
    padding: 8px 10px;
    margin-bottom: 8px;
}

.chat-global-font-sm .chat-bubble,
.chat-global-font-sm .chat-send-form textarea {
    font-size: 12px;
}

.chat-global-font-lg .chat-bubble,
.chat-global-font-lg .chat-send-form textarea {
    font-size: 15px;
}

.chat-template-list {
    display: grid;
    gap: 8px;
    max-height: 360px;
    overflow: auto;
    padding-right: 2px;
}

.chat-template-item {
    border: 1px solid #dce6ff;
    border-radius: 12px;
    background: #fbfdff;
    padding: 10px 12px;
    display: grid;
    gap: 6px;
}

.chat-template-item p {
    margin: 0;
    color: #53658f;
    font-size: 13px;
    white-space: pre-wrap;
}

.chat-template-use {
    font-size: 12px;
}

/* ---------- Metodologias ---------- */
.task-top-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.task-inline-search {
    margin: 0;
}

.task-inline-search input {
    width: 280px;
    max-width: 38vw;
    border: 1px solid #d3ddfa;
    border-radius: 12px;
    background: #fff;
    color: var(--text);
    padding: 10px 12px;
    font-size: 14px;
    outline: none;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.task-inline-search input:focus {
    border-color: #86a3ff;
    box-shadow: 0 0 0 4px rgba(49, 86, 255, 0.12);
}

.task-new-btn {
    white-space: nowrap;
}

.task-view-switch {
    margin-bottom: var(--space-4);
}

.task-view-panel.is-hidden {
    display: none;
}

.task-board-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(220px, 1fr));
    gap: var(--space-3);
    align-items: start;
}

.task-board-column {
    border: 1px solid #d9e4ff;
    background: linear-gradient(180deg, #f5f9ff 0%, #eef4ff 100%);
    border-radius: 16px;
    padding: 12px;
    box-shadow: 0 8px 20px rgba(43, 66, 140, 0.08);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.task-board-column.is-over {
    border-color: #2f4ab3;
    box-shadow: 0 0 0 2px rgba(47, 74, 179, 0.2), 0 12px 24px rgba(43, 66, 140, 0.16);
}

.task-board-column-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-2);
    margin-bottom: 10px;
}

.task-board-column-head h3 {
    margin: 0;
    font-size: 16px;
}

.task-board-count {
    min-width: 28px;
    text-align: center;
    padding: 4px 8px;
    border-radius: 999px;
    background: #dfe7ff;
    color: #2b4290;
    font-weight: 700;
}

.task-board-dropzone {
    min-height: 140px;
    display: grid;
    gap: 10px;
}

.task-board-empty {
    margin: 0;
    border: 1px dashed #c7d6ff;
    border-radius: 12px;
    padding: 14px 12px;
    color: #61739d;
    background: rgba(255, 255, 255, 0.75);
    text-align: center;
}

.task-board-empty.is-hidden {
    display: none;
}

.task-board-card {
    cursor: grab;
    user-select: none;
    min-height: 300px;
    position: relative;
    perspective: 1200px;
    transition: transform 0.16s ease, opacity 0.16s ease;
    z-index: 1;
}

.task-board-card {
    touch-action: manipulation;
}

.task-card-inner {
    position: relative;
    min-height: 300px;
    transform-style: preserve-3d;
    transition: transform 0.34s ease;
}

.task-board-card.is-context-open {
    z-index: 30;
}

.task-board-card.is-context-open .task-card-inner {
    transform: rotateY(180deg);
}

.task-card-face {
    position: absolute;
    inset: 0;
    border: 1px solid #d7e1ff;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 8px 18px rgba(57, 76, 132, 0.08);
    padding: 12px;
    display: flex;
    flex-direction: column;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.task-card-front {
    z-index: 2;
}

.task-card-back {
    transform: rotateY(180deg);
    justify-content: flex-start;
    gap: 10px;
}

.task-card-back-head strong {
    display: block;
    font-size: 14px;
    color: #2a3e79;
}

.task-card-back-head small {
    color: #6375a1;
    font-size: 12px;
}

.task-card-back-note {
    margin: 0;
    font-size: 12px;
    color: #5f7099;
}

.task-card-back-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: auto;
}

.task-card-back-actions .btn {
    width: 100%;
    min-width: 0;
    justify-content: center;
}

.task-board-card:hover .task-card-front {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(57, 76, 132, 0.14);
}

.task-board-card.is-context-open:hover .task-card-front {
    transform: none;
}

.task-board-card.is-dragging {
    opacity: 0.6;
    transform: scale(0.98);
    cursor: grabbing;
}

.task-board-card.is-updating {
    opacity: 0.6;
    pointer-events: none;
}

.task-board-card.is-locked {
    cursor: not-allowed;
}

.task-board-card.is-locked .task-card-face {
    border-style: dashed;
    background: #f6f8ff;
}

.task-board-card.is-locked:hover .task-card-front {
    transform: none;
    box-shadow: 0 8px 18px rgba(57, 76, 132, 0.08);
}

.task-board-card.is-touch-dragging {
    cursor: grabbing;
    transition: none;
}

.task-board-card.is-touch-dragging .task-card-front {
    box-shadow: 0 18px 28px rgba(57, 76, 132, 0.3);
}

.task-dragging {
    user-select: none;
    -webkit-user-select: none;
}

.task-board-card h4 {
    margin: 0 0 8px;
    font-size: 15px;
    line-height: 1.35;
    min-height: 42px;
}

.task-owner-indicator {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    width: fit-content;
    max-width: 100%;
    margin-bottom: 8px;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid #cbe5ff;
    background: #ebf6ff;
    color: #1f4f72;
    font-size: 12px;
    line-height: 1.2;
    font-weight: 600;
}

.task-owner-indicator strong {
    color: #174564;
    font-weight: 700;
}

.task-owner-indicator.is-hidden {
    display: none;
}

.task-board-desc {
    margin: 0 0 10px;
    color: #61739d;
    font-size: 13px;
    line-height: 1.4;
    min-height: 54px;
}

.task-board-meta {
    margin: 0;
    display: grid;
    gap: 8px;
}

.task-board-meta > div {
    display: grid;
    grid-template-columns: 92px 1fr;
    gap: 8px;
    align-items: center;
}

.task-board-meta dt {
    margin: 0;
    font-weight: 700;
    font-size: 12px;
    color: #2f4ab3;
}

.task-board-meta dd {
    margin: 0;
    color: #31456f;
    font-size: 13px;
}

.task-board-card-footer {
    margin-top: auto;
    padding-top: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.task-card-lock-note {
    display: block;
    margin-top: 8px;
    color: #8a2c4d;
    font-size: 12px;
}

.task-note-panel {
    margin: 0 0 var(--space-3);
    border: 1px solid #d8e4ff;
    background: #f4f8ff;
    border-radius: 12px;
    padding: 10px 12px;
    color: #334b7a;
}

.methodology-container .forum-header-row .text-soft {
    margin: 6px 0 0;
}

.methodology-container .dashboard-stats {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    overflow-x: auto;
    margin-bottom: var(--space-4);
    padding-bottom: 2px;
}

.methodology-container .dashboard-stats .stat-card {
    flex: 1 0 128px;
    min-width: 128px;
    padding: 12px 10px;
    border-radius: 14px;
}

.methodology-container .dashboard-stats .stat-card::after {
    width: 74px;
    height: 74px;
    top: -20px;
    right: -20px;
}

.methodology-container .dashboard-stats .stat-card h3 {
    margin: 0 0 4px;
    font-size: 24px;
    line-height: 1;
}

.methodology-container .dashboard-stats .stat-card p {
    font-size: 12px;
    line-height: 1.15;
}

.task-history {
    display: grid;
    gap: var(--space-3);
}

.task-history-item {
    border: 1px solid #dde5ff;
    border-radius: 12px;
    padding: 10px 12px;
    background: #f8faff;
}

.task-history-item header {
    display: flex;
    justify-content: space-between;
    gap: var(--space-2);
}

.task-history-item header small {
    color: var(--text-soft);
}

.task-history-item p {
    margin: 8px 0 0;
}

.section-title-spaced {
    margin-top: 22px;
}

.reunion-item-actions {
    margin-top: 10px;
}

/* ---------- Responsive ---------- */
@media (max-width: 1020px) {
    .header-container {
        grid-template-columns: 1fr;
    }

    .header-search-form {
        width: 100%;
    }

    .user-menu {
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .search-form,
    .filter-form {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    }

    .meetings-inline-search {
        width: clamp(170px, 32vw, 250px);
    }

    .forum-inline-search {
        width: clamp(180px, 34vw, 300px);
    }

    .meetings-view-switch {
        width: 100%;
        justify-content: flex-start;
    }

    .chat-section-top-actions input[type="text"] {
        width: clamp(180px, 34vw, 280px);
    }
}

@media (max-width: 760px) {
    .main-container {
        margin-top: var(--space-5);
        padding: 0 var(--space-3) var(--space-6);
    }

    .dashboard-container,
    .meetings-container,
    .users-container,
    .logs-container,
    .profile-container,
    .forum-container,
    .chat-container,
    .methodology-container,
    .notifications-container,
    .search-container,
    .calendar-container,
    .form-container,
    .detail-container,
    .section-proximas,
    .section-actions,
    .profile-section {
        padding: var(--space-4);
        border-radius: 18px;
    }

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

    .detail-list {
        grid-template-columns: 1fr;
    }

    .calendar-table td {
        height: 72px;
    }

    .current-month {
        font-size: 17px;
        text-align: center;
        width: 100%;
    }

    .calendar-navigation {
        flex-wrap: wrap;
    }

    .forum-grid,
    .chat-layout {
        grid-template-columns: 1fr;
    }

    .task-board-grid {
        display: flex;
        gap: var(--space-3);
        overflow-x: auto;
        padding-bottom: 4px;
        scroll-snap-type: x proximity;
    }

    .task-top-actions {
        width: 100%;
        flex-wrap: wrap;
        justify-content: flex-start;
    }

    .task-inline-search {
        width: 100%;
    }

    .task-inline-search input {
        width: 100%;
        max-width: none;
    }

    .task-board-column {
        min-width: 255px;
        scroll-snap-align: start;
    }

    .chat-main {
        min-height: 520px;
        grid-template-rows: auto minmax(0, 360px) auto auto;
    }

    .chat-bubble {
        max-width: 95%;
    }

    .chat-section-title-row {
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
    }

    .chat-section-top-actions {
        justify-content: flex-end;
        width: auto;
    }

    .chat-section-top-actions input[type="text"] {
        width: clamp(150px, 45vw, 220px);
        min-width: 0;
    }

    .chat-send-main {
        grid-template-columns: auto auto auto 1fr;
    }

    .chat-send-submit {
        grid-column: 1 / -1;
        width: 100%;
    }

    .chat-send-extras {
        justify-content: stretch;
    }

    .chat-send-extras input[type="datetime-local"] {
        width: 100%;
    }

    .chat-attach-chip-text {
        max-width: calc(100vw - 200px);
    }

    .chat-send-form {
        padding-bottom: var(--space-4);
    }

    .chat-scheduled-overlay {
        left: 12px;
        right: 12px;
        bottom: 10px;
    }

    .chat-emoji-picker {
        left: 12px;
        width: calc(100% - 24px);
    }

    .meeting-card-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
