/* StaerTeams — prefix st- */

/* === Hub (pagina carduri) === */
.st-hub {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
    padding: 24px;
    max-width: 900px;
}

.st-hub-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    cursor: pointer;
    transition: box-shadow 0.15s, transform 0.1s;
    position: relative;
}
.st-hub-card:hover {
    box-shadow: 0 4px 14px rgba(0,0,0,0.1);
    transform: translateY(-1px);
}
.st-hub-card.disabled {
    opacity: 0.55;
    cursor: default;
}
.st-hub-card.disabled:hover {
    box-shadow: none;
    transform: none;
}

.st-hub-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 10px;
    color: #fff;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.st-hub-card-info {
    flex: 1;
    min-width: 0;
}

.st-hub-card-title {
    font-size: 1rem;
    font-weight: 600;
    color: #1a1a1a;
}

.st-hub-card-desc {
    font-size: 0.8rem;
    color: #6b7280;
    margin-top: 2px;
}

.st-hub-badge {
    position: absolute;
    top: 10px;
    right: 12px;
    background: #dc3545;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
}

.st-hub-soon {
    position: absolute;
    top: 10px;
    right: 12px;
    font-size: 0.65rem;
    color: #9ca3af;
    font-style: italic;
}

/* === TopAuth unread badge === */
.topauth-unread-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #dc3545;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.2s;
    line-height: 1.2;
}
.topauth-unread-badge:hover {
    background: #c82333;
}
.topauth-unread-badge-empty {
    display: inline-flex;
    align-items: center;
    color: #6c757d;
    font-size: 0.85rem;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    transition: color 0.2s;
}
.topauth-unread-badge-empty:hover {
    color: #4a90d9;
}

/* === Tab badge pt StaerTeams === */
.tab-unread-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #dc3545;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 8px;
    margin-left: 6px;
    line-height: 1;
}

.st-chat-layout {
    display: flex;
    height: calc(100vh - 120px);
    border: 1px solid #dee2e6;
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
}

/* Compact mode — doar fereastra conversatie, fara sidebar canale */
.st-chat-layout.st-compact { height: 100%; border: none; border-radius: 0; }
.st-chat-layout.st-compact .st-channel-panel { display: none !important; }
.st-chat-layout.st-compact .st-chat-panel { display: flex; flex: 1; }

