/**
	* Publication Co-Pilot - Frontend Styles
	* Modern, clean, scientific UI
*/

:root {
    --pcg-primary: #C9A441;        /* gold, as in PCP (was blue #2563eb) */
    --pcg-primary-hover: #ebcf6a;
    --pcg-primary-light: #fce48b;
    --pcg-darkgold: #A87C2A;
    --pcg-success: #16a34a;
    --pcg-warning: #d97706;
    --pcg-danger: #dc2626;
    --pcg-gray-50: #f9fafb;
    --pcg-gray-100: #f3f4f6;
    --pcg-gray-200: #e5e7eb;
      --pcg-gray-300: #d1d5db;
    --pcg-gray-400: #9ca3af;
    --pcg-gray-500: #6b7280;
    --pcg-gray-600: #4b5563;
    --pcg-gray-700: #374151;
    --pcg-gray-800: #1f2937;
    --pcg-gray-900: #111827;
    --pcg-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --pcg-radius: 12px;
    --pcg-gold: #A87C2A;
    --pcg-gold-light: #C9A441;
    --pcg-gold-bg: #FBF7EE;
    --pcg-gold-border: #E2C97A;

    --pcg-font: 'Outfit', system-ui, sans-serif;   /* as PCP (landing page font) */
    --pcg-font-serif: 'Georgia', serif;            /* manuscript text areas only (set inline) */
}

/* Container */
.pcg-wrap {
    max-width: 95%;
    margin: 0 auto;
    padding: 20px;
    font-family: var(--pcg-font);
}

/* Optional: Max-Breite für sehr große Bildschirme */
@media (min-width: 1920px) {
    .pcg-wrap {
        max-width: 1800px;
	}
}

@media screen and (max-width: 768px) {
    body {
        min-width: 1200px;
        overflow-x: auto;
	}
    .pcg-wrap {
        min-width: 1200px;
	}
}

/* ==================== GLOBAL FORM TYPOGRAPHY ==================== */
/* Same as PCP: Outfit for all inputs; manuscript text areas set Georgia inline */
.pcg-wrap input[type="text"],
.pcg-wrap input[type="email"],
.pcg-wrap input[type="number"],
.pcg-wrap textarea {
    font-family: var(--pcg-font);
    font-size: 14px;
}

.pcg-wrap input[type="text"]:not(.figure-number-edit):not(.relates-to-input input),
.pcg-wrap textarea {
    line-height: 1.6;
}

/* Status Bar - Universal für alle Messages */
.pcg-status-bar {
    position: sticky;
    top: 0px; /* WordPress admin bar */
    z-index: 100;
    background: white;
    border-left: 4px solid #A87C2A;
    padding: 14px 20px;
    margin: 0 0 20px 0;
    border-radius: var(--pcg-radius);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideDown 1s ease-out;
}

body.admin-bar .pcg-status-bar {
    top: 34px;
}

.pcg-status-bar.error {
    border-left-color: #ef4444;
    background: #fef2f2;
}

.pcg-status-bar.success {
    border-left-color: #10b981;
    background: #f0fdf4;
}

.pcg-status-bar.warning {
    border-left-color: #f59e0b;
    background: #fffbeb;
}

.pcg-status-bar.info {
    border-left-color: #3b82f6;
    background: #eff6ff;
}

.pcg-status-bar .status-icon {
    font-size: 1.2em;
    min-width: 24px;
}

.pcg-status-bar .status-message {
    flex: 1;
    font-weight: 500;
    color: #111827;
}

.pcg-status-bar .status-close {
    background: none;
    border: none;
    font-size: 1.5em;
    color: #6b7280;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    line-height: 1;
    transition: color 0.2s;
}

.pcg-status-bar .status-close:hover {
    color: #111827;
}

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

/* Tab Navigation */
.pcg-tab-nav {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    padding: 8px;
    background: white;
    border-radius: var(--pcg-radius);
    box-shadow: var(--pcg-shadow);
    overflow: hidden;
    flex-wrap: nowrap;
}

.pcg-tab-btn {
    flex: 1 1 auto;
    min-width: 0;
    padding: 10px 12px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 20px;
    cursor: pointer;
    font-size: clamp(13px, 1vw, 22px);
    font-weight: 500;
    font-family: var(--pcg-font);
    color: var(--pcg-gray-600);
    transition: all 0.2s;
    white-space: nowrap;
    text-align: center;
}

.pcg-tab-btn:hover {
    background: var(--pcg-gray-100);
    color: var(--pcg-gray-900);
}

.pcg-tab-btn.active {
    background: #A87C2A;
    color: white;
    border-color: #A87C2A;
    border-radius: 20px;
}

/* Tab Content */
.pcg-tab-content {
    display: none;
}

.pcg-tab-content.active {
    display: block;
}

/* Token Bar Logo */
.pcg-token-bar-logo {
    font-family: var(--pcg-font);
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin-right: 20px;
    flex-shrink: 0;
}
.pcg-token-bar-logo .logo-pub {
    color: rgba(255, 255, 255, 0.92);
}
.pcg-token-bar-logo .logo-god {
    color: #1A1916;
}
.pcg-token-bar-logo .logo-credits {
    color: #6B4F00;
    margin-left: 2px;
}



/* OCR Modal Button Hover Effects */
.btn-manual-search:hover {
    border-color: var(--pcg-primary, #C9A441) !important;
    background: #f9fafb !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-ai-extract:hover {
    background: var(--pcg-primary, #C9A441) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(201, 164, 65, 0.3);
}

.btn-manual-search:active,
.btn-ai-extract:active {
    transform: translateY(0);
}

/* Mock Editor */
.mock-editor {

    margin: 30px auto;
    text-align: left;
}

.mock-editor label {
    display: block;
    font-weight: 500;
    color: var(--pcg-gray-700);
    margin-bottom: 8px;
    margin-top: 20px;
}

.mock-editor label:first-child {
    margin-top: 0;
}

.mock-editor input[type="text"],
.mock-editor input[type="number"],
.mock-editor select,
.mock-editor textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--pcg-gray-300);
    border-radius: 8px;
    font-size: 14px;
    font-family: var(--pcg-font);
}

.mock-editor textarea {
    resize: vertical;
    font-family: var(--pcg-font);
}

.mock-editor .action-buttons {
    margin-top: 20px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Method List */
.method-list {
    display: grid;
    gap: 16px;
}

.method-item {
    padding: 16px;
    background: white;
    border: 1px solid var(--pcg-gray-200);
    border-radius: 8px;
}

.method-item strong {
    color: var(--pcg-primary);
    display: block;
    margin-bottom: 8px;
}

.method-item p {
    margin: 0 0 8px 0;
    color: var(--pcg-gray-600);
}

.method-item .source {
    font-size: 12px;
    color: var(--pcg-gray-400);
}

.meta-summary {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
    padding: 8px;
    background: #f9fafb;
    border-radius: 6px;
}

.meta-badge {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    background: #e5e7eb;
    color: #374151;
}

.meta-badge.fulltext {
    background: #d1fae5;
    color: #065f46;
}

.meta-badge.abstract {
    background: #fef3c7;
    color: #92400e;
}

.search-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.search-bar input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid var(--pcg-gray-300);
    border-radius: 8px;
    font-size: 14px;
}

.filters {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.filters label {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--pcg-gray-600);
    font-size: 14px;
}

.pcg-toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
    margin: 0;
}

.pcg-toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.pcg-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: 0.3s;
    border-radius: 26px;
}

/* Toggle Slider Animation - CRITICAL */
.pcg-toggle-slider:before {
    position: absolute !important;
    content: "" !important;
    height: 20px !important;
    width: 20px !important;
    left: 3px !important;
    bottom: 3px !important;
    background-color: white !important;
    transition: 0.3s !important;
    border-radius: 50% !important;
}

#pcg-education-toggle:checked + .pcg-toggle-slider {
    background-color: #f59e0b !important;
}

#pcg-education-toggle:checked + .pcg-toggle-slider:before {
    transform: translateX(24px) !important;
}


.pcg-toggle-label {
    font-weight: 500;
    color: #92400e;
}

/* ==================== Project Overview Wrapper ==================== */

.two-column-wrapper {
	display: flex !important;
	gap: 20px !important;
	align-items: stretch !important;
	height: 100%;
	margin-bottom: 20px;
}

.two-column-wrapper > .pcg-project-info-box:first-child {
	flex: 0 0 calc(50% - 13.33px) !important;
}

