/* ============================================================
   NAVICOM – System Analizy Przetargów Energetycznych
   Główny arkusz stylów v1.0.0
   ============================================================ */

:root {
    --nc-primary:   #2271b1;
    --nc-success:   #00ba37;
    --nc-warning:   #f0b429;
    --nc-danger:    #d63638;
    --nc-sn:        #2271b1;
    --nc-nn:        #00ba37;
    --nc-lighting:  #f0b429;
    --nc-other:     #8c8f94;
    --nc-bg:        #eef3fb;
    --nc-card-bg:   #f8fbff;
    --nc-border:    #c3d6ea;
    --nc-text:      #1d2327;
    --nc-muted:     #5b6e88;
    --nc-radius:    6px;
    --nc-shadow:    0 1px 3px rgba(37,99,235,.07);
}

/* ---- Layout ---- */
.navicom-wrap { max-width: 1400px; }

.navicom-page-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    font-size: 22px;
    font-weight: 600;
}

.navicom-logo { color: var(--nc-primary); font-size: 20px; }
.navicom-count { color: var(--nc-muted); font-size: 16px; font-weight: 400; }
.navicom-back { font-size: 18px; text-decoration: none; color: var(--nc-primary); }

.navicom-row { display: flex; gap: 20px; margin-bottom: 20px; flex-wrap: wrap; }
.navicom-col-4 { flex: 0 0 calc(33.33% - 14px); min-width: 240px; }
.navicom-col-5 { flex: 0 0 calc(41.67% - 14px); min-width: 280px; }
.navicom-col-7 { flex: 0 0 calc(58.33% - 14px); min-width: 320px; }
.navicom-col-8 { flex: 0 0 calc(66.67% - 14px); min-width: 360px; }

/* ---- Cards ---- */
.navicom-card {
    background: var(--nc-card-bg);
    border: 1px solid var(--nc-border);
    border-radius: var(--nc-radius);
    box-shadow: var(--nc-shadow);
    margin-bottom: 20px;
    overflow: hidden;
}
.navicom-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid var(--nc-border);
    background: #edf3fc;
}
.navicom-card-header h2 { margin: 0; font-size: 15px; font-weight: 600; }
.navicom-card-body { padding: 16px; }
.navicom-card-body.navicom-no-pad { padding: 0; }
.navicom-card.navicom-card-compact { padding: 10px 16px; }
.navicom-card.navicom-card-success { border-left: 4px solid var(--nc-success); }
.navicom-no-pad { padding: 0 !important; }

/* ---- Stats Grid ---- */
.navicom-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}
.navicom-stats-compact .navicom-stat-card { padding: 12px; }

.navicom-stat-card {
    background: var(--nc-card-bg);
    border: 1px solid var(--nc-border);
    border-radius: var(--nc-radius);
    padding: 16px;
    text-align: center;
    box-shadow: var(--nc-shadow);
    transition: box-shadow .15s;
}
.navicom-stat-value { font-size: 32px; font-weight: 700; line-height: 1; }
.navicom-stat-label { font-size: 12px; color: var(--nc-muted); margin-top: 4px; }
.navicom-stat-primary .navicom-stat-value { color: var(--nc-primary); }
.navicom-stat-success .navicom-stat-value { color: var(--nc-success); }
.navicom-stat-warning .navicom-stat-value { color: var(--nc-warning); }
.navicom-stat-sn .navicom-stat-value     { color: var(--nc-sn); }
.navicom-stat-nn .navicom-stat-value     { color: var(--nc-nn); }
.navicom-stat-light .navicom-stat-value  { color: var(--nc-lighting); }

/* ---- Blink (nowe przetargi) ---- */
@keyframes navicom-blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: .3; }
}
.navicom-blink { animation: navicom-blink 1.4s ease-in-out infinite; }

