/* ========================================
   OPENMED AI - Modern PubMed-Inspired Design
   ======================================== */
@import url('https://fonts.googleapis.com/css2?family=Source+Serif+4:opsz,wght@8..60,400;8..60,500;8..60,600&family=DM+Sans:opsz,wght@9..40,300;9..40,400;9..40,500;9..40,600&display=swap');

:root {
    --navy: #1a3a5c;
    --navy-mid: #2a5080;
    --navy-light: #3d6ea0;
    --blue: #1d6faf;
    --blue-light: #2b8ad4;
    --blue-link: #106ba3;
    --teal: #0d8c82;

    --text: #1c2b3a;
    --text-mid: #3a5169;
    --text-light: #6b7e93;
    --text-lighter: #9fb0bf;

    --bg: #ffffff;
    --bg-warm: #f4f7fb;
    --bg-secondary: #eef2f7;
    --bg-tertiary: #e2e9f0;
    --bg-accent: #e8f0fb;

    --border: #ccd8e5;
    --border-light: #dde6f0;

    --success: #2e7d55;
    --success-bg: #e6f7ee;
    --warning: #b06a00;
    --warning-bg: #fff8ec;
    --free-gold: #a05c00;
    --free-bg: #fff3d4;

    --radius: 8px;
    --radius-sm: 5px;
    --radius-lg: 10px;

    --shadow-xs: 0 1px 2px rgba(26, 58, 92, 0.06);
    --shadow-sm: 0 1px 4px rgba(26, 58, 92, 0.08), 0 1px 2px rgba(26, 58, 92, 0.04);
    --shadow: 0 2px 8px rgba(26, 58, 92, 0.08);
    --shadow-md: 0 4px 16px rgba(26, 58, 92, 0.1);
    --shadow-lg: 0 8px 30px rgba(26, 58, 92, 0.14);

    --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-serif: 'Source Serif 4', Georgia, serif;
}

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

body {
    font-family: var(--font-body);
    background: var(--bg-warm);
    color: var(--text);
    line-height: 1.6;
    font-size: 14px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ========================================
   HEADER - PubMed Clinical Style
   ======================================== */
.ncbi-header {
    background: white;
    color: white;
    padding: 0;
    border-bottom: 3px solid var(--navy);
    box-shadow: 0 2px 10px rgba(26, 58, 92, 0.35);
    position: sticky;
    top: 0;
    z-index: 100;
}

.ncbi-bar {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    height: 54px;
    gap: 16px;
}

.ncbi-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-mark {
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, var(--teal) 0%, var(--blue-light) 100%);
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-serif);
    font-weight: 600;
    font-size: 15px;
    color: white;
    flex-shrink: 0;
}