.two-column-wrapper > .pcg-project-info-box {
	flex: 0 0 calc(25% - 10px) !important;
}

/* Onboarding: Quickstart box swaps visually to the left; widths stay 50/25/25 */
.two-column-wrapper.is-onboarding > .pcg-quickstart-box {
	order: -1;
}

.pcg-status-section {
	margin-bottom: 12px;
	padding-bottom: 12px;
	border-bottom: 1px solid #e5e7eb;
}

.pcg-status-section:last-child {
	margin-bottom: 0;
	padding-bottom: 0;
	border-bottom: none;
}

.pcg-status-label {
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: #6b7280;
	margin-bottom: 12px;
	margin-top: 12px;
	font-weight: 600;
	display: block;
}

.pcg-status-value {
	font-size: 13px;
	color: #111827;
	font-weight: 500;
	line-height: 1.4;
}

.pcg-status-provider-badge {
	display: inline-block;
	padding: 3px 8px;
	border-radius: 4px;
	font-size: 12px;
	font-weight: 600;
}

.pcg-status-provider-badge.vertex {
	background: #d1fae5;
	color: #065f46;
}

.pcg-status-provider-badge.anthropic {
	background: #fef3c7;
	color: #92400e;
}

.pcg-status-warning {
	background: #fef3c7;
	border: 1px solid #f59e0b;
	border-radius: 6px;
	padding: 8px;
	margin-top: 6px;
	font-size: 12px;
	color: #92400e;
	line-height: 1.3;
}

.pcg-status-message {
	font-size: 13px;
	line-height: 1.4;
	color: #374151;
}

.pcg-status-message.short {
	font-size: 14px;
}

.pcg-status-message.medium {
	font-size: 13px;
}

.pcg-status-message.long {
	font-size: 11px;
}

/* Provider Toggle Switch */
.pcg-provider-toggle-wrapper {
	margin-top: 10px;
}

.pcg-provider-toggle-wrapper.pcg-toggle-disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.pcg-provider-toggle {
	position: relative;
	display: inline-block;
	width: 60px;
	height: 30px;
	vertical-align: middle;
	margin-right: 10px;
}

.pcg-provider-toggle input {
	opacity: 0;
	width: 0;
	height: 0;
}

.pcg-toggle-slider {
	position: absolute;
	cursor: pointer;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: #10b981;
	transition: 0.3s;
	border-radius: 30px;
}

.pcg-toggle-slider:before {
	position: absolute;
	content: "";
	height: 22px;
	width: 22px;
	left: 4px;
	bottom: 4px;
	background-color: white;
	transition: 0.3s;
	border-radius: 50%;
	box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.pcg-provider-toggle input:checked + .pcg-toggle-slider {
	background-color: #f59e0b;
}

.pcg-provider-toggle input:checked + .pcg-toggle-slider:before {
	transform: translateX(30px);
}

.pcg-provider-toggle input:disabled + .pcg-toggle-slider {
	cursor: not-allowed;
	opacity: 0.5;
}

.pcg-toggle-labels {
	display: inline-block;
	vertical-align: middle;
}

.pcg-toggle-label {
	display: block;
	font-size: 12px;
	color: #9ca3af;
	line-height: 1.4;
	transition: color 0.2s, font-weight 0.2s;
}

.pcg-toggle-label.active {
	color: #111827;
	font-weight: 600;
}

.pcg-toggle-eu {
	margin-bottom: 2px;
}

/* Vertikaler Container für Education Mode + Writing Race */
.pcg-vertical-boxes-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;
    font-size: 16px;
    flex: 0 0 calc(25% - 10px);  /* 25% Breite wie die erste Box */
}

/* Boxen innerhalb des vertikalen Wrappers nehmen volle Breite */
.pcg-vertical-boxes-wrapper > .pcg-project-info-box {
    flex: 1 1 0;
    width: 100%;
    padding: 20px;
    flex-direction: column;
}

/* ==================== EDUCATION MODE ==================== */

/* Education Section */
.pcg-education-section {
    margin-top: 30px;
    background: #fef3c7;
    border: 2px solid #f59e0b;
    border-radius: 12px;
    padding: 20px;
}

.pcg-education-section h3 {
    margin-top: 0;
    color: #92400e;
}

/* Toggle Switch */
.pcg-education-toggle-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 15px 0;
}

.pcg-toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
    margin: 0;
}

.pcg-toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.pcg-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: 0.3s;
    border-radius: 26px;
}

.pcg-toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

input:checked + .pcg-toggle-slider {
    background-color: #f59e0b;
}

input:checked + .pcg-toggle-slider:before {
    transform: translateX(24px);
}

.pcg-toggle-label {
    font-weight: 500;
    color: #92400e;
}

/* Education Modal */
.pcg-education-modal-content {
    max-width: min(1200px, 70vw) !important;
    width: 70vw !important;
    max-height: 85vh;
    overflow-y: auto;
}

.pcg-education-modal-content .pcg-modal-header h2 {
    color: #f59e0b;
    margin: 0;
}

.pcg-education-modal-content .pcg-modal-body {
    padding: 20px;
    line-height: 1.6;
}

.pcg-education-modal-content .pcg-modal-body h3 {
    color: #f59e0b;
    margin-top: 0;
    margin-bottom: 15px;
}

.pcg-education-modal-content .pcg-modal-body p {
    margin-bottom: 12px;
}

.pcg-education-modal-content .pcg-modal-body ul,
.pcg-education-modal-content .pcg-modal-body ol {
    margin-left: 20px;
    margin-bottom: 15px;
    font-size: 14px !important;
}

.pcg-education-modal-content .pcg-modal-body li {
    margin-bottom: 8px;
}

.pcg-education-modal-content .pcg-modal-body strong {
    color: #92400e;
}

.pcg-education-modal-content .pcg-modal-body em {
    font-style: italic;
    color: #6b7280;
}

.pcg-education-modal-content .pcg-modal-footer {
    padding: 15px 20px;
    text-align: right;
    border-top: 1px solid #e5e7eb;
}

