/*
 * Search Console (GSC) Dashboard Page Styles
 * Module: gsc.css
 * Follows: design-system.md — clip-path only, NO border-radius
 * Covers: project picker, import card, batch history list,
 *         batch detail panel (diff + anchor audit), action buttons,
 *         inline feedback messages, modal overlay.
 */

/* ============================================================
   PAGE SCAFFOLD
   ============================================================ */

.gsc-page-header {
    margin-bottom: var(--space-6);
}

.gsc-page-title {
    font-family: var(--font-display);
    font-size: var(--text-h3);
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 1px;
    text-transform: uppercase;
    margin: 0 0 var(--space-2) 0;
}

.gsc-page-subtitle {
    font-family: var(--font-body);
    font-size: var(--text-sm);
    color: var(--text-muted);
    margin: 0;
    line-height: 1.5;
}

/* ============================================================
   PROJECT PICKER
   ============================================================ */

.gsc-project-picker-bar {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    margin-bottom: var(--space-6);
    padding: var(--space-4) var(--space-5);
    background: var(--bg-card);
    border: var(--border-subtle);
}

.gsc-project-picker-label {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--neon-cyan);
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
    flex-shrink: 0;
}

.gsc-project-select {
    flex: 1;
    max-width: 360px;
    padding: var(--space-2) var(--space-10) var(--space-2) var(--space-3);
    background: var(--bg-input);
    border: var(--border-subtle);
    font-family: var(--font-body);
    font-size: var(--text-sm);
    color: var(--text-primary);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2300f5d4' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
}

.gsc-project-select:focus {
    outline: none;
    border-color: var(--neon-cyan);
    box-shadow: 0 0 12px var(--glow-cyan);
}

.gsc-project-select option {
    background: var(--bg-dark);
    color: var(--text-primary);
}

/* ============================================================
   TWO-COLUMN LAYOUT (import card + history)
   ============================================================ */

.gsc-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-6);
}

@media (min-width: 1100px) {
    .gsc-layout {
        grid-template-columns: 420px 1fr;
        align-items: start;
    }
}

/* ============================================================
   IMPORT CARD
   ============================================================ */

.gsc-import-card {
    background: var(--bg-card);
    border: var(--border-subtle);
    padding: var(--space-6);
    clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 16px 100%, 0 calc(100% - 16px));
    position: relative;
    transition: border-color 0.3s ease;
}

.gsc-import-card:hover {
    border-color: rgba(0, 245, 212, 0.2);
}

.gsc-card-title {
    font-family: var(--font-display);
    font-size: var(--text-sm);
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 1px;
    text-transform: uppercase;
    margin: 0 0 var(--space-5) 0;
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.gsc-card-title svg {
    width: 18px;
    height: 18px;
    stroke: var(--neon-cyan);
    flex-shrink: 0;
}

/* Export type selector */
.gsc-export-types {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    margin-bottom: var(--space-5);
}

.gsc-export-type-option {
    position: relative;
}

.gsc-export-type-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.gsc-export-type-label {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: var(--space-3) var(--space-4);
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: var(--bg-input);
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
    clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
}

.gsc-export-type-label:hover {
    border-color: rgba(0, 245, 212, 0.25);
    background: rgba(0, 245, 212, 0.04);
}

.gsc-export-type-option input[type="radio"]:checked + .gsc-export-type-label {
    border-color: var(--neon-cyan);
    background: rgba(0, 245, 212, 0.07);
    box-shadow: 0 0 0 1px rgba(0, 245, 212, 0.15);
}

.gsc-export-type-name {
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.gsc-export-type-option input[type="radio"]:checked + .gsc-export-type-label .gsc-export-type-name {
    color: var(--neon-cyan);
}

.gsc-export-type-hint {
    font-family: var(--font-mono);
    font-size: var(--text-tiny);
    color: var(--text-muted);
    line-height: 1.4;
}

/* Recommended badge on linking_pages */
.gsc-badge-recommended {
    display: inline-flex;
    align-items: center;
    font-family: var(--font-mono);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 2px 6px;
    background: rgba(0, 245, 212, 0.15);
    color: var(--neon-cyan);
    clip-path: polygon(0 0, calc(100% - 4px) 0, 100% 4px, 100% 100%, 4px 100%, 0 calc(100% - 4px));
}

/* Drop zone */
.gsc-dropzone {
    position: relative;
    padding: var(--space-6) var(--space-4);
    border: 1px dashed rgba(0, 245, 212, 0.25);
    background: rgba(0, 245, 212, 0.02);
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
    margin-bottom: var(--space-4);
    clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
}

.gsc-dropzone.drag-over,
.gsc-dropzone:focus-within {
    border-color: var(--neon-cyan);
    background: rgba(0, 245, 212, 0.06);
    box-shadow: 0 0 20px var(--glow-cyan);
}

.gsc-dropzone-icon {
    width: 36px;
    height: 36px;
    margin: 0 auto var(--space-3);
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 245, 212, 0.1);
    clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
}

.gsc-dropzone-icon svg {
    width: 18px;
    height: 18px;
    stroke: var(--neon-cyan);
}

.gsc-dropzone-text {
    font-family: var(--font-body);
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin: 0 0 var(--space-1) 0;
}

.gsc-dropzone-hint {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: var(--text-muted);
    margin: 0;
}

.gsc-dropzone-file-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}

