:root {
    --apple-blue: #0071e3;
    --apple-blue-rgb: 0, 113, 227;
    --apple-mint: #00a87e;
    --apple-amber: #f59e0b;

    --bg-page: #f5f5f7;
    --bg-surface: rgba(255, 255, 255, 0.78);
    --bg-surface-strong: rgba(255, 255, 255, 0.94);
    --bg-muted: rgba(17, 17, 17, 0.04);

    --text-primary: #1d1d1f;
    --text-secondary: #6e6e73;
    --text-tertiary: #8f8f94;

    --border-soft: rgba(0, 0, 0, 0.08);
    --border-strong: rgba(0, 0, 0, 0.12);

    --radius-sm: 12px;
    --radius-md: 18px;
    --radius-lg: 26px;
    --radius-xl: 36px;
    --radius-pill: 999px;

    --shadow-1: 0 6px 24px rgba(15, 23, 42, 0.06);
    --shadow-2: 0 16px 40px rgba(15, 23, 42, 0.10);

    --font-stack: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

[data-bs-theme="dark"] {
    --bg-page: #2a2c31;
    --bg-surface: rgba(50, 52, 58, 0.74);
    --bg-surface-strong: rgba(62, 64, 71, 0.9);
    --bg-muted: rgba(255, 255, 255, 0.08);

    --text-primary: #f5f5f7;
    --text-secondary: #a1a1a7;
    --text-tertiary: #7d7d82;

    --border-soft: rgba(255, 255, 255, 0.10);
    --border-strong: rgba(255, 255, 255, 0.16);

    --shadow-1: 0 10px 28px rgba(0, 0, 0, 0.35);
    --shadow-2: 0 22px 52px rgba(0, 0, 0, 0.45);
}

html,
body {
    min-height: 100%;
}

html,
body {
    height: 100%;
}

body {
    margin: 0;
    background: var(--bg-page);
    color: var(--text-primary);
    font-family: var(--font-stack);
    line-height: 1.5;
    letter-spacing: -0.01em;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--text-primary);
    letter-spacing: -0.03em;
    margin-bottom: 0.5rem;
}

h1 {
    font-weight: 700;
    font-size: clamp(1.9rem, 1.45rem + 1.5vw, 2.8rem);
}

h2 {
    font-weight: 650;
    font-size: clamp(1.4rem, 1.25rem + 0.8vw, 2rem);
}

p {
    color: var(--text-secondary);
}

a {
    color: var(--apple-blue);
    text-decoration: none;
}

a:hover {
    color: var(--apple-blue);
    opacity: 0.82;
}

.text-apple-blue {
    color: var(--apple-blue) !important;
}

.app-ambient {
    position: fixed;
    z-index: -2;
    filter: blur(30px);
    opacity: 0.55;
    pointer-events: none;
}

.app-ambient--one {
    width: 420px;
    height: 420px;
    top: -140px;
    right: -120px;
    background: radial-gradient(circle, rgba(var(--apple-blue-rgb), 0.28) 0%, rgba(var(--apple-blue-rgb), 0) 70%);
}

.app-ambient--two {
    width: 360px;
    height: 360px;
    left: -120px;
    bottom: -120px;
    background: radial-gradient(circle, rgba(0, 168, 126, 0.18) 0%, rgba(0, 168, 126, 0) 70%);
}

.app-main {
    padding-top: 104px;
    padding-bottom: 64px;
    position: relative;
}

.navbar-apple {
    background: rgba(248, 248, 250, 0.72);
    backdrop-filter: saturate(160%) blur(20px);
    -webkit-backdrop-filter: saturate(160%) blur(20px);
    border-bottom: 1px solid var(--border-soft);
    padding: 12px 0;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    font-synthesis: none;
}

[data-bs-theme="dark"] .navbar-apple {
    background: rgba(46, 48, 54, 0.74);
}

.navbar-brand {
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.navbar-brand-logo {
    width: 160px;
    height: auto;
    display: block;
}

.navbar-brand-logo--dark {
    display: none;
}

[data-bs-theme="dark"] .navbar-brand-logo--light {
    display: none;
}

[data-bs-theme="dark"] .navbar-brand-logo--dark {
    display: block;
}

.nav-link {
    color: var(--text-secondary);
    font-weight: 500;
    letter-spacing: 0;
    padding: 8px 12px !important;
    border-radius: 12px;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
    background: var(--bg-muted);
}

.glass-panel {
    background: var(--bg-surface);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-1);
    backdrop-filter: blur(16px) saturate(150%);
    -webkit-backdrop-filter: blur(16px) saturate(150%);
    padding: 1.35rem;
}

.glass-panel:hover {
    box-shadow: var(--shadow-2);
}

.btn {
    border-radius: var(--radius-pill);
    font-weight: 600;
    font-size: 0.92rem;
    letter-spacing: -0.01em;
}