/* Education modal explainer video — round "professor bubble" */
.pcg-edu-video {
    position: relative;
    width: 180px;
    height: 180px;
    margin: 0 auto 20px;
    border-radius: 50%;
    overflow: hidden;                  /* clips the VIDEO into the circle... */
    cursor: pointer;
    background: #000;
    border: 3px solid #fff;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}

.pcg-edu-video video {
    width: 100%;
    height: 100%;
    object-fit: cover;                 /* fills the circle, no stretch */
    display: block;
}

.pcg-edu-video-play {                  /* ...but the button is a sibling, so it stays fully visible */
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 54px;
    height: 54px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.pcg-edu-video-play::before {          /* the ▶ triangle */
    content: "";
    display: block;
    margin-left: 4px;
    border-style: solid;
    border-width: 11px 0 11px 18px;
    border-color: transparent transparent transparent #fff;
}

.pcg-edu-video.is-playing .pcg-edu-video-play {
    opacity: 0;
    pointer-events: none;              /* hide the button while playing; click video to pause */
}

/* ==================== LITERATURE TAB ==================== */

.meta-badge.pubmed-link {
    background: var(--pcg-primary, #C9A441);
    color: white;
    text-decoration: none;
    transition: background 0.2s;
}

.meta-badge.pubmed-link:hover {
    background: var(--pcg-primary-hover, #ebcf6a);
    text-decoration: none;
}

.literature-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 20px 0;
}

.literature-item {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    background: white;
    transition: all 0.3s ease;
}

.literature-item.unconfirmed {
    border-left: 4px solid #f59e0b;
    background: #fffbeb;
}

.literature-item.confirmed {
    border-left: 4px solid #10b981;
    background: #f0fdf4;
}

.literature-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.lit-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.lit-header h4 {
    flex: 1;
    margin: 0;
    font-size: 16px;
    color: #1f2937;
}

.lit-save-status {
    display: inline-block;
    margin-left: 10px;
    font-size: 12px;
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.3s ease;
    vertical-align: middle;
}
.lit-save-status.is-pending { color: var(--pcg-gray-400, #9ca3af); }
.lit-save-status.is-saved   { color: #059669; }
.lit-save-status.is-error   { color: #dc2626; }

.status-badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.status-badge.confirmed {
    background: #10b981;
    color: white;
}

.status-badge:not(.confirmed) {
    background: #f59e0b;
    color: white;
}

.badge {
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
    background: #e5e7eb;
    color: #6b7280;
    white-space: nowrap;
}

.lit-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.lit-metadata {
    padding: 12px;
    background: #f9fafb;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.6;
}

.lit-metadata strong {
    color: #374151;
    font-weight: 600;
}

.lit-annotations {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 16px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.lit-annotations label {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

.lit-annotations input[type="range"] {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #e5e7eb;
    outline: none;
    -webkit-appearance: none;
}

.lit-annotations input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--pcg-primary, #C9A441);
    cursor: pointer;
    transition: all 0.2s ease;
}

.lit-annotations input[type="range"]::-webkit-slider-thumb:hover {
    background: #5568d3;
    transform: scale(1.1);
}

.lit-annotations input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--pcg-primary, #C9A441);
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

.lit-annotations .score-value {
    display: inline-block;
    min-width: 30px;
    padding: 2px 8px;
    background: var(--pcg-primary, #C9A441);
    color: white;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
}

.lit-annotations .checkboxes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.lit-annotations .checkboxes label {
    flex-direction: row;
    align-items: center;
    gap: 8px;
    font-weight: normal;
    cursor: pointer;
}

.lit-annotations .checkboxes input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.lit-annotations textarea {
    width: 100%;
    min-height: 80px;
    padding: 10px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-family: var(--pcg-font);
    font-size: 14px;
    resize: vertical;
}

.lit-annotations textarea:focus {
    outline: none;
    border-color: var(--pcg-primary, #C9A441);
    box-shadow: 0 0 0 3px rgba(201, 164, 65, 0.1);
}

.lit-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.lit-actions .btn-primary {
    flex: 1;
}

.lit-actions .btn-delete {
    background: #ef4444;
    color: white;
}

.lit-actions .btn-delete:hover {
    background: #dc2626;
}

.tab-status {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #f9fafb;
    border-radius: 8px;
    margin-bottom: 16px;
}

.tab-status #confirmed-count {
    font-size: 24px;
    font-weight: 700;
    color: var(--pcg-primary, #C9A441);
}

.tab-status .help-text {
    font-size: 13px;
    color: #6b7280;
    margin: 0;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #9ca3af;
    font-size: 15px;
}

/* ==================== PUBMED SEARCH MODAL ==================== */

.modal-large {
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 600;
    font-size: 14px;
    color: #374151;
}

.form-group input[type="text"],
.form-group select {
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.form-group input[type="text"]:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--pcg-primary, #C9A441);
    box-shadow: 0 0 0 3px rgba(201, 164, 65, 0.1);
}

.form-group .help-text {
    font-size: 12px;
    color: #6b7280;
    margin: 0;
}

.token-cost {
    display: inline-block;
    padding: 2px 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    font-size: 11px;
    margin-left: 8px;
}

.progress-message {
    padding: 16px;
    background: var(--pcg-gold-bg, #FBF7EE);
    border: 1px solid var(--pcg-gold-border, #E2C97A);
    border-radius: 8px;
    color: var(--pcg-darkgold, #A87C2A);
    text-align: center;
    font-weight: 500;
    margin: 16px 0;
}

/* ==================== PUBMED RESULTS ==================== */

#pubmed-results {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 2px solid #e5e7eb;
}

#pubmed-results h4 {
    margin-bottom: 16px;
    color: #1f2937;
}

.action-buttons-inline {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.btn-small {
    padding: 6px 12px;
    font-size: 13px;
    border: 1px solid #d1d5db;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-small:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.btn-get-tokens {
    background: rgba(255, 255, 255, 0.20);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.45);
    font-family: var(--pcg-font);
    font-weight: 500;
    border-radius: 8px;
}
.btn-get-tokens:hover {
    background: rgba(255, 255, 255, 0.35);
    color: white;
    text-decoration: none;
}

/* Author Action Buttons - Override for white background */
.pcg-author-actions .btn-small {
    background: #f8f9fa;
    color: #495057;
    border: 1px solid #dee2e6;
}

.pcg-author-actions .btn-small:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.pcg-author-actions .btn-confirm-author {
    background: #FBF7EE;
    color: #A87C2A;
    border-color: #E2C97A;
}

.pcg-author-actions .btn-confirm-author:hover {
    background: #0056b3;
    border-color: #0056b3;
}

.pcg-author-actions .btn-confirm-author.confirmed,
.pcg-author-item.confirmed .btn-confirm-author {
    background: #28a745;
    border-color: #28a745;
}

.pcg-author-actions .btn-delete-author {
    background: #dc3545;
    color: white;
    border-color: #dc3545;
}

.pcg-author-actions .btn-delete-author:hover {
    background: #c82333;
    border-color: #c82333;
}

/* Affiliation Multi-Field Buttons */
.btn-add-affiliation,
.btn-remove-affiliation {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 10px;
    font-size: 13px;
    line-height: 1.4;
    border: 1px solid #d1d5db;
    background: #f8f9fa;
    color: #374151;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 28px;
}

.btn-add-affiliation:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.btn-remove-affiliation:hover:not(:disabled) {
    background: #fee2e2;
    border-color: #fca5a5;
    color: #dc2626;
}

.btn-remove-affiliation:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Figure Move Buttons */
.btn-move-figure {
    background: #495057;
    color: white;
    border: 1px solid #343a40;
    font-size: 13px;
    padding: 2px 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    line-height: 1.4;
}

.btn-move-figure:hover:not(:disabled) {
    background: #343a40;
    border-color: #212529;
}

.btn-move-figure:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.results-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 400px;
    overflow-y: auto;
    padding: 12px;
    background: #f9fafb;
    border-radius: 8px;
    margin-bottom: 16px;
}

.pubmed-result-item {
    padding: 12px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.pubmed-result-item:hover {
    border-color: var(--pcg-primary, #C9A441);
    box-shadow: 0 2px 8px rgba(201, 164, 65, 0.1);
}

.pubmed-result-item label {
    display: flex;
    gap: 12px;
    cursor: pointer;
    align-items: start;
}

.pubmed-result-item input[type="checkbox"] {
    margin-top: 4px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.paper-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.paper-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.paper-header strong {
    color: #1f2937;
}

.paper-title {
    font-size: 14px;
    color: #4b5563;
    line-height: 1.5;
}

.paper-meta {
    font-size: 12px;
    color: #6b7280;
}

/* ==================== ANIMATIONS ==================== */

.btn-pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(201, 164, 65, 0.7);
	}
    50% {
        box-shadow: 0 0 0 10px rgba(201, 164, 65, 0);
	}
}

.token-display.pulse {
    animation: token-pulse 0.6s ease;
}

@keyframes token-pulse {
    0%, 100% {
        transform: scale(1);
	}
    50% {
        transform: scale(1.05);
	}
}

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

@media (max-width: 768px) {
    .lit-header {
        flex-direction: column;
        align-items: flex-start;
	}
    
    .lit-annotations .checkboxes {
        grid-template-columns: 1fr;
	}
    
    .lit-actions {
        flex-direction: column;
	}
    
    .modal-large {
        max-width: 95vw;
	}
    
    .form-row {
        grid-template-columns: 1fr;
	}
}
/* Literature Results */
.literature-results {
    display: grid;
    gap: 16px;
}

.lit-item {
    padding: 16px;
    background: white;
    border: 1px solid var(--pcg-gray-200);
    border-radius: 8px;
}

.lit-item h5 {
    margin: 0 0 8px 0;
    color: var(--pcg-gray-900);
    font-size: 16px;
}

.lit-item .authors {
    margin: 4px 0;
    color: var(--pcg-gray-600);
    font-size: 14px;
}

.lit-item .journal {
    margin: 4px 0 12px 0;
    color: var(--pcg-gray-500);
    font-size: 13px;
    font-style: italic;
}

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

.lit-actions .btn-small {
    padding: 6px 12px;
    font-size: 13px;
    border-radius: 6px;
    background: white;
    color: var(--pcg-gray-700);
    text-decoration: none;
    border: 1px solid var(--pcg-gray-300);
    cursor: pointer;
    transition: all 0.2s;
}

.lit-actions .btn-small:hover {
    background: var(--pcg-gray-50);
}

/* Author Item Styles */
.pcg-author-item {
    border: 1px solid #ddd;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 4px;
    background: #fff;
}

.pcg-author-item.confirmed {
    border-color: #28a745;
    background: #f0fff4;
}

.pcg-author-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.pcg-author-number {
    font-weight: bold;
    color: #666;
}

.pcg-author-actions {
    display: flex;
    gap: 10px;
}

/* Author Collapsible Header */
.author-collapse-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--pcg-gray-50);
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
    user-select: none;
}

.author-collapse-header:hover {
    background: var(--pcg-gray-100);
}

.author-collapse-header.expanded {
    background: var(--pcg-primary-light);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.author-title-display {
    flex: 1;
    font-weight: 600;
    color: var(--pcg-gray-800);
    font-size: 15px;
}

.author-header-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.author-collapse-content {
    padding: 16px 0 0 0;
}

/* Confirmed state visible on collapsed header */
.pcg-author-item.confirmed .author-collapse-header {
    background: #f0fff4;
    border-left: 3px solid #28a745;
}

.pcg-author-item.confirmed .author-collapse-header:hover {
    background: #dcfce7;
}

.pcg-author-item.confirmed .author-collapse-header.expanded {
    background: #dcfce7;
}

/* Word Count Display */
.word-count-display {
    margin-top: 5px;
    font-size: 14px;
    color: #666;
}

.status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 12px;
    margin-left: 10px;
}

.status-badge.ok {
    background: #d4edda;
    color: #155724;
}

.status-badge.warning {
    background: #fff3cd;
    color: #856404;
}

.status-badge.error {
    background: #f8d7da;
    color: #721c24;
}

/* Manuscript Preview */
.manuscript-preview {
    background: #f8f9fa;
    padding: 20px;
    padding-bottom: 20px; /* Extra Platz unten */
    overflow: visible;
    border-radius: 4px;
}

.preview-item {
    padding: 10px;
    margin-bottom: 10px;
    background: #fff;
    border-left: 4px solid var(--pcg-primary, #C9A441);
}

.preview-item:last-child {
    margin-bottom: 20px;
    padding-bottom: 10px;
}

.preview-item.ok {
    border-left-color: #28a745;
}

.preview-item.warning {
    border-left-color: #ffc107;
}

.preview-item.error {
    border-left-color: #dc3545;
}


/* CRediT Roles */
.credit-roles-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 10px;
}

.credit-role-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Danger Zone */
.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

/* Token Balance Bar (Sticky) */
.pcg-token-bar {
    position: sticky;
    top: 0; /* sticky below viewport top */
    z-index: 100;
    background: linear-gradient(315deg, #e8c645 0%, #c9a227 100%);
    color: white;
    padding: 14px 20px;
    border-radius: var(--pcg-radius);
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--pcg-shadow);
}

body.admin-bar .pcg-token-bar {
    top: 32px;
}

.pcg-token-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.pcg-balance.shared-project {
    color: #2563eb; /* Blau für Shared */
}

.pcg-balance.shared-project::before {
    content: "👥 ";
    opacity: 0.7;
}

/* ALT: */
.pcg-progress-bar {
    width: 50%;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    overflow: hidden;
    margin-left: auto;
}

.pcg-progress-fill {
    height: 100%;
    transition: width 0.5s ease, background-color 0.5s ease;
    border-radius: 2px;
}

/* NEU: */
.pcg-progress-bar-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 50%;
    margin-left: auto;
}

.pcg-progress-bar {
    flex: 1;
    height: 16px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

.pcg-progress-fill {
    height: 100%;
    transition: width 0.5s ease, background-color 0.5s ease;
    border-radius: 8px;
}

.pcg-progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 10px;
    font-weight: 600;
    color: rgba(255,255,255,0.95);
    white-space: nowrap;
    pointer-events: none;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.pcg-export-star {
    color: #C9A441;
    font-size: 18px;
    font-weight: 700;
    animation: star-pulse 1.5s ease-in-out infinite;
    flex-shrink: 0;
}

.pcg-progress-fill.orange {
    background: #ff9800;
}

.pcg-progress-fill.yellow {
    background: #ffc107;
}

.pcg-progress-fill.green {
    background: #4caf50;
}

.token-display {
    font-size: 18px;
}

.token-display strong {
    font-size: 24px;
    margin: 0 4px;
}

/* Space between the balance and the Get Credits button */
.pcg-token-bar .token-actions {
    margin-left: 24px;
}

.token-display.pulse {
    animation: pulse 0.6s ease;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Main Panel */
.pcg-panel {
    background: white;
    border: 1px solid var(--pcg-gray-200);
    border-radius: var(--pcg-radius);
    box-shadow: var(--pcg-shadow);
    padding: 24px;
}

.panel-header {
    margin-bottom: 20px;
}

.panel-header h2 {
    margin: 0 0 8px 0;
    color: var(--pcg-gray-900);
}

.help-text {
    color: var(--pcg-gray-500);
    margin: 0;
}

/* Action Bar */
.action-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 16px;
    background: var(--pcg-gray-50);
    border-radius: 10px;
}

.action-buttons {
    display: flex;
    gap: 10px;
}

/* Buttons */
.btn {
    padding: 10px 16px;
    border: 1px solid var(--pcg-gray-300);
    background: white;
    color: var(--pcg-gray-700);
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.btn:hover {
    background: var(--pcg-gray-50);
    border-color: var(--pcg-gray-400);
}

.btn.primary {
    background: var(--pcg-primary);
    color: white;
    border-color: var(--pcg-primary);
}

.btn.primary:hover {
    background: var(--pcg-primary-hover);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Figures List */
.figures-list {
    display: grid;
    gap: 20px;
}

.pcg-figure-item {
    border: 1px solid var(--pcg-gray-200);
    border-radius: 12px;
    padding: 16px;
    background: white;
    transition: all 0.2s;
}

.pcg-figure-item:hover {
    box-shadow: var(--pcg-shadow);
}

/* Collapsible Figure Header */
.figure-collapse-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--pcg-gray-50);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 0;
}

.figure-collapse-header:hover {
    background: var(--pcg-gray-100);
}

.figure-collapse-header.expanded {
    background: var(--pcg-primary-light);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.collapse-arrow {
    width: 0;
    height: 0;
    border-left: 10px solid var(--pcg-primary);
    border-top: 7px solid transparent;
    border-bottom: 7px solid transparent;
    transition: transform 0.2s;
    margin-right: 8px;
    display: inline-block;
}

.figure-collapse-header.expanded .collapse-arrow {
    transform: rotate(90deg);
    border-left-color: var(--pcg-primary-hover);
}

.figure-title-display {
    font-weight: 600;
    color: var(--pcg-gray-900);
    flex: 1;
}

.confirmed-badge {
    background: var(--pcg-success);
    color: white;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 8px;
}

/* Collapsible Content */
.figure-collapse-content {
    padding: 16px;
    border-top: 1px solid var(--pcg-gray-200);
}

/* Figure Header */
.figure-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--pcg-gray-200);
}

.figure-number-display {
    display: flex;
    align-items: center;
    gap: 10px;
}

.type-label {
    font-weight: 600;
    color: var(--pcg-gray-700);
}

.figure-number-edit {
    width: 60px;
    padding: 4px 8px;
    border: 1px solid var(--pcg-gray-300);
    border-radius: 6px;
    text-align: center;
    font-weight: 600;
}

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

.btn-delete {
    padding: 6px 12px;
    background: var(--pcg-danger);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
}

.btn-delete:hover {
    background: #b91c1c;
}

.relates-to-input {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.relates-to-input input {
    width: 150px;
    padding: 4px 8px;
    border: 1px solid var(--pcg-gray-300);
    border-radius: 6px;
    font-size: 13px;
}

.relates-to-input .help-icon {
    color: var(--pcg-gray-400);
    cursor: help;
}

/* Figure Preview */
.figure-preview {
    margin: 16px 0;
    text-align: center;
}

.pcg-figure-thumb {
    max-width: 200px;
    max-height: 200px;
    object-fit: contain;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.pcg-figure-thumb:hover {
    transform: scale(1.05);
}

/* Figure Fields */
.figure-fields {
    display: grid;
    gap: 16px;
}

.figure-fields label {
    display: block;
    font-weight: 500;
    color: var(--pcg-gray-700);
    margin-bottom: 6px;
    font-size: 14px;
}

.figure-fields input[type="text"],
.figure-fields textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--pcg-gray-300);
    border-radius: 8px;
    font-size: 14px;
    font-family: var(--pcg-font);
}

.figure-fields textarea {
    resize: vertical;
}

.figure-fields input:focus,
.figure-fields textarea:focus {
    outline: none;
    border-color: var(--pcg-primary);
    box-shadow: 0 0 0 3px var(--pcg-primary-light);
}

/* Yellow highlight for missing info (?) */
.figure-fields textarea {
    line-height: 1.6;
}

/* Confirmed Button State */
.btn.confirmed {
    background: var(--pcg-success);
    border-color: var(--pcg-success);
}

.btn.confirmed:hover {
    background: #15803d;
}

/* Style the highlighted ? spans from AI response */
.pcg-figure-item textarea::after {
    content: '';
}

/* AI Controls */
.ai-controls {
    margin: 16px 0;
}

.btn-ai {
    width: 100%;
    padding: 12px;
    background: var(--pcg-primary, #C9A441);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.btn-ai:hover {
    transform: translateY(-2px);
    background: var(--pcg-primary, #C9A441);
}

.cost-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 12px;
}

.ai-badge {
    background: var(--pcg-primary-light);
    color: var(--pcg-primary);
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 8px;
}

.ai-error {
    margin-top: 10px;
    padding: 12px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    color: var(--pcg-danger);
    font-size: 14px;
}

.btn-retry {
    margin-left: 10px;
    padding: 6px 12px;
    background: var(--pcg-danger);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

/* Confirm Label */
.confirm-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    color: var(--pcg-gray-700);
    cursor: pointer;
}

.confirm-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Lightbox */
.pcg-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    cursor: pointer;
}

.pcg-lightbox img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 8px;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
}

/* Toast Notifications */
.pcg-toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--pcg-gray-900);
    color: white;
    padding: 14px 20px;
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s;
    z-index: 1000;
}

.pcg-toast.show {
    opacity: 1;
    transform: translateY(0);
}

.pcg-toast-success {
    background: var(--pcg-success);
}

.pcg-toast-error {
    background: var(--pcg-danger);
}

/* Loading Overlay */
.pcg-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9998;
}

.loading-content {
    text-align: center;
    color: white;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Upload Modal */

.pcg-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6); /* Nur EIN dunkler Hintergrund */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9997;
}

.modal-content {
    background: white;
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--pcg-gray-200);
}

.modal-header h2 {
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--pcg-gray-400);
    line-height: 1;
}

.modal-close:hover {
    color: var(--pcg-gray-700);
}

.modal-body {
    padding: 24px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--pcg-gray-700);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--pcg-gray-300);
    border-radius: 8px;
    font-size: 14px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 24px;
    border-top: 1px solid var(--pcg-gray-200);
    background: var(--pcg-gray-50);
}

