/* ===========================
   SHARED PAGE STYLES
=========================== */
.nav-links a.active {
    color: var(--primary);
    background: var(--primary-light);
}

/* Page hero */
.page-hero {
    padding: 120px 0 60px;
    position: relative;
    overflow: hidden;
    background: var(--bg-2);
    border-bottom: 1px solid var(--border);
}
.page-hero-sm { padding: 100px 0 48px; }
.page-hero-content { max-width: 600px; }
.page-title {
    font-size: clamp(28px, 4vw, 48px);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 16px;
    color: var(--text);
}
.page-hero p { font-size: 18px; color: var(--text-2); }

/* ===========================
   CHAT PAGE (NEW FULL LAYOUT)
=========================== */
body.chat-fullpage { overflow: hidden; height: 100vh; }
.chat-layout {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* NEW SIDEBAR */
.chat-sidebar-new {
    width: 260px;
    flex-shrink: 0;
    background: #111827;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.sidebar-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 14px 12px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-size: 18px;
    font-weight: 800;
    color: #fff;
}
.sidebar-logo-icon { font-size: 22px; line-height: 1; }
.sidebar-logo-text .accent { color: #60a5fa; }
.chat-sidebar-new .new-chat-btn {
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: 8px;
    background: rgba(255,255,255,.1);
    justify-content: center;
    flex-shrink: 0;
}
.chat-sidebar-new .new-chat-btn:hover { background: rgba(255,255,255,.18); opacity: 1; }
.sidebar-history-label {
    padding: 14px 14px 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: rgba(255,255,255,.35);
}
.chat-sidebar-new .chat-history { flex: 1; overflow-y: auto; padding: 4px 8px; }
.chat-sidebar-new .history-label { color: rgba(255,255,255,.3); padding: 0 6px; }
.chat-sidebar-new .history-item { color: rgba(255,255,255,.7); }
.chat-sidebar-new .history-item:hover { background: rgba(255,255,255,.08); }
.chat-sidebar-new .history-item.active { background: rgba(96,165,250,.2); color: #93c5fd; }
.chat-sidebar-new .history-item svg { color: rgba(255,255,255,.3); }
.chat-sidebar-new .history-delete-btn { color: rgba(255,255,255,.35); }
.chat-sidebar-new .history-delete-btn:hover { background: rgba(239,68,68,.2); color: #fca5a5; }

/* SIDEBAR BOTTOM */
.sidebar-bottom {
    padding: 8px 8px 12px;
    border-top: 1px solid rgba(255,255,255,.08);
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.sidebar-link-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 8px;
    text-decoration: none;
    transition: background .15s;
    cursor: pointer;
}
.sidebar-link-item:hover { background: rgba(255,255,255,.08); }
.sidebar-link-title { font-size: 13px; font-weight: 500; color: rgba(255,255,255,.8); }
.sidebar-link-sub { font-size: 11px; color: rgba(255,255,255,.35); margin-top: 1px; }
.sidebar-divider { height: 1px; background: rgba(255,255,255,.08); margin: 6px 0; }

/* SIDEBAR USER PROFILE */
.sidebar-user {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 10px;
    border-radius: 10px;
    cursor: pointer;
    transition: background .15s;
}
.sidebar-user:hover { background: rgba(255,255,255,.08); }
.sidebar-user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563eb, #0d9488);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
}
.sidebar-user-name { font-size: 13px; font-weight: 600; color: rgba(255,255,255,.9); }
.sidebar-user-email { font-size: 11px; color: rgba(255,255,255,.4); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 140px; }
.sidebar-user-menu {
    margin-left: auto;
    color: rgba(255,255,255,.35);
    flex-shrink: 0;
}
.sidebar-user-dropdown {
    position: absolute;
    bottom: calc(100% + 6px);
    left: 0;
    right: 0;
    background: #1f2937;
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 10px;
    padding: 5px;
    box-shadow: 0 -8px 24px rgba(0,0,0,.3);
    z-index: 100;
}
.su-dd-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 10px;
    border-radius: 7px;
    font-size: 13px;
    color: rgba(255,255,255,.75);
    text-decoration: none;
    transition: background .12s;
    cursor: pointer;
}
.su-dd-item:hover { background: rgba(255,255,255,.08); color: #fff; }
.su-dd-sep { height: 1px; background: rgba(255,255,255,.08); margin: 4px 0; }
.su-dd-logout { color: #fca5a5; }
.su-dd-logout:hover { background: rgba(239,68,68,.15); color: #fca5a5; }

/* NEW MAIN */
.chat-main-new {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #fff;
}

/* OLD CHAT PAGE (keep for compatibility) */
.chat-page {
    display: flex;
    height: 100vh;
    padding-top: 68px;
    overflow: hidden;
}

/* Sidebar */
.chat-sidebar {
    width: 280px;
    flex-shrink: 0;
    background: var(--bg-2);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.chat-sidebar-header {
    padding: 20px 16px 12px;
    border-bottom: 1px solid var(--border);
}
.chat-sidebar-header h3 { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 12px; }
.new-chat-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    padding: 8px 12px;
    background: var(--gradient);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity .2s;
}
.new-chat-btn:hover { opacity: .9; }

.chat-history { flex: 1; overflow-y: auto; padding: 12px 8px; }
.history-group { margin-bottom: 16px; }
.history-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); padding: 0 8px; margin-bottom: 4px; }
.history-item-wrap {
    position: relative;
    display: flex;
    align-items: center;
    border-radius: 8px;
}
.history-item-wrap:hover .history-delete-btn { opacity: 1; }
.history-item {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
    padding: 8px 10px;
    background: none;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    color: var(--text-2);
    cursor: pointer;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: background .15s;
}
.history-item:hover { background: var(--border); }
.history-item.active { background: var(--primary-light); color: var(--primary); font-weight: 600; }
.history-item svg { flex-shrink: 0; color: var(--text-3); }
.history-delete-btn {
    opacity: 0;
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    margin-right: 4px;
    border: none;
    background: none;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-3);
    transition: opacity .15s, background .15s, color .15s;
}
.history-delete-btn:hover { background: #fee2e2; color: #ef4444; }

.sidebar-footer { padding: 12px; border-top: 1px solid var(--border); }
.sidebar-promo {
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #eff6ff, #f0fdfa);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px;
    text-decoration: none;
    color: var(--text);
    transition: box-shadow .2s;
}
.sidebar-promo:hover { box-shadow: var(--shadow); }
.sidebar-promo .fc-icon { font-size: 24px; }
.sidebar-promo p { font-size: 13px; font-weight: 600; margin-bottom: 2px; }
.sidebar-promo span { font-size: 11px; color: var(--text-3); }

/* Main chat */
.chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #fff;
}
.chat-window {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
}

/* Welcome */
.chat-welcome {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 20px;
}
.welcome-icon { font-size: 56px; margin-bottom: 16px; line-height: 1; }
.chat-welcome h2 { font-size: 24px; font-weight: 800; margin-bottom: 8px; }
.chat-welcome > p { color: var(--text-2); margin-bottom: 32px; }
.quick-label { font-size: 13px; color: var(--text-3); font-weight: 600; margin-bottom: 12px; text-transform: uppercase; letter-spacing: .06em; }
.quick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-width: 640px; }
.quick-btn {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    cursor: pointer;
    transition: all .15s;
    text-align: left;
}
.quick-btn:hover { background: var(--primary-light); border-color: var(--primary); color: var(--primary); }

/* Messages */
.messages-list { display: flex; flex-direction: column; gap: 16px; }
.chat-msg { display: flex; gap: 10px; max-width: 75%; }
.chat-msg-user { align-self: flex-end; flex-direction: row-reverse; }
.chat-msg-ai { align-self: flex-start; }
.msg-avatar {
    width: 32px; height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}
.ai-avatar { background: var(--gradient); color: #fff; font-size: 18px; }
.user-avatar { background: var(--primary-light); color: var(--primary); font-weight: 700; }
.msg-bubble { padding: 12px 16px; border-radius: 16px; font-size: 14px; line-height: 1.6; }
.chat-msg-user .msg-bubble { background: var(--gradient); color: #fff; border-bottom-right-radius: 4px; }
.chat-msg-ai .msg-bubble { background: var(--bg-2); color: var(--text); border-bottom-left-radius: 4px; border: 1px solid var(--border); }
.msg-bubble p { margin-bottom: 6px; }
.msg-bubble p:last-child { margin: 0; }
.msg-bubble ul { padding-left: 16px; margin: 4px 0; }
.msg-time { font-size: 11px; color: var(--text-3); margin-top: 4px; text-align: right; }
.chat-msg-ai .msg-time { text-align: left; }

/* Image preview in chat */
.msg-bubble-image { padding: 6px !important; }
.msg-image-wrap { display: flex; flex-direction: column; gap: 0; }
.msg-image-preview {
    width: 220px;
    max-width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 12px 12px 0 0;
    display: block;
}
.msg-image-name {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 10px;
    font-size: 12px;
    color: rgba(255,255,255,.8);
    border-radius: 0 0 10px 10px;
    background: rgba(0,0,0,.15);
}

/* Input image preview panel */
.image-preview-panel {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: #f0f7ff;
    border: 1px solid #bfdbfe;
    border-radius: 12px 12px 0 0;
    margin-bottom: -2px;
}
.input-preview-img {
    width: 52px;
    height: 52px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
    border: 1px solid #93c5fd;
}
.input-preview-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.input-preview-name {
    font-size: 13px;
    font-weight: 600;
    color: #1d4ed8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.input-preview-hint {
    font-size: 12px;
    color: #64748b;
}
.input-preview-remove {
    width: 28px;
    height: 28px;
    border: none;
    background: #dbeafe;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2563eb;
    flex-shrink: 0;
    transition: background .15s;
}
.input-preview-remove:hover { background: #fee2e2; color: #ef4444; }

/* Custom confirm modal */
.confirm-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: modalFadeIn .15s ease;
}
@keyframes modalFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
.confirm-modal {
    background: #fff;
    border-radius: 20px;
    padding: 32px 28px 24px;
    width: 340px;
    max-width: calc(100vw - 32px);
    text-align: center;
    box-shadow: 0 24px 60px rgba(15,23,42,.2);
    animation: modalSlideIn .2s ease;
}
@keyframes modalSlideIn {
    from { opacity: 0; transform: scale(.94) translateY(8px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}
.confirm-modal-icon {
    font-size: 44px;
    line-height: 1;
    margin-bottom: 16px;
}
.confirm-modal-title {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 8px;
}
.confirm-modal-text {
    font-size: 14px;
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 24px;
}
.confirm-modal-actions {
    display: flex;
    gap: 10px;
}
.confirm-modal-cancel {
    flex: 1;
    padding: 11px;
    border-radius: 10px;
    border: 1.5px solid #e2e8f0;
    background: #f8fafc;
    font-size: 14px;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    transition: all .15s;
}
.confirm-modal-cancel:hover { background: #f1f5f9; border-color: #cbd5e1; }
.confirm-modal-ok {
    flex: 1;
    padding: 11px;
    border-radius: 10px;
    border: none;
    background: #ef4444;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    transition: all .15s;
}
.confirm-modal-ok:hover { background: #dc2626; }

/* Typing indicator */
.typing-indicator { display: flex; gap: 4px; align-items: center; padding: 4px 0; }
.typing-indicator span { width: 7px; height: 7px; background: var(--text-3); border-radius: 50%; animation: typing .9s infinite; }
.typing-indicator span:nth-child(2) { animation-delay: .2s; }
.typing-indicator span:nth-child(3) { animation-delay: .4s; }

/* Disclaimer */
.chat-disclaimer {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-3);
    padding: 8px 24px;
    background: #fffbeb;
    border-top: 1px solid #fef08a;
    border-bottom: 1px solid #fef08a;
}

/* Input */
.chat-input-area { padding: 16px 24px; background: #fff; border-top: 1px solid var(--border); }
.input-wrapper {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    background: var(--bg-2);
    border: 1.5px solid var(--border);
    border-radius: 14px;
    padding: 10px 10px 10px 14px;
    transition: border-color .2s;
}
.input-wrapper:focus-within { border-color: var(--primary); }
.input-wrapper textarea {
    flex: 1;
    border: none;
    background: none;
    resize: none;
    outline: none;
    font-family: inherit;
    font-size: 14px;
    color: var(--text);
    line-height: 1.5;
    max-height: 120px;
}
.attach-btn, .send-btn {
    width: 36px; height: 36px;
    border-radius: 8px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: all .15s;
}
.attach-btn { background: none; color: var(--text-3); }
.attach-btn:hover { background: var(--border); color: var(--text); }
.send-btn { background: var(--gradient); color: #fff; }
.send-btn:hover { opacity: .9; }
.send-btn:disabled { opacity: .4; cursor: default; }

/* ===========================
   ANALYSIS PAGE
=========================== */
.analysis-page { padding: 48px 0 80px; }
.analysis-layout { display: grid; grid-template-columns: 1fr 360px; gap: 32px; align-items: start; }

.upload-card, .analysis-result-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}
.upload-big-zone {
    min-height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px dashed var(--border);
    cursor: pointer;
    transition: background .2s;
}
.upload-big-zone:hover { background: var(--primary-light); }
.ubz-inner { text-align: center; padding: 40px; }
.ubz-icon { color: var(--text-3); margin: 0 auto 16px; }
.ubz-title { font-size: 18px; font-weight: 700; margin-bottom: 6px; }
.ubz-sub { color: var(--text-3); margin-bottom: 16px; }
.ubz-formats { font-size: 12px; color: var(--text-3); margin-top: 14px; }

.file-preview { padding: 20px; }
.preview-header { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.preview-info { display: flex; align-items: center; gap: 10px; flex: 1; }
.preview-icon { font-size: 28px; }
.preview-name { font-size: 14px; font-weight: 600; }
.preview-size { font-size: 12px; color: var(--text-3); }
.preview-remove { background: none; border: none; cursor: pointer; color: var(--text-3); padding: 4px; }
.preview-remove:hover { color: #ef4444; }
.preview-img-wrap { border-radius: 10px; overflow: hidden; margin-bottom: 16px; background: var(--bg-2); min-height: 200px; display: flex; align-items: center; justify-content: center; }
.preview-img-wrap img { max-height: 300px; width: 100%; object-fit: contain; }
.btn-block { width: 100%; justify-content: center; }

/* Analysis result card */
.analysis-result-card { padding: 28px; margin-top: 20px; }
.arc-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.arc-status { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; padding: 4px 12px; border-radius: 100px; }
.arc-status-ok { background: #f0fdf4; color: var(--green); }
.arc-time { font-size: 12px; color: var(--text-3); }
.arc-title { font-size: 20px; font-weight: 800; margin-bottom: 16px; }
.arc-confidence { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text-2); margin-bottom: 24px; }
.arc-sections { display: flex; flex-direction: column; gap: 20px; }
.arc-section h4 { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); margin-bottom: 8px; }
.arc-section p { font-size: 14px; color: var(--text-2); line-height: 1.7; }
.arc-findings { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.arc-findings li { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.finding-ok::before { content: '✓'; width: 18px; height: 18px; background: #f0fdf4; color: var(--green); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 800; flex-shrink: 0; }
.finding-warn::before { content: '!'; width: 18px; height: 18px; background: #fff7ed; color: var(--orange); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; flex-shrink: 0; }
.arc-recommend { background: #eff6ff; border-radius: 10px; padding: 16px; }
.arc-recommend h4 { color: var(--primary); }
.arc-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 24px; }
.arc-disclaimer { font-size: 12px; color: var(--text-3); margin-top: 16px; line-height: 1.6; border-top: 1px solid var(--border); padding-top: 12px; }

/* Info cards */
.info-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; margin-bottom: 16px; }
.info-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 16px; }
.type-list { display: flex; flex-direction: column; gap: 14px; }
.type-item { display: flex; align-items: center; gap: 12px; }
.type-emoji { font-size: 24px; width: 36px; flex-shrink: 0; text-align: center; }
.type-item p { font-size: 14px; font-weight: 600; margin-bottom: 2px; }
.type-item span { font-size: 12px; color: var(--text-3); }
.mini-steps { display: flex; flex-direction: column; gap: 14px; }
.mini-step { display: flex; align-items: flex-start; gap: 10px; }
.mini-step-num { width: 24px; height: 24px; background: var(--gradient); color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; flex-shrink: 0; }
.mini-step p { font-size: 14px; color: var(--text-2); }
.info-card-warn { background: #fffbeb; border-color: #fef08a; display: flex; gap: 10px; color: #92400e; }
.info-card-warn p { font-size: 13px; line-height: 1.6; }

/* ===========================
   NEWS PAGE
=========================== */
.news-page { padding: 48px 0 80px; }

.news-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 36px; }
.filter-btn { padding: 7px 18px; border-radius: 100px; border: 1.5px solid var(--border); background: #fff; font-size: 13px; font-weight: 600; color: var(--text-2); cursor: pointer; transition: all .15s; }
.filter-btn:hover { border-color: var(--primary); color: var(--primary); }
.filter-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* Featured */
.news-featured {
    display: grid;
    grid-template-columns: 480px 1fr;
    gap: 0;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    text-decoration: none;
    color: var(--text);
    margin-bottom: 36px;
    box-shadow: var(--shadow);
    transition: box-shadow .2s, transform .2s;
}
.news-featured:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.news-featured-img { background: var(--bg-2); }
.news-featured-body { padding: 40px; display: flex; flex-direction: column; justify-content: center; }
.news-featured-body h2 { font-size: 24px; font-weight: 800; line-height: 1.3; margin-bottom: 12px; }
.news-featured-body p { color: var(--text-2); font-size: 15px; line-height: 1.7; margin-bottom: 20px; }
.news-footer-meta { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--text-3); }
.news-author { font-weight: 600; color: var(--text-2); }

/* Image placeholders */
.news-img-placeholder {
    width: 100%; height: 100%; min-height: 200px;
    display: flex; align-items: center; justify-content: center;
    font-size: 56px;
}
.nip-blue { background: linear-gradient(135deg, #eff6ff, #dbeafe); }
.nip-teal { background: linear-gradient(135deg, #f0fdfa, #ccfbf1); }
.nip-purple { background: linear-gradient(135deg, #f5f3ff, #ede9fe); }
.nip-green { background: linear-gradient(135deg, #f0fdf4, #dcfce7); }
.nip-orange { background: linear-gradient(135deg, #fff7ed, #fed7aa); }

/* News grid */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 48px; }
.news-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: var(--text); transition: all .2s; display: block; }
.news-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.news-card-img { height: 180px; }
.news-card-body { padding: 20px; }
.news-card-body h3 { font-size: 16px; font-weight: 700; line-height: 1.4; margin-bottom: 8px; }
.news-card-body p { font-size: 13px; color: var(--text-2); line-height: 1.6; margin-bottom: 14px; }

.news-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.news-cat { font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 100px; text-transform: uppercase; letter-spacing: .04em; }
.news-cat-update { background: #eff6ff; color: var(--primary); }
.news-cat-research { background: #f0fdfa; color: var(--teal); }
.news-cat-health { background: #f0fdf4; color: var(--green); }
.news-cat-company { background: #f5f3ff; color: var(--purple); }
.news-date { font-size: 12px; color: var(--text-3); }
.read-more { font-size: 13px; font-weight: 600; color: var(--primary); }

/* Pagination */
.pagination { display: flex; align-items: center; justify-content: center; gap: 6px; }
.page-btn { width: 38px; height: 38px; border-radius: 8px; border: 1.5px solid var(--border); background: #fff; font-size: 14px; font-weight: 600; color: var(--text-2); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all .15s; }
.page-btn:hover { border-color: var(--primary); color: var(--primary); }
.page-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.page-btn.disabled { opacity: .4; cursor: default; pointer-events: none; }
.page-dots { color: var(--text-3); }

/* ===========================
   ARTICLE PAGE
=========================== */
.article-page { padding: 48px 0 80px; }
.article-layout { display: grid; grid-template-columns: 1fr 320px; gap: 48px; margin-bottom: 64px; }

.breadcrumb { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-3); margin-bottom: 20px; }
.breadcrumb a { text-decoration: none; color: var(--text-3); transition: color .15s; }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb span { color: var(--text-2); }

.article-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.article-title { font-size: clamp(24px, 3.5vw, 40px); font-weight: 800; line-height: 1.2; margin-bottom: 24px; }
.article-author { display: flex; align-items: center; gap: 12px; padding: 16px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); margin-bottom: 28px; }
.author-avatar { width: 40px; height: 40px; background: var(--gradient); color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; flex-shrink: 0; }
.author-name { font-size: 14px; font-weight: 700; }
.author-role { font-size: 12px; color: var(--text-3); }
.article-share { margin-left: auto; display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-3); }
.share-btn { padding: 6px 12px; border: 1.5px solid var(--border); border-radius: 8px; background: none; font-size: 12px; font-weight: 600; cursor: pointer; transition: all .15s; }
.share-btn:hover { border-color: var(--primary); color: var(--primary); }

.article-cover { margin-bottom: 32px; }

.article-content { font-size: 16px; color: var(--text-2); line-height: 1.8; }
.article-content h2 { font-size: 22px; font-weight: 800; color: var(--text); margin: 32px 0 12px; }
.article-content p { margin-bottom: 16px; }
.article-content ul { padding-left: 24px; margin-bottom: 16px; }
.article-content li { margin-bottom: 6px; }
.article-content strong { color: var(--text); }
.article-lead { font-size: 18px; font-weight: 500; color: var(--text); line-height: 1.7; }
.article-quote { border-left: 4px solid var(--primary); background: var(--primary-light); padding: 20px 24px; border-radius: 0 12px 12px 0; margin: 24px 0; }
.article-quote p, .article-quote { font-size: 17px; font-style: italic; color: var(--text); margin-bottom: 8px; }
.article-quote cite { font-size: 14px; font-style: normal; color: var(--text-3); font-weight: 600; display: block; }
.article-cta-box { background: var(--gradient); border-radius: var(--radius); padding: 32px; margin: 32px 0; color: #fff; }
.article-cta-box h3 { font-size: 20px; font-weight: 800; margin-bottom: 8px; }
.article-cta-box p { opacity: .85; margin-bottom: 20px; }
.article-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--border); }
.tag { background: var(--bg-2); border: 1px solid var(--border); border-radius: 100px; padding: 5px 14px; font-size: 13px; color: var(--text-2); }

/* Article sidebar */
.article-sidebar { position: sticky; top: 88px; }
.sidebar-widget { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; margin-bottom: 16px; }
.sidebar-widget h4 { font-size: 15px; font-weight: 700; margin-bottom: 16px; }
.sidebar-news { display: flex; flex-direction: column; gap: 14px; }
.sidebar-news-item { display: flex; gap: 10px; text-decoration: none; color: var(--text); transition: opacity .15s; }
.sidebar-news-item:hover { opacity: .75; }
.sni-img { width: 52px; height: 52px; border-radius: 8px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 22px; }
.sidebar-news-item p { font-size: 13px; font-weight: 600; line-height: 1.4; margin-bottom: 4px; }
.sidebar-news-item span { font-size: 12px; color: var(--text-3); }
.sidebar-cta { background: var(--gradient) !important; border: none !important; text-align: center; }
.sidebar-cta .sc-icon { font-size: 40px; display: block; margin-bottom: 12px; }
.sidebar-cta h4, .sidebar-cta p { color: #fff !important; }
.sidebar-cta p { opacity: .85; font-size: 13px; margin-bottom: 16px; }

/* Related */
.related-articles h3 { font-size: 22px; font-weight: 800; margin-bottom: 24px; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

/* ===========================
   ABOUT PAGE
=========================== */
.about-mission { padding: 80px 0; }
.about-mission-inner { display: grid; grid-template-columns: 1fr 360px; gap: 64px; align-items: start; }
.about-mission-text p { color: var(--text-2); margin-bottom: 16px; }
.about-values { display: flex; flex-direction: column; gap: 16px; margin-top: 24px; }
.value-item { display: flex; gap: 14px; }
.value-icon { font-size: 28px; flex-shrink: 0; }
.value-item strong { display: block; font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.value-item p { font-size: 14px; color: var(--text-2); margin: 0; }

.about-mission-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.big-stat { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; text-align: center; }
.big-num { display: block; font-size: 32px; font-weight: 900; background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; margin-bottom: 6px; }
.big-stat span:last-child { font-size: 13px; color: var(--text-3); }

.about-team { padding: 80px 0; background: var(--bg-2); }
.team-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.team-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 28px 20px; text-align: center; transition: all .2s; }
.team-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.team-avatar { width: 64px; height: 64px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 800; color: #fff; margin: 0 auto 16px; }
.team-card h4 { font-size: 16px; font-weight: 800; margin-bottom: 4px; }
.team-role { font-size: 13px; color: var(--primary); font-weight: 600; margin-bottom: 10px; }
.team-bio { font-size: 13px; color: var(--text-2); line-height: 1.6; }

/* ===========================
   PRICING PAGE
=========================== */
.pricing-page { padding: 48px 0 80px; }
.billing-toggle { display: inline-flex; background: var(--bg-2); border: 1px solid var(--border); border-radius: 10px; padding: 4px; margin-top: 20px; }
.billing-btn { padding: 8px 20px; border: none; border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer; background: none; color: var(--text-2); transition: all .15s; }
.billing-btn.active { background: #fff; color: var(--text); box-shadow: 0 2px 8px rgba(0,0,0,.1); }
.save-badge { background: #f0fdf4; color: var(--green); font-size: 11px; padding: 2px 6px; border-radius: 4px; margin-left: 4px; }

.plans-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-bottom: 64px; }
.plan-card { background: #fff; border: 1.5px solid var(--border); border-radius: var(--radius); padding: 32px; position: relative; transition: all .2s; }
.plan-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.plan-featured { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
.plan-popular-badge { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--gradient); color: #fff; font-size: 12px; font-weight: 700; padding: 4px 16px; border-radius: 100px; white-space: nowrap; }
.plan-header { margin-bottom: 24px; }
.plan-icon { font-size: 32px; display: block; margin-bottom: 12px; }
.plan-header h3 { font-size: 22px; font-weight: 800; margin-bottom: 4px; }
.plan-header p { font-size: 14px; color: var(--text-3); }
.plan-price { margin-bottom: 24px; display: flex; align-items: baseline; gap: 4px; flex-wrap: wrap; }
.price-amount { font-size: 36px; font-weight: 900; color: var(--text); }
.price-currency { font-size: 16px; color: var(--text-3); }
.price-period { font-size: 14px; color: var(--text-3); }
.plan-btn { width: 100%; justify-content: center; margin-bottom: 24px; }
.plan-features { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.plan-features li { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.pf-yes::before { content: '✓'; width: 18px; height: 18px; background: #f0fdf4; color: var(--green); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 800; flex-shrink: 0; }
.pf-no { color: var(--text-3); text-decoration: line-through; }
.pf-no::before { content: '×'; width: 18px; height: 18px; background: var(--bg-2); color: var(--text-3); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; flex-shrink: 0; }

.pricing-faq { margin-bottom: 80px; }

/* ===========================
   CONTACT PAGE
=========================== */
.contact-page { padding: 48px 0 80px; }
.contact-layout { display: grid; grid-template-columns: 1fr 360px; gap: 40px; }
.contact-form-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 36px; box-shadow: var(--shadow); }
.contact-form-card h2 { font-size: 22px; font-weight: 800; margin-bottom: 24px; }
.contact-form { display: flex; flex-direction: column; gap: 20px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 14px; font-weight: 600; color: var(--text); display: flex; justify-content: space-between; }
.form-group input, .form-group select, .form-group textarea {
    border: 1.5px solid var(--border);
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 14px;
    font-family: inherit;
    color: var(--text);
    outline: none;
    transition: border-color .2s;
    background: var(--bg-2);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: var(--primary); background: #fff; }
.form-group textarea { resize: vertical; }
.form-check { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; color: var(--text-2); }
.form-check input { margin-top: 2px; flex-shrink: 0; }
.form-check a { color: var(--primary); text-decoration: none; }
.form-success { text-align: center; padding: 40px 20px; }
.success-icon { font-size: 48px; margin-bottom: 16px; }
.form-success h3 { font-size: 22px; font-weight: 800; margin-bottom: 8px; }
.form-success p { color: var(--text-2); }

.contact-info-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; margin-bottom: 16px; }
.contact-info-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 20px; }
.contact-item { display: flex; gap: 12px; margin-bottom: 16px; }
.ci-icon { font-size: 22px; flex-shrink: 0; }
.ci-label { font-size: 12px; color: var(--text-3); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 2px; }
.contact-item a, .contact-item p { font-size: 14px; color: var(--text); text-decoration: none; }
.contact-item a:hover { color: var(--primary); }
.messengers { display: flex; flex-direction: column; gap: 10px; }
.messenger-btn { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 10px; border: 1.5px solid var(--border); background: none; font-size: 14px; font-weight: 600; cursor: pointer; color: var(--text); text-decoration: none; transition: all .15s; }
.messenger-btn:hover { transform: translateX(3px); }
.messenger-tg:hover { border-color: #2196F3; color: #2196F3; }
.messenger-wa:hover { border-color: #25D366; color: #25D366; }
.messenger-inst:hover { border-color: #E1306C; color: #E1306C; }
.forgot-link { font-size: 13px; font-weight: 500; color: var(--primary); text-decoration: none; }

/* ===========================
   AUTH PAGES
=========================== */
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 100px 24px 48px; background: var(--bg-2); }
.auth-card { background: #fff; border: 1px solid var(--border); border-radius: 20px; padding: 40px; width: 100%; max-width: 440px; box-shadow: var(--shadow-lg); }
.auth-card-wide { max-width: 540px; }
.auth-logo { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 24px; }
.auth-title { font-size: 24px; font-weight: 800; text-align: center; margin-bottom: 6px; }
.auth-sub { text-align: center; color: var(--text-3); font-size: 14px; margin-bottom: 28px; }
.auth-form { display: flex; flex-direction: column; gap: 18px; margin-bottom: 20px; }
.input-password { position: relative; }
.input-password input { width: 100%; padding-right: 44px; }
.toggle-pass { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; color: var(--text-3); padding: 4px; }
.toggle-pass:hover { color: var(--text); }
.auth-divider { text-align: center; position: relative; margin: 20px 0; }
.auth-divider::before { content: ''; position: absolute; top: 50%; left: 0; right: 0; height: 1px; background: var(--border); }
.auth-divider span { background: #fff; padding: 0 12px; position: relative; font-size: 13px; color: var(--text-3); }
.social-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 20px; }
.social-btn { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 10px; border: 1.5px solid var(--border); border-radius: 10px; background: none; font-size: 14px; font-weight: 600; cursor: pointer; color: var(--text); transition: all .15s; }
.social-btn:hover { border-color: var(--primary); color: var(--primary); }
.auth-switch { text-align: center; font-size: 14px; color: var(--text-3); }
.auth-switch a { color: var(--primary); text-decoration: none; font-weight: 600; }

/* Role selection */
.role-select { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 24px; }
.role-btn { padding: 14px 10px; border: 1.5px solid var(--border); border-radius: 12px; background: none; cursor: pointer; text-align: center; transition: all .15s; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.role-btn span { font-size: 24px; }
.role-btn p { font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 2px; }
.role-btn span.sub { font-size: 11px; color: var(--text-3); }
.role-btn > div p, .role-btn > div span { display: block; }
.role-btn:hover { border-color: var(--primary); }
.role-btn.active { border-color: var(--primary); background: var(--primary-light); }

/* ===========================
   RESPONSIVE
=========================== */
@media (max-width: 1024px) {
    .chat-sidebar { width: 240px; }
    .analysis-layout { grid-template-columns: 1fr; }
    .analysis-right { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
    .news-featured { grid-template-columns: 1fr; }
    .news-featured-img { height: 240px; }
    .article-layout { grid-template-columns: 1fr; }
    .article-sidebar { position: static; }
    .about-mission-inner { grid-template-columns: 1fr; }
    .team-grid { grid-template-columns: repeat(2, 1fr); }
    .plans-grid { grid-template-columns: 1fr; max-width: 480px; margin: 0 auto 64px; }
    .contact-layout { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .chat-sidebar { display: none; }
    .news-grid { grid-template-columns: repeat(2, 1fr); }
    .related-grid { grid-template-columns: repeat(2, 1fr); }
    .quick-grid { grid-template-columns: repeat(2, 1fr); }
    .form-row { grid-template-columns: 1fr; }
    .social-btns { grid-template-columns: 1fr; }
    .role-select { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
    .news-grid { grid-template-columns: 1fr; }
    .related-grid { grid-template-columns: 1fr; }
    .team-grid { grid-template-columns: 1fr; }
    .quick-grid { grid-template-columns: 1fr; }
}
/* ═══════════════════════════════════════════
   DESIGN 2.0 UPGRADE
═══════════════════════════════════════════ */

/* — Page hero: мягкий градиент с бликами — */
.page-hero {
    position: relative;
    background:
        radial-gradient(ellipse 600px 300px at 15% 20%, rgba(37, 99, 235, 0.07), transparent),
        radial-gradient(ellipse 500px 280px at 85% 80%, rgba(13, 148, 136, 0.07), transparent),
        linear-gradient(180deg, #f8fafc 0%, #fff 100%);
    overflow: hidden;
}

/* — About: ценности в виде плиток — */
.value-item { align-items: flex-start; }
.value-icon {
    width: 46px; height: 46px;
    border-radius: 13px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    font-size: 20px;
}
.vi-blue  { background: linear-gradient(135deg, #2563eb, #1e40af); color: #fff; box-shadow: 0 6px 14px -5px rgba(37, 99, 235, .5); }
.vi-teal  { background: linear-gradient(135deg, #14b8a6, #0f766e); color: #fff; box-shadow: 0 6px 14px -5px rgba(20, 184, 166, .5); }
.vi-amber { background: linear-gradient(135deg, #f59e0b, #b45309); color: #fff; box-shadow: 0 6px 14px -5px rgba(245, 158, 11, .5); }

.big-stat {
    border-radius: 16px;
    transition: transform .22s ease, box-shadow .22s ease;
}
.big-stat:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px -10px rgba(37, 99, 235, .2);
}

/* — Contact: цветные иконки и форма — */
.ci-icon {
    width: 42px; height: 42px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.ci-blue  { background: #eff6ff; color: #2563eb; }
.ci-teal  { background: #f0fdfa; color: #0d9488; }
.ci-rose  { background: #fff1f2; color: #e11d48; }
.ci-amber { background: #fffbeb; color: #d97706; }

.contact-form-card { border-radius: 20px; }
.contact-info-card { border-radius: 18px; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.messenger-btn:hover { transform: translateX(4px); box-shadow: 0 4px 12px -4px rgba(15, 23, 42, .15); }

/* — Pricing: премиальные карточки — */
.plan-card { border-radius: 20px; }
.plan-icon {
    width: 56px; height: 56px;
    border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 16px;
}
.plan-icon-gray { background: linear-gradient(135deg, #f1f5f9, #e2e8f0); color: #475569; }
.plan-icon-blue { background: linear-gradient(135deg, #2563eb, #1e40af); color: #fff; box-shadow: 0 8px 18px -6px rgba(37, 99, 235, .55); }
.plan-icon-teal { background: linear-gradient(135deg, #14b8a6, #0f766e); color: #fff; box-shadow: 0 8px 18px -6px rgba(20, 184, 166, .55); }

.plan-featured {
    border: none;
    background:
        linear-gradient(#fff, #fff) padding-box,
        linear-gradient(135deg, #2563eb, #0d9488) border-box;
    border: 2px solid transparent;
    box-shadow: 0 24px 56px -20px rgba(37, 99, 235, .35);
    transform: scale(1.03);
}
.plan-featured:hover { transform: scale(1.03) translateY(-3px); }
.plan-popular-badge {
    padding: 5px 18px;
    box-shadow: 0 6px 16px -4px rgba(37, 99, 235, .5);
    letter-spacing: .3px;
}

/* — FAQ: карточки с акцентом — */
.faq-item {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    margin-bottom: 10px;
    transition: border-color .2s, box-shadow .2s;
    overflow: hidden;
}
.faq-item:hover { border-color: rgba(37, 99, 235, .35); }
.faq-item.open {
    border-color: rgba(37, 99, 235, .45);
    box-shadow: 0 8px 24px -10px rgba(37, 99, 235, .18);
}

/* — Auth: фон с градиентными пятнами — */
.auth-page {
    position: relative;
    background:
        radial-gradient(ellipse 500px 400px at 12% 18%, rgba(37, 99, 235, 0.10), transparent),
        radial-gradient(ellipse 520px 420px at 88% 85%, rgba(13, 148, 136, 0.10), transparent),
        linear-gradient(160deg, #f8fafc 0%, #eef4fc 100%);
}
.auth-card {
    border-radius: 24px;
    box-shadow:
        0 1px 2px rgba(15, 23, 42, .04),
        0 24px 64px -24px rgba(30, 58, 138, .25);
}
.social-btn { border-radius: 12px; transition: all .15s; }
.social-btn:hover { border-color: var(--primary); background: var(--primary-light); transform: translateY(-1px); }