.gsc-selected-file {
    display: none;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    background: rgba(0, 245, 212, 0.06);
    border: 1px solid rgba(0, 245, 212, 0.2);
    margin-bottom: var(--space-4);
    clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
}

.gsc-selected-file.visible {
    display: flex;
}

.gsc-selected-file svg {
    width: 18px;
    height: 18px;
    stroke: var(--neon-cyan);
    flex-shrink: 0;
}

.gsc-selected-file-name {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: var(--neon-cyan);
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gsc-selected-file-clear {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    transition: color 0.2s ease;
    flex-shrink: 0;
}

.gsc-selected-file-clear:hover {
    color: var(--neon-magenta);
}

.gsc-selected-file-clear svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
}

/* Submit button */
.gsc-submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    width: 100%;
    padding: var(--space-3) var(--space-5);
    background: linear-gradient(135deg, var(--neon-cyan), var(--neon-blue));
    color: var(--bg-deep);
    border: none;
    cursor: pointer;
    font-family: var(--font-display);
    font-size: var(--text-xs);
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.gsc-submit-btn:hover:not(:disabled) {
    box-shadow: var(--shadow-btn-primary-hover);
    transform: translateY(-2px);
}

.gsc-submit-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.gsc-submit-btn svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
}

.gsc-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(10, 10, 15, 0.4);
    border-top-color: var(--bg-deep);
    border-radius: 50%;
    animation: gsc-spin 0.7s linear infinite;
    flex-shrink: 0;
}

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

/* Upload inline error */
.gsc-upload-error {
    display: none;
    align-items: center;
    gap: var(--space-2);
    margin-top: var(--space-3);
    padding: var(--space-2) var(--space-3);
    background: rgba(247, 37, 133, 0.08);
    border: 1px solid rgba(247, 37, 133, 0.25);
    clip-path: polygon(0 0, calc(100% - 6px) 0, 100% 6px, 100% 100%, 6px 100%, 0 calc(100% - 6px));
}

.gsc-upload-error.visible {
    display: flex;
}

.gsc-upload-error svg {
    width: 14px;
    height: 14px;
    stroke: var(--neon-magenta);
    flex-shrink: 0;
}

.gsc-upload-error-text {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: var(--neon-magenta);
    line-height: 1.4;
}

/* ============================================================
   G4 AUDIT REFINE INPUTS (brand / keyword / domain)
   ============================================================ */

.gsc-audit-inputs {
    margin-bottom: var(--space-4);
    padding-bottom: var(--space-4);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.gsc-audit-hint {
    font-family: var(--font-body);
    font-size: var(--text-sm);
    color: var(--text-muted);
    margin: var(--space-2) 0 var(--space-3);
    line-height: 1.5;
}

.gsc-audit-fields {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-3);
}

.gsc-audit-fields .gsc-group-picker-select {
    flex: 1 1 180px;
    max-width: none;
}

/* ============================================================
   RIGHT SIDE — PANEL (history + detail)
   ============================================================ */

.gsc-right-panel {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
}

/* ============================================================
   BATCH HISTORY
   ============================================================ */

.gsc-history-card {
    background: var(--bg-card);
    border: var(--border-subtle);
    padding: var(--space-5) var(--space-6);
    clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 16px 100%, 0 calc(100% - 16px));
}

.gsc-history-empty {
    padding: var(--space-8) 0;
    text-align: center;
}

