* {
    box-sizing: border-box;
}

:root {

    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    color-scheme: dark;

    --background: #09090c;
    --sidebar: #0d0d11;
    --surface: #111116;
    --surface-hover: #18181e;

    --border: #24242b;

    --text: #f4f4f5;
    --text-secondary: #96969f;
    --text-muted: #606069;

    --accent: #ffffff;
    --accent-text: #09090c;

    --radius: 14px;
}

html,
body {

    width: 100%;
    height: 100%;

    margin: 0;

    background: var(--background);
    color: var(--text);

}

body {

    overflow: hidden;

}

button,
textarea {

    font-family: inherit;

}

button {

    border: 0;

}

.app {

    width: 100%;
    height: 100vh;

    display: flex;

}

/* =========================
   SIDEBAR
========================= */

.sidebar {

    width: 270px;
    height: 100%;

    flex-shrink: 0;

    display: flex;
    flex-direction: column;

    padding: 16px;

    background: var(--sidebar);

    border-right: 1px solid var(--border);

    position: relative;

    z-index: 30;

}

.sidebar-top {

    display: flex;

    align-items: center;

    justify-content: space-between;

    margin-bottom: 22px;

}

.brand {

    display: flex;

    align-items: center;

    gap: 11px;

}

.brand-logo {

    width: 38px;
    height: 38px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 11px;

    background: var(--accent);

    color: var(--accent-text);

    font-size: 19px;

    font-weight: 800;

}

.brand-name {

    font-size: 15px;

    font-weight: 750;

    letter-spacing: 0.04em;

}

.brand-status {

    display: flex;

    align-items: center;

    gap: 6px;

    margin-top: 3px;

    color: var(--text-secondary);

    font-size: 11px;

}

.status-dot {

    width: 6px;
    height: 6px;

    border-radius: 50%;

    background: #68d46c;

}

.new-chat {

    width: 100%;

    height: 44px;

    display: flex;

    align-items: center;

    gap: 10px;

    padding: 0 13px;

    border-radius: 12px;

    background: var(--surface);

    border: 1px solid var(--border);

    color: var(--text);

    font-size: 13px;

    font-weight: 600;

    cursor: pointer;

    transition:
        background 0.15s ease,
        border-color 0.15s ease;

}

.new-chat:hover {

    background: var(--surface-hover);

    border-color: #34343c;

}

.new-chat-icon {

    width: 22px;
    height: 22px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 7px;

    background: #222229;

    font-size: 18px;

    line-height: 1;

}

.sidebar-section-title {

    margin:

        26px 10px 10px;

    color: var(--text-muted);

    font-size: 11px;

    font-weight: 600;

    text-transform: uppercase;

    letter-spacing: 0.08em;

}

.conversation-list {

    display: flex;

    flex-direction: column;

    gap: 3px;

    overflow-y: auto;

}

.conversation {

    width: 100%;

    min-height: 42px;

    display: flex;

    align-items: center;

    gap: 9px;

    padding: 0 10px;

    border-radius: 10px;

    background: transparent;

    color: var(--text-secondary);

    text-align: left;

    cursor: pointer;

    transition:
        background 0.15s ease,
        color 0.15s ease;

}

.conversation:hover {

    background: var(--surface);

    color: var(--text);

}