.btn-cancel {
    padding: 10px 16px;
    background: white;
    border: 1px solid var(--pcg-gray-300);
    border-radius: 8px;
    cursor: pointer;
}

.btn-upload {
    padding: 10px 16px;
    background: var(--pcg-primary);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

/* Literature Warning Modal Specific Styles */

.pcg-modal-content {
    position: relative;
    background: white;
    border-radius: 12px;
    max-width: 540px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    z-index: 10; /* GEÄNDERT: höher als overlay */
    animation: modalSlideIn 0.2s ease-out;
}


.pcg-modal-header {
    padding: 24px 24px 16px;
    border-bottom: 1px solid #e5e7eb;
}

.pcg-modal-header h3 {
    margin: 0;
    font-size: 20px;
    color: #111827;
}

.pcg-modal-body {
    padding: 24px;
}

.pcg-modal-body p {
    margin: 0 0 12px;
    line-height: 1.6;
    color: #374151;
}

.pcg-modal-option {
    transition: transform 0.2s;
}

.pcg-modal-option:hover {
    transform: translateY(-2px);
}

.pcg-modal-option button {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.2s;
}

.pcg-modal-option button:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Empty State */

.pcg-empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.pcg-empty-state h3 {
    margin: 0 0 8px 0;
    color: var(--pcg-gray-700);
}

/* Help Section */
.pcg-help-section {
    margin-top: 24px;
}

.pcg-help-section details {
    background: var(--pcg-gray-50);
    border: 1px solid var(--pcg-gray-200);
    border-radius: 10px;
    padding: 16px;
}

.pcg-help-section summary {
    font-weight: 600;
    cursor: pointer;
    color: var(--pcg-gray-700);
}

.help-content {
    margin-top: 16px;
}

.help-content h4 {
    margin: 20px 0 10px 0;
    color: var(--pcg-gray-700);
}

.help-content ul,
.help-content ol {
    margin: 10px 0;
    padding-left: 24px;
}

.help-content li {
    margin: 6px 0;
    color: var(--pcg-gray-600);
}

/* Messages */
.pcg-message {
    padding: 16px;
    border-radius: 10px;
    margin: 20px 0;
}

.pcg-info {
    background: var(--pcg-primary-light);
    border: 1px solid var(--pcg-primary);
    color: var(--pcg-primary);
}

.pcg-warning {
    background: #fef3c7;
    border: 1px solid var(--pcg-warning);
    color: var(--pcg-warning);
}

/* ==================== LITERATURE STYLES ==================== */

.literature-container {
    display: grid;
    gap: 20px;
    margin-bottom: 30px;
}

@media (min-width: 1024px) {
    .literature-container {
        grid-template-columns: 1fr 1fr;
	}
}

.literature-section {
    background: var(--pcg-gray-50);
    border: 1px solid var(--pcg-gray-200);
    border-radius: 10px;
    padding: 20px;
}

.literature-section h3 {
    margin: 0 0 16px 0;
    color: var(--pcg-gray-900);
}

.upload-dropzone {
    border: 2px dashed var(--pcg-gray-300);
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    color: var(--pcg-gray-500);
    cursor: pointer;
    transition: all 0.2s;
}

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

.search-input {
    display: grid;
    gap: 10px;
}

.search-input textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--pcg-gray-300);
    border-radius: 8px;
    font-family: var(--pcg-font);
    font-size: 14px;
    resize: vertical;
}