.gsc-history-empty-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto var(--space-4);
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.04);
    clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
}

.gsc-history-empty-icon svg {
    width: 22px;
    height: 22px;
    stroke: var(--text-muted);
}

.gsc-history-empty p {
    font-family: var(--font-body);
    font-size: var(--text-sm);
    color: var(--text-muted);
    margin: 0;
}

/* Table */
.gsc-history-table {
    width: 100%;
    border-collapse: collapse;
}

.gsc-history-table th {
    font-family: var(--font-mono);
    font-size: var(--text-tiny);
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0 var(--space-3) var(--space-3) var(--space-3);
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    white-space: nowrap;
}

.gsc-history-table td {
    padding: var(--space-3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    font-family: var(--font-body);
    font-size: var(--text-sm);
    color: var(--text-secondary);
    vertical-align: middle;
}

.gsc-history-row {
    cursor: pointer;
    transition: background 0.15s ease;
}

.gsc-history-row:hover td {
    background: rgba(0, 245, 212, 0.03);
    color: var(--text-primary);
}

.gsc-history-row.selected td {
    background: rgba(0, 245, 212, 0.06);
    color: var(--text-primary);
}

.gsc-history-row:last-child td {
    border-bottom: none;
}

.gsc-import-type-badge {
    display: inline-flex;
    align-items: center;
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.3px;
    padding: 2px 7px;
    text-transform: uppercase;
    clip-path: polygon(0 0, calc(100% - 4px) 0, 100% 4px, 100% 100%, 4px 100%, 0 calc(100% - 4px));
}

.gsc-import-type-badge--top_linking_text    { background: rgba(76, 201, 240, 0.12); color: var(--neon-blue); }
.gsc-import-type-badge--top_linking_sites   { background: rgba(76, 201, 240, 0.12); color: var(--neon-blue); }
.gsc-import-type-badge--top_target_pages    { background: rgba(76, 201, 240, 0.12); color: var(--neon-blue); }
.gsc-import-type-badge--linking_pages       { background: rgba(0, 245, 212, 0.12); color: var(--neon-cyan); }

.gsc-status-badge {
    display: inline-flex;
    align-items: center;
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 3px 8px;
    text-transform: uppercase;
    clip-path: polygon(0 0, calc(100% - 4px) 0, 100% 4px, 100% 100%, 4px 100%, 0 calc(100% - 4px));
}

.gsc-status-badge--COMPLETED { background: rgba(0, 245, 212, 0.12); color: var(--neon-cyan); }
.gsc-status-badge--PROCESSING { background: rgba(254, 228, 64, 0.12); color: var(--neon-yellow); }
.gsc-status-badge--FAILED     { background: rgba(247, 37, 133, 0.12); color: var(--neon-magenta); }

.gsc-history-load-more {
    display: none;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    width: 100%;
    margin-top: var(--space-4);
    padding: var(--space-2) var(--space-4);
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    cursor: pointer;
    clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
    transition: border-color 0.2s ease, color 0.2s ease;
}

.gsc-history-load-more.visible {
    display: flex;
}

.gsc-history-load-more:hover {
    border-color: rgba(0, 245, 212, 0.3);
    color: var(--neon-cyan);
}

/* ============================================================
   BATCH DETAIL PANEL
   ============================================================ */

.gsc-detail-panel {
    display: none;
    background: var(--bg-card);
    border: var(--border-subtle);
    padding: var(--space-5) var(--space-6);
    clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 16px 100%, 0 calc(100% - 16px));
}

.gsc-detail-panel.visible {
    display: block;
}

.gsc-detail-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-8) 0;
}

.gsc-detail-loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(0, 245, 212, 0.15);
    border-top-color: var(--neon-cyan);
    border-radius: 50%;
    animation: gsc-spin 0.7s linear infinite;
}

.gsc-detail-loading p {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: var(--text-muted);
    margin: 0;
}

/* Diff summary row */
.gsc-diff-summary {
    display: flex;
    gap: var(--space-3);
    margin-bottom: var(--space-5);
    flex-wrap: wrap;
}

.gsc-diff-chip {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    background: var(--bg-input);
    clip-path: polygon(0 0, calc(100% - 6px) 0, 100% 6px, 100% 100%, 6px 100%, 0 calc(100% - 6px));
}