.conversation.active {

    background: var(--surface-light, #17171d);

    color: var(--text);

}

.conversation-icon {

    width: 22px;

    flex-shrink: 0;

    color: var(--text-muted);

    text-align: center;

}

.conversation-title {

    min-width: 0;

    flex: 1;

    overflow: hidden;

    text-overflow: ellipsis;

    white-space: nowrap;

    font-size: 13px;

}

.conversation-more {

    color: var(--text-muted);

    letter-spacing: 1px;

}

.sidebar-bottom {

    margin-top: auto;

    padding-top: 14px;

    border-top: 1px solid var(--border);

}

.sidebar-user {

    display: flex;

    align-items: center;

    gap: 10px;

    padding: 7px;

}

.user-avatar {

    width: 34px;
    height: 34px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 10px;

    background: #25252d;

    color: var(--text);

    font-size: 13px;

    font-weight: 700;

}

.user-name {

    font-size: 13px;

    font-weight: 600;

}

.user-label {

    margin-top: 2px;

    color: var(--text-muted);

    font-size: 10px;

}

.mobile-close,
.mobile-menu {

    display: none;

}

/* =========================
   MAIN
========================= */

.main {

    min-width: 0;

    flex: 1;

    height: 100%;

    display: flex;

    flex-direction: column;

}

/* =========================
   HEADER
========================= */

.header {

    height: 64px;

    flex-shrink: 0;

    display: flex;

    align-items: center;

    padding: 0 22px;

    border-bottom: 1px solid var(--border);

    background: rgba(9, 9, 12, 0.88);

    backdrop-filter: blur(14px);

}

.header-title {

    display: flex;

    align-items: center;

    gap: 10px;

}

.header-chat-name {

    font-size: 14px;

    font-weight: 650;

}

.header-model {

    padding: 4px 8px;

    border-radius: 6px;

    background: #15151b;

    color: var(--text-muted);

    font-size: 10px;

}

.header-actions {

    margin-left: auto;

}

.header-button {

    width: 34px;
    height: 34px;

    border-radius: 9px;

    background: transparent;

    color: var(--text-secondary);

    font-size: 16px;

    cursor: pointer;

}

.header-button:hover {

    background: var(--surface);

    color: var(--text);

}

/* =========================
   CHAT
========================= */

.chat {

    min-height: 0;

    flex: 1;

    display: flex;

    flex-direction: column;

}

.messages {

    min-height: 0;

    flex: 1;

    width: 100%;

    max-width: 920px;

    margin: 0 auto;

    padding: 38px 26px 28px;

    overflow-y: auto;

}

.messages::-webkit-scrollbar {

    width: 6px;

}

.messages::-webkit-scrollbar-thumb {

    background: #292930;

    border-radius: 20px;

}

/* =========================
   WELCOME
========================= */

.welcome {

    min-height: 100%;

    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;

    padding-bottom: 80px;

    text-align: center;

}

.welcome-logo {

    width: 62px;
    height: 62px;

    display: flex;

    align-items: center;
    justify-content: center;

    margin-bottom: 18px;

    border-radius: 19px;

    background: var(--accent);

    color: var(--accent-text);

    font-size: 30px;

    font-weight: 800;

    box-shadow:
        0 15px 50px rgba(0, 0, 0, 0.35);

}

.welcome h1 {

    margin: 0;

    font-size: 27px;

    font-weight: 700;

    letter-spacing: -0.03em;

}

.welcome p {

    margin:

        9px 0 27px;

    color: var(--text-secondary);

    font-size: 14px;

}

.suggestions {

    width: min(650px, 100%);

    display: grid;

    grid-template-columns:
        repeat(2, 1fr);

    gap: 9px;

}

.suggestion {

    min-height: 54px;

    display: flex;

    align-items: center;

    gap: 10px;

    padding: 0 14px;

    border: 1px solid var(--border);

    border-radius: 12px;

    background: var(--surface);

    color: var(--text-secondary);

    text-align: left;

    font-size: 13px;

    cursor: pointer;

    transition:
        background 0.15s ease,
        border-color 0.15s ease,
        color 0.15s ease;

}

.suggestion:hover {

    background: var(--surface-hover);

    border-color: #35353e;

    color: var(--text);

}

.suggestion span {

    color: var(--text);

}

/* =========================
   MESSAGES
========================= */

.message {

    display: flex;

    gap: 13px;

    margin-bottom: 28px;

    animation:
        message-in 0.18s ease;

}

@keyframes message-in {

    from {

        opacity: 0;

        transform:
            translateY(4px);

}

    to {

        opacity: 1;

        transform:
            translateY(0);

    }

}

.avatar {

    width: 36px;
    height: 36px;

    flex: 0 0 36px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 11px;

    background: #18181e;

    color: var(--text);

    font-size: 13px;

    font-weight: 700;

}

.message-content {

    min-width: 0;

    max-width: 760px;

}

.message-name {

    margin-bottom: 6px;

    color: var(--text-secondary);

    font-size: 12px;

    font-weight: 650;

}

.message-text {

    color: var(--text);

    font-size: 15px;

    line-height: 1.65;

    white-space: pre-wrap;

    overflow-wrap: anywhere;

}

.message.user {

    flex-direction: row-reverse;

}

.message.user .message-content {

    text-align: right;

}

.message.user .message-text {

    display: inline-block;

    padding: 11px 15px;

    border-radius:
        17px 17px 4px 17px;

    background: #19191f;

    text-align: left;

}

/* =========================
   АНИМАЦИЯ "ДУМАЕТ..."
========================= */

.thinking-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #888;
    font-style: italic;
    font-size: 15px;
    animation: thinkingPulse 1.5s ease-in-out infinite;
    padding: 8px 0;
}