.btn-apple-primary {
    border: none;
    color: #fff;
    background: linear-gradient(180deg, #1683ff 0%, var(--apple-blue) 100%);
    padding: 11px 22px;
    box-shadow: 0 10px 24px rgba(var(--apple-blue-rgb), 0.28);
}

.btn-apple-primary:hover {
    color: #fff;
    transform: translateY(-1px);
}

.btn-apple-primary:active {
    transform: translateY(0);
}

.btn-apple-secondary {
    border: 1px solid var(--border-strong);
    color: var(--text-primary);
    background: var(--bg-surface-strong);
    padding: 11px 22px;
}

.btn-apple-secondary:hover {
    color: var(--text-primary);
    background: var(--bg-muted);
}

.form-label-apple {
    display: inline-block;
    margin: 0 0 8px 2px;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-tertiary);
    font-weight: 700;
}

.form-control-apple,
.form-control.form-control-apple,
.form-select.form-control-apple {
    border: 1px solid var(--border-soft);
    background: var(--bg-surface-strong);
    color: var(--text-primary);
    border-radius: var(--radius-md);
    min-height: 48px;
    padding: 0.67rem 0.9rem;
    font-size: 0.95rem;
}

textarea.form-control-apple {
    min-height: 110px;
}

.form-control-apple:focus,
.form-control.form-control-apple:focus,
.form-select.form-control-apple:focus {
    border-color: rgba(var(--apple-blue-rgb), 0.55);
    box-shadow: 0 0 0 4px rgba(var(--apple-blue-rgb), 0.16);
    background: var(--bg-surface-strong);
    color: var(--text-primary);
}

.form-control-apple::placeholder {
    color: var(--text-tertiary);
}

.project-id-block,
.project-id-inline {
    display: inline-flex;
    align-items: center;
    min-height: 48px;
    padding: 0 0.9rem;
    border-radius: 14px;
    background: var(--bg-muted);
    border: 1px solid var(--border-soft);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-weight: 650;
    letter-spacing: 0.04em;
}

.project-id-block {
    width: 100%;
}

.project-id-inline {
    margin-top: 8px;
}

.table-apple {
    --bs-table-bg: transparent;
    --bs-table-color: var(--text-primary);
    margin: 0;
}

.table-apple th {
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-tertiary);
    font-weight: 700;
    border-bottom: 1px solid var(--border-soft);
    background: rgba(0, 0, 0, 0.015);
    padding-top: 1rem;
    padding-bottom: 1rem;
}

[data-bs-theme="dark"] .table-apple th {
    background: rgba(255, 255, 255, 0.02);
}

.table-apple td {
    padding-top: 1rem;
    padding-bottom: 1rem;
    border-color: var(--border-soft);
}

.table-apple tr:hover td {
    background: rgba(var(--apple-blue-rgb), 0.05);
}

.badge {
    font-weight: 620;
    letter-spacing: 0.02em;
}

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

.stat-card {
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
}

.stat-icon-wrapper {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.stat-value {
    font-size: clamp(1.7rem, 1.1rem + 1vw, 2.3rem);
    line-height: 1;
    font-weight: 680;
    color: var(--text-primary);
}

.stat-label {
    margin-top: 0.35rem;
    color: var(--text-secondary);
    font-size: 0.84rem;
    letter-spacing: 0.02em;
}

.dashboard-project-search__icon,
.search-toolbar__icon {
    position: absolute;
    top: 50%;
    left: 16px;
    transform: translateY(-50%);
    color: var(--text-tertiary);
    pointer-events: none;
    z-index: 2;
}

.dashboard-project-search__input,
.search-toolbar__input {
    padding-left: 48px !important;
}

.search-toolbar {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.search-toolbar__field {
    position: relative;
    flex: 1 1 320px;
    min-width: 240px;
}

.search-toolbar__filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    flex: 1 1 auto;
}

.search-toolbar__filter {
    flex: 1 1 180px;
    min-width: 160px;
}

.search-toolbar__actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.search-toolbar__actions .btn {
    white-space: nowrap;
}

@media (min-width: 992px) {
    .search-toolbar {
        flex-direction: row;
        align-items: center;
    }
}

.dashboard-team-grid,
.dashboard-projects-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.dashboard-team-card,
.dashboard-project-card {
    border: 1px solid var(--border-soft);
    border-radius: 16px;
    background: var(--bg-surface-strong);
    padding: 0.85rem;
}

.dashboard-user-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.1rem;
    padding: 1.25rem 1.35rem;
    border-bottom: 1px solid var(--border-soft);
    background: var(--bg-surface-strong);
}

.dashboard-user-strip__identity {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    min-width: 0;
    flex: 1 1 auto;
}

.dashboard-user-strip__icon {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--apple-blue);
    background: rgba(var(--apple-blue-rgb), 0.12);
    flex-shrink: 0;
}

.dashboard-user-strip__title {
    font-size: clamp(1.45rem, 1.05rem + 0.8vw, 1.95rem);
    line-height: 1;
    font-weight: 680;
    color: var(--text-primary);
    white-space: normal;
    word-break: break-word;
}