.gsc-diff-chip__icon {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    font-weight: 700;
}

.gsc-diff-chip__count {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    font-weight: 700;
}

.gsc-diff-chip__label {
    font-family: var(--font-body);
    font-size: var(--text-xs);
    color: var(--text-muted);
}

.gsc-diff-chip--new .gsc-diff-chip__icon,
.gsc-diff-chip--new .gsc-diff-chip__count { color: var(--neon-cyan); }

.gsc-diff-chip--lost .gsc-diff-chip__icon,
.gsc-diff-chip--lost .gsc-diff-chip__count { color: var(--neon-magenta); }

.gsc-diff-chip--neutral .gsc-diff-chip__icon,
.gsc-diff-chip--neutral .gsc-diff-chip__count { color: var(--text-secondary); }

/* Section separators */
.gsc-section-label {
    font-family: var(--font-mono);
    font-size: var(--text-tiny);
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: var(--space-5) 0 var(--space-3) 0;
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.gsc-section-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.06);
}

/* ============================================================
   ANCHOR DISTRIBUTION
   ============================================================ */

.gsc-anchor-summary-row {
    display: flex;
    gap: var(--space-4);
    margin-bottom: var(--space-4);
    flex-wrap: wrap;
}

.gsc-anchor-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.gsc-anchor-stat__value {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.gsc-anchor-stat__label {
    font-family: var(--font-mono);
    font-size: var(--text-tiny);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Score band */
.gsc-score-band {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-1) var(--space-3);
    clip-path: polygon(0 0, calc(100% - 6px) 0, 100% 6px, 100% 100%, 6px 100%, 0 calc(100% - 6px));
    margin-bottom: var(--space-5);
}

.gsc-score-band--healthy {
    background: rgba(0, 245, 212, 0.1);
    border: 1px solid rgba(0, 245, 212, 0.2);
    color: var(--neon-cyan);
}

.gsc-score-band--caution {
    background: rgba(254, 228, 64, 0.1);
    border: 1px solid rgba(254, 228, 64, 0.2);
    color: var(--neon-yellow);
}

.gsc-score-band--risky {
    background: rgba(247, 37, 133, 0.1);
    border: 1px solid rgba(247, 37, 133, 0.2);
    color: var(--neon-magenta);
}

.gsc-score-band__score {
    font-family: var(--font-display);
    font-size: var(--text-sm);
    font-weight: 700;
}

.gsc-score-band__label {
    font-family: var(--font-body);
    font-size: var(--text-xs);
}

/* Distribution bars */
.gsc-distribution {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    margin-bottom: var(--space-4);
}

.gsc-dist-row {
    display: grid;
    grid-template-columns: 130px 1fr 55px 55px;
    align-items: center;
    gap: var(--space-3);
}

.gsc-dist-row__name {
    font-family: var(--font-body);
    font-size: var(--text-xs);
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gsc-dist-bar-track {
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    clip-path: polygon(0 0, calc(100% - 4px) 0, 100% 4px, 100% 100%, 4px 100%, 0 calc(100% - 4px));
    overflow: hidden;
}

.gsc-dist-bar-fill {
    height: 100%;
    transition: width 0.4s ease;
    min-width: 2px;
}

.gsc-dist-bar-fill--exact    { background: var(--neon-magenta); }
.gsc-dist-bar-fill--partial  { background: var(--neon-yellow); }
.gsc-dist-bar-fill--brand    { background: var(--neon-cyan); }
.gsc-dist-bar-fill--generic  { background: rgba(255, 255, 255, 0.3); }
.gsc-dist-bar-fill--url      { background: var(--neon-blue); }
.gsc-dist-bar-fill--other    { background: rgba(255, 255, 255, 0.2); }

.gsc-dist-row__pct {
    font-family: var(--font-mono);
    font-size: var(--text-tiny);
    color: var(--text-secondary);
    text-align: right;
    white-space: nowrap;
}

.gsc-dist-row__count {
    font-family: var(--font-mono);
    font-size: var(--text-tiny);
    color: var(--text-muted);
    text-align: right;
    white-space: nowrap;
}

/* Top repeated anchors */
.gsc-top-anchors {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    margin-bottom: var(--space-4);
}

.gsc-top-anchor-row {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-2) var(--space-3);
    background: var(--bg-input);
    clip-path: polygon(0 0, calc(100% - 6px) 0, 100% 6px, 100% 100%, 6px 100%, 0 calc(100% - 6px));
}

.gsc-top-anchor-text {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: var(--text-secondary);
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gsc-top-anchor-count {
    font-family: var(--font-mono);
    font-size: var(--text-tiny);
    color: var(--text-muted);
    white-space: nowrap;
}

/* Warnings */
.gsc-warnings {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    margin-bottom: var(--space-4);
}

.gsc-warning-item {
    display: flex;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    clip-path: polygon(0 0, calc(100% - 6px) 0, 100% 6px, 100% 100%, 6px 100%, 0 calc(100% - 6px));
}

.gsc-warning-item--high {
    background: rgba(247, 37, 133, 0.07);
    border: 1px solid rgba(247, 37, 133, 0.2);
}

.gsc-warning-item--medium {
    background: rgba(254, 228, 64, 0.07);
    border: 1px solid rgba(254, 228, 64, 0.2);
}

.gsc-warning-item--low {
    background: rgba(76, 201, 240, 0.07);
    border: 1px solid rgba(76, 201, 240, 0.15);
}

.gsc-warning-item svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    margin-top: 2px;
}

.gsc-warning-item--high svg   { stroke: var(--neon-magenta); }
.gsc-warning-item--medium svg { stroke: var(--neon-yellow); }
.gsc-warning-item--low svg    { stroke: var(--neon-blue); }

.gsc-warning-item p {
    font-family: var(--font-body);
    font-size: var(--text-xs);
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

/* Not-applicable notice */
.gsc-not-applicable-notice {
    display: flex;
    gap: var(--space-3);
    padding: var(--space-4);
    background: rgba(76, 201, 240, 0.05);
    border: 1px solid rgba(76, 201, 240, 0.2);
    clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
    margin-bottom: var(--space-4);
}

.gsc-not-applicable-notice svg {
    width: 18px;
    height: 18px;
    stroke: var(--neon-blue);
    flex-shrink: 0;
    margin-top: 1px;
}

.gsc-not-applicable-notice p {
    font-family: var(--font-body);
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.6;
}

/* ============================================================
   ACTIONS BAR
   ============================================================ */

.gsc-actions-bar {
    display: flex;
    gap: var(--space-3);
    flex-wrap: wrap;
    padding-top: var(--space-5);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.gsc-action-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    border: none;
    cursor: pointer;
    font-family: var(--font-display);
    font-size: var(--text-xs);
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gsc-action-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.gsc-action-btn svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    flex-shrink: 0;
}

.gsc-action-btn--primary {
    background: linear-gradient(135deg, var(--neon-cyan), var(--neon-blue));
    color: var(--bg-deep);
}

.gsc-action-btn--primary:hover:not(:disabled) {
    box-shadow: 0 0 20px var(--glow-cyan);
    transform: translateY(-1px);
}

.gsc-action-btn--secondary {
    background: var(--bg-input);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
}

.gsc-action-btn--secondary:hover:not(:disabled) {
    border-color: rgba(0, 245, 212, 0.3);
    color: var(--neon-cyan);
}

/* ============================================================
   ACTION INLINE FEEDBACK (non-JS-alert responses)
   ============================================================ */

.gsc-action-feedback {
    display: none;
    align-items: flex-start;
    gap: var(--space-3);
    padding: var(--space-4);
    margin-top: var(--space-4);
    clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
}

.gsc-action-feedback.visible {
    display: flex;
}

.gsc-action-feedback--success {
    background: rgba(0, 245, 212, 0.06);
    border: 1px solid rgba(0, 245, 212, 0.25);
}

.gsc-action-feedback--error {
    background: rgba(247, 37, 133, 0.06);
    border: 1px solid rgba(247, 37, 133, 0.25);
}

.gsc-action-feedback--info {
    background: rgba(76, 201, 240, 0.06);
    border: 1px solid rgba(76, 201, 240, 0.2);
}

.gsc-action-feedback__icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-top: 1px;
}

.gsc-action-feedback--success .gsc-action-feedback__icon { stroke: var(--neon-cyan); }
.gsc-action-feedback--error   .gsc-action-feedback__icon { stroke: var(--neon-magenta); }
.gsc-action-feedback--info    .gsc-action-feedback__icon { stroke: var(--neon-blue); }

.gsc-action-feedback__body {
    flex: 1;
}

.gsc-action-feedback__title {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 4px 0;
}

.gsc-action-feedback--success .gsc-action-feedback__title { color: var(--neon-cyan); }
.gsc-action-feedback--error   .gsc-action-feedback__title { color: var(--neon-magenta); }
.gsc-action-feedback--info    .gsc-action-feedback__title { color: var(--neon-blue); }

.gsc-action-feedback__text {
    font-family: var(--font-body);
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

.gsc-action-feedback__close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    color: var(--text-muted);
    display: flex;
    flex-shrink: 0;
    transition: color 0.2s ease;
}

.gsc-action-feedback__close:hover { color: var(--text-secondary); }

.gsc-action-feedback__close svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
}

/* ============================================================
   ADD-TO-MONITORING GROUP PICKER (inline in detail panel)
   ============================================================ */

.gsc-group-picker-row {
    display: none;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    background: rgba(0, 245, 212, 0.04);
    border: 1px solid rgba(0, 245, 212, 0.15);
    margin-top: var(--space-3);
    clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
    flex-wrap: wrap;
}

.gsc-group-picker-row.visible {
    display: flex;
}

.gsc-group-picker-label {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: var(--text-muted);
    white-space: nowrap;
    flex-shrink: 0;
}

.gsc-group-picker-select {
    flex: 1;
    min-width: 160px;
    max-width: 280px;
    padding: var(--space-2) var(--space-8) var(--space-2) var(--space-3);
    background: var(--bg-input);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-family: var(--font-body);
    font-size: var(--text-sm);
    color: var(--text-primary);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2300f5d4' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 14px;
    clip-path: polygon(0 0, calc(100% - 6px) 0, 100% 6px, 100% 100%, 6px 100%, 0 calc(100% - 6px));
    transition: border-color 0.2s ease;
}

.gsc-group-picker-select:focus {
    outline: none;
    border-color: var(--neon-cyan);
}

.gsc-group-picker-select option {
    background: var(--bg-dark);
    color: var(--text-primary);
}

.gsc-group-picker-confirm {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-2) var(--space-3);
    background: var(--neon-cyan);
    color: var(--bg-deep);
    border: none;
    cursor: pointer;
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    clip-path: polygon(0 0, calc(100% - 6px) 0, 100% 6px, 100% 100%, 6px 100%, 0 calc(100% - 6px));
    transition: box-shadow 0.2s ease;
}

.gsc-group-picker-confirm:hover {
    box-shadow: 0 0 12px var(--glow-cyan);
}

.gsc-group-picker-confirm svg {
    width: 12px;
    height: 12px;
    stroke: currentColor;
}

/* ============================================================
   NO PROJECT SELECTED STATE
   ============================================================ */

.gsc-no-project {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-16) var(--space-8);
    text-align: center;
    gap: var(--space-4);
}

.gsc-no-project-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.03);
    clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
}

.gsc-no-project-icon svg {
    width: 28px;
    height: 28px;
    stroke: var(--text-muted);
}

.gsc-no-project h3 {
    font-family: var(--font-display);
    font-size: var(--text-h5);
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 1px;
    margin: 0;
}

.gsc-no-project p {
    font-family: var(--font-body);
    font-size: var(--text-sm);
    color: var(--text-muted);
    max-width: 320px;
    margin: 0;
    line-height: 1.6;
}

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

@media (max-width: 768px) {
    .gsc-project-picker-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-2);
    }

    .gsc-project-select {
        max-width: 100%;
        width: 100%;
    }

    .gsc-import-card,
    .gsc-history-card,
    .gsc-detail-panel {
        padding: var(--space-4);
    }

    .gsc-dist-row {
        grid-template-columns: 100px 1fr 45px 45px;
        gap: var(--space-2);
    }

    .gsc-actions-bar {
        flex-direction: column;
    }

    .gsc-action-btn {
        width: 100%;
        justify-content: center;
    }

    .gsc-anchor-summary-row {
        gap: var(--space-5);
    }

    .gsc-diff-summary {
        gap: var(--space-2);
    }
}

@media (prefers-reduced-motion: reduce) {
    .gsc-spinner,
    .gsc-detail-loading-spinner {
        animation: none;
        border-top-color: var(--neon-cyan);
    }

    .gsc-dist-bar-fill,
    .gsc-submit-btn,
    .gsc-action-btn,
    .gsc-dropzone {
        transition: none;
    }
}