.thinking-indicator .dots {
    display: inline-block;
    min-width: 20px;
    animation: dotsBlink 1.5s steps(4) infinite;
}

@keyframes thinkingPulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

@keyframes dotsBlink {
    0% { content: ''; }
    25% { content: '.'; }
    50% { content: '..'; }
    75% { content: '...'; }
}

/* Анимация печатания */
.typing-cursor {
    display: inline-block;
    width: 2px;
    height: 1em;
    background: #888;
    margin-left: 2px;
    animation: blink 0.8s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Стиль для ошибки */
.error-message {
    color: #ff6b6b;
}

/* =========================
   INPUT
========================= */

.input-wrapper {

    width: 100%;

    max-width: 920px;

    margin: 0 auto;

    padding:

        0 26px 20px;

}

.input-form {

    display: flex;

    align-items: flex-end;

    gap: 9px;

    padding: 8px;

    border:

        1px solid var(--border);

    border-radius: 17px;

    background: var(--surface);

    box-shadow:
        0 12px 35px rgba(0, 0, 0, 0.15);

    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease;

}

.input-form:focus-within {

    border-color: #3a3a43;

    box-shadow:
        0 0 0 3px
        rgba(255, 255, 255, 0.025);

}

#message-input {

    flex: 1;

    min-height: 42px;

    max-height: 180px;

    padding:

        10px 8px;

    border: 0;

    outline: 0;

    resize: none;

    background: transparent;

    color: var(--text);

    font-size: 14px;

    line-height: 1.5;

}

#message-input::placeholder {

    color: #62626c;

}

.send-button {

    width: 40px;
    height: 40px;

    flex: 0 0 40px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 11px;

    background: var(--accent);

    color: var(--accent-text);

    font-size: 22px;

    cursor: pointer;

    transition:
        transform 0.15s ease,
        opacity 0.15s ease;

}

.send-button:hover {

    transform:
        translateY(-1px);

}

.send-button:active {

    transform:
        translateY(1px);

}

.send-button:disabled {

    opacity: 0.35;

    cursor: default;

    transform: none;

}

.input-footer {

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 12px;

    margin-top: 7px;

    color: var(--text-muted);

    font-size: 10px;

}

.input-disclaimer {

    margin-left: 4px;

}

/* =========================
   MODAL
========================= */

.modal-overlay {

    position: fixed;

    inset: 0;

    z-index: 100;

    display: none;

    align-items: center;
    justify-content: center;

    padding: 20px;

    background:
        rgba(0, 0, 0, 0.6);

    backdrop-filter:
        blur(8px);

}

.modal-overlay.visible {

    display: flex;

}

.modal {

    width: min(430px, 100%);

    border:
        1px solid var(--border);

    border-radius: 18px;

    background: #111116;

    box-shadow:
        0 25px 80px
        rgba(0, 0, 0, 0.5);

    overflow: hidden;

}

.modal-header {

    display: flex;

    align-items: center;

    justify-content: space-between;

    padding: 20px;

    border-bottom:
        1px solid var(--border);

}

.modal-title {

    font-size: 15px;

    font-weight: 700;

}

.modal-subtitle {

    margin-top: 3px;

    color: var(--text-muted);

    font-size: 11px;

}

.modal-close {

    width: 32px;
    height: 32px;

    border-radius: 9px;

    background: transparent;

    color: var(--text-secondary);

    font-size: 22px;

    cursor: pointer;

}