.dashboard-user-strip__subtitle {
    margin-top: 0.3rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.dashboard-user-strip__stats {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    flex-wrap: wrap;
    justify-content: flex-end;
    min-width: 0;
}

.dashboard-user-strip__metric {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 112px;
}

.dashboard-user-strip__metric-icon {
    grid-area: icon;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.dashboard-user-strip__metric-icon i {
    font-size: 0.9rem;
}

.dashboard-user-strip__metric-icon--standby {
    background: #f7a600;
}

.dashboard-user-strip__metric-icon--archive {
    background: #a7a9ad;
}

.dashboard-user-strip__metric-icon--progress {
    background: #f93b3b;
}

.dashboard-user-strip__metric-text {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.dashboard-user-strip__metric-count {
    font-size: 1.9rem;
    line-height: 0.95;
    font-weight: 680;
    color: var(--text-primary);
}

.dashboard-user-strip__metric-label {
    margin-top: 0.15rem;
    font-size: 0.78rem;
    letter-spacing: 0.02em;
    color: var(--text-secondary);
    font-weight: 600;
    white-space: nowrap;
}

.dashboard-user-strip__nav {
    display: inline-flex;
    gap: 0.4rem;
    margin-left: 0.2rem;
}

.dashboard-user-strip__nav-btn {
    width: 38px;
    height: 38px;
    border-radius: 999px;
    border: 1px solid var(--border-soft);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    text-decoration: none;
    background: var(--bg-surface-strong);
}

.dashboard-user-strip__nav-btn:hover {
    background: rgba(var(--apple-blue-rgb), 0.08);
    border-color: rgba(var(--apple-blue-rgb), 0.25);
}

.dashboard-user-strip__nav-btn.is-disabled {
    opacity: 0.35;
}

.dashboard-inprogress-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.dashboard-inprogress-card {
    border: 1px solid var(--border-soft);
    border-radius: 20px;
    background: var(--bg-surface-strong);
    overflow: hidden;
    padding: 0.65rem;
    display: block;
}

.dashboard-inprogress-card__cover {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #e9edf5;
}

.dashboard-inprogress-card__cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.dashboard-inprogress-card__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.45rem;
}

.dashboard-inprogress-card__id {
    color: var(--apple-blue);
    font-size: 1.55rem;
    line-height: 1;
    font-weight: 700;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.dashboard-inprogress-card__date {
    color: var(--text-secondary);
    font-size: 0.82rem;
}

.dashboard-inprogress-card__title {
    margin-top: 0.22rem;
    color: var(--text-primary);
    font-weight: 640;
    line-height: 1.22;
    min-height: 2.2em;
}

.record-nav-btn {
    width: 36px;
    height: 36px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.record-nav-btn:disabled {
    opacity: 0.45;
}

.projeto-detail-header {
    padding: 1.1rem 1.25rem;
}

.projeto-showcase-header {
    display: grid;
    grid-template-columns: 122px 1fr auto;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 1rem;
}

.projeto-showcase-id {
    padding: 0;
    text-align: center;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: clamp(2rem, 1.25rem + 1.4vw, 2.6rem);
    line-height: 1;
    letter-spacing: 0.06em;
}

.projeto-showcase-title {
    font-size: clamp(1.36rem, 0.92rem + 0.96vw, 2.32rem);
    line-height: 1.1;
    font-weight: 200;
    font-variation-settings: "wght" 200;
}

.projeto-showcase-side {
    display: grid;
    gap: 0.55rem;
    justify-items: end;
}

.projeto-state-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 150px;
    border-radius: 999px;
    padding: 0.32rem 1rem;
    font-weight: 700;
    font-size: 0.86rem;
    border: 1px solid transparent;
}

.projeto-state-pill--progress {
    background: linear-gradient(180deg, #ffa83b 0%, #ff8a00 100%);
    color: #fff;
    box-shadow: 0 8px 20px rgba(255, 138, 0, 0.3);
}

.projeto-state-pill--standby {
    background: #ffe9c9;
    color: #9b5f00;
    border-color: #ffd08c;
}

.projeto-state-pill--archive,
.projeto-state-pill--offline {
    background: rgba(140, 140, 148, 0.14);
    color: #6a6a72;
    border-color: rgba(140, 140, 148, 0.2);
}

.projeto-state-pill--online {
    background: rgba(34, 197, 94, 0.14);
    color: #138348;
    border-color: rgba(34, 197, 94, 0.28);
}

.projeto-state-pill--star {
    background: rgba(245, 158, 11, 0.14);
    color: #9a5f08;
    border-color: rgba(245, 158, 11, 0.28);
}

.projeto-main-stage {
    padding: 1rem;
}

.projeto-main-stage-frame {
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: #000;
}

.projeto-associated-panel {
    padding: 1.15rem;
}

.projeto-submenu {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 999px;
    padding: 0.3rem;
    display: inline-flex;
    gap: 0.25rem;
}

.projeto-submenu .nav-link {
    border: 0;
    border-radius: 999px;
    padding: 0.45rem 1rem !important;
    color: var(--text-secondary);
    font-weight: 650;
}

.projeto-submenu .nav-link.active {
    background: #fff;
    color: #111;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12);
}

[data-bs-theme="dark"] .projeto-submenu .nav-link.active {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.projeto-assoc-item {
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    padding: 0.7rem 0.9rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
}

.projeto-assoc-item-id {
    color: var(--apple-blue);
    font-weight: 700;
    min-width: 66px;
}

.projeto-mini-stage img {
    min-height: 124px;
    object-fit: cover;
}

.projeto-icon-btn {
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.projeto-departamento-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
}

.projeto-departamento-bullet {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    background: rgba(34, 197, 94, 0.2);
    color: #0a7a3f;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.projeto-side-meta {
    padding-top: 1rem;
}

.projeto-description-box {
    border-radius: 10px;
    min-height: 64px;
    padding: 0.7rem 0.85rem;
    background: rgba(0, 0, 0, 0.04);
}

.projeto-record-footer-meta {
    margin-top: 2rem;
    text-align: center;
    color: #9ca3af;
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    line-height: 1.7;
}

.projeto-detail-edit-btn {
    min-width: 120px;
}

.projeto-detail-media-panel iframe {
    width: 100%;
    height: 100%;
}

.projeto-detail-media-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #000;
}

.client-unlink-btn {
    width: 24px;
    height: 24px;
    border-radius: 999px;
    border: 1px solid #d1d5db;
    background: #f3f4f6;
    color: #6b7280;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.client-unlink-btn:hover {
    background: #e5e7eb;
    color: #4b5563;
}

.team-unlink-btn {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    border: 1px solid #d1d5db;
    background: #f3f4f6;
    color: #6b7280;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.team-unlink-btn:hover {
    background: #e5e7eb;
    color: #4b5563;
}

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

.chat-room-card {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    transition: transform 0.2s ease;
}

.chat-room-card:hover {
    transform: translateY(-2px);
}

.chat-room-card__icon {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    background: rgba(var(--apple-blue-rgb), 0.12);
    color: var(--apple-blue);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.chat-empty-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.chat-archive-list {
    display: grid;
    gap: 0.45rem;
}

.chat-archive-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.55rem 0.7rem;
    border-radius: 12px;
    border: 1px solid var(--border-soft);
    background: var(--bg-surface-strong);
    color: var(--text-primary);
}

.chat-archive-link small {
    color: var(--text-tertiary);
}

.chat-room-layout {
    max-width: 920px;
    margin: 0 auto;
}

.chat-room-layout--embed {
    max-width: 100%;
}

.chat-messages-layout {
    display: grid;
    grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
    gap: 1rem;
    min-height: calc(100dvh - 140px);
    height: calc(100dvh - 140px);
}

.chat-messages-layout--embed {
    min-height: 100%;
    height: 100%;
    overflow: hidden;
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
}

.chat-sidebar {
    padding: 0.8rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    height: 100%;
    min-height: 0;
}

.chat-sidebar-section {
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    padding: 0.6rem;
    background: var(--bg-surface-strong);
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.chat-sidebar-section--users {
    flex: 0 0 auto;
    max-height: 36%;
}

.chat-sidebar-section--users .chat-sidebar-users {
    overflow-y: auto;
}

.chat-sidebar-section--recent {
    flex: 1 1 auto;
}

.chat-sidebar-section--recent .chat-sidebar-chats {
    overflow-y: auto;
    min-height: 0;
    max-height: 100%;
}

.chat-sidebar-section__title {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-tertiary);
    font-weight: 700;
    margin-bottom: 0.45rem;
}

.chat-sidebar-users,
.chat-sidebar-chats {
    display: grid;
    gap: 0.34rem;
}

.chat-sidebar-user {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-radius: 10px;
    padding: 0.42rem 0.45rem;
    color: var(--text-primary);
    text-decoration: none;
    border: 1px solid transparent;
}

.chat-sidebar-user:hover {
    border-color: var(--border-soft);
    background: rgba(127, 127, 127, 0.08);
}

.chat-sidebar-user__dot {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: #9ca3af;
}

.chat-sidebar-user.is-active .chat-sidebar-user__dot {
    background: #22c55e;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.18);
}

.chat-sidebar-user.is-away {
    color: var(--text-secondary);
}

.chat-sidebar-chat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.6rem;
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    padding: 0.45rem 0.55rem;
    color: var(--text-primary);
    background: rgba(127, 127, 127, 0.08);
}

.chat-sidebar-chat small {
    color: var(--text-tertiary);
}

.chat-sidebar-chat.is-current {
    background: rgba(var(--apple-blue-rgb), 0.14);
    border-color: rgba(var(--apple-blue-rgb), 0.38);
}

.chat-conversation {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    padding: 1rem;
    height: 100%;
    min-height: 0;
}

.chat-conversation--embed {
    padding: 0.75rem 0.75rem 0 0.75rem;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    backdrop-filter: none;
}

.chat-conversation-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.chat-room-shell {
    padding: 1rem;
}

.chat-room-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.chat-room-kicker {
    color: var(--text-tertiary);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
}

.chat-room-title {
    margin: 0;
    font-size: clamp(1.2rem, 1.1rem + 0.45vw, 1.6rem);
}

.chat-message-list {
    min-height: 320px;
    max-height: calc(100dvh - 320px);
    overflow-y: auto;
    padding: 0.5rem;
    border-radius: 18px;
    border: 1px solid var(--border-soft);
    background: var(--bg-surface-strong);
}

.chat-message-item {
    padding: 0.1rem 0.2rem;
    margin-bottom: 0.65rem;
    border: 0;
    background: transparent;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.chat-message-item--mine {
    align-items: flex-end;
}

.chat-message-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.6rem;
    margin-bottom: 0.2rem;
    padding-inline: 0.35rem;
}

.chat-message-head span {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

.chat-message-body {
    color: #1f2937;
    word-break: break-word;
    max-width: min(78%, 620px);
    padding: 0.5rem 0.75rem;
    border-radius: 18px;
    background: #e9e9eb;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
}

[data-bs-theme="dark"] .chat-message-body {
    color: #f5f5f7;
    background: #3a3a3c;
}

.chat-message-item--mine .chat-message-body {
    color: #fff;
    background: #0a84ff;
    border-bottom-right-radius: 8px;
}

.chat-message-item:not(.chat-message-item--mine) .chat-message-body {
    border-bottom-left-radius: 8px;
}

.chat-message-delete {
    margin-top: 0.35rem;
    padding-inline: 0.35rem;
}

.chat-empty-state {
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    color: var(--text-secondary);
}

.chat-composer {
    margin-top: 0.75rem;
}

.chat-messages-layout--embed .chat-sidebar,
.chat-messages-layout--embed .chat-conversation {
    min-height: 0;
    height: 100%;
}

.chat-messages-layout--embed .chat-message-list {
    min-height: 0;
    max-height: none;
    height: 100%;
    padding-bottom: 0.85rem;
}

.chat-messages-layout--embed .chat-composer {
    margin-top: 0;
    position: sticky;
    bottom: 0;
    border-top: 1px solid var(--border-soft);
    padding-top: 0.7rem;
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 0.35rem);
    background: var(--bg-surface);
    z-index: 3;
}

.chat-icon-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.chat-icon-btn {
    min-width: 38px;
    min-height: 34px;
    padding: 0.2rem 0.45rem;
}

.chat-input-control {
    min-height: 84px !important;
    resize: vertical;
}

.chat-presence-panel {
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    padding: 0.55rem 0.7rem;
    background: var(--bg-surface-strong);
}

.chat-presence-panel__title {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-tertiary);
    margin-bottom: 0.35rem;
    font-weight: 700;
}

.chat-presence-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.3rem 0.6rem;
}

.chat-presence-item {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.chat-presence-name {
    font-size: 0.86rem;
}

.chat-presence-dot {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: #9ca3af;
}

.chat-presence-item.is-active .chat-presence-dot {
    background: #22c55e;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.18);
}

.chat-presence-item.is-away {
    color: var(--text-secondary);
}

.chat-presence-item.is-away .chat-presence-dot {
    background: #9ca3af;
}

.chat-notification-badge {
    position: absolute;
    top: -6px;
    right: -8px;
    min-width: 18px;
    height: 18px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 0.68rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    font-weight: 700;
}

.chat-notification-menu {
    min-width: 280px;
}

.chat-notification-item {
    display: grid;
    gap: 0.1rem;
}

.chat-notification-item__title {
    font-weight: 640;
}

.chat-notification-item small {
    color: var(--text-tertiary);
}

.project-chat-overlay-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(12, 12, 14, 0.4);
    z-index: 1150;
    backdrop-filter: blur(2px);
}

.project-chat-overlay {
    position: fixed;
    right: 18px;
    bottom: 8px;
    width: min(760px, calc(100vw - 20px));
    height: calc(100dvh - 16px);
    z-index: 1160;
    background: var(--bg-surface-strong);
    border: 1px solid var(--border-soft);
    border-radius: 22px;
    overflow: hidden;
    box-shadow: var(--shadow-2);
    display: flex;
    flex-direction: column;
}

.project-chat-overlay__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.8rem;
    border-bottom: 1px solid var(--border-soft);
    background: var(--bg-surface);
}