.logo-text-group {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.logo-main {
    font-family: var(--font-serif);
    font-size: 17px;
    font-weight: 600;
    color: black;
    letter-spacing: -0.2px;
    line-height: 1;
}

.logo-sub {
    font-size: 10px;
    font-weight: 400;
    color: var(--text-light);
    letter-spacing: 0.8px;
    text-transform: uppercase;
    line-height: 1;
}

/* ========================================
   LAYOUT
   ======================================== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 24px;
    flex: 1;
    width: 100%;
}

.layout {
    display: grid;
    grid-template-columns: 252px 1fr;
    gap: 20px;
    align-items: start;
}

/* ========================================
   SIDEBAR
   ======================================== */
.sidebar {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    position: sticky;
    top: 76px;
    max-height: calc(100vh - 92px);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

.sidebar-section {
    border-bottom: 1px solid var(--border-light);
    padding: 14px 0;
}

.sidebar-section:last-child { border-bottom: none; }

.sidebar-header {
    padding: 2px 16px 8px;
    font-weight: 600;
    font-size: 10px;
    color: var(--text-lighter);
    text-transform: uppercase;
    letter-spacing: 0.9px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-count {
    background: var(--bg-secondary);
    color: var(--text-light);
    padding: 1px 7px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0;
}

.sidebar-list { list-style: none; padding: 0; margin: 0; }

.sidebar-item {
    padding: 6px 16px;
    font-size: 12.5px;
    cursor: pointer;
    color: var(--text-mid);
    transition: all 0.15s;
    border-left: 2px solid transparent;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-item:hover {
    background: var(--bg-accent);
    color: var(--blue);
    border-left-color: var(--blue);
}

.empty-state {
    padding: 18px 16px;
    text-align: center;
    color: var(--text-lighter);
    font-size: 12px;
    line-height: 1.5;
}

/* ========================================
   FOLDER CONTROLS
   ======================================== */
.folder-controls { padding: 0 10px 8px; }

.btn-new-folder {
    width: 100%;
    background: var(--bg-accent);
    color: var(--blue);
    border: 1px solid #b8d0ed;
    padding: 7px 12px;
    font-size: 12px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: var(--font-body);
}

.btn-new-folder:hover {
    background: var(--blue);
    color: white;
    border-color: var(--blue);
    box-shadow: var(--shadow-sm);
}

.folders-container { padding: 0 6px; }

.folder-item {
    padding: 7px 10px;
    display: flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all 0.15s;
    margin-bottom: 2px;
    border: 1px solid transparent;
}

.folder-item:hover {
    background: var(--bg-secondary);
    border-color: var(--border-light);
}

.folder-item.active {
    background: var(--bg-accent);
    border-color: #b8d0ed;
}

.folder-icon { width: 14px; height: 14px; color: var(--text-lighter); flex-shrink: 0; }
.folder-item.active .folder-icon { color: var(--blue); }

.folder-name {
    flex: 1;
    font-size: 12.5px;
    color: var(--text);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.folder-item.active .folder-name { color: var(--blue); }

.folder-count {
    background: var(--bg-tertiary);
    color: var(--text-lighter);
    padding: 1px 6px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 600;
    flex-shrink: 0;
}

.folder-item.active .folder-count { background: var(--blue); color: white; }

/* ========================================
   TOPICS GRID
   ======================================== */
.topics-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px;
    padding: 0 10px;
}

.topic-item {
    padding: 7px 6px;
    font-size: 11px;
    cursor: pointer;
    color: var(--text-mid);
    transition: all 0.15s;
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
    text-align: center;
    font-weight: 500;
    border: 1px solid var(--border-light);
    line-height: 1.3;
}

.topic-item:hover {
    background: var(--navy);
    color: white;
    border-color: var(--navy);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

/* ========================================
   SEARCH PANEL
   ======================================== */
.search-panel {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
}

.search-tabs {
    display: flex;
    gap: 3px;
    margin-bottom: 14px;
    background: var(--bg-secondary);
    padding: 3px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
}

.tab-btn {
    background: transparent;
    border: none;
    padding: 7px 14px;
    font-size: 12.5px;
    font-weight: 500;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 4px;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: var(--font-body);
}

.tab-btn:hover { color: var(--text); }

.tab-btn.active {
    background: var(--bg);
    color: var(--navy);
    box-shadow: var(--shadow-xs);
    font-weight: 600;
}

.search-row {
    display: flex;
    margin-bottom: 12px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.search-row:focus-within {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(29, 111, 175, 0.12);
}

.search-input {
    flex: 1;
    padding: 10px 14px;
    border: none;
    font-size: 14px;
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    outline: none;
}

.search-input::placeholder { color: var(--text-lighter); }

.btn-search {
    background: var(--navy);
    color: white;
    border: none;
    padding: 0 18px;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 50px;
}

.btn-search:hover { background: var(--navy-mid); }
.btn-search:disabled { background: var(--text-lighter); cursor: not-allowed; }

.search-controls {
    display: flex;
    gap: 14px;
    padding: 9px 0;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.basic-filters { display: flex; gap: 14px; flex-wrap: wrap; }

.filter-label {
    font-size: 12.5px;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    color: var(--text-mid);
    font-weight: 500;
    user-select: none;
}

.filter-label input[type="checkbox"] {
    width: 14px;
    height: 14px;
    cursor: pointer;
    accent-color: var(--blue);
}

.adv-toggle {
    color: var(--blue);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 0;
    transition: color 0.15s;
}

.adv-toggle:hover { color: var(--navy); }

.advanced-filters {
    display: none;
    margin-top: 12px;
    padding: 14px;
    background: var(--bg-warm);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 18px;
}

.filter-column h4 {
    font-size: 10px;
    text-transform: uppercase;
    color: var(--text-lighter);
    margin-bottom: 7px;
    font-weight: 600;
    letter-spacing: 0.7px;
}

.filter-option {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
    font-size: 12.5px;
    color: var(--text-mid);
    cursor: pointer;
    gap: 6px;
}

.filter-option input { accent-color: var(--blue); }

.filter-select {
    width: 100%;
    padding: 5px 9px;
    border: 1px solid var(--border);
    font-size: 12px;
    margin-bottom: 9px;
    border-radius: var(--radius-sm);
    background: var(--bg);
    font-family: var(--font-body);
    color: var(--text);
    cursor: pointer;
}

.date-range { display: none; align-items: center; gap: 6px; margin-top: 5px; }
.date-range.active { display: flex; }

.date-input {
    width: 64px;
    padding: 4px 7px;
    font-size: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
}

/* ========================================
   QUERY PANEL
   ======================================== */
.query-panel {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 16px;
    display: none;
    overflow: hidden;
    box-shadow: var(--shadow-xs);
}

.query-header {
    background: var(--bg-secondary);
    padding: 9px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-size: 10.5px;
    font-weight: 600;
    color: var(--text-mid);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    border-bottom: 1px solid var(--border-light);
}

.query-content {
    padding: 12px 14px;
    background: #0e1d2e;
    color: #90b8d8;
    font-family: 'Courier New', 'Consolas', monospace;
    font-size: 11.5px;
    word-break: break-word;
    display: none;
    line-height: 1.7;
}

.btn-copy {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.15);
    padding: 3px 10px;
    font-size: 10.5px;
    cursor: pointer;
    border-radius: var(--radius-sm);
    font-weight: 500;
    transition: all 0.2s;
    font-family: var(--font-body);
    color: var(--text-mid);
    background: var(--bg);
}

.btn-copy:hover { background: var(--navy); color: white; border-color: var(--navy); }

/* ========================================
   RESULTS
   ======================================== */
.results-container {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.results-header {
    background: var(--navy);
    padding: 11px 18px;
    font-size: 12.5px;
    font-weight: 600;
    color: rgba(255,255,255,0.9);
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.2px;
}

.paper {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-light);
    transition: background 0.15s;
    position: relative;
}

.paper:last-child { border-bottom: none; }
.paper:hover { background: #f8fbff; }

/* Subtle left accent on hover */
.paper::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--blue);
    opacity: 0;
    transition: opacity 0.15s;
}
.paper:hover::before { opacity: 1; }

.paper-title {
    font-family: var(--font-serif);
    font-size: 15px;
    color: var(--blue-link);
    text-decoration: none;
    font-weight: 500;
    display: block;
    margin-bottom: 5px;
    line-height: 1.45;
    transition: color 0.15s;
}

.paper-title:hover {
    color: var(--navy);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.paper-meta {
    font-size: 11.5px;
    color: var(--teal);
    margin-bottom: 7px;
    font-weight: 500;
}

.paper-abstract {
    font-size: 13px;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-highlight {
    background-color: #fff3cd;
    font-weight: 600;
    color: var(--navy);
    border-radius: 2px;
    padding: 0 1px;
}

.paper-title .search-highlight {
    background: transparent;
    color: var(--navy);
    font-weight: 700;
}

.paper-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.btn-action {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    padding: 5px 12px;
    font-size: 11.5px;
    cursor: pointer;
    color: var(--text-mid);
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: all 0.15s;
    font-family: var(--font-body);
}

.btn-action:hover {
    background: var(--bg-tertiary);
    border-color: var(--blue);
    color: var(--blue);
}

.btn-saved {
    background: var(--success-bg);
    border-color: #a3d4b8;
    color: var(--success);
}

/* DESPUÉS */
.link-pubmed {
    font-size: 11.5px;
    color: var(--blue);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.15s;
    padding: 5px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
    white-space: nowrap;
}

.link-pubmed:hover { 
    color: var(--blue);
    border-color: var(--blue);
    background: var(--bg-tertiary);
    text-decoration: none;
}

.free-label {
    display: inline-block;
    background: var(--free-bg);
    color: var(--free-gold);
    padding: 1px 7px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 600;
    margin-left: 7px;
    border: 1px solid #f0d090;
}

.ai-summary {
    margin-top: 12px;
    background: var(--warning-bg);
    border: 1px solid #f5d88a;
    border-left: 3px solid #e0a020;
    padding: 11px 14px;
    display: none;
    font-size: 12.5px;
    line-height: 1.65;
    border-radius: var(--radius-sm);
    color: var(--text);
}

/* ========================================
   LOADER
   ======================================== */
.loader {
    text-align: center;
    padding: 28px;
    color: var(--text-light);
    font-size: 12.5px;
    display: none;
    font-weight: 500;
}

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid var(--border);
    border-top: 2px solid var(--blue);
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ========================================
   FOOTER - Fixed at bottom
   ======================================== */
.legal-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 900;
    background: #1a2535;
    color: #c8d3de;
    padding: 12px 24px;
    font-size: 11px;
    text-align: center;
    border-top: 1px solid #2e3e52;
}

.footer-content { max-width: 1400px; margin: 0 auto; }

.footer-warning {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    color: #f0c050;
    margin-bottom: 5px;
    font-weight: 500;
}

.footer-warning svg { flex-shrink: 0; }
.footer-warning a { color: #f5d080; text-decoration: underline; }
.footer-disclaimer { color: #7a90a5; line-height: 1.5; }

.close-footer-btn {
    position: absolute;
    top: 6px;
    right: 14px;
    background: transparent;
    border: none;
    color: #5a7090;
    font-size: 22px;
    cursor: pointer;
    padding: 0 6px;
    transition: color 0.2s;
    line-height: 1;
}

.close-footer-btn:hover { color: white; }

/* ========================================
   FLOATING BUTTONS - Fixed position, always visible
   ======================================== */
.legal-trigger,
.about-trigger {
    position: fixed;
    background: var(--bg);
    color: var(--text-mid);
    border: 1px solid var(--border);
    padding: 9px 16px;
    cursor: pointer;
    font-size: 12.5px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    z-index: 1000;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 7px;
    font-family: var(--font-body);
    /* Fixed bottom that doesn't depend on footer */
    bottom: 20px;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s, color 0.2s;
}

.legal-trigger { right: 24px; }
.about-trigger { right: 130px; }

.legal-trigger:hover,
.about-trigger:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--blue);
    color: var(--blue);
}

/* When footer is visible, push buttons up */
body.footer-visible .legal-trigger,
body.footer-visible .about-trigger {
    bottom: 80px;
}

/* ========================================
   MODALS
   ======================================== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(10, 20, 35, 0.65);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(3px);
}

.modal-content {
    background: var(--bg);
    width: 90%;
    max-width: 580px;
    border-radius: var(--radius-lg);
    box-shadow: 0 24px 40px rgba(10, 20, 35, 0.2);
    overflow: hidden;
    animation: modalFadeIn 0.2s ease;
}

.modal-header {
    background: var(--navy);
    padding: 18px 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    color: white;
    font-family: var(--font-serif);
}

.modal-body {
    padding: 26px;
    max-height: 70vh;
    overflow-y: auto;
}

.legal-section {
    margin-bottom: 20px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border-light);
}

.legal-section:last-child { border-bottom: none; margin-bottom: 0; }

.legal-section h4 {
    color: var(--navy);
    margin-bottom: 8px;
    font-size: 13.5px;
    font-weight: 600;
    font-family: var(--font-serif);
}

.legal-section p {
    font-size: 13px;
    color: var(--text-light);
    line-height: 1.7;
}

.close-btn {
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.2);
    color: rgba(255,255,255,0.8);
    font-size: 20px;
    cursor: pointer;
    transition: all 0.2s;
    padding: 2px 8px;
    border-radius: 4px;
    line-height: 1;
}

.close-btn:hover { background: rgba(255,255,255,0.25); color: white; }

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

/* ========================================
   SAVED PAPERS
   ======================================== */
.saved-item {
    padding: 7px 10px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.saved-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 5px;
}

.saved-link {
    color: var(--text-mid);
    font-size: 12px;
    text-decoration: none;
    font-weight: 500;
    flex: 1;
    line-height: 1.4;
}

.saved-link:hover { color: var(--blue); text-decoration: underline; }

.icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 3px;
    opacity: 0.45;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 3px;
    transition: all 0.15s;
}

.icon-btn:hover { opacity: 1; background: var(--bg-secondary); }

.icon-btn svg {
    width: 13px;
    height: 13px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

.edit-input {
    width: 100%;
    padding: 3px 6px;
    border: 1px solid var(--border);
    font-size: 11px;
    font-family: var(--font-body);
    border-radius: var(--radius-sm);
}

.folder-actions { display: none; gap: 3px; align-items: center; }
.folder-item:hover .folder-actions { display: flex; }

.folder-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 3px;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    opacity: 0.55;
}

.folder-btn:hover { opacity: 1; background: rgba(0, 0, 0, 0.05); }
.folder-btn-edit { color: #1565c0; }
.folder-btn-edit:hover { background: rgba(21, 101, 192, 0.1); }
.folder-btn-delete { color: #c62828; }
.folder-btn-delete:hover { background: rgba(198, 40, 40, 0.1); }
.folder-btn svg { width: 13px; height: 13px; }

.folder-input {
    flex: 1;
    padding: 5px 7px;
    border: 2px solid var(--blue);
    font-size: 11px;
    font-family: var(--font-body);
    border-radius: 3px;
    outline: none;
}

.folder-dropdown {
    position: fixed;
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    min-width: 175px;
    z-index: 10000;
    display: none;
    max-height: 200px;
    overflow-y: auto;
}

.folder-dropdown.show { display: block; }

.folder-dropdown::-webkit-scrollbar { width: 5px; }
.folder-dropdown::-webkit-scrollbar-track { background: #f5f5f5; }
.folder-dropdown::-webkit-scrollbar-thumb { background: #ccc; border-radius: 3px; }

.folder-option {
    padding: 7px 12px;
    font-size: 11.5px;
    cursor: pointer;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: 7px;
    transition: all 0.15s ease;
    color: var(--text);
    font-weight: 500;
}

.folder-option:hover { background: var(--bg-accent); color: var(--blue); }
.folder-option:last-child { border-bottom: none; }
.folder-option svg { width: 13px; height: 13px; flex-shrink: 0; }

.folder-option-empty {
    padding: 10px;
    text-align: center;
    font-size: 11px;
    color: var(--text-lighter);
    font-style: italic;
}

.folder-papers-list {
    margin-left: 10px;
    border-left: 2px solid var(--border-light);
    padding-left: 8px;
    position: relative;
    z-index: 1;
}

/* ========================================
   SOCIAL BUTTONS
   ======================================== */
.social-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 14px;
}

.social-btn {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 9px 18px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-weight: 500;
    font-size: 13px;
    transition: all 0.2s;
    color: white;
}

.social-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.social-btn svg { width: 17px; height: 17px; }
.social-btn.linkedin { background: #0077b5; }
.social-btn.linkedin:hover { background: #005e93; }
.social-btn.github { background: #24292e; }
.social-btn.github:hover { background: #000; }

/* ========================================
   COOKIE BANNER
   ======================================== */
.cookie-banner {
    position: fixed;
    bottom: 24px;
    left: 24px;
    width: 310px;
    background: #1a2535;
    color: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.35);
    z-index: 10001;
    display: flex;
    flex-direction: column;
    gap: 14px;
    border: 1px solid #2e3e52;
    animation: slideInUp 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.cookie-content p {
    font-size: 12.5px;
    margin: 0;
    line-height: 1.6;
    color: #c8d3de;
    padding: 5px;
    padding-bottom: 1px;
}

.cookie-actions { display: flex; gap: 8px; }

.btn-accept {
    background: var(--blue);
    color: white;
    border: none;
    padding: 7px 14px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    font-weight: 600;
    flex: 1;
    transition: background 0.2s;
    font-family: var(--font-body);
}

.btn-accept:hover { background: var(--navy-mid); }

.btn-decline {
    background: transparent;
    border: 1px solid #3a4f65;
    color: #8a9ab0;
    padding: 7px 14px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    flex: 1;
    transition: all 0.2s;
    font-family: var(--font-body);
}

.btn-decline:hover { border-color: #6a8aaa; color: #c0d0e0; }

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

/* ========================================
   DRAG & DROP
   ======================================== */
.drag-over {
    background-color: rgba(29, 111, 175, 0.08) !important;
    border: 2px dashed var(--blue) !important;
    border-radius: 6px;
}

.paper, .saved-item { cursor: grab; }
.paper:active, .saved-item:active { cursor: grabbing; }
.paper.dragging, .saved-item.dragging { opacity: 0.45; }

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 900px) {
    .layout { grid-template-columns: 1fr; }
    .sidebar { order: 2; position: static; max-height: none; }
    .main { order: 1; }

    .legal-trigger { right: 16px; }
    .about-trigger { right: 120px; }
}