/* ==========================================
   ADIUT - Design System v3
   Chat conversacional estilo moderno
   ========================================== */

:root {
    --primary: #6C63FF;
    --primary-dark: #5A52D5;
    --primary-gradient: linear-gradient(135deg, #6C63FF 0%, #7C3AED 100%);
    --primary-light: #EEEDFF;

    --bg: #FFFFFF;
    --bg-soft: #F9F9FB;
    --text: #1A1A2E;
    --text-secondary: #6B7280;
    --text-muted: #9CA3AF;
    --border: #E5E7EB;
    --border-light: #F3F4F6;

    --font: 'Century Gothic', CenturyGothic, AppleGothic, sans-serif;
}

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    height: 100vh;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
}

#app {
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ==========================================
   SIDEBAR
   ========================================== */

.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.25);
    z-index: 900;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.sidebar {
    position: fixed;
    top: 0;
    left: -320px;
    width: 300px;
    height: 100vh;
    background: var(--bg);
    border-right: 1px solid var(--border);
    z-index: 950;
    display: flex;
    flex-direction: column;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 4px 0 24px rgba(0,0,0,0);
}

.sidebar.open {
    left: 0;
    box-shadow: 4px 0 24px rgba(0,0,0,0.08);
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid var(--border-light);
}

.sidebar-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

.sidebar-close {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: background 0.15s;
}

.sidebar-close:hover {
    background: var(--border-light);
}

.sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
}

.sidebar-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.6;
}

.sidebar-empty svg {
    display: block;
    margin: 0 auto 12px;
    opacity: 0.3;
}

/* ---- Document cards ---- */
.doc-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 6px;
    cursor: default;
    transition: background 0.15s;
    border: 1px solid var(--border-light);
}

.doc-card:hover {
    background: var(--bg-soft);
}

.doc-card-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 16px;
}

.doc-card-info {
    flex: 1;
    min-width: 0;
}

.doc-card-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.doc-card-meta {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

.doc-card-delete {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
    transition: all 0.15s;
}

.doc-card-delete:hover {
    background: #FEE2E2;
    color: #EF4444;
}

.doc-card-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.doc-card-status.ok {
    background: #10B981;
}

.doc-card-status.loading {
    background: #F59E0B;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* ---- Sidebar upload button ---- */
.sidebar-upload-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px;
    margin-top: 8px;
    border: 1.5px dashed var(--border);
    border-radius: 10px;
    background: transparent;
    color: var(--text-secondary);
    font-family: var(--font);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
}

.sidebar-upload-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}

.sidebar-audit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px;
    margin-top: 6px;
    border: 1.5px dashed var(--border);
    border-radius: 10px;
    background: transparent;
    color: var(--text-secondary);
    font-family: var(--font);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
}
.sidebar-audit-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}

/* Document processed result */
.doc-done-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 2px;
}
.doc-done-meta {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 12px;
}
.doc-done-warn {
    font-size: 13px;
    color: #92400E;
    margin-bottom: 8px;
}
.doc-done-warn p { margin: 0; }
.doc-done-prompt {
    font-size: 13px;
    color: var(--text-secondary);
}