/* Literature Item (similar to Figure) */
.lit-item {
    border: 1px solid var(--pcg-gray-200);
    border-radius: 12px;
    padding: 16px;
    background: white;
    transition: all 0.2s;
    margin-bottom: 16px;
}

.lit-item:hover {
    box-shadow: var(--pcg-shadow);
}

.lit-collapse-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--pcg-gray-50);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.lit-collapse-header:hover {
    background: var(--pcg-gray-100);
}

.lit-collapse-header.expanded {
    background: var(--pcg-primary-light);
}

.lit-title-display {
    font-weight: 600;
    color: var(--pcg-gray-900);
    flex: 1;
}

/* Delete icon in the source headline (ported from PCP) */
.btn-lit-delete-icon {
    flex: 0 0 auto;
    background: transparent;
    border: none;
    color: var(--pcg-gray-400, #9ca3af);
    font-size: 16px;
    line-height: 1;
    padding: 4px 6px;
    border-radius: 6px;
    cursor: pointer;
    opacity: 0.55;
    transition: all 0.15s;
}
.btn-lit-delete-icon:hover {
    opacity: 1;
    color: #dc2626;
    background: #fef2f2;
}

.lit-collapse-content {
    padding: 16px;
    border-top: 1px solid var(--pcg-gray-200);
}

/* Literature Metadata */
.lit-metadata {
    display: grid;
    gap: 16px;
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    gap: 16px;
    grid-template-columns: 1fr 1fr;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
	}
}

.form-group {
    display: grid;
    gap: 6px;
}

.form-group label {
    font-weight: 500;
    color: var(--pcg-gray-700);
    font-size: 14px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--pcg-gray-300);
    border-radius: 6px;
    font-size: 14px;
}

.form-group textarea {
    resize: vertical;
}

.ai-reason-box {
    background: var(--pcg-primary-light);
    border: 1px solid var(--pcg-primary);
    border-radius: 8px;
    padding: 12px;
    color: var(--pcg-primary);
    font-size: 14px;
}

.fulltext-badge,
.abstract-only-badge {
    font-size: 13px;
    font-weight: 500;
    margin: 8px 0;
}

.fulltext-badge {
    color: var(--pcg-success);
}

.abstract-only-badge {
    color: var(--pcg-gray-500);
}

/* Literature Annotations */
.lit-annotations {
    background: var(--pcg-gray-50);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
}

.lit-annotations h4 {
    margin: 0 0 16px 0;
    color: var(--pcg-gray-700);
    font-size: 16px;
}

.slider-group {
    margin-bottom: 16px;
}

.slider-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--pcg-gray-700);
    font-weight: 500;
    font-size: 14px;
}

.slider-value {
    color: var(--pcg-primary);
}

.slider-group input[type="range"] {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: var(--pcg-gray-200);
    outline: none;
    -webkit-appearance: none;
}

.slider-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--pcg-primary);
    cursor: pointer;
}

.slider-group input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--pcg-primary);
    cursor: pointer;
    border: none;
}