.modal-close:hover {

    background: var(--surface-hover);

    color: var(--text);

}

.settings-list {

    padding: 8px 20px 16px;

}

.setting {

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 20px;

    padding: 15px 0;

    border-bottom:
        1px solid #202027;

}

.setting:last-child {

    border-bottom: 0;

}

.setting-title {

    font-size: 13px;

    font-weight: 600;

}

.setting-description {

    margin-top: 4px;

    color: var(--text-muted);

    font-size: 11px;

}

.setting-value {

    color: var(--text-secondary);

    font-size: 11px;

}

.setting-value.online {

    color: #75d978;

}

/* =========================
   MOBILE
========================= */

@media (max-width: 760px) {

    .sidebar {

        position: fixed;

        left: 0;
        top: 0;
        bottom: 0;

        transform:
            translateX(-100%);

        transition:
            transform 0.22s ease;

        box-shadow:
            20px 0 60px
            rgba(0, 0, 0, 0.35);

    }

    .sidebar.open {

        transform:
            translateX(0);

    }

    .sidebar-overlay {

        position: fixed;

        inset: 0;

        z-index: 20;

        display: none;

        background:
            rgba(0, 0, 0, 0.55);

    }

    .sidebar-overlay.visible {

        display: block;

    }

    .mobile-menu {

        width: 36px;
        height: 36px;

        display: flex;

        align-items: center;
        justify-content: center;

        margin-right: 10px;

        border-radius: 9px;

        background: transparent;

        color: var(--text-secondary);

        font-size: 18px;

        cursor: pointer;

    }

    .mobile-menu:hover {

        background: var(--surface);

        color: var(--text);

    }

    .mobile-close {

        display: flex;

        align-items: center;
        justify-content: center;

        width: 32px;
        height: 32px;

        border-radius: 8px;

        background: transparent;

        color: var(--text-secondary);

        font-size: 22px;

        cursor: pointer;

    }

    .header {

        padding:
            0 13px;

    }

    .header-model {

        display: none;

    }

    .messages {

        padding:
            25px 15px 20px;

    }

    .input-wrapper {

        padding:
            0 12px 13px;

    }

    .input-footer {

        display: none;

    }

    .suggestions {

        grid-template-columns:
            1fr;

    }

    .welcome {

        padding:
            20px 5px 60px;

    }

    .welcome h1 {

        font-size: 24px;

    }

    .welcome p {

        font-size: 13px;

    }

    .message {

        gap: 9px;

        margin-bottom: 23px;

    }

    .avatar {

        width: 32px;
        height: 32px;

        flex-basis: 32px;

        border-radius: 9px;

    }

    .message-text {

        font-size: 14px;

    }

}


/* Стили для размышлений и финального ответа */

.thinking-container {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    border-left: 3px solid #ffa94d;
    margin-bottom: 12px;
    flex-wrap: wrap;
    animation: thinkingFadeIn 0.3s ease;
}

.thinking-label {
    color: #ffa94d;
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
}

.thinking-text {
    color: #a0a0b0;
    font-style: italic;
    font-size: 14px;
    min-height: 20px;
    animation: thinkingPulse 1.5s ease-in-out infinite;
    word-break: break-word;
}

.response-container {
    padding: 4px 0;
    animation: responseFadeIn 0.5s ease;
}

.response-text {
    color: var(--text);
    font-size: 15px;
    line-height: 1.7;
    white-space: pre-wrap;
    word-break: break-word;
}

@keyframes thinkingFadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes responseFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes thinkingPulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

/* Стиль для ошибки */
.error-message {
    color: #ff6b6b;
    padding: 8px 0;
}

/* Адаптивность для мобильных */
@media (max-width: 760px) {
    .thinking-container {
        padding: 6px 10px;
        font-size: 12px;
    }
    
    .thinking-label {
        font-size: 12px;
    }
    
    .thinking-text {
        font-size: 12px;
    }
    
    .response-text {
        font-size: 14px;
    }
}

/* ============================================
   AUTH STYLES - добавляем в конец файла
   ============================================ */

/* Страница авторизации */
.auth-page {
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--naum-primary), var(--naum-secondary));
    padding: 20px;
    box-sizing: border-box;
}