/* Audit results */
.audit-stats {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.audit-stat {
    flex: 1;
    min-width: 100px;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
}
.audit-stat-num {
    display: block;
    font-size: 1.5em;
    font-weight: 700;
}
.audit-stat-label {
    font-size: 0.75em;
    color: #6B7280;
}
.audit-stat-ok { background: #ECFDF5; color: #065F46; }
.audit-stat-warn { background: #FFFBEB; color: #92400E; }
.audit-stat-err { background: #FEF2F2; color: #991B1B; }
.audit-stat-timeout { background: #F3F4F6; color: #6B7280; }

.audit-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85em;
}
.audit-table th {
    background: #F9FAFB;
    padding: 8px 10px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #E5E7EB;
}
.audit-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #F3F4F6;
    vertical-align: top;
}
.audit-table tr.audit-err td { background: #FEF2F2; }
.audit-table tr.audit-warn-deroga td { background: #FEF2F2; }
.audit-table tr.audit-warn-mod td { background: #FFFBEB; }
.audit-table tr.audit-ok td { background: #ECFDF5; }
.audit-table tr.audit-timeout td { background: #F9FAFB; }
.audit-table a.law-link { font-weight: 600; }

/* ==========================================
   HAMBURGER MENU
   ========================================== */

.hamburger-menu {
    position: fixed;
    top: 20px;
    left: 20px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid transparent;
    background: #FFFFFF;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 2000;
    box-shadow: var(--shadow-sm);
}

.hamburger-menu:hover {
    background: var(--bg-soft);
    color: var(--primary);
    transform: scale(1.05);
    box-shadow: var(--shadow-md);
}

.hamburger-menu.hidden {
    opacity: 0;
    pointer-events: none;
}

/* ==========================================
   HERO (solo cuando no hay mensajes)
   ========================================== */

.hero {
    text-align: center;
    padding-top: 20vh;
    padding-bottom: 1rem;
    user-select: none;
    transition: all 0.4s ease;
    max-width: 680px;
    width: 100%;
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
}

.hero.collapsed {
    padding-top: 16px;
    padding-bottom: 8px;
}

.hero-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-bottom: 2px;
    margin-left: -20px; /* Compensación visual para centrar el bloque ópticamente */
}

.hero-logo-img {
    width: 65px;
    height: 65px;
    object-fit: contain;
    transition: width 0.4s ease, height 0.4s ease;
}

.hero.collapsed .hero-logo-img {
    width: 28px;
    height: 28px;
}

.hero-title {
    font-size: 52px;
    font-weight: 700;
    letter-spacing: 1px;
    color: #1A1A2E;
    line-height: 1;
    transition: font-size 0.4s ease;
}

.hero.collapsed .hero-title {
    font-size: 24px;
    letter-spacing: 0.5px;
}

.hero-sub {
    color: #1A1A2E;
    font-size: 18px;
    font-weight: 400;
    letter-spacing: 0.5px;
    margin-top: 2px;
    text-align: center;
    padding-left: 20px; /* Alinear visualmente con "Adiut" */
    padding-right: 20px;
    transition: all 0.4s ease;
}

.hero.collapsed .hero-sub {
    font-size: 12px;
    margin-top: 0;
}

/* ==========================================
   MESSAGES AREA
   ========================================== */

.messages {
    flex: 1;
    overflow-y: auto;
    padding: 0 24px 16px;
    max-width: 680px;
    width: 100%;
    margin: 0 auto;
}

.message {
    max-width: 680px;
    margin: 0 auto 20px;
    animation: fadeIn 0.3s ease;
}

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

/* ---- User message ---- */
.message-user {
    display: flex;
    justify-content: flex-end;
}

.message-user .message-content {
    background: var(--primary);
    color: #FFFFFF;
    border-radius: 20px 20px 4px 20px;
    padding: 14px 20px;
    max-width: 75%;
    font-size: 16px;
    line-height: 1.6;
}

/* ---- Assistant message ---- */
.message-assistant {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary-gradient);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 2px;
}

.message-assistant .message-content {
    flex: 1;
    font-size: 15px;
    line-height: 1.7;
    color: var(--text);
    padding: 4px 0;
}

.message-assistant .message-content a {
    color: var(--primary, #2563eb);
    text-decoration: underline;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.2s;
}

.message-assistant .message-content a:hover {
    opacity: 0.7;
}

/* Enlaces a leyes/normas: siempre subrayados y clicables hacia la URL oficial */
.message-assistant .message-content a.law-link {
    text-decoration: underline;
    text-underline-offset: 2px;
    color: var(--primary);
    font-weight: 600;
}

.message-assistant .message-content a.law-link:hover {
    text-decoration: underline;
    opacity: 0.85;
}

/* Badges de vigencia */
.message-assistant .message-content code.vigencia-badge {
    font-size: 0.72em;
    padding: 2px 7px;
    border-radius: 4px;
    font-weight: 600;
    letter-spacing: 0.02em;
    vertical-align: middle;
    margin-left: 4px;
    font-family: inherit;
    white-space: nowrap;
    background: #ECFDF5;
    color: #065F46;
    border: 1px solid #A7F3D0;
}
.message-assistant .message-content code.vigencia-derogada {
    background: #FEF2F2;
    color: #991B1B;
    border: 1px solid #FECACA;
}
.message-assistant .message-content code.vigencia-modificada {
    background: #FFFBEB;
    color: #92400E;
    border: 1px solid #FDE68A;
}

.message-assistant .message-content p {
    margin-bottom: 10px;
    text-align: justify;
    text-justify: inter-word;
    hyphens: auto;
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
}

.message-assistant .message-content p:last-child {
    margin-bottom: 0;
}

.message-assistant .message-content strong {
    font-weight: 600;
}

.message-assistant .message-content h2,
.message-assistant .message-content h3,
.message-assistant .message-content h4 {
    margin: 16px 0 8px;
    font-weight: 600;
    text-align: left;
}

.message-assistant .message-content h2 { font-size: 20px; }
.message-assistant .message-content h3 { font-size: 18px; }
.message-assistant .message-content h4 { font-size: 17px; }

.message-assistant .message-content ul {
    margin: 8px 0;
    padding-left: 24px;
}

.message-assistant .message-content li {
    margin-bottom: 6px;
    text-align: justify;
    text-justify: inter-word;
    hyphens: auto;
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
}

.message-meta {
    margin-top: 12px;
    font-size: 12px;
    color: var(--text-muted);
    text-align: left;
}

/* ==========================================
   DOCUMENT BADGE
   ========================================== */

.doc-badge-wrap {
    text-align: center;
    padding: 6px 0;
}

.doc-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--primary-light);
    color: var(--primary);
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
}

/* ==========================================
   CHAT BAR (fija abajo)
   ========================================== */

.chat-bar-wrap {
    flex-shrink: 0;
    padding: 12px 20px 20px;
    background: var(--bg);
    max-width: 680px;
    width: 100%;
    margin: 0 auto;
    transition: all 0.4s ease;
}

.chat-bar-wrap.centered {
    position: absolute;
    top: calc(20vh + 130px);
    left: 50%;
    transform: translateX(-50%);
    padding: 0 20px;
    max-width: 680px;
}

.chat-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg);
    border: 1.5px solid var(--border);
    border-radius: 28px;
    padding: 5px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.chat-bar:focus-within {
    border-color: rgba(3, 2, 8, 0.4);
    box-shadow: 0 0 0 3px rgba(3, 3, 7, 0);
}

/* ---- Clip Button ---- */
.btn-clip {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: var(--border-light);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.15s;
}

.btn-clip:hover {
    background: var(--border);
}

/* ---- Input ---- */
.chat-input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-family: var(--font);
    font-size: 16px;
    color: var(--text);
    padding: 10px 4px;
    caret-color: var(--primary);
    resize: none;
    overflow-y: hidden;
    min-height: 24px;
    max-height: 150px;
    line-height: 1.4;
}

.chat-input::placeholder {
    color: var(--text-muted);
}

/* ---- Send Button ---- */
.btn-send {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: #000000; /* Negro */
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.15s, box-shadow 0.15s;
}

.btn-send:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

.btn-send:active {
    transform: scale(0.95);
}

.btn-send:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ==========================================
   THINKING DOTS
   ========================================== */

.thinking-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
}

.thinking-dots {
    display: flex;
    gap: 5px;
    flex-shrink: 0;
}

.thinking-dots span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--primary);
    animation: bounce 1.4s ease-in-out infinite;
}