.project-chat-overlay__kicker {
    display: block;
    color: var(--text-tertiary);
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.project-chat-overlay__body {
    flex: 1;
}

.project-chat-overlay__body iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

body.chat-overlay-open {
    overflow: hidden;
}

.chat-embed-mode .navbar-apple,
.chat-embed-mode .app-ambient {
    display: none !important;
}

.chat-embed-mode {
    height: 100%;
}

.chat-embed-mode .app-main {
    padding-top: 0;
    padding-bottom: 0;
    max-width: 100%;
    height: 100%;
    min-height: 100%;
    overflow: hidden;
}

.chat-embed-mode .app-main.container-xl {
    padding-left: 0;
    padding-right: 0;
}

.chat-page .app-main {
    padding-bottom: 0;
}

.projeto-detail-meta-grid .col-md-6 {
    border-top: 1px solid var(--border-soft);
    padding-top: 0.7rem;
}

.login-wrapper {
    background: #d9d9de;
}

.login-wrapper .app-ambient {
    display: none;
}

.login-wrapper .app-main {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 20px;
    padding-bottom: 44px;
}

.login-shell {
    max-width: 470px;
    margin: 0 auto;
}

.login-glass-card {
    width: 100%;
    max-width: 410px;
    margin-inline: auto;
    background: rgba(245, 245, 246, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.75);
    border-radius: 34px;
    padding: clamp(2rem, 1.7rem + 1.2vw, 2.8rem);
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.14);
}