.auth-container {
    width: 100%;
    max-width: 420px;
    padding: 35px 30px;
    background: var(--naum-card-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--naum-glass);
    border-radius: 18px;
    box-shadow: var(--naum-shadow);
    animation: authFadeIn 0.4s ease;
}

@keyframes authFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.auth-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 30px;
}

.auth-logo .brand-logo {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--naum-music), var(--naum-it));
    color: #fff;
    font-size: 30px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    box-shadow: 0 10px 30px rgba(233, 69, 96, 0.3);
}

.auth-logo h1 {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    color: var(--naum-text);
    letter-spacing: -0.5px;
}

.auth-logo p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
    margin: 4px 0 0;
}

/* Формы */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.auth-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.auth-form label {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
}

.auth-form input {
    padding: 12px 16px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.3);
    color: var(--naum-text);
    font-size: 14px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.auth-form input:focus {
    outline: none;
    border-color: var(--naum-it);
    box-shadow: 0 0 0 3px rgba(0, 180, 216, 0.15);
    background: rgba(0, 0, 0, 0.4);
}

.auth-form input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.auth-form .auth-btn {
    padding: 13px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--naum-it), #0077b6);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 6px;
    box-shadow: 0 4px 15px rgba(0, 180, 216, 0.3);
}

.auth-form .auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 180, 216, 0.4);
    opacity: 0.95;
}

.auth-form .auth-btn:active {
    transform: scale(0.98);
}

.auth-form .auth-btn:disabled {
    opacity: 0.5;
    cursor: default;
    transform: none;
    box-shadow: none;
}

/* Сообщения */
.auth-error {
    padding: 10px 14px;
    border-radius: 8px;
    background: rgba(233, 69, 96, 0.15);
    color: var(--naum-music);
    font-size: 13px;
    display: none;
    border-left: 3px solid var(--naum-music);
}

.auth-error.visible {
    display: block;
    animation: authShake 0.4s ease;
}

@keyframes authShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-8px); }
    75% { transform: translateX(8px); }
}

.auth-success {
    padding: 10px 14px;
    border-radius: 8px;
    background: rgba(0, 180, 216, 0.12);
    color: var(--naum-it);
    font-size: 13px;
    display: none;
    border-left: 3px solid var(--naum-it);
}

.auth-success.visible {
    display: block;
    animation: authFadeIn 0.3s ease;
}

/* Разделитель */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 8px 0 4px;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
}

.auth-divider span {
    color: rgba(255, 255, 255, 0.3);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    white-space: nowrap;
}

/* Кнопка гостя */
.auth-guest-btn {
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    text-decoration: none;
    display: block;
    box-sizing: border-box;
    width: 100%;
}

.auth-guest-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--naum-text);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Переключение форм */
.auth-switch {
    margin-top: 16px;
    text-align: center;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
}

.auth-switch a {
    color: var(--naum-text);
    cursor: pointer;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border-bottom: 1px solid transparent;
}

.auth-switch a:hover {
    color: var(--naum-it);
    border-bottom-color: var(--naum-it);
}

/* Подсказка для пароля */
.auth-password-hint {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.35);
    margin-top: 2px;
}

/* ============================================
   КНОПКА ВЫХОДА В SIDEBAR
   ============================================ */

#logout-btn {
    width: 100%;
    height: 44px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 13px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

#logout-btn:hover {
    background: rgba(233, 69, 96, 0.12);
    border-color: rgba(233, 69, 96, 0.3);
    color: var(--naum-music);
}

#logout-btn .new-chat-icon {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
    background: rgba(233, 69, 96, 0.12);
    font-size: 14px;
    line-height: 1;
    transition: all 0.3s ease;
}

#logout-btn:hover .new-chat-icon {
    background: rgba(233, 69, 96, 0.25);
}

/* ============================================
   СТАТУС АВТОРИЗАЦИИ В НАСТРОЙКАХ
   ============================================ */

.auth-status-setting .setting-value {
    font-weight: 600;
}

.auth-status-setting .setting-value.online {
    color: #75d978;
}

.auth-status-setting .setting-value.guest {
    color: #ffa94d;
}