/* === Document viewer (overlay peste chat) === */
.st-doc-viewer { position: absolute; inset: 0; background: #fff; z-index: 50; display: flex; flex-direction: column; }
.st-doc-viewer.st-doc-viewer-fs { position: fixed !important; inset: 0 !important; width: 100vw !important; height: 100vh !important; z-index: 9999 !important; }
.st-doc-viewer-header { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; border-bottom: 1px solid #dee2e6; background: #f8f9fa; gap: 8px; }
.st-doc-viewer-title { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.st-doc-viewer-title i { margin-right: 6px; color: #666; }
.st-doc-viewer-actions { display: flex; gap: 4px; flex: 0 0 auto; }
.st-doc-viewer-nav { display: flex; gap: 4px; align-items: center; flex: 0 0 auto; }
.st-doc-viewer-counter { font-size: 0.85rem; color: #666; min-width: 50px; text-align: center; }
.st-doc-viewer-body { flex: 1; overflow: auto; display: flex; align-items: center; justify-content: center; background: #fafafa; }
.st-doc-viewer-body img { max-width: 100%; max-height: 100%; object-fit: contain; }
.st-doc-viewer-body iframe { width: 100%; height: 100%; border: 0; }
.st-doc-viewer-unsupported { text-align: center; padding: 2rem; color: #666; }
.st-doc-viewer-unsupported i { font-size: 4rem; display: block; margin-bottom: 0.5rem; opacity: 0.5; }

/* Chat panel trebuie sa fie position relative ca viewer-ul sa-l acopere */
.st-chat-panel { position: relative; }

/* === Panel stanga: lista canale === */
.st-channel-panel {
    width: 300px;
    min-width: 260px;
    border-right: 1px solid #dee2e6;
    display: flex;
    flex-direction: column;
    background: #f8f9fa;
}

.st-channel-header {
    padding: 12px;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    align-items: center;
    gap: 8px;
}

.st-channel-header input {
    flex: 1;
    border: 1px solid #ced4da;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 0.85rem;
}

/* === Tab-uri panel stanga === */
.st-tabs {
    display: flex;
    border-bottom: 1px solid #dee2e6;
    background: #f0f2f5;
    padding: 0;
}

.st-tab {
    flex: 1;
    border: none;
    background: transparent;
    padding: 8px 4px;
    font-size: 0.75rem;
    color: #6c757d;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    border-bottom: 2px solid transparent;
    transition: all 0.15s;
}

.st-tab:hover {
    color: #495057;
    background: rgba(0,0,0,0.03);
}

.st-tab.active {
    color: #4a90d9;
    border-bottom-color: #4a90d9;
    font-weight: 600;
}

.st-tab i {
    font-size: 1rem;
}

.st-tab-badge {
    background: #e74c3c;
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    line-height: 16px;
    border-radius: 8px;
    padding: 0 4px;
    text-align: center;
    margin-left: 2px;
}

.st-channel-list {
    flex: 1;
    overflow-y: auto;
    padding: 4px 0;
}

.st-channel-group-title {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: #6c757d;
    padding: 8px 12px 2px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.st-channel-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    cursor: pointer;
    gap: 10px;
    border-left: 3px solid transparent;
    transition: background 0.15s;
}
.st-channel-item:hover { background: #e9ecef; }
.st-channel-item.active {
    background: #d4e5f7;
    border-left-color: #0d6efd;
}

.st-channel-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #6c757d;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 600;
    flex-shrink: 0;
}

.st-flux-close {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    cursor: pointer;
    color: #999;
    font-size: 0.85rem;
    transition: all 0.15s;
}
.st-flux-close:hover {
    background: #fee;
    color: #d33;
}

.st-channel-info {
    flex: 1;
    min-width: 0;
}
.st-channel-name {
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.st-channel-preview {
    font-size: 0.75rem;
    color: #6c757d;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.st-channel-meta {
    text-align: right;
    flex-shrink: 0;
}
.st-channel-time {
    font-size: 0.7rem;
    color: #6c757d;
}
.st-unread-badge {
    background: #e74c3c;
    color: #fff;
    border-radius: 10px;
    padding: 1px 6px;
    font-size: 0.7rem;
    font-weight: 600;
    display: inline-block;
    margin-top: 2px;
}
.st-unread-badge.st-unread-children {
    background: #0d6efd;
}
.st-channel-group-header {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    cursor: pointer;
}

/* === Panel dreapta: conversatie === */
.st-chat-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.st-chat-header {
    padding: 8px 16px 0;
    border-bottom: 1px solid #dee2e6;
    background: #fff;
}

.st-chat-header-top {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.st-chat-header-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.st-chat-header-nav {
    display: flex;
    gap: 0;
}

.st-header-link {
    border: none;
    background: transparent;
    padding: 6px 12px;
    font-size: 0.8rem;
    color: #6c757d;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    gap: 4px;
}

.st-header-link:hover {
    color: #495057;
}

.st-header-link.active {
    color: #4a90d9;
    border-bottom-color: #4a90d9;
    font-weight: 600;
}

/* === Lista membri === */
.st-members-list {
    flex: 1;
    overflow-y: auto;
    padding: 12px 16px;
}

.st-member-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    font-size: 0.9rem;
    border-bottom: 1px solid #f0f2f5;
}

.st-member-checked { background: #f0f4ff; border-radius: 4px; }

.st-messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Spacer care impinge mesajele in jos cand sunt putine */
.st-messages-spacer {
    flex: 1;
}

.st-empty-state {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #adb5bd;
    font-size: 1.1rem;
}

/* === Mesaj (stil WhatsApp, fara avatar) === */
.st-msg {
    display: flex;
    flex-direction: column;
    max-width: 80%;
    padding: 2px 0;
    align-self: flex-start;
}
/* Cand mesajul e in editare, ia mai multa latime ca edit box sa aiba loc */
.st-msg:has(.st-msg-edit) { max-width: 95%; }
.st-msg.mine {
    align-self: flex-end;
}

.st-msg-body {
    padding: 6px 10px;
    background: #eaf8ff;
    border-radius: 8px;
    border: 1px solid #989ca0;
    box-shadow: 0 1px 1px rgba(0,0,0,0.04);
}
.st-msg.mine .st-msg-body {
    background: #d9fdd3;
    border-color: #c7ecc0;
}
.st-msg.auto .st-msg-body {
    background: #fff8e1;
    border-color: #ffe58a;
    font-style: italic;
}

.st-msg-header {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.st-msg-time {
    font-size: 0.75rem;
    color: #8696a0;
    flex-shrink: 0;
}

.st-msg-check {
    font-size: 0.75rem;
    color: #8696a0;
    flex-shrink: 0;
    letter-spacing: -2px;
}
.st-msg-check.read {
    color: #53bdeb;
}

.st-msg-sender {
    font-size: 0.85rem;
    font-weight: 600;
}
.st-msg.mine .st-msg-sender { display: none; }

.st-msg-text {
    font-size: 1rem;
    line-height: 1.45;
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: normal;
    white-space: pre-wrap;
}

/* Linkuri in mesaje */
.st-msg-link {
    color: #1a73e8;
    text-decoration: underline;
    word-break: break-all;
}
.st-msg-link:hover {
    color: #0d47a1;
}

/* Link preview card */
.st-link-preview {
    display: flex;
    gap: 10px;
    margin-top: 6px;
    padding: 8px;
    border: 1px solid #dee2e6;
    border-left: 3px solid #1a73e8;
    border-radius: 6px;
    background: #fafbfc;
    text-decoration: none;
    color: inherit;
    max-width: 350px;
    overflow: hidden;
    transition: background 0.15s;
}
.st-link-preview:hover {
    background: #f0f2f5;
    text-decoration: none;
    color: inherit;
}
.st-link-preview-img {
    width: 350px;
    height: 200px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}
.st-link-preview-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    overflow: hidden;
}
.st-link-preview-site {
    font-size: 0.7rem;
    color: #1a73e8;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.st-link-preview-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: #212529;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.st-link-preview-desc {
    font-size: 0.72rem;
    color: #6c757d;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Date separator */
.st-date-sep {
    text-align: center;
    font-size: 0.7rem;
    color: #6c757d;
    padding: 8px 0;
}
.st-date-sep span {
    background: #e9ecef;
    padding: 2px 12px;
    border-radius: 10px;
}

/* === Input area === */
.st-input-area {
    padding: 10px 16px;
    border-top: 1px solid #dee2e6;
    display: flex;
    gap: 8px;
    align-items: flex-end;
    background: #fff;
}
.st-input-area textarea {
    flex: 1;
    border: 1px solid #ced4da;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.85rem;
    resize: none;
    min-height: 38px;
    max-height: 120px;
    line-height: 1.4;
}
.st-input-area textarea:focus {
    outline: none;
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.2rem rgba(13,110,253,.15);
}
.st-send-btn {
    background: #0d6efd;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.st-clip-btn {
    background: transparent;
    border: none;
    color: #6c757d;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 6px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.15s;
}
.st-clip-btn:hover { color: #495057; background: #f0f2f5; }

.st-send-btn:hover { background: #0b5ed7; }
.st-send-btn:disabled { background: #6c757d; cursor: not-allowed; }

/* === Atasamente in mesaj === */
.st-msg-attachments {
    margin-top: 4px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.st-msg-img {
    max-width: 280px;
    max-height: 200px;
    border-radius: 8px;
    object-fit: cover;
    cursor: pointer;
    display: block;
}
.st-msg-img:hover {
    opacity: 0.9;
}

.st-msg-file {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: rgba(0,0,0,0.05);
    border-radius: 6px;
    font-size: 0.8rem;
    color: #495057;
    text-decoration: none;
    transition: background 0.15s;
}
.st-msg-file:hover {
    background: rgba(0,0,0,0.1);
    color: #212529;
}
.st-msg-file i { font-size: 1rem; }
.st-msg-file small { color: #6c757d; }

/* === Staged files (preview inainte de send) === */
.st-staged-files {
    padding: 6px 16px;
    border-top: 1px solid #dee2e6;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    background: #fafbfc;
}

.st-staged-file {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    background: #e9ecef;
    border-radius: 6px;
    font-size: 0.8rem;
}

.st-staged-thumb {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    object-fit: cover;
}

.st-staged-name {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.st-staged-remove {
    background: transparent;
    border: none;
    cursor: pointer;
    color: #6c757d;
    padding: 0 2px;
    font-size: 0.75rem;
    line-height: 1;
}
.st-staged-remove:hover { color: #dc3545; }

/* === Upload indicator === */
.st-upload-indicator {
    padding: 4px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: #6c757d;
    background: #fafbfc;
    border-top: 1px solid #dee2e6;
}

/* === Tab Fisiere (panel dreapta) === */
.st-files-list {
    flex: 1;
    overflow-y: auto;
    padding: 12px 16px;
}

.st-file-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 4px;
    border-bottom: 1px solid #f0f2f5;
}

.st-file-thumb {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}

.st-file-icon {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    background: #f0f2f5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: #6c757d;
    flex-shrink: 0;
}

.st-file-info {
    flex: 1;
    min-width: 0;
}

.st-file-name {
    display: block;
    font-size: 0.85rem;
    color: #495057;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.st-file-name:hover { color: #0d6efd; }

.st-file-size {
    font-size: 0.75rem;
    color: #6c757d;
}

/* === Context menu (click dreapta pe mesaj) === */
.st-ctx-overlay {
    position: fixed;
    inset: 0;
    z-index: 900;
}

.st-context-menu {
    position: fixed;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    padding: 4px 0;
    min-width: 160px;
    z-index: 901;
}

.st-context-menu button {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    border: none;
    background: transparent;
    padding: 6px 14px;
    font-size: 0.8rem;
    color: #495057;
    cursor: pointer;
    text-align: left;
}
.st-context-menu button:hover {
    background: #f0f2f5;
}
.st-context-menu button.st-ctx-danger {
    color: #dc3545;
}
.st-context-menu button.st-ctx-danger:hover {
    background: #fff5f5;
}

/* === Reply indicator (deasupra input) === */
.st-reply-indicator {
    padding: 6px 16px;
    border-top: 1px solid #dee2e6;
    border-left: 3px solid #4a90d9;
    background: #f0f6ff;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: #495057;
}
.st-reply-indicator span {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* === Internal/External toggle (Migration 073) === */
.st-internal-toggle {
    padding: 8px 14px;
    border-top: 1px solid #dee2e6;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    transition: filter 0.15s ease;
}
.st-internal-toggle:hover { filter: brightness(0.97); }
.st-internal-toggle.internal {
    background: #e9ecef;
    color: #6c757d;
    border-left: 3px solid #6c757d;
}
.st-internal-toggle.external {
    background: #fff3cd;
    color: #856404;
    border-left: 3px solid #dc3545;
    animation: st-external-pulse 1.4s ease-in-out infinite;
}
@keyframes st-external-pulse {
    0%, 100% { background: #fff3cd; }
    50% { background: #ffe69c; }
}
.st-internal-toggle i { font-size: 1rem; }

/* Mesaje interne — border galben + emoji lacat */
.st-msg.st-msg-internal .st-msg-body {
    border-left: 3px solid #ffc107 !important;
    background: #fffbf0 !important;
    position: relative;
    padding-right: 26px !important;
}
.st-msg.st-msg-internal .st-msg-body::after {
    content: "🔒";
    position: absolute;
    top: 2px;
    right: 6px;
    font-size: 0.85rem;
    opacity: 0.9;
    pointer-events: none;
    z-index: 2;
}

/* Mesaje externe (catre/de la client) — border verde + emoji megafon */
.st-msg.st-msg-external .st-msg-body {
    border-left: 3px solid #198754 !important;
    background: #f0faf4 !important;
    position: relative;
    padding-right: 26px !important;
}
.st-msg.st-msg-external .st-msg-body::after {
    content: "📢";
    position: absolute;
    top: 2px;
    right: 6px;
    font-size: 0.85rem;
    opacity: 0.9;
    pointer-events: none;
    z-index: 2;
}

/* === Reply reference in bubble === */
.st-msg-reply-ref {
    font-size: 0.75rem;
    color: #6c757d;
    padding: 3px 8px;
    background: rgba(0,0,0,0.04);
    border-left: 2px solid #4a90d9;
    border-radius: 0 4px 4px 0;
    margin-bottom: 3px;
    display: flex;
    align-items: center;
    gap: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* === Edited badge === */
.st-msg-edited {
    font-style: italic;
    margin-left: 4px;
    opacity: 0.7;
}

/* === Edit inline === */
.st-msg-edit {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 320px;
    width: 100%;
}
.st-msg-edit textarea {
    border: 1px solid #86b7fe;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 0.85rem;
    resize: vertical;
    min-height: 72px;
    max-height: 400px;
    width: 100%;
    line-height: 1.35;
    line-height: 1.35;
}
.st-msg-edit textarea:focus {
    outline: none;
    box-shadow: 0 0 0 0.15rem rgba(13,110,253,.15);
}
.st-msg-edit-actions {
    display: flex;
    gap: 4px;
    justify-content: flex-end;
}
.st-msg-edit-actions .btn {
    padding: 2px 8px;
    font-size: 0.75rem;
}

/* === Thread-uri (frame vizual prin CSS borders pe mesaje consecutive) === */
.st-msg.in-thread,
.st-thread-label {
    border-left: 3px solid #4a90d9;
    border-right: 1px solid rgba(74, 144, 217, 0.25);
    background: rgba(74, 144, 217, 0.04);
    margin-left: 4px;
    margin-right: 4px;
}
.st-msg.in-thread.thread-start {
    border-top: 1px solid rgba(74, 144, 217, 0.25);
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    margin-top: 10px;
    padding-top: 10px;
}
.st-msg.in-thread.thread-end {
    border-bottom: 1px solid rgba(74, 144, 217, 0.25);
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    margin-bottom: 10px;
    padding-bottom: 10px;
}
.st-thread-label {
    font-size: 0.75rem;
    color: #4a90d9;
    padding: 4px 16px;
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 500;
}

/* === Buton back mobil (ascuns pe desktop) === */
.st-back-btn {
    display: none;
    background: transparent;
    border: none;
    color: #4a90d9;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 4px;
    margin-right: 4px;
    flex-shrink: 0;
}

/* === Mention autocomplete === */
.st-input-wrapper {
    position: relative;
}
.st-mention-dropdown {
    position: absolute;
    bottom: 100%;
    left: 0;
    right: 0;
    max-height: 240px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px 8px 0 0;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.1);
    padding: 4px 0;
    z-index: 100;
}
.st-mention-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 0.85rem;
}
.st-mention-item:hover,
.st-mention-item.active {
    background: #e9ecef;
}
.st-mention-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #6c757d;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 600;
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
}
.st-mention {
    color: #1a73e8;
    font-weight: 600;
    background: rgba(26, 115, 232, 0.08);
    padding: 0 3px;
    border-radius: 3px;
}

/* === Responsive: mobil (<768px) === */
@media (max-width: 767px) {
    .st-chat-layout {
        height: calc(100vh - 90px);
        border: none;
        border-radius: 0;
    }

    /* Pe mobil: channel panel ia 100% din latime, chat panel ascuns */
    .st-channel-panel {
        width: 100%;
        min-width: unset;
        border-right: none;
    }
    .st-chat-panel {
        display: none;
        width: 100%;
    }

    /* Cand un canal e selectat: ascunde channel panel, arata chat panel */
    .st-chat-layout.mobile-chat-active .st-channel-panel {
        display: none;
    }
    .st-chat-layout.mobile-chat-active .st-chat-panel {
        display: flex;
    }

    /* Buton back vizibil pe mobil */
    .st-back-btn {
        display: inline-flex;
        align-items: center;
    }

    /* Mesaje full width pe mobil */
    .st-msg {
        max-width: 95%;
    }

    /* Input padding */
    .st-input-area {
        padding: 8px 10px;
        gap: 6px;
    }

    /* Messages container */
    .st-messages-container {
        padding: 8px 10px;
    }

    /* Chat header mai compact */
    .st-chat-header {
        padding: 6px 10px 0;
    }
    .st-chat-header-name {
        font-size: 0.85rem;
    }
    .st-header-link {
        padding: 4px 8px;
        font-size: 0.75rem;
    }

    /* Imagini atasate mai mici */
    .st-msg-img {
        max-width: 200px;
        max-height: 150px;
    }

    /* Font mai mare pe mobil */
    .st-msg-text {
        font-size: 1.1rem;
        line-height: 1.5;
    }
    .st-msg-sender {
        font-size: 0.9rem;
    }
    .st-msg-time {
        font-size: 0.8rem;
    }

    /* Header-uri grup Flux — padding mai mare pt touch */
    .st-channel-group-header {
        padding: 10px 12px;
    }

    /* Link preview mai compact */
    .st-link-preview {
        max-width: 100%;
    }
    .st-link-preview-img {
        width: 200px;
        height: 150px;
    }
}

/* =========================================
   StaerCloud — File Manager (prefix sc-)
   ========================================= */

.sc-layout {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #f8f9fa;
}

/* Toolbar */
.sc-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    gap: 12px;
    flex-wrap: wrap;
}

.sc-breadcrumb {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.9rem;
    min-width: 0;
    overflow: hidden;
}
.sc-breadcrumb-item {
    cursor: pointer;
    color: #1a73e8;
    white-space: nowrap;
}
.sc-breadcrumb-item:hover { text-decoration: underline; }
.sc-breadcrumb-sep { color: #9e9e9e; }

.sc-toolbar-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.sc-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border: 1px solid #d0d0d0;
    border-radius: 6px;
    background: #fff;
    font-size: 0.85rem;
    cursor: pointer;
    white-space: nowrap;
}
.sc-btn:hover { background: #f0f0f0; }
.sc-btn-primary { background: #1a73e8; color: #fff; border-color: #1a73e8; }
.sc-btn-primary:hover { background: #1557b0; }
.sc-btn-danger { color: #dc3545; border-color: #dc3545; }
.sc-btn-danger:hover { background: #fef2f2; }

/* View tabs */
.sc-view-tabs {
    display: flex;
    gap: 0;
    padding: 0 16px;
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
}
.sc-view-tab {
    padding: 10px 18px;
    font-size: 0.85rem;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    color: #666;
    display: flex;
    align-items: center;
    gap: 6px;
}
.sc-view-tab:hover { color: #1a73e8; }
.sc-view-tab.active {
    color: #1a73e8;
    border-bottom-color: #1a73e8;
    font-weight: 600;
}

/* Content area */
.sc-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.sc-loading, .sc-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: #999;
}

/* File/Folder grid */
.sc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}

.sc-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 14px 8px 10px;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    cursor: pointer;
    transition: box-shadow 0.1s, border-color 0.1s;
    text-align: center;
}
.sc-item:hover {
    border-color: #b0c4de;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.sc-item.selected {
    border-color: #1a73e8;
    background: #e8f0fe;
}

.sc-item-icon {
    font-size: 2.2rem;
    margin-bottom: 6px;
}
.sc-item-icon.folder { color: #f9a825; }
.sc-item-icon.file { color: #5f6368; }

.sc-item-name {
    font-size: 0.8rem;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.sc-item-info {
    font-size: 0.7rem;
    color: #9e9e9e;
    margin-top: 2px;
}

/* Context menu */
.sc-ctx-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
}
.sc-ctx-menu {
    position: fixed;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    min-width: 160px;
    z-index: 1001;
    padding: 4px 0;
}
.sc-ctx-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    font-size: 0.85rem;
    cursor: pointer;
}
.sc-ctx-item:hover { background: #f0f0f0; }
.sc-ctx-danger { color: #dc3545; }

/* Modal */
.sc-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}
.sc-modal {
    background: #fff;
    border-radius: 10px;
    width: 460px;
    max-height: 80vh;
    overflow: auto;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}
.sc-modal-sm { width: 320px; }
.sc-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    border-bottom: 1px solid #eee;
    font-weight: 600;
}
.sc-modal-close {
    cursor: pointer;
    font-size: 1.2rem;
    color: #999;
}
.sc-modal-close:hover { color: #333; }
.sc-modal-body { padding: 14px 18px; }

.sc-input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 0.9rem;
}

/* Share dialog */
.sc-share-list { max-height: 300px; overflow-y: auto; }
.sc-share-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid #f0f0f0;
}
.sc-share-name { font-size: 0.85rem; }
.sc-share-select {
    padding: 4px 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.8rem;
}

/* Drop zone */
.sc-content {
    position: relative;
}
.sc-drop-overlay {
    display: none;
    position: absolute;
    inset: 0;
    background: rgba(26, 115, 232, 0.08);
    border: 2px dashed #1a73e8;
    border-radius: 8px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #1a73e8;
    font-size: 1rem;
    z-index: 10;
    pointer-events: none;
}
.sc-dragover .sc-drop-overlay {
    display: flex;
}
.sc-dragover .sc-grid,
.sc-dragover .sc-loading,
.sc-dragover .sc-empty {
    opacity: 0.3;
    pointer-events: none;
}

.sc-error {
    padding: 8px 16px;
    background: #fef2f2;
    color: #dc3545;
    font-size: 0.85rem;
    border-top: 1px solid #f5c2c7;
}