.login-logo {
    width: 96px;
    height: 96px;
    max-width: 96px;
    display: block;
    margin-inline: auto;
    object-fit: contain;
}

.login-wrapper .form-label-apple {
    color: #8f9198;
    letter-spacing: 0.12em;
    font-size: 0.75rem;
}

.login-wrapper .form-control-apple {
    border-color: #d1d2d8;
    background: #efeff1;
    min-height: 46px;
}

.login-wrapper .form-control-apple::placeholder {
    color: #8f9198;
}

.login-submit-btn {
    min-height: 44px;
    border-radius: 999px;
    font-size: 1.05rem;
    box-shadow: 0 10px 20px rgba(var(--apple-blue-rgb), 0.35);
}

.login-forgot-link {
    font-size: 1.02rem;
}

.login-footer {
    font-size: 1.05rem;
}

[data-bs-theme="dark"] .login-wrapper {
    background: #181a1f;
}

[data-bs-theme="dark"] .login-glass-card {
    background: rgba(32, 34, 39, 0.94);
    border-color: rgba(255, 255, 255, 0.08);
}

[data-bs-theme="dark"] .login-wrapper .form-control-apple {
    background: #2a2d34;
    border-color: #3a3d45;
}

.app-toast-container {
    z-index: 1100;
    margin-top: 80px;
}