/* ============================================
   СТАТУС В ХЕДЕРЕ
   ============================================ */

.header-auth-status {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.4);
    padding: 3px 10px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    margin-left: 10px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: all 0.3s ease;
    white-space: nowrap;
}

.header-auth-status.guest {
    color: #ffa94d;
    border-color: rgba(255, 169, 77, 0.2);
}

.header-auth-status.user {
    color: #75d978;
    border-color: rgba(117, 217, 120, 0.2);
}

/* ============================================
   АДАПТИВНОСТЬ ДЛЯ АВТОРИЗАЦИИ
   ============================================ */

@media (max-width: 480px) {
    .auth-container {
        padding: 25px 18px;
        margin: 10px;
    }
    
    .auth-logo .brand-logo {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
    
    .auth-logo h1 {
        font-size: 20px;
    }
    
    .auth-form input {
        padding: 10px 14px;
        font-size: 13px;
    }
    
    .auth-form .auth-btn {
        padding: 11px;
        font-size: 14px;
    }
    
    .auth-switch {
        font-size: 12px;
    }
    
    .header-auth-status {
        font-size: 9px;
        padding: 2px 8px;
        margin-left: 6px;
    }
}

@media (max-width: 380px) {
    .auth-container {
        padding: 20px 14px;
    }
    
    .auth-logo .brand-logo {
        width: 44px;
        height: 44px;
        font-size: 20px;
    }
    
    .auth-logo h1 {
        font-size: 18px;
    }
}

/* ============================================
   AUTH STYLES - добавляем в конец naum-styles.css
   ============================================ */

/* Страница авторизации */
.auth-page {
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--naum-primary), var(--naum-secondary));
    padding: 20px;
    box-sizing: border-box;
}

.auth-container {
    width: 100%;
    max-width: 420px;
    padding: 35px 30px;
    background: var(--naum-card-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--naum-glass);
    border-radius: 18px;
    box-shadow: var(--naum-shadow);
    animation: authFadeIn 0.4s ease;
}

@keyframes authFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.auth-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 30px;
}

.auth-logo .brand-logo {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--naum-music), var(--naum-it));
    color: #fff;
    font-size: 30px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    box-shadow: 0 10px 30px rgba(233, 69, 96, 0.3);
}

.auth-logo h1 {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    color: var(--naum-text);
    letter-spacing: -0.5px;
}

.auth-logo p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
    margin: 4px 0 0;
}

/* Формы */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.auth-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.auth-form label {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
}

.auth-form input {
    padding: 12px 16px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.3);
    color: var(--naum-text);
    font-size: 14px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.auth-form input:focus {
    outline: none;
    border-color: var(--naum-it);
    box-shadow: 0 0 0 3px rgba(0, 180, 216, 0.15);
    background: rgba(0, 0, 0, 0.4);
}

.auth-form input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.auth-form .auth-btn {
    padding: 13px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--naum-it), #0077b6);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 6px;
    box-shadow: 0 4px 15px rgba(0, 180, 216, 0.3);
}

.auth-form .auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 180, 216, 0.4);
    opacity: 0.95;
}

.auth-form .auth-btn:active {
    transform: scale(0.98);
}

.auth-form .auth-btn:disabled {
    opacity: 0.5;
    cursor: default;
    transform: none;
    box-shadow: none;
}

/* Сообщения */
.auth-error {
    padding: 10px 14px;
    border-radius: 8px;
    background: rgba(233, 69, 96, 0.15);
    color: var(--naum-music);
    font-size: 13px;
    display: none;
    border-left: 3px solid var(--naum-music);
}

.auth-error.visible {
    display: block;
    animation: authShake 0.4s ease;
}

@keyframes authShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-8px); }
    75% { transform: translateX(8px); }
}

.auth-success {
    padding: 10px 14px;
    border-radius: 8px;
    background: rgba(0, 180, 216, 0.12);
    color: var(--naum-it);
    font-size: 13px;
    display: none;
    border-left: 3px solid var(--naum-it);
}

.auth-success.visible {
    display: block;
    animation: authFadeIn 0.3s ease;
}

/* Разделитель */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 8px 0 4px;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
}