.checkboxes {
    display: grid;
    gap: 10px;
}

.checkboxes label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--pcg-gray-700);
    cursor: pointer;
}

.checkboxes input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}



/* Literature Actions */
.lit-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid var(--pcg-gray-200);
}

/* Search Results Modal */
.search-result-item {
    border: 1px solid var(--pcg-gray-200);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    transition: all 0.2s;
}

.search-result-item:hover {
    background: var(--pcg-gray-50);
}

.search-result-checkbox {
    display: flex;
    gap: 12px;
    cursor: pointer;
}

.search-result-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    flex-shrink: 0;
    margin-top: 4px;
}

.paper-info h4 {
    margin: 0 0 8px 0;
    color: var(--pcg-gray-900);
    font-size: 15px;
}

.paper-info .authors {
    margin: 4px 0;
    color: var(--pcg-gray-600);
    font-size: 14px;
}

.paper-info .journal {
    margin: 4px 0;
    color: var(--pcg-gray-500);
    font-size: 13px;
    font-style: italic;
}

.paper-info .pmid {
    margin: 4px 0;
    color: var(--pcg-gray-400);
    font-size: 12px;
}

.paper-info .ai-reason {
    margin: 8px 0 0 0;
    padding: 8px;
    background: var(--pcg-primary-light);
    border-radius: 6px;
    color: var(--pcg-primary);
    font-size: 13px;
}

.badge-fulltext,
.badge-abstract,
.badge-review {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    margin-top: 8px;
}

.badge-fulltext {
    background: #d1fae5;
    color: var(--pcg-success);
}

.badge-abstract {
    background: var(--pcg-gray-100);
    color: var(--pcg-gray-600);
}

.badge-review {
    background: #ede9fe;
    color: #7c3aed;
    margin-left: 6px;
}

/* All Sources Section */
.all-sources {
    margin-top: 30px;
}

.all-sources h3 {
    margin: 0 0 16px 0;
    color: var(--pcg-gray-900);
}

.source-filters {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    padding: 16px;
    background: var(--pcg-gray-50);
    border-radius: 8px;
    flex-wrap: wrap;
}

.source-filters label {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--pcg-gray-700);
    font-size: 14px;
    cursor: pointer;
}

.figure-fields textarea[data-legend] {
    /* Enable HTML rendering for yellow ? boxes */
    white-space: pre-wrap;
}

mark.pcg-missing-info,
span[style*="background-color: #ffeb3b"],
span[style*="background-color:#ffeb3b"] {
    background-color: #ffeb3b !important;
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: 600;
    color: #000;
}

/* Next Section */
.pcg-next-section {
    padding: 20px;
    background: var(--pcg-gray-50);
    border-radius: 10px;
    border: 2px dashed var(--pcg-gray-300);
}

.pcg-next-section .btn {
    font-size: 16px;
    padding: 12px 24px;
}



/* ==================== METHODS TAB ==================== */

.methods-extract-section,
.methods-list-section,
.methods-generate-section,
.methods-output-section {
    padding: 20px;
    background: var(--pcg-gray-50);
    border-radius: 10px;
    border: 1px solid var(--pcg-gray-200);
}

.section-help {
    font-size: 14px;
    color: var(--pcg-gray-600);
    margin: 0 0 16px 0;
    line-height: 1.5;
}

/* Methods Table */
.methods-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.methods-table thead tr {
    background: var(--pcg-gray-50);
    border-bottom: 2px solid var(--pcg-gray-200);
}

.methods-table th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    color: var(--pcg-gray-700);
    white-space: nowrap;
}

.methods-table tbody tr {
    border-bottom: 1px solid var(--pcg-gray-200);
    transition: background 0.2s;
}

.methods-table tbody tr:hover {
    background: var(--pcg-gray-50);
}

.methods-table tbody tr:last-child {
    border-bottom: none;
}

.methods-table td {
    padding: 12px;
    vertical-align: top;
}

.methods-table select,
.methods-table textarea {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid var(--pcg-gray-300);
    border-radius: 6px;
    font-size: 14px;
    font-family: var(--pcg-font);
    transition: all 0.2s;
}

.methods-table select {
    cursor: pointer;
    background: white;
}

.methods-table select:focus,
.methods-table textarea:focus {
    outline: none;
    border-color: var(--pcg-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.methods-table textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.4;
}

.methods-table .btn-delete {
    padding: 6px 12px;
    font-size: 13px;
    background: var(--pcg-danger);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.methods-table .btn-delete:hover {
    background: #b91c1c;
    transform: translateY(-1px);
}

/* Methods Empty State */
#methods-empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--pcg-gray-500);
    background: var(--pcg-gray-50);
    border: 2px dashed var(--pcg-gray-300);
    border-radius: 10px;
    margin-top: 20px;
}

#methods-empty-state p {
    margin: 0;
    font-size: 15px;
}

/* Extract Result Box */
#extract-result {
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.5;
}

/* Methods Output Section */
#methods-output-section {
    background: white;
    padding: 24px;
    border-radius: 10px;
    border: 1px solid var(--pcg-gray-200);
}

#methods-text {
    width: 100%;
    font-size: 15px;
    line-height: 1.8;
    border: 2px solid var(--pcg-gray-200);
    border-radius: 8px;
    padding: 16px;
    font-family: var(--pcg-font);
    resize: vertical;
    min-height: 400px;
    transition: border-color 0.2s;
}

#methods-text:focus {
    outline: none;
    border-color: var(--pcg-primary);
}

#methods-word-count {
    font-weight: 600;
    color: var(--pcg-primary);
}

/* Add Method Modal Specific */
.modal-content .form-group label span {
    color: var(--pcg-danger);
    font-weight: 600;
}

.modal-content .form-group .description {
    font-size: 12px;
    color: var(--pcg-gray-500);
    margin: 4px 0 0 0;
    font-style: italic;
}



/* Section Confirm */
.section-confirm {
    background: var(--pcg-gray-50);
    border: 1px solid var(--pcg-gray-200);
    border-radius: 8px;
    padding: 20px;
}

.section-confirm .confirm-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 500;
    color: var(--pcg-gray-700);
    cursor: pointer;
    margin: 0;
}

.section-confirm input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--pcg-success);
}

.section-confirm input[type="checkbox"]:checked + strong {
    color: var(--pcg-success);
}

/* Methods Status Text */
#methods-status-text {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 10px;
    transition: color 0.3s;
}

/* Requirements Box */
#methods-gen-requirements {
    background: #fef3c7;
    border: 1px solid #fbbf24;
    border-radius: 6px;
    padding: 10px 16px;
    font-size: 13px;
    color: #92400e;
    line-height: 1.5;
}

/* Proceed Button States */
#btn-proceed-abstract:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* NEU — alle Next-Buttons einheitlich: */
#btn-proceed-abstract:not(:disabled),
#btn-proceed-discussion:not(:disabled),
#btn-proceed-methods:not(:disabled),
#pcg-next-to-results:not(:disabled),
#pcg-next-to-literature:not(:disabled),
#pcg-proceed-to-summary:not(:disabled) {
    animation: pulse 2s infinite;
}

/* Generate Button AI Style */
#btn-generate-methods {
    background: var(--pcg-primary, #C9A441);
    border: none;
    color: white;
    transition: all 0.3s;
}

#btn-generate-methods:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(201, 164, 65, 0.4);
}

#btn-generate-methods:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}


/* Action Buttons Group */
.action-buttons {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.action-buttons .btn {
    flex: 0 0 auto;
}

.action-buttons .btn.primary {
    flex: 1;
}

/* Save Indicator */
#methods-save-indicator {
    font-size: 13px;
    color: var(--pcg-success);
    font-weight: 500;
    opacity: 0;
    transition: opacity 0.3s;
}

#methods-save-indicator[style*="inline"] {
    opacity: 1;
}

/* Table Scrolling on Small Screens */
@media (max-width: 1200px) {
    .methods-table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
	}
    
    .methods-table {
        min-width: 900px;
	}
}

/* Responsive Methods Table */
@media (max-width: 768px) {
    .methods-table {
        font-size: 13px;
	}
    
    .methods-table th,
    .methods-table td {
        padding: 8px;
	}
    
    .methods-table select,
    .methods-table textarea {
        font-size: 13px;
        padding: 4px 8px;
	}
    
    .methods-table textarea {
        min-height: 50px;
	}
    
    .methods-extract-section,
    .methods-list-section,
    .methods-generate-section,
    .methods-output-section {
        padding: 16px;
	}
    
    #methods-text {
        font-size: 14px;
        padding: 12px;
        min-height: 300px;
	}
    
    .action-buttons {
        flex-direction: column;
	}
    
    .action-buttons .btn {
        width: 100%;
	}
}

/* Methods Tab Specific Help Section */
.methods-list-section h3 {
    margin: 0 0 16px 0;
    color: var(--pcg-gray-900);    /* size as section 1 (theme h3), 10/2026 */
}

.methods-output-section h3 {
    margin: 0 0 16px 0;
    font-size: 18px;
    color: var(--pcg-gray-900);
}

/* Loading State in Table */
#methods-table-container .pcg-loading {
    padding: 40px;
    text-align: center;
}

/* Cost Badge in Button */
.btn .cost-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 12px;
    margin-left: 8px;
}

/* ==================== EXPORT TAB ==================== */
/* Export History */
.export-history-item {
    padding: 10px;
    margin-bottom: 10px;
    background: #f8f9fa;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Collapsible Section für Export History */
.pcg-collapsible-section {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
}

.pcg-collapsible-header {
    cursor: pointer;
    padding: 15px 20px;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    user-select: none;
    transition: background 0.2s;
}

.pcg-collapsible-header:hover {
    background: #f3f4f6;
}

.pcg-collapse-arrow {
    display: inline-block;
    width: 20px;
    transition: transform 0.2s;
    font-size: 12px;
    margin-right: 8px;
}

.pcg-collapsible-section.expanded .pcg-collapse-arrow {
    transform: rotate(90deg);
}

.pcg-collapsible-content {
    display: none;
    padding: 20px;
    background: white;
}

.pcg-collapsible-section.expanded .pcg-collapsible-content {
    display: block;
}

/* ==================== DASHBOARD TAB ==================== */

.pcg-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.pcg-stat-card {
    background: var(--pcg-primary, #C9A441);
    color: white !important;
    padding: 10px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(201, 164, 65, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.pcg-stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(201, 164, 65, 0.5);
}

/* Storage Status Colors */
.pcg-stat-card.storage-ok {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.pcg-stat-card.storage-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.pcg-stat-card.storage-critical {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.pcg-stat-icon {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.9;
}

.pcg-stat-value {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1;
}

.pcg-stat-label {
    font-size: 14px;
    color: white;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.9;
    margin-top: 5px;
}

.pcg-stat-meta {
    font-size: 12px;
    opacity: 0.8;
    margin-top: 5px;
}

.pcg-project-info-box,
.pcg-section {
    flex: 1;                /* gleiche Breite */
    display: flex;
    min-height: 100%;
    flex-direction: column; /* damit innerer Inhalt normal fließt */
}

.pcg-project-info-box h3 {
    margin-top: 0;         /* entfernt den großen oberen Abstand */
    margin-bottom: 10px;   /* optional: klein halten */
}


.pcg-project-info-box {
    background: white;
    font-size: 16px;
    border: 2px solid var(--pcg-gray-200);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.pcg-project-name-large {
    font-size: 24px;
    font-weight: 700;
    color: var(--pcg-gray-900);
    margin-bottom: 10px;
}

.pcg-project-owner {
    font-size: 14px;
    color: var(--pcg-gray-600);
}

.pcg-section h3 {
    font-size: 20px;
    margin-top: 0;         /* entfernt den großen oberen Abstand */
    margin-bottom: 15px;
    color: var(--pcg-gray-900);
}

.pcg-section ul {
    list-style: disc;
    margin-left: 20px;
    color: var(--pcg-gray-700);
}

.pcg-section ul li {
    margin-bottom: 8px;
}


.pcg-section h3 {
    font-size: 18px;  /* war 20px */
    margin-top: 0;
    margin-bottom: 15px;
    color: var(--pcg-gray-900);
}

.pcg-status-section {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--pcg-gray-200);
}

.pcg-status-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.pcg-status-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--pcg-gray-500);
    margin-bottom: 5px;
    font-weight: 600;
}

.pcg-status-value {
    font-size: 14px;
    color: var(--pcg-gray-900);
    font-weight: 500;
}

.pcg-status-provider-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 5px;
}

.pcg-status-provider-badge.vertex {
    background: #d1fae5;
    color: #065f46;
}

.pcg-status-provider-badge.anthropic {
    background: #fef3c7;
    color: #92400e;
}

.pcg-status-warning {
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: 6px;
    padding: 10px;
    margin-top: 8px;
    font-size: 12px;
    color: #92400e;
    line-height: 1.4;
}

.pcg-status-message {
    font-size: 14px;
    line-height: 1.5;
    color: var(--pcg-gray-700);
}

/* Dynamic font-size based on message length */
.pcg-status-message.short {
    font-size: 16px;
}

.pcg-status-message.medium {
    font-size: 14px;
}

.pcg-status-message.long {
    font-size: 12px;
}

.pcg-project-badge {
	background: var(--pcg-gold-bg, #FBF7EE);
	color: var(--pcg-darkgold, #A87C2A);
	margin-left: 100px;
	padding: 6px 12px;
	border-radius: 6px;
	font-size: 13px;
	font-weight: 600;
}

.pcg-remove-collab {
	background: #ef4444;
	color: white;
	border: none;
	border-radius: 6px;
	cursor: pointer;
	transition: background 0.2s;
}

.pcg-remove-collab:hover {
	background: #dc2626;
}

/* Cover Letter Modal */
.reviewer-group {
    transition: all 0.2s;
}

.reviewer-group:hover {
    background: #f3f4f6 !important;
}

.reviewer-group input:focus {
    outline: none;
    border-color: var(--pcg-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

#pcg-export-coverletter {
    position: relative;
}

#pcg-export-coverletter:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#pcg-export-coverletter:disabled {
    cursor: not-allowed;
}

#pcg-export-coverletter:disabled:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #1f2937;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: pre-line;
    z-index: 1000;
    margin-bottom: 8px;
    max-width: 300px;
    pointer-events: none;
}

/* Fallback: Browser native tooltip wenn CSS tooltip nicht angezeigt wird */
#pcg-export-coverletter[title=""]::after {
    content: "Checking requirements...";
}

/* Literature Source Action Buttons */
.meta-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}

.meta-info {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.meta-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.btn-lit-action {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: var(--pcg-primary, #C9A441);
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s;
    line-height: 1.4;
    box-sizing: border-box;
}

.btn-lit-action:hover {
    background: var(--pcg-darkgold, #A87C2A);
    color: #fff;
}

.btn-lit-action--warn {
    background: #d97706;
}

.btn-lit-action--warn:hover {
    background: #b45309;
}


/* Loading state for stats */
.pcg-stat-value.loading::after {
    content: '...';
    animation: ellipsis 1.5s infinite;
}

@keyframes ellipsis {
    0% { content: '.'; }
    33% { content: '..'; }
    66% { content: '...'; }
}

/* Tab Complete Star (Summary & Export) */
.tab-complete-star {
    color: #C9A441;
    font-weight: 700;
    font-size: 14px;
    display: inline-block;
    animation: star-pulse 1.5s ease-in-out infinite;
}

@keyframes star-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.6; transform: scale(1.3); }
}


/* Responsive */
@media (max-width: 768px) {
    .pcg-wrap {
        padding: 10px;
	}
    
    .action-bar {
        flex-direction: column;
        gap: 10px;
	}
    
    .pcg-figure-thumb {
        max-width: 150px;
        max-height: 150px;
	}
    
    .pcg-token-bar {
        top: 0;
        flex-direction: column;
        gap: 10px;
	}
}

/* ==================== SHARE MODAL ==================== */
@keyframes pcgShareIn {
    0%   { opacity: 0; transform: scale(0.92) translateY(16px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

#pcg-share-x-btn:disabled,
#pcg-share-li-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

#pcg-share-text:focus {
    outline: none;
    border-color: #0a66c2;
}

/* Figure kind tag in the figure header (Background / Preliminary Data) */
.figure-kind-tag {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    vertical-align: middle;
}
.figure-kind-main          { background: #eef2f7; color: #475569; }
.figure-kind-supplementary { background: var(--pcg-gold-bg, #FBF7EE); color: var(--pcg-darkgold, #A87C2A); border: 1px solid var(--pcg-gold-border, #E2C97A); }
.figure-kind-table         { background: #f3f4f6; color: #6b7280; }


/* ==================== PCP-STYLE SECTIONS (10/2026) ==================== */
.methods-extract-section h3,
.methods-list-section h3,
.methods-generate-section h3 {
    margin-top: 0;
}

.pcg-btn-pair {
    flex: 1 1 520px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    width: 100%;
    max-width: 920px;
}

.pcg-btn-pair .btn {
    width: 100%;
    white-space: nowrap;
    justify-content: center;
    padding-top: 12px;
    padding-bottom: 12px;
}

/* ==================== CARD DECK (WP / Methods / Programme) ==================== */
.pcg-deck {
    margin-top: 8px;
}

.pcg-deck-nav {
    display: flex;
    align-items: flex-end;
    gap: 8px;
}

.pcg-deck-tabs {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 4px;
    min-width: 0;
}

.pcg-deck-arrow {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    margin-bottom: 6px;
    border: 1px solid var(--pcg-gold-border);
    border-radius: 50%;
    background: #fff;
    color: var(--pcg-darkgold);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    font-family: var(--pcg-font);
    transition: background 0.15s;
}

.pcg-deck-arrow:hover:not(:disabled) {
    background: var(--pcg-gold-bg);
}

.pcg-deck-arrow:disabled {
    opacity: 0.35;
    cursor: default;
}

/* A tab is the top edge of a card lying behind the one in front */
.pcg-deck-tab {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1px;
    max-width: 230px;
    min-width: 92px;
    padding: 7px 14px 9px;
    margin-bottom: -2px;               /* overlaps the front card's top border */
    border: 2px solid var(--pcg-gray-200);
    border-top-width: 4px;
    border-bottom: none;
    border-radius: 10px 10px 0 0;
    background: var(--pcg-gray-100);
    color: var(--pcg-gray-600);
    font-family: var(--pcg-font);
    text-align: left;
    cursor: pointer;
    transform: translateY(4px);
    transition: transform 0.15s, background 0.15s, box-shadow 0.15s;
}

.pcg-deck-tab:hover {
    transform: translateY(0);
}

.pcg-deck-tab.active {
    z-index: 2;
    transform: translateY(0);
    background: #fff;
    color: var(--pcg-gray-900);
    padding-bottom: 11px;
    box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.06);
}

.pcg-deck-tab-label {
    max-width: 100%;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pcg-deck-tab-title {
    max-width: 100%;
    font-size: 12px;
    font-weight: 400;
    color: var(--pcg-gray-500);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pcg-deck-grip {
    position: absolute;
    top: 6px;
    right: 6px;
    font-size: 11px;
    color: var(--pcg-gray-400);
    cursor: grab;
}

.pcg-deck-tab[draggable="true"] {
    padding-right: 22px;
    cursor: grab;
}

.pcg-deck-tab.dragging {
    opacity: 0.45;
}

.pcg-deck-tab.drop-before {
    box-shadow: inset 4px 0 0 var(--pcg-darkgold);
}

.pcg-deck-tab.drop-after {
    box-shadow: inset -4px 0 0 var(--pcg-darkgold);
}

/* Tab states */
.pcg-deck-tab.is-open {
    border-top-color: var(--pcg-primary);
}

.pcg-deck-tab.is-confirmed {
    border-color: #a7f3d0;
    border-top-color: var(--pcg-success);
    background: #ecfdf5;
}

.pcg-deck-tab.is-confirmed .pcg-deck-tab-label::before {
    content: '✓ ';
    color: var(--pcg-success);
}

.pcg-deck-tab.is-prelim {
    border-color: var(--pcg-gold-border);
    border-top-color: var(--pcg-primary);
    background: var(--pcg-gold-bg);
}

.pcg-deck-tab.is-background {
    border-color: #d6c49a;
    border-top-color: var(--pcg-darkgold);
    background: #ece4d2;
    color: #6b5a3a;
}

.pcg-deck-tab.is-background:not(.active) {
    opacity: 0.8;
}

.pcg-deck-tab.active.is-confirmed,
.pcg-deck-tab.active.is-prelim,
.pcg-deck-tab.active.is-background {
    background: #fff;
    opacity: 1;
}

/* Methods tab: workpackage headings — equal-width pill + larger title */
.pcg-methods-wp-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    font-size: 19px;
    font-weight: 700;
    color: #1A1916;
}

.pcg-wp-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 76px;
    padding: 6px 0;
    border-radius: 999px;
    background: linear-gradient(315deg, #e8c645 0%, #c9a227 100%);
    color: #1A1916;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.pcg-wp-heading-title {
    line-height: 1.3;
}

/* 1.2.0 forward-looking methods: feasibility colours */
.pcg-deck-tab.is-feas-open   { border-color: #fcd34d; border-top-color: #f59e0b; background: #fffbeb; }
.pcg-deck-tab.is-feas-ok     { border-color: #a7f3d0; border-top-color: var(--pcg-success); background: #ecfdf5; }
.pcg-deck-tab.is-feas-risk   { border-color: #a7f3d0; border-top-color: var(--pcg-success); background: #ecfdf5; }
.pcg-deck-tab.is-feas-risk .pcg-deck-tab-label::after { content: ' ⚠'; color: #b45309; }
.pcg-deck-tab.is-feas-collab { border-color: #bfdbfe; border-top-color: #3b82f6; background: #eff6ff; }
.pcg-deck-tab.is-unused      { border-color: #e5e7eb; border-top-color: #9ca3af; background: #f3f4f6; color: #6b7280; }
.pcg-deck-tab.is-stale       { border-color: #fcd34d; border-top-color: #f59e0b; background: #fffbeb; }
.pcg-deck-tab.active.is-feas-open,
.pcg-deck-tab.active.is-feas-ok,
.pcg-deck-tab.active.is-feas-risk,
.pcg-deck-tab.active.is-feas-collab,
.pcg-deck-tab.active.is-unused,
.pcg-deck-tab.active.is-stale { background: #fff; }

.pcg-deck-swatch.is-feas-open   { background: #fffbeb; border-color: #f59e0b; }
.pcg-deck-swatch.is-feas-ok     { background: #ecfdf5; border-color: var(--pcg-success); }
.pcg-deck-swatch.is-feas-collab { background: #eff6ff; border-color: #3b82f6; }
.pcg-deck-swatch.is-unused      { background: #f3f4f6; border-color: #9ca3af; }

/* The card in front; .is-stacked draws the edges of the cards behind it */
.pcg-deck-stage {
    position: relative;
    z-index: 1;
}

.pcg-deck-stage.is-stacked {
    margin-right: 12px;
    margin-bottom: 12px;
}

.pcg-deck-card {
    display: none;
}

.pcg-deck-card.active {
    display: block;
}

.pcg-deck-body {
    border: 2px solid var(--pcg-gray-200);
    border-radius: 0 10px 10px 10px;
    padding: 22px 24px;
    background: #fff;
}

.pcg-deck-stage.is-stacked .pcg-deck-body {
    box-shadow:
        6px 6px 0 -2px #fff,
        6px 6px 0 0 var(--pcg-gray-200),
        12px 12px 0 -2px #fff,
        12px 12px 0 0 var(--pcg-gray-200);
}

.pcg-method-card.is-background {
    background: #fcfaf5;
}

textarea.pcg-autogrow {
    overflow-y: hidden;
    resize: none;
}

/* Legend of the method tab colours */
.pcg-deck-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin: 0 0 14px 0;
    font-size: 12px;
    color: var(--pcg-gray-500);
}

.pcg-deck-legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.pcg-deck-swatch {
    display: inline-block;
    width: 14px;
    height: 10px;
    border-radius: 3px 3px 0 0;
    border-top: 3px solid;
}

.pcg-deck-swatch.is-confirmed  { background: #ecfdf5; border-color: var(--pcg-success); }
.pcg-deck-swatch.is-prelim     { background: var(--pcg-gold-bg); border-color: var(--pcg-primary); }
.pcg-deck-swatch.is-background { background: #ece4d2; border-color: var(--pcg-darkgold); }

.pcg-deck-body textarea,
.pcg-deck-body input[type="text"],
.pcg-deck-body select {
    box-sizing: border-box;
    max-width: 100%;
}

/* ==================== AI REVIEW OUTPUT (Export) ==================== */
.pcg-air-text {
    white-space: pre-wrap;
    font-family: var(--pcg-font-serif);
    font-size: 15px;
    line-height: 1.7;
    color: var(--pcg-gray-900);
    background: #fff;
    border: 1px solid var(--pcg-gray-200);
    border-radius: 8px;
    padding: 18px 20px;
    max-height: 720px;
    overflow-y: auto;
}

.pcg-air-text strong {
    font-family: var(--pcg-font);
    color: var(--pcg-darkgold);
}