.hover-lift {
    transition: transform 0.2s ease;
}

.hover-lift:hover {
    transform: translateY(-1px);
}

.animate-entry {
    opacity: 0;
    animation: fadeInUp 0.48s ease forwards;
}

.delay-1 {
    animation-delay: 0.08s;
}

.delay-2 {
    animation-delay: 0.16s;
}

.delay-3 {
    animation-delay: 0.24s;
}

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

@media (max-width: 992px) {
    .app-main {
        padding-top: 92px;
    }

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

    .dashboard-user-strip {
        align-items: flex-start;
        flex-direction: column;
    }

    .dashboard-user-strip__stats {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .dashboard-inprogress-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .chat-room-grid {
        grid-template-columns: 1fr;
    }

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

    .chat-messages-layout {
        grid-template-columns: 1fr;
        min-height: calc(100dvh - 126px);
        height: calc(100dvh - 126px);
    }
}

@media (max-width: 768px) {
    .app-main {
        padding-top: 88px;
        padding-bottom: 32px;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-team-grid,
    .dashboard-projects-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-user-strip {
        align-items: flex-start;
        flex-direction: column;
    }

    .dashboard-user-strip__title {
        font-size: 1.3rem;
    }

    .dashboard-user-strip__stats {
        width: 100%;
        justify-content: flex-start;
        gap: 0.65rem;
    }

    .dashboard-user-strip__metric {
        min-width: 104px;
    }

    .dashboard-user-strip__metric-count {
        font-size: 1.45rem;
    }

    .dashboard-user-strip__metric-label {
        font-size: 0.7rem;
    }

    .dashboard-inprogress-grid {
        grid-template-columns: 1fr;
    }

    .glass-panel {
        border-radius: 22px;
        padding: 1rem;
    }

    .table-apple th,
    .table-apple td {
        white-space: nowrap;
    }

    .app-ambient {
        opacity: 0.4;
    }

    .projeto-showcase-header {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }

    .projeto-showcase-side {
        justify-items: start;
    }

    .projeto-submenu {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .project-chat-overlay {
        right: 10px;
        left: 10px;
        width: auto;
        height: calc(100dvh - 12px);
        bottom: 10px;
    }
}

/* Chat redesign aligned with Figma node 539:2258 */
.chat-fg-layout {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr) 290px;
    gap: 24px;
    min-height: calc(100dvh - 140px);
    height: calc(100dvh - 140px);
}

.chat-fg-layout--embed {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    min-height: 100%;
    height: 100%;
}

.chat-fg-sidebar,
.chat-fg-main,
.chat-fg-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 30px;
    box-shadow: 0 6px 22px rgba(15, 23, 42, 0.06);
}

.chat-fg-sidebar {
    min-height: 0;
    overflow: hidden;
}

.chat-fg-sidebar--threads {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
}

.chat-fg-search {
    margin: 16px;
    background: #f1f5f9;
    border-radius: 999px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid #edf2f7;
}

.chat-fg-search i {
    color: #94a3b8;
    font-size: 0.82rem;
}

.chat-fg-search input {
    border: 0;
    background: transparent;
    width: 100%;
    color: #64748b;
    font-size: 0.93rem;
}

.chat-fg-search input:focus {
    outline: none;
}

.chat-fg-thread-list {
    min-height: 0;
    overflow-y: auto;
    padding: 4px 0 10px;
}

.chat-fg-thread {
    display: flex;
    gap: 12px;
    color: #0f172a;
    text-decoration: none;
    padding: 16px;
    border-right: 4px solid transparent;
}

.chat-fg-thread.is-current {
    background: #f8fafc;
    border-right-color: #0084ff;
}

.chat-fg-thread__avatar {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.88rem;
    font-weight: 700;
    color: #ea580c;
    background: #ffedd5;
    flex-shrink: 0;
}

.chat-fg-thread__avatar--general {
    color: #2563eb;
    background: #dbeafe;
}

.chat-fg-thread__avatar--direct {
    color: #475569;
    background: #e2e8f0;
}

.chat-fg-thread__body {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.chat-fg-thread__title-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 8px;
}

.chat-fg-thread__title-row strong {
    font-size: 14px;
    line-height: 20px;
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
}

.chat-fg-thread__title-row small {
    color: #94a3b8;
    font-size: 0.66rem;
    font-weight: 600;
    text-transform: uppercase;
    line-height: 1.5;
    padding-top: 2px;
}

.chat-fg-thread__body p {
    color: #64748b;
    font-size: 0.8rem;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-fg-chip {
    display: inline-flex;
    width: fit-content;
    padding: 2px 9px;
    border-radius: 16px;
    background: rgba(249, 115, 22, 0.12);
    color: #ea580c;
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.chat-fg-chip--blue {
    background: rgba(37, 99, 235, 0.12);
    color: #2563eb;
}

.chat-fg-main {
    min-height: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    overflow: hidden;
}

.chat-fg-main__header {
    min-height: 80px;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}

.chat-fg-main__title-wrap {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    min-width: 0;
    padding-block: 16px;
}

.chat-fg-room-avatar {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f97316;
    color: #fff;
    font-size: 0.86rem;
    font-weight: 700;
    flex-shrink: 0;
}

.chat-fg-main__title-wrap h1 {
    margin: 0;
    font-size: 18px;
    line-height: 22.5px;
    font-weight: 600;
    color: #0f172a;
    white-space: normal;
    overflow-wrap: anywhere;
}

.chat-fg-main__title-box {
    min-width: 0;
}

.chat-fg-main__id,
.chat-fg-main__name {
    display: inline;
}

.chat-fg-main__id {
    margin-right: 10px;
}

.chat-fg-main__title-wrap p {
    margin: 0;
    color: #64748b;
    font-size: 0.76rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.chat-fg-dot {
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: #22c55e;
}

.chat-fg-main__btn {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    border: 0;
    background: #f1f5f9;
    color: #334155;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
}

.chat-fg-messages {
    background: #f8fafc;
    border-top: 1px solid #eef2f7;
    border-bottom: 1px solid #e2e8f0;
    min-height: 0;
    overflow-y: auto;
    padding: 18px 18px 20px;
}

.chat-fg-day {
    width: fit-content;
    margin: 0 auto 14px;
    padding: 3px 10px;
    border-radius: 999px;
    background: #eef2f7;
    color: #94a3b8;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.chat-fg-message {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 14px;
}

.chat-fg-message--mine {
    align-items: flex-end;
}

.chat-fg-message__meta {
    font-size: 0.74rem;
    color: #64748b;
    margin-bottom: 5px;
    padding: 0 4px;
}

.chat-fg-message__bubble {
    max-width: min(82%, 650px);
    border-radius: 14px;
    background: #ffffff;
    border: 1px solid #eef2f7;
    padding: 12px 14px 10px;
    color: #0f172a;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
}

.chat-fg-message--mine .chat-fg-message__bubble {
    background: #0084ff;
    color: #fff;
    border-color: #0084ff;
}

.chat-fg-message__text {
    line-height: 1.5;
    font-size: 0.95rem;
    overflow-wrap: anywhere;
}

.chat-fg-message__time {
    margin-top: 8px;
    font-size: 0.7rem;
    color: #94a3b8;
    text-align: right;
}

.chat-fg-message--mine .chat-fg-message__time {
    color: rgba(255, 255, 255, 0.82);
}

.chat-fg-message__delete {
    margin-top: 5px;
}

.chat-fg-message__delete button {
    border: 0;
    background: transparent;
    color: #ef4444;
    font-size: 0.75rem;
    padding: 0 4px;
}

.chat-fg-composer {
    padding: 14px 24px 8px;
    background: #fff;
}

.chat-fg-composer__shell {
    border: 1px solid #e2e8f0;
    border-radius: 24px;
    background: #f8fafc;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.chat-fg-composer__tools {
    display: inline-flex;
    gap: 4px;
    align-items: center;
}

.chat-fg-tool {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    border: 0;
    background: transparent;
    color: #94a3b8;
}

.chat-fg-composer__input {
    flex: 1;
}

.chat-fg-composer__input .chat-input-control {
    min-height: 20px !important;
    height: 20px;
    max-height: 120px;
    border: 0;
    box-shadow: none;
    background: transparent;
    padding: 0 10px;
    line-height: 20px;
    resize: none;
    font-size: 0.9rem;
    overflow: hidden;
}

.chat-fg-composer__input .chat-input-control:focus {
    box-shadow: none;
}

.chat-fg-send {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    border: 0;
    background: #0084ff;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.chat-fg-send:disabled {
    opacity: 0.55;
}

.chat-fg-warning {
    margin: 8px 4px 0;
    color: #dc2626;
    font-size: 0.78rem;
}

.chat-fg-footer {
    margin-top: 8px;
    text-align: center;
    color: #94a3b8;
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.09em;
}

.chat-fg-sidebar--details {
    display: grid;
    align-content: start;
    gap: 24px;
    background: transparent;
    border: 0;
    box-shadow: none;
}

.chat-fg-card {
    padding: 24px;
}

.chat-fg-profile {
    display: flex;
    gap: 14px;
    align-items: center;
}

.chat-fg-profile__avatar-wrap {
    position: relative;
    width: 64px;
    height: 64px;
    flex-shrink: 0;
}

.chat-fg-profile__avatar {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    object-fit: cover;
    display: block;
    background: #f1f5f9;
}

.chat-fg-profile__avatar--fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #334155;
    font-size: 1.15rem;
    font-weight: 700;
}

.chat-fg-profile__status {
    position: absolute;
    right: -3px;
    bottom: -3px;
    width: 16px;
    height: 16px;
    border-radius: 999px;
    background: #22c55e;
    border: 2px solid #fff;
}

.chat-fg-profile h3 {
    margin: 0;
    font-size: 1.1rem;
}

.chat-fg-profile p {
    margin: 0;
    color: #64748b;
    font-size: 0.93rem;
    text-transform: capitalize;
}

.chat-fg-stats {
    margin-top: 16px;
    display: grid;
    gap: 10px;
}

.chat-fg-stat {
    background: #f8fafc;
    border: 1px solid rgba(241, 245, 249, 0.5);
    border-radius: 12px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.chat-fg-stat strong {
    color: #1e293b;
    font-size: 1.1rem;
    font-weight: 700;
}

.chat-fg-stat span {
    color: #94a3b8;
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.chat-fg-card h4 {
    margin: 0;
    color: #94a3b8;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.12em;
}

.chat-fg-member-list {
    margin-top: 16px;
    display: grid;
    gap: 12px;
}

.chat-fg-member {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 10px;
    align-items: center;
    color: #0f172a;
    text-decoration: none;
}

.chat-fg-member__avatar {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: #ffedd5;
    color: #ea580c;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.74rem;
    font-weight: 700;
}

.chat-fg-member__body strong {
    display: block;
    font-size: 0.89rem;
    line-height: 1.2;
}

.chat-fg-member__body small {
    display: block;
    font-size: 0.7rem;
    color: #64748b;
}

.chat-fg-member__status {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: #cbd5e1;
}

.chat-fg-member__status.is-active {
    background: #22c55e;
}

.chat-fg-add {
    margin-top: 14px;
    width: 100%;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    background: #fff;
    color: #64748b;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.84rem;
}

.chat-team-modal {
    border: 1px solid #e2e8f0;
    border-radius: 18px;
}

.chat-team-modal .modal-title {
    font-size: 0.88rem;
    letter-spacing: 0.12em;
    color: #64748b;
    font-weight: 800;
}

.chat-team-modal__search {
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    background: #f8fafc;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.chat-team-modal__search i {
    color: #94a3b8;
}

.chat-team-modal__search input {
    width: 100%;
    border: 0;
    background: transparent;
    font-size: 0.9rem;
    color: #334155;
}

.chat-team-modal__search input:focus {
    outline: none;
}

.chat-team-modal__list {
    max-height: min(52vh, 420px);
    overflow-y: auto;
    display: grid;
    gap: 8px;
    padding-bottom: 2px;
}

.chat-team-modal__item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #0f172a;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 10px;
    background: #fff;
}

.chat-team-modal__item:hover {
    background: #f8fafc;
}

.chat-team-modal__avatar {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ffedd5;
    color: #ea580c;
    font-size: 0.74rem;
    font-weight: 700;
}

.chat-team-modal__body strong {
    display: block;
    font-size: 0.88rem;
    line-height: 1.2;
}

.chat-team-modal__body small {
    display: block;
    color: #64748b;
    font-size: 0.74rem;
}

.chat-team-modal__status {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: #cbd5e1;
}

.chat-team-modal__status.is-active {
    background: #22c55e;
}

.chat-fg-empty,
.chat-fg-empty-mini {
    color: #64748b;
    font-size: 0.86rem;
}

.chat-fg-empty {
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.chat-fg-empty-mini {
    padding: 12px 16px;
}

.chat-fg-layout--embed .chat-fg-main {
    border-radius: 0;
    border: 0;
    box-shadow: none;
}

@media (max-width: 1400px) {
    .chat-fg-layout {
        grid-template-columns: 300px minmax(0, 1fr);
    }

    .chat-fg-sidebar--details {
        display: none;
    }
}

@media (max-width: 1100px) {
    .chat-fg-layout {
        grid-template-columns: minmax(0, 1fr);
        height: auto;
        min-height: calc(100dvh - 120px);
    }

    .chat-fg-sidebar--threads {
        display: none;
    }

    .chat-fg-main__title-wrap h1 {
        font-size: 1.05rem;
        line-height: 1.35;
    }

    .chat-fg-messages {
        padding: 14px 12px;
    }

    .chat-fg-composer {
        padding: 12px;
    }
}

.stat-card--presence-online {
    background: #dff7e8;
}

.stat-card--presence-offline {
    background: #f1f3f5;
}

.stat-value--presence {
    font-size: clamp(0.85rem, 0.55rem + 0.5vw, 1.15rem);
}