.auth-divider span {
    color: rgba(255, 255, 255, 0.3);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    white-space: nowrap;
}

/* Кнопка гостя */
.auth-guest-btn {
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    text-decoration: none;
    display: block;
    box-sizing: border-box;
    width: 100%;
}

.auth-guest-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--naum-text);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Переключение форм */
.auth-switch {
    margin-top: 16px;
    text-align: center;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
}

.auth-switch a {
    color: var(--naum-text);
    cursor: pointer;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border-bottom: 1px solid transparent;
}

.auth-switch a:hover {
    color: var(--naum-it);
    border-bottom-color: var(--naum-it);
}

/* Подсказка для пароля */
.auth-password-hint {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.35);
    margin-top: 2px;
}

/* ============================================
   КНОПКА ВЫХОДА В SIDEBAR
   ============================================ */

#logout-btn {
    width: 100%;
    height: 44px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 13px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

#logout-btn:hover {
    background: rgba(233, 69, 96, 0.12);
    border-color: rgba(233, 69, 96, 0.3);
    color: var(--naum-music);
}

#logout-btn .new-chat-icon {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
    background: rgba(233, 69, 96, 0.12);
    font-size: 14px;
    line-height: 1;
    transition: all 0.3s ease;
}

#logout-btn:hover .new-chat-icon {
    background: rgba(233, 69, 96, 0.25);
}

/* ============================================
   СТАТУС АВТОРИЗАЦИИ В НАСТРОЙКАХ
   ============================================ */

.auth-status-setting .setting-value {
    font-weight: 600;
}

.auth-status-setting .setting-value.online {
    color: #75d978;
}

.auth-status-setting .setting-value.guest {
    color: #ffa94d;
}

/* ============================================
   АДАПТИВНОСТЬ ДЛЯ АВТОРИЗАЦИИ
   ============================================ */

@media (max-width: 480px) {
    .auth-container {
        padding: 25px 18px;
        margin: 10px;
    }
    
    .auth-logo .brand-logo {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
    
    .auth-logo h1 {
        font-size: 20px;
    }
    
    .auth-form input {
        padding: 10px 14px;
        font-size: 13px;
    }
    
    .auth-form .auth-btn {
        padding: 11px;
        font-size: 14px;
    }
    
    .auth-switch {
        font-size: 12px;
    }
}

@media (max-width: 380px) {
    .auth-container {
        padding: 20px 14px;
    }
    
    .auth-logo .brand-logo {
        width: 44px;
        height: 44px;
        font-size: 20px;
    }
    
    .auth-logo h1 {
        font-size: 18px;
    }
}

/* ============================================
   ПРОФИЛЬ - СТИЛИ
   ============================================ */

.profile-edit-btn {
    width: 100%;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0 13px;
    border-radius: 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 8px;
    box-sizing: border-box;
}

.profile-edit-btn:hover {
    background: var(--surface-hover);
    border-color: #34343c;
}

.profile-edit-btn span:first-child {
    font-size: 16px;
}

.profile-input {
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.3);
    color: var(--text);
    font-size: 13px;
    transition: all 0.3s ease;
    box-sizing: border-box;
    width: 160px;
}

.profile-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.05);
}

.profile-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.profile-message {
    margin-top: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
    display: none;
}

.profile-message.error {
    display: block;
    background: rgba(233, 69, 96, 0.12);
    color: var(--naum-music);
    border-left: 3px solid var(--naum-music);
}

.profile-message.success {
    display: block;
    background: rgba(0, 180, 216, 0.12);
    color: var(--naum-it);
    border-left: 3px solid var(--naum-it);
}

/* Стиль для кнопки сохранения в профиле */
#profile-save-btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--accent), #888);
    color: var(--accent-text);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

#profile-save-btn:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

#profile-save-btn:disabled {
    opacity: 0.5;
    cursor: default;
    transform: none;
}

/* ============================================
   СТАТУС В НАСТРОЙКАХ
   ============================================ */

.auth-status-setting .setting-value.online {
    color: #75d978;
}

.auth-status-setting .setting-value.guest {
    color: #ffa94d;
}