.thinking-dots span:nth-child(2) { animation-delay: 0.2s; }
.thinking-dots span:nth-child(3) { animation-delay: 0.4s; }

.thinking-status {
    font-size: 0.85rem;
    color: var(--text-muted);
    animation: fadeInStatus 0.3s ease-in;
    font-style: italic;
}

@keyframes bounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.3; }
    40% { transform: scale(1); opacity: 1; }
}

@keyframes fadeInStatus {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ==========================================
   ACTIVITY LOG - Trabajo interno de Adiut
   ========================================== */

.activity-log {
    margin-top: 8px;
    padding: 10px 14px;
    background: var(--bg-soft);
    border-left: 3px solid var(--primary);
    border-radius: 0 8px 8px 0;
    max-height: 160px;
    overflow-y: auto;
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 0.75rem;
    line-height: 1.6;
    color: var(--text-secondary);
    opacity: 0.85;
    transition: opacity 0.3s ease;
}

.activity-log:empty {
    display: none;
}

.activity-line {
    animation: slideInLog 0.3s ease-out;
    padding: 1px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.activity-line:last-child {
    color: var(--text);
    font-weight: 500;
}

.activity-ts {
    color: var(--primary);
    font-weight: 600;
    margin-right: 6px;
    opacity: 0.7;
}

@keyframes slideInLog {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Scrollbar sutil para activity-log */
.activity-log::-webkit-scrollbar {
    width: 3px;
}
.activity-log::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 3px;
    opacity: 0.3;
}

/* ==========================================
   PROCESSING STEPS
   ========================================== */

.processing-title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 10px;
}

.step {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    font-size: 13px;
    color: var(--text-secondary);
}

.step-icon {
    width: 18px;
    text-align: center;
    flex-shrink: 0;
}

/* ==========================================
   SIDEBAR EXTRAS
   ========================================== */

.sidebar-divider {
    height: 1px;
    background: var(--border-light);
    margin: 12px 0;
}

.sidebar-graph-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    background: transparent;
    color: var(--text-secondary);
    font-family: var(--font);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
}

.sidebar-graph-btn:hover {
    border-color: #10B981;
    color: #10B981;
    background: #ECFDF5;
}

.sidebar-clear-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px;
    margin-top: 8px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    background: transparent;
    color: var(--text-tertiary);
    font-family: var(--font);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
}

.sidebar-clear-btn:hover {
    border-color: #EF4444;
    color: #EF4444;
    background: #FEF2F2;
}

/* ==========================================
   GRAPH MODAL
   ========================================== */

.graph-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.graph-modal-inner {
    background: var(--bg);
    border-radius: 16px;
    width: 90vw;
    max-width: 900px;
    height: 70vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.graph-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-light);
}

.graph-modal-title {
    font-size: 16px;
    font-weight: 600;
}

.graph-modal-close {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.graph-modal-close:hover {
    background: var(--border-light);
}

.graph-container {
    flex: 1;
    overflow: hidden;
}

.graph-container svg {
    width: 100%;
    height: 100%;
}

.graph-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 20px;
    border-top: 1px solid var(--border-light);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-secondary);
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ==========================================
   CONFIDENCE BADGE
   ========================================== */

.confidence-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-soft);
    border: 1px solid var(--border-light);
    border-radius: 999px;
    padding: 3px 10px;
    font-size: 11px;
    position: relative;
    overflow: hidden;
}

.source-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.source-link:hover {
    text-decoration: underline;
}

.graph-update-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #059669;
    font-weight: 500;
}

.confidence-bar {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    opacity: 0.12;
    border-radius: 999px;
    transition: width 0.5s ease;
}

/* ==========================================
   RL STATUS PANEL
   ========================================== */

.rl-status-panel {
    padding: 12px 0;
}

.rl-status-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6B7280;
    margin-bottom: 10px;
}

.rl-status-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #374151;
    padding: 3px 0;
}

.rl-status-row span:last-child {
    font-weight: 500;
    color: var(--primary);
}

.rl-retrain-btn {
    width: 100%;
    margin-top: 10px;
    padding: 8px 12px;
    border: 1px solid #D1D5DB;
    border-radius: 8px;
    background: #FFF;
    font-size: 13px;
    color: #374151;
    cursor: pointer;
    transition: all 0.15s ease;
}

.rl-retrain-btn:hover:not(:disabled) {
    border-color: var(--primary);
    color: var(--primary);
    background: #F0F4FF;
}

.rl-retrain-btn:disabled {
    opacity: 0.6;
    cursor: wait;
}

/* ==========================================
   FEEDBACK RL
   ========================================== */

.feedback-bar {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 8px;
}

.feedback-label {
    font-size: 13px;
    color: #374151;
    margin-right: 8px;
    font-weight: 500;
}

.feedback-btn {
    width: 28px;
    height: 28px;
    border: 1px solid transparent;
    border-radius: 6px;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9CA3AF;
    transition: color 0.15s, background 0.15s;
    padding: 0;
}

.feedback-btn:hover:not(:disabled) {
    color: #111;
    background: #F3F4F6;
}

.feedback-btn:disabled {
    cursor: default;
    opacity: 0.3;
}

.feedback-btn.feedback-active {
    opacity: 1 !important;
    color: #111;
}

.feedback-up.feedback-active {
    background: #F3F4F6;
}

.feedback-down.feedback-active {
    background: #F3F4F6;
}

/* ==========================================
   SCROLLBAR
   ========================================== */

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #DDD; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #BBB; }

/* ==========================================
   RESPONSIVE
   ========================================== */

@media (max-width: 640px) {
    .hero-title { font-size: 36px; }
    .hero.collapsed .hero-title { font-size: 20px; }
    .message-user .message-content { max-width: 88%; }
    .btn-clip, .btn-send { width: 38px; height: 38px; }
}