/* ---- Tables ---- */
.navicom-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.navicom-table th, .navicom-table td { padding: 10px 12px; border-bottom: 1px solid var(--nc-border); text-align: left; vertical-align: middle; }
.navicom-table th { background: #edf3fc; font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--nc-muted); }
.navicom-table-hover tbody tr:hover { background: #e8f0fb; }
.navicom-table .navicom-id { color: var(--nc-muted); font-size: 11px; width: 40px; }
.navicom-title-link { font-weight: 500; text-decoration: none; color: var(--nc-text); }
.navicom-title-link:hover { color: var(--nc-primary); }
.navicom-sub { font-size: 11px; color: var(--nc-muted); margin-top: 2px; }
.navicom-empty { text-align: center; color: var(--nc-muted); padding: 30px; font-style: italic; }
.navicom-urgent { background: #fff8e1 !important; }

/* ---- Detail Table ---- */
.navicom-detail-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.navicom-detail-table th { width: 180px; padding: 8px 12px; text-align: right; color: var(--nc-muted); font-weight: 500; border-bottom: 1px solid var(--nc-border); }
.navicom-detail-table td { padding: 8px 12px; border-bottom: 1px solid var(--nc-border); }

/* ---- Badges ---- */
.navicom-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.6;
    white-space: nowrap;
}
.navicom-badge-primary  { background: #dce9f5; color: var(--nc-primary); }
.navicom-badge-success  { background: #d7f7e0; color: #007a1d; }
.navicom-badge-warning  { background: #fdf3cc; color: #856404; }
.navicom-badge-danger   { background: #fde8e8; color: var(--nc-danger); }
.navicom-badge-error    { background: #fde8e8; color: var(--nc-danger); }
.navicom-cat-sn         { background: #dce9f5; color: var(--nc-sn); }
.navicom-cat-nn         { background: #d7f7e0; color: #007a1d; }
.navicom-cat-lighting   { background: #fdf3cc; color: #856404; }
.navicom-cat-other      { background: #e8eef8; color: #50575e; }
.navicom-status-active  { background: #d7f7e0; color: #007a1d; }
.navicom-status-closed  { background: #e8eef8; color: #50575e; }
.navicom-priority-high  { background: #fde8e8; color: var(--nc-danger); }
.navicom-priority-medium{ background: #fdf3cc; color: #856404; }
.navicom-priority-low   { background: #e8eef8; color: #50575e; }

/* ---- Progress Bar ---- */
.navicom-progress-bar { background: #e2e4e7; border-radius: 4px; height: 6px; margin-bottom: 2px; overflow: hidden; }
.navicom-progress-fill { height: 100%; border-radius: 4px; background: var(--nc-primary); }
.navicom-prof-high  .navicom-progress-fill { background: var(--nc-success); }
.navicom-prof-medium .navicom-progress-fill { background: var(--nc-warning); }
.navicom-prof-low   .navicom-progress-fill { background: var(--nc-danger); }
.navicom-score-num { font-size: 11px; color: var(--nc-muted); }

/* ---- Score Circle ---- */
.navicom-score-circle {
    width: 80px; height: 80px;
    border-radius: 50%;
    border: 5px solid var(--nc-border);
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    margin: 0 auto 16px;
}
.navicom-score-circle.navicom-score-high   { border-color: var(--nc-success); }
.navicom-score-circle.navicom-score-medium { border-color: var(--nc-warning); }
.navicom-score-circle.navicom-score-low    { border-color: var(--nc-danger); }
.navicom-score-val { font-size: 22px; font-weight: 700; line-height: 1; }
.navicom-score-lbl { font-size: 10px; color: var(--nc-muted); }

/* ---- Risk ---- */
.navicom-risk-list { margin: 0; padding: 0; list-style: none; }
.navicom-risk { padding: 6px 10px; border-radius: 4px; margin-bottom: 4px; font-size: 12px; }
.navicom-risk-high   { background: #fde8e8; border-left: 3px solid var(--nc-danger); }
.navicom-risk-medium { background: #fdf3cc; border-left: 3px solid var(--nc-warning); }
.navicom-risk-low    { background: #e8f0fb; border-left: 3px solid var(--nc-primary); }

/* ---- Similar tenders list ---- */
.navicom-similar-list { margin: 0; padding: 0; list-style: none; }
.navicom-similar-list li { padding: 8px 12px; border-bottom: 1px solid var(--nc-border); }
.navicom-similar-list li:last-child { border-bottom: none; }

/* ---- Buttons ---- */
.navicom-btn {
    display: inline-block;
    padding: 6px 14px;
    border-radius: var(--nc-radius);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid var(--nc-primary);
    background: var(--nc-primary);
    color: #fff;
    text-decoration: none;
    line-height: 1.5;
    transition: background .15s, opacity .15s;
}
.navicom-btn:hover { background: #135e96; border-color: #135e96; color: #fff; }
.navicom-btn-outline { background: transparent; color: var(--nc-primary); }
.navicom-btn-outline:hover { background: var(--nc-primary); color: #fff; }
.navicom-btn-primary { background: var(--nc-primary); color: #fff; }
.navicom-btn-sm  { padding: 4px 10px; font-size: 12px; }
.navicom-btn-xs  { padding: 2px 8px; font-size: 11px; }

/* ---- Forms ---- */
.navicom-filters { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.navicom-form .navicom-card { margin-bottom: 16px; }
.navicom-form-actions { margin-top: 8px; }
.navicom-field { margin-bottom: 14px; }
.navicom-field label { display: block; font-weight: 500; font-size: 13px; margin-bottom: 4px; }
.navicom-field-row { display: flex; gap: 24px; flex-wrap: wrap; }
.navicom-field-sm .navicom-input { width: auto; }
.navicom-hint { margin: 4px 0 0; color: var(--nc-muted); font-size: 11px; }
.navicom-input { border: 1px solid var(--nc-border); border-radius: 4px; padding: 6px 10px; font-size: 13px; }
.navicom-input-wide { min-width: 300px; }
.navicom-input-sm { width: 100px; }
.navicom-select { border: 1px solid var(--nc-border); border-radius: 4px; padding: 6px 10px; font-size: 13px; background: var(--nc-card-bg); }
.navicom-select-sm { padding: 4px 8px; font-size: 12px; }

/* ---- Global buttons – zaokrąglone rogi ---- */
.wrap button,
.wrap .button,
.wrap input[type="submit"],
.wrap input[type="button"],
.navicom-wrap button,
.navicom-wrap .button,
.nv-op-btn,
.navicom-page-btn,
button.button,
.button.button-primary,
.button.button-small {
    border-radius: var(--nc-radius) !important;
}

/* ---- Toggle switch ---- */
.nv-toggle { position:relative; display:inline-flex; align-items:center; cursor:pointer; gap:6px; font-size:11.5px; user-select:none; }
.nv-toggle input { position:absolute; opacity:0; width:0; height:0; }
.nv-toggle-track {
    width:34px; height:18px; border-radius:9px;
    background:#cbd5e1; transition:background .2s;
    position:relative; flex-shrink:0;
}
.nv-toggle-track::after {
    content:''; position:absolute; top:2px; left:2px;
    width:14px; height:14px; border-radius:50%;
    background:#fff; transition:transform .2s; box-shadow:0 1px 2px rgba(0,0,0,.2);
}
.nv-toggle input:checked + .nv-toggle-track { background:var(--nc-danger); }
.nv-toggle input:checked + .nv-toggle-track::after { transform:translateX(16px); }
.nv-toggle-label { color:#374151; font-weight:500; }

/* ---- Modules grid ---- */
.navicom-modules-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.navicom-module-card { background: var(--nc-card-bg); border: 1px solid var(--nc-border); border-radius: var(--nc-radius); padding: 16px; box-shadow: var(--nc-shadow); }
.navicom-module-active { border-left: 4px solid var(--nc-success); }
.navicom-module-inactive { border-left: 4px solid var(--nc-border); opacity: .75; }
.navicom-module-header { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.navicom-module-header h3 { margin: 0; font-size: 15px; }
.navicom-module-version { font-size: 11px; color: var(--nc-muted); }
.navicom-module-status { font-size: 11px; margin-left: auto; }
.navicom-module-desc { font-size: 12px; color: var(--nc-muted); margin: 0 0 12px; }
.navicom-module-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.navicom-module-config { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--nc-border); }

/* ---- Pagination ---- */
.navicom-pagination { display: flex; gap: 3px; flex-wrap: nowrap; overflow-x: auto; align-items: center; margin-top: 0; padding: 10px 0; }
.navicom-pagination .pg-info { font-size: 11px; color: #8c8f94; margin-left: 8px; white-space: nowrap; flex-shrink: 0; }
.navicom-page-btn { padding: 4px 10px; border: 1px solid var(--nc-border); border-radius: 4px; font-size: 13px; text-decoration: none; color: var(--nc-text); background: var(--nc-card-bg); }
.navicom-page-btn.active { background: var(--nc-primary); color: #fff; border-color: var(--nc-primary); }
.navicom-page-btn:hover:not(.active) { background: var(--nc-bg); }

/* ---- Colors helpers ---- */
.navicom-muted   { color: var(--nc-muted); }
.navicom-danger  { color: var(--nc-danger); }
.navicom-warning { color: var(--nc-warning); }

/* ---- Widget ---- */
.navicom-widget { font-size: 13px; }
.navicom-widget-stats { background: #edf3fc; border-radius: 4px; padding: 8px 12px; margin-bottom: 12px; font-size: 13px; }
.navicom-widget-num { font-size: 20px; font-weight: 700; color: var(--nc-primary); }
.navicom-widget ul { margin: 0 0 12px; padding: 0; list-style: none; }
.navicom-widget li { padding: 6px 0; border-bottom: 1px solid var(--nc-border); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ---- Notes ---- */
.navicom-notes { background: #edf3fc; border-left: 3px solid var(--nc-primary); padding: 10px 14px; border-radius: 0 4px 4px 0; font-size: 12px; margin-top: 12px; }

/* ---- Description ---- */
.navicom-description { margin-top: 20px; }
.navicom-description h3 { font-size: 14px; margin-bottom: 8px; }
.navicom-description-text { background: #edf3fc; border-radius: 4px; padding: 12px; font-size: 12px; line-height: 1.7; max-height: 300px; overflow-y: auto; }

/* ---- MIXED kategoria badge ---- */
.navicom-cat-mixed { background: #f0e6fb; color: #9b59b6; }
.navicom-stat-mixed .navicom-stat-value { color: #9b59b6; }

/* ---- Status badges rozszerzone ---- */
.navicom-status-new      { background: #dce9f5; color: #2271b1; }
.navicom-status-analyzed { background: #d7f7e0; color: #007a1d; }
.navicom-status-closed   { background: #e8eef8; color: #50575e; }
.navicom-status-won      { background: #d7f7e0; color: #007a1d; font-weight:700; }
.navicom-status-lost     { background: #fde8e8; color: #d63638; }

/* ---- Badge info ---- */
.navicom-badge-info  { background: #e8f3fb; color: #0073aa; }

/* ---- Stat card hover ---- */
.navicom-stat-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,.1);
}

/* ---- Tabela przetargow: scraper badge ---- */
.navicom-scraper-pge { background: #dce9f5; color: #2271b1; font-size:10px; font-weight:700; padding:2px 8px; border-radius:10px; white-space:nowrap; }
.navicom-scraper-ez  { background: #d7f7e0; color: #007a1d; font-size:10px; font-weight:700; padding:2px 8px; border-radius:10px; white-space:nowrap; }

/* ---- Card header gradient (ciemny akcent) ---- */
.navicom-card-header-dark {
    background: #1e3a5f;
    color: #fff;
    border-radius: 6px 6px 0 0;
}
.navicom-card-header-dark h2 { color: #fff; margin: 0; font-size: 14px; }

/* ---- Analiza: progress bar kolorowy ---- */
.navicom-prof-fill-high   { background: #00ba37; }
.navicom-prof-fill-medium { background: #f0b429; }
.navicom-prof-fill-low    { background: #d63638; }

/* ---- Source info table ---- */
.navicom-source-table th { background: #1e3a5f; color: #fff; }

/* ---- Responsive ---- */
@media (max-width: 960px) {
    .navicom-col-4, .navicom-col-5, .navicom-col-7, .navicom-col-8 { flex: 0 0 100%; }
    .navicom-stats-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
}
@media (max-width: 640px) {
    .navicom-stats-grid { grid-template-columns: repeat(2, 1fr); }
    .navicom-filters { flex-direction: column; align-items: stretch; }
    .navicom-input, .navicom-select { width: 100%; }
}

/* ============================================================
   DARK MODE – navicom.css admin overrides
   ============================================================ */

[data-theme="dark"] {
    --nc-bg:       #b4bac1;
    --nc-card-bg:  #c0c9d2;
    --nc-border:   #8698a8;
    --nc-text:     #1c2b3a;
    --nc-muted:    #4a6278;
    --nc-shadow:   0 1px 4px rgba(0,0,0,.10);
    --nc-primary:  #1a68b0;
    --nc-sn:       #1a68b0;
    --nc-nn:       #1a7848;
    --nc-lighting: #8a5e00;
    --nc-other:    #4a6278;
    --nc-success:  #1a7848;
    --nc-warning:  #8a5e00;
    --nc-danger:   #c52828;
}

[data-theme="dark"] .navicom-card-header { background: #b5bdc7; border-bottom-color: #8698a8; }
[data-theme="dark"] .navicom-card-header h2 { color: #1c2b3a; }
[data-theme="dark"] .navicom-card-header-dark { background: #7a90a4; color: #fff; }
[data-theme="dark"] .navicom-card-header-dark h2 { color: #fff; }

[data-theme="dark"] .navicom-table th {
    background: #b8c2cc;
    color: #4a6278;
    border-bottom-color: #8698a8;
}
[data-theme="dark"] .navicom-table th,
[data-theme="dark"] .navicom-table td { border-bottom-color: #8698a8; }
[data-theme="dark"] .navicom-table-hover tbody tr:hover { background: #cad4dc; }
[data-theme="dark"] .navicom-title-link { color: #1c2b3a; }
[data-theme="dark"] .navicom-title-link:hover { color: #1a68b0; }
[data-theme="dark"] .navicom-urgent { background: #ede0b8 !important; }
[data-theme="dark"] .navicom-empty { color: #6a8090; }

[data-theme="dark"] .navicom-badge-primary  { background: #c4d4e8; color: #1a4a80; }
[data-theme="dark"] .navicom-badge-success  { background: #bfd8c8; color: #1a5a38; }
[data-theme="dark"] .navicom-badge-warning  { background: #e0d4a8; color: #6a4000; }
[data-theme="dark"] .navicom-badge-danger   { background: #e0c4c4; color: #8a1a1a; }
[data-theme="dark"] .navicom-badge-error    { background: #e0c4c4; color: #8a1a1a; }
[data-theme="dark"] .navicom-badge-info     { background: #c4d4e8; color: #1a4a80; }
[data-theme="dark"] .navicom-cat-sn         { background: #c4d4e8; color: #1a4a80; }
[data-theme="dark"] .navicom-cat-nn         { background: #bfd8c8; color: #1a5a38; }
[data-theme="dark"] .navicom-cat-lighting   { background: #e0d4a8; color: #6a4000; }
[data-theme="dark"] .navicom-cat-other      { background: #b8c8d8; color: #3a5870; }
[data-theme="dark"] .navicom-cat-mixed      { background: #d4c8e4; color: #4a1a78; }

[data-theme="dark"] .navicom-status-new      { background: #c4d4e8; color: #1a4a80; }
[data-theme="dark"] .navicom-status-active   { background: #bfd8c8; color: #1a5a38; }
[data-theme="dark"] .navicom-status-analyzed { background: #bfd8c8; color: #1a5a38; }
[data-theme="dark"] .navicom-status-closed   { background: #b8c8d8; color: #3a5870; }
[data-theme="dark"] .navicom-status-won      { background: #bfd8c8; color: #1a5a38; font-weight:700; }
[data-theme="dark"] .navicom-status-lost     { background: #e0c4c4; color: #8a1a1a; }

[data-theme="dark"] .navicom-priority-high   { background: #e0c4c4; color: #8a1a1a; }
[data-theme="dark"] .navicom-priority-medium { background: #e0d4a8; color: #6a4000; }
[data-theme="dark"] .navicom-priority-low    { background: #b8c8d8; color: #3a5870; }

[data-theme="dark"] .navicom-progress-bar { background: #96aabc; }
[data-theme="dark"] .navicom-score-circle { border-color: #96aabc; }
[data-theme="dark"] .navicom-score-val { color: #1c2b3a; }
[data-theme="dark"] .navicom-score-lbl { color: #4a6278; }

[data-theme="dark"] .navicom-page-btn { background: #c0c9d2; border-color: #8698a8; color: #1c2b3a; }
[data-theme="dark"] .navicom-page-btn:hover:not(.active) { background: #cad4dc; }
[data-theme="dark"] .navicom-page-btn.active { background: #1a68b0; border-color: #1a68b0; color: #fff; }

[data-theme="dark"] .navicom-input,
[data-theme="dark"] .navicom-select { background: #b4bac1; border-color: #8698a8; color: #1c2b3a; }

[data-theme="dark"] .navicom-source-table th { background: #7a90a4; color: #fff; }

[data-theme="dark"] .navicom-notes { background: #bec8d2; border-left-color: #1a68b0; color: #2a4055; }
[data-theme="dark"] .navicom-description-text { background: #b8c2cc; color: #2a4055; }
[data-theme="dark"] .navicom-widget-stats { background: #b8c2cc; }

[data-theme="dark"] .navicom-risk-high   { background: #e0c4c4; border-left-color: #c52828; color: #8a1a1a; }
[data-theme="dark"] .navicom-risk-medium { background: #e0d4a8; border-left-color: #8a5e00; color: #6a4000; }
[data-theme="dark"] .navicom-risk-low    { background: #b8c8d8; border-left-color: #1a68b0; color: #2a4868; }

[data-theme="dark"] .navicom-similar-list li { border-bottom-color: #8698a8; }
[data-theme="dark"] .navicom-detail-table th { color: #4a6278; border-bottom-color: #8698a8; }
[data-theme="dark"] .navicom-detail-table td { border-bottom-color: #8698a8; }

[data-theme="dark"] .navicom-module-card { background: #c0c9d2; border-color: #8698a8; }
[data-theme="dark"] .navicom-module-active { border-left-color: #1a7848; }
[data-theme="dark"] .navicom-module-header h3 { color: #1c2b3a; }
[data-theme="dark"] .navicom-module-version { color: #4a6278; }
[data-theme="dark"] .navicom-module-desc { color: #4a6278; }
[data-theme="dark"] .navicom-module-config { border-top-color: #8698a8; }

[data-theme="dark"] .navicom-scraper-pge { background: #c4d4e8; color: #1a4a80; }
[data-theme="dark"] .navicom-scraper-ez  { background: #bfd8c8; color: #1a5a38; }

[data-theme="dark"] .navicom-muted   { color: #4a6278; }
[data-theme="dark"] .navicom-danger  { color: #c52828; }
[data-theme="dark"] .navicom-warning { color: #8a5e00; }

/* ================================================================
   LLM AI Module + Chat Widget – wp-admin styles (v3.13)
   ================================================================ */
.nv-card-llm { margin-top: 20px; }

/* Chat widget – pozycja fixed */
.nv-chat-widget { position: fixed; bottom: 24px; right: 24px; z-index: 99999; font-family: Arial,'Helvetica Neue',Helvetica,sans-serif; }
.nv-chat-toggle { width: 52px; height: 52px; border-radius: 50%; background: #8e44ad; color: #fff; border: none; font-size: 22px; cursor: pointer; box-shadow: 0 2px 12px rgba(0,0,0,0.25); display: flex; align-items: center; justify-content: center; }
.nv-chat-toggle:hover { background: #6c3483; }
.nv-chat-panel { position: absolute; bottom: 60px; right: 0; width: 380px; max-height: 520px; background: #fff; border: 1px solid #d0d0d0; border-radius: 10px; box-shadow: 0 4px 20px rgba(0,0,0,0.15); display: flex; flex-direction: column; overflow: hidden; }
.nv-chat-header { background: #8e44ad; color: #fff; padding: 10px 12px; display: flex; align-items: center; gap: 8px; font-size: 13px; }
.nv-chat-header span { flex: 1; font-weight: bold; }
.nv-chat-recent-btn { background: rgba(255,255,255,0.2); border: 1px solid rgba(255,255,255,0.4); color: #fff; border-radius: 4px; padding: 2px 6px; font-size: 11px; cursor: pointer; }
.nv-chat-close { background: transparent; border: none; color: #fff; font-size: 16px; cursor: pointer; padding: 0 4px; line-height: 1; }
.nv-chat-messages { flex: 1; overflow-y: auto; padding: 10px 12px; min-height: 120px; max-height: 300px; display: flex; flex-direction: column; gap: 8px; }
.nv-chat-msg { max-width: 90%; padding: 8px 12px; border-radius: 12px; font-size: 13px; line-height: 1.4; word-wrap: break-word; }
.nv-chat-user      { background: #8e44ad; color: #fff; align-self: flex-end; border-bottom-right-radius: 3px; }
.nv-chat-assistant { background: #f0f4f8; color: #2c3e50; align-self: flex-start; border-bottom-left-radius: 3px; }
.nv-chat-recent-panel { padding: 10px; border-top: 1px solid #e0e0e0; max-height: 160px; overflow-y: auto; font-size: 12px; }
.nv-chat-input-row { display: flex; gap: 6px; padding: 8px 10px; border-top: 1px solid #e0e0e0; }
.nv-chat-input-row input { flex: 1; border: 1px solid #ccc; border-radius: 6px; padding: 6px 10px; font-size: 13px; outline: none; }
.nv-chat-input-row input:focus { border-color: #8e44ad; }
.nv-chat-input-row button { background: #8e44ad; color: #fff; border: none; border-radius: 6px; padding: 6px 14px; font-size: 13px; cursor: pointer; }
.nv-chat-input-row button:hover { background: #6c3483; }

/* Dark mode */
[data-theme="dark"] .nv-chat-panel { background: #1c2b3a; border-color: #2d4a62; }
[data-theme="dark"] .nv-chat-assistant { background: #2d4a62; color: #d8e4f0; }
[data-theme="dark"] .nv-chat-input-row { border-color: #2d4a62; }
[data-theme="dark"] .nv-chat-input-row input { background: #243a4e; border-color: #3d5a72; color: #d8e4f0; }
[data-theme="dark"] .nv-chat-recent-panel { border-color: #2d4a62; }