/* ============================================
   АДАПТИВНОСТЬ
   ============================================ */

@media (max-width: 480px) {
    .profile-input {
        width: 120px;
        font-size: 12px;
        padding: 6px 10px;
    }
    
    .profile-edit-btn {
        font-size: 12px;
        height: 38px;
    }
}

/* ============================================
   КНОПКИ ДЕЙСТВИЙ В СПИСКЕ ЧАТОВ
   ============================================ */

.conversation-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.conversation:hover .conversation-actions {
    opacity: 1;
}

.conv-action {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.2s ease;
    background: transparent;
    user-select: none;
}

.conv-action:hover {
    background: var(--surface-hover);
    color: var(--text);
}

.conv-action.delete:hover {
    background: rgba(233, 69, 96, 0.15);
    color: #e94560;
}

.conv-action.rename:hover {
    background: rgba(0, 180, 216, 0.15);
    color: #00b4d8;
}

/* Для мобильных устройств - всегда показываем кнопки */
@media (max-width: 760px) {
    .conversation-actions {
        opacity: 1;
    }
    
    .conv-action {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }
}

/* Добавьте в конец файла nail.css */

/* ============================================
   СТАТУСНАЯ ПАНЕЛЬ В УГЛУ
   ============================================ */

#system-status-panel {
    position: fixed;
    bottom: 100px;
    right: 20px;
    z-index: 50;
    background: rgba(9, 9, 12, 0.92);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px 18px;
    font-size: 12px;
    color: var(--text-secondary);
    min-width: 190px;
    max-width: 280px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.5);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: none;
    pointer-events: none;
    font-family: Inter, -apple-system, sans-serif;
    line-height: 1.6;
    border-left: 3px solid transparent;
}

@media (max-width: 760px) {
    #system-status-panel {
        bottom: 80px;
        right: 10px;
        padding: 10px 14px;
        min-width: 150px;
        max-width: 200px;
        font-size: 10px;
    }
}

/* ============================================
   АНИМАЦИИ ДЛЯ СТАТУСА
   ============================================ */

@keyframes statusPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

#system-status-panel .status-busy {
    animation: statusPulse 1.5s ease-in-out infinite;
}

/* ============================================
   СТАТУС В ОЧЕРЕДИ
   ============================================ */

.queue-indicator {
    display: inline-block;
    background: rgba(255, 169, 77, 0.15);
    color: #ffa94d;
    padding: 2px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 6px;
}

/* ============================================
   ПРОФИЛЬ
   ============================================ */

.profile-edit-btn {
    width: 100%;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0 13px;
    border-radius: 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 8px;
    box-sizing: border-box;
}

.profile-edit-btn:hover {
    background: var(--surface-hover);
    border-color: #34343c;
}

.profile-input {
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.3);
    color: var(--text);
    font-size: 13px;
    transition: all 0.3s ease;
    box-sizing: border-box;
    width: 160px;
}

.profile-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.05);
}

.profile-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.profile-message {
    margin-top: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
    display: none;
}

.profile-message.error {
    display: block;
    background: rgba(233, 69, 96, 0.12);
    color: var(--naum-music);
    border-left: 3px solid var(--naum-music);
}

.profile-message.success {
    display: block;
    background: rgba(0, 180, 216, 0.12);
    color: var(--naum-it);
    border-left: 3px solid var(--naum-it);
}

#profile-save-btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--accent), #888);
    color: var(--accent-text);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

#profile-save-btn:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

#profile-save-btn:disabled {
    opacity: 0.5;
    cursor: default;
    transform: none;
}

/* ============================================
   КНОПКА ВЫХОДА
   ============================================ */

#logout-btn {
    width: 100%;
    height: 44px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 13px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

#logout-btn:hover {
    background: rgba(233, 69, 96, 0.12);
    border-color: rgba(233, 69, 96, 0.3);
    color: var(--naum-music);
}

#logout-btn .new-chat-icon {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
    background: rgba(233, 69, 96, 0.12);
    font-size: 14px;
    line-height: 1;
    transition: all 0.3s ease;
}

#logout-btn:hover .new-chat-icon {
    background: rgba(233, 69, 96, 0.25);
}