/* ===== Design Tokens ===== */
:root {
    /* Primary blue */
    --color-primary: #1a56a8;
    --color-primary-hover: #2b7de0;
    --color-primary-light: #e8f0fb;
    --color-primary-border: #93c5fd;

    /* Danger / red */
    --color-danger: #dc2626;
    --color-danger-dark: #991b1b;
    --color-danger-light: #fde8e8;
    --color-danger-border: #fca5a5;

    /* Success / green */
    --color-success: #16a34a;
    --color-success-dark: #166534;
    --color-success-light: #e8f5e9;
    --color-success-border: #86efac;

    /* Warning / orange */
    --color-warning: #f59e0b;
    --color-warning-dark: #d97706;
    --color-warning-light: #fff7ed;
    --color-warning-border: #fed7aa;

    /* Purple (embargos) */
    --color-purple: #9333ea;
    --color-purple-light: #f5f3ff;
    --color-purple-border: #c4b5fd;

    /* Teal (infractions) */
    --color-teal: #0891b2;
    --color-teal-light: #ecfeff;
    --color-teal-border: #a5f3fc;

    /* Dark theme / navy */
    --color-navy: #1a1a2e;
    --color-navy-mid: #16213e;
    --color-navy-light: #0f3460;

    /* Gray scale — text */
    --color-text: #333;
    --color-text-secondary: #555;
    --color-text-muted: #888;
    --color-text-faint: #999;

    /* Gray scale — borders & backgrounds */
    --color-border: #ddd;
    --color-border-light: #eee;
    --color-bg-subtle: #f8f9fa;
    --color-bg-hover: #f1f5f9;

    /* Bookmark / stars */
    --color-star: #eab308;

    /* Border radius */
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
    --radius-xl: 12px;
    --radius-pill: 20px;
    --radius-full: 50%;

    /* Shadows */
    --shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 20px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 8px 32px rgba(0, 0, 0, 0.25);

    /* Font sizes */
    --text-xs: 0.75rem;
    --text-sm: 0.82rem;
    --text-base: 0.9rem;
    --text-md: 1rem;
    --text-lg: 1.1rem;
    --text-xl: 1.3rem;
    --text-2xl: 1.8rem;
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Login Screen */
.login-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}

.login-card {
    background: white;
    padding: 40px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 420px;
    text-align: center;
}

.login-logo {
    height: 60px;
    margin-bottom: 20px;
}

.login-card h2 {
    font-size: 1.3rem;
    color: var(--color-navy);
    margin-bottom: 6px;
}

.login-subtitle {
    color: var(--color-text-secondary);
    font-size: 0.9rem;
    margin-bottom: 24px;
}

.login-field {
    margin-bottom: 16px;
    text-align: left;
}

.login-field label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    margin-bottom: 4px;
}

.login-field input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: border-color 0.2s;
}

.login-field input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(26, 86, 168, 0.1);
}

.login-error {
    background: var(--color-danger-light);
    color: var(--color-danger-dark);
    padding: 8px 12px;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    margin-bottom: 16px;
    text-align: left;
}

.login-btn {
    width: 100%;
    padding: 12px;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

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

.login-btn:disabled {
    background: var(--color-text-faint);
    cursor: not-allowed;
}

/* Profile Menu */
.profile-menu {
    position: relative;
}

.profile-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.12);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}

.profile-btn:hover {
    background: rgba(255, 255, 255, 0.22);
}

.profile-icon {
    font-size: 1.1rem;
    opacity: 0.8;
}

.profile-email {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-arrow {
    font-size: 0.7rem;
    opacity: 0.7;
}

.profile-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 6px;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    min-width: 200px;
    z-index: 2000;
    overflow: hidden;
}

.profile-dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 10px 16px;
    border: none;
    background: none;
    font-size: 0.9rem;
    color: var(--color-text);
    cursor: pointer;
    text-align: left;
    transition: background 0.15s;
}

.profile-dropdown-item:hover {
    background: var(--color-bg-hover);
}

.profile-badge {
    background: var(--color-primary);
    color: white;
    font-size: 0.7rem;
    padding: 1px 6px;
    border-radius: var(--radius-lg);
    margin-left: auto;
}

.profile-divider {
    border: none;
    border-top: 1px solid var(--color-border-light);
    margin: 0;
}

/* Change Password Modal */
.change-pw-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 5000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.change-pw-modal {
    background: white;
    padding: 32px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 420px;
}

.change-pw-modal h3 {
    font-size: 1.2rem;
    color: var(--color-navy);
    margin-bottom: 20px;
}

.change-pw-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 8px;
}

.change-pw-cancel {
    padding: 10px 24px;
    background: none;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    cursor: pointer;
    color: var(--color-text-secondary);
}

.change-pw-cancel:hover {
    background: var(--color-bg-subtle);
}

.change-pw-success {
    background: var(--color-success-light);
    color: var(--color-success-dark);
    padding: 8px 12px;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    margin-bottom: 16px;
    text-align: left;
}

/* My AUTEFs Slide-out Panel */
.my-autefs-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 3000;
}

.my-autefs-panel {
    position: fixed;
    top: 0;
    right: -500px;
    width: 500px;
    max-width: 90vw;
    height: 100vh;
    background: white;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
    z-index: 3001;
    padding: 24px;
    overflow-y: auto;
    transition: right 0.3s ease;
}

.my-autefs-panel.open {
    right: 0;
}

.my-autefs-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.my-autefs-header h2 {
    color: var(--color-primary);
    font-size: 1.3rem;
    margin: 0;
}

.panel-close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--color-text-faint);
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}

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

.my-autefs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.my-autefs-table th {
    background: var(--color-bg-subtle);
    padding: 8px 10px;
    text-align: left;
    font-weight: 600;
    color: var(--color-text-secondary);
    border-bottom: 2px solid var(--color-border);
    white-space: nowrap;
}

.my-autefs-table td {
    padding: 8px 10px;
    border-bottom: 1px solid var(--color-border-light);
}

.my-autefs-table tr:hover {
    background: var(--color-bg-subtle);
}

/* Help Button */
.help-btn {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.12);
    color: white;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    flex-shrink: 0;
    margin-right: 10px;
}

.help-btn:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Glossary Slide-out Panel */
.glossary-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 3000;
}

.glossary-panel {
    position: fixed;
    top: 0;
    right: -500px;
    width: 500px;
    max-width: 90vw;
    height: 100vh;
    background: white;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
    z-index: 3001;
    padding: 24px;
    overflow-y: auto;
    transition: right 0.3s ease;
}

.glossary-panel.open {
    right: 0;
}

.glossary-list {
    margin: 0;
    padding: 0;
}

.glossary-list dt {
    font-weight: 700;
    color: var(--color-primary);
    font-size: 0.95rem;
    margin-top: 14px;
    padding-top: 10px;
    border-top: 1px solid var(--color-border-light);
}

.glossary-list dt:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.glossary-list dd {
    margin: 4px 0 0 0;
    color: var(--color-text);
    font-size: 0.9rem;
    line-height: 1.5;
}

.glossary-list dd em {
    color: var(--color-text-secondary);
}

.glossary-list dd a {
    color: var(--color-primary);
    font-size: 0.8rem;
    text-decoration: none;
    margin-left: 4px;
}

.glossary-list dd a:hover {
    text-decoration: underline;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-bg-subtle);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
header {
    text-align: left;
    padding: 20px 30px;
    background: var(--color-navy);
    color: white;
    border-radius: var(--radius-lg);
    margin-bottom: 30px;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 24px;
}

.header-logo {
    height: 70px;
    width: auto;
}

.beta-tag {
    font-size: 0.7rem;
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    vertical-align: middle;
    letter-spacing: 1px;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.4);
}

header h1 {
    font-size: 1.8rem;
    margin-bottom: 4px;
}

header .subtitle {
    font-size: 0.95rem;
    opacity: 0.8;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 0;
    background: white;
    padding: 15px 15px 0;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    box-shadow: var(--shadow-md);
}

.tab-btn {
    padding: 12px 24px;
    border: none;
    background: var(--color-bg-hover);
    color: var(--color-text-secondary);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    transition: all 0.2s;
}

.tab-btn:hover {
    background: #dee2e6;
}

.tab-btn.active {
    background: var(--color-primary);
    color: white;
}

/* Search Section */
.search-section {
    background: white;
    padding: 25px;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    box-shadow: var(--shadow-md);
    margin-bottom: 30px;
}

.search-section h2 {
    color: var(--color-primary);
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.section-description {
    color: var(--color-text-secondary);
    margin-bottom: 20px;
    font-size: 0.95rem;
}

/* Summary Cards */
.summary-section {
    margin-bottom: 30px;
}

.summary-cards {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.summary-card {
    flex: 1;
    min-width: 0;
    background: white;
    padding: 20px 15px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    text-align: center;
    box-sizing: border-box;
}

.summary-card.highlight {
    background: linear-gradient(135deg, #1a1a2e 0%, #1a56a8 100%);
    color: white;
}

.summary-value {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.summary-card.highlight .summary-value {
    color: white;
}

.summary-label {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.summary-card.highlight .summary-label {
    color: rgba(255, 255, 255, 0.9);
}

.explore-network-card {
    border: none;
    outline: 2px dashed var(--color-border);
    outline-offset: -2px;
    background: var(--color-bg-subtle);
    box-shadow: none;
    transition: all 0.2s;
}

.explore-network-card:hover {
    outline-color: var(--color-primary);
    background: var(--color-primary-light);
}

.explore-network-card .summary-label {
    color: var(--color-primary);
    font-weight: 600;
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.form-row-divider {
    display: flex;
    align-items: flex-end;
    padding-bottom: 10px;
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--color-text-muted);
    flex-shrink: 0;
}

.form-check-group {
    display: flex;
    gap: 20px;
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
}

.form-check-group input[type="radio"] {
    margin-right: 4px;
}

.form-group {
    flex: 1;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: var(--color-text-secondary);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--color-primary-hover);
    box-shadow: 0 0 0 3px rgba(26, 86, 168, 0.1);
}

.form-group input::placeholder {
    color: var(--color-text-faint);
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.btn-primary,
.btn-secondary {
    padding: 12px 30px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
}

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

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

.btn-secondary {
    background-color: var(--color-bg-hover);
    color: var(--color-text-secondary);
}

.btn-secondary:hover {
    background-color: #dee2e6;
}

.btn-primary:disabled {
    background-color: var(--color-border);
    cursor: not-allowed;
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.9rem;
}

.btn-sources {
    padding: 10px 20px;
}

/* Selection Actions */
.selection-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 15px;
    background: var(--color-bg-subtle);
    border-radius: var(--radius-md);
    margin-bottom: 15px;
}

.select-all-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 500;
    color: var(--color-text-secondary);
}

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

.selected-count {
    color: var(--color-primary);
    font-weight: 500;
}

.checkbox-col {
    width: 40px;
    text-align: center;
}

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

/* Results Section */
.results-section {
    background: white;
    padding: 20px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    margin-bottom: 30px;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    min-width: 0;
    overflow: hidden;
}

.results-header > * {
    min-width: 0;
}

.results-header h2 {
    color: var(--color-primary);
    font-size: 1.3rem;
}

.result-count {
    background-color: var(--color-primary-light);
    color: var(--color-primary);
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    font-weight: 500;
    flex-shrink: 0;
    white-space: nowrap;
}

.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background-color: var(--color-bg-subtle);
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--color-border-light);
}

th {
    font-weight: 600;
    color: var(--color-text-secondary);
    white-space: nowrap;
}

tbody tr:hover {
    background-color: var(--color-bg-subtle);
}

td {
    font-size: 0.9rem;
}

.status-active {
    color: var(--color-primary-hover);
    font-weight: 500;
}

.status-expired {
    color: var(--color-text-faint);
}

.status-cancelled {
    color: var(--color-danger);
}

/* Loading */
.loading {
    text-align: center;
    padding: 50px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--color-primary-light);
    border-top: 4px solid var(--color-primary);
    border-radius: var(--radius-full);
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

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

/* Error */
.error {
    background-color: var(--color-danger-light);
    border: 1px solid var(--color-danger-border);
    color: var(--color-danger-dark);
    padding: 20px;
    border-radius: var(--radius-lg);
    text-align: center;
}

/* Footer */
footer {
    text-align: center;
    padding: 20px;
    color: var(--color-text-secondary);
    font-size: 0.9rem;
}

footer .disclaimer {
    margin-top: 5px;
    font-size: 0.8rem;
    color: var(--color-text-faint);
}

/* Sources Section */
.sources-section {
    border: 2px solid var(--color-primary);
}

.sources-summary {
    padding: 10px 15px;
    background: var(--color-primary-light);
    border-radius: var(--radius-md);
    margin-bottom: 20px;
}

.sources-summary p {
    margin: 0;
    color: var(--color-primary);
}

.sources-cards {
    margin-bottom: 25px;
}

.sources-tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--color-border-light);
    padding-bottom: 0;
}

.source-tab-btn {
    padding: 10px 20px;
    border: none;
    background: transparent;
    color: var(--color-text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}

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

.source-tab-btn.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}

.source-table {
    max-height: 400px;
    overflow-y: auto;
}

.source-table table {
    width: 100%;
}

.source-table tbody tr:nth-child(even) {
    background-color: var(--color-bg-subtle);
}

/* Supply Chain Direction Selector */
.sc-direction-selector {
    margin-bottom: 20px;
}

.sc-direction-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--color-text-secondary);
}

.sc-direction-options {
    display: flex;
    gap: 10px;
}

.sc-direction-option {
    flex: 1;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
}

.sc-direction-option:hover {
    border-color: var(--color-primary-hover);
}

.sc-direction-option:has(input:checked) {
    border-color: var(--color-primary);
    background: var(--color-success-light);
}

.sc-direction-option input[type="radio"] {
    margin-top: 3px;
    accent-color: var(--color-primary);
}

.sc-direction-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sc-direction-text strong {
    font-size: 0.9rem;
    color: var(--color-text);
}

.sc-direction-text small {
    font-size: 0.78rem;
    color: var(--color-text-muted);
}

/* Supply Chain Flowchart */
.sc-summary-cards {
    margin-bottom: 20px;
}

.sc-view-toggle {
    display: flex;
    gap: 5px;
    margin-bottom: 20px;
}

.sc-view-btn {
    padding: 8px 20px;
    border: 2px solid var(--color-border);
    background: white;
    color: var(--color-text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.sc-view-btn:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.sc-view-btn.active {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

.sc-flowchart-container {
    position: relative;
    overflow-x: auto;
    background: #f8faf9;
    border: 1px solid #e0e8e4;
    border-radius: var(--radius-lg);
    padding: 30px 20px;
    min-height: 200px;
}

.sc-svg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.sc-tiers {
    display: flex;
    flex-direction: row;
    gap: 60px;
    position: relative;
    z-index: 2;
    min-width: max-content;
}

.sc-tier {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 220px;
    max-width: 260px;
}

.sc-tier-label {
    text-align: center;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-text-muted);
    padding-bottom: 8px;
    border-bottom: 2px solid var(--color-border);
    margin-bottom: 4px;
}

.sc-node {
    background: white;
    border-radius: var(--radius-md);
    padding: 12px 14px;
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--color-border);
    transition: box-shadow 0.2s;
    cursor: pointer;
}

.sc-node:hover {
    box-shadow: 0 3px 10px rgba(0,0,0,0.15);
}

.sc-node.type-forest {
    border-left-color: var(--color-primary-hover);
}

.sc-node.type-intermediary {
    border-left-color: var(--color-warning-dark);
}

.sc-node.type-exporter {
    border-left-color: var(--color-primary-hover);
}

.sc-node.type-importer {
    border-left-color: var(--color-danger);
}

.sc-node-name {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--color-text);
    margin-bottom: 4px;
    word-wrap: break-word;
}

.sc-node-detail {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

.sc-node-volume {
    font-size: 0.8rem;
    color: var(--color-primary);
    font-weight: 600;
    margin-top: 4px;
}

.sc-node-flows {
    display: flex;
    gap: 8px;
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid var(--color-border-light);
}

.sc-node-flow-col {
    flex: 1;
    min-width: 0;
}

.sc-flow-in {
    text-align: left;
}

.sc-flow-out {
    text-align: right;
}

.sc-flow-vol {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-primary);
}

.sc-flow-gfs {
    font-size: 0.7rem;
    color: var(--color-text-muted);
}

.sc-flow-pct {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--color-warning-dark);
}

.sc-svg-overlay.sc-svg-highlight {
    z-index: 3;
}

.sc-svg-overlay path.highlighted {
    stroke: var(--color-primary);
    stroke-opacity: 0.85;
}

.sc-svg-overlay path.dimmed {
    opacity: 0.08;
}

.sc-table-container {
    margin-top: 10px;
}

/* Node Detail Table */
.node-detail-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid var(--color-primary);
}

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

.node-detail-header h3 {
    color: var(--color-primary);
    font-size: 1.1rem;
}

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

.node-detail-section .table-container {
    max-height: 500px;
    overflow-y: auto;
}

.direction-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.direction-badge.dir-incoming {
    background: var(--color-primary-light);
    color: var(--color-primary-hover);
}

.direction-badge.dir-outgoing {
    background: var(--color-warning-light);
    color: var(--color-warning-dark);
}

#nodeDetailTable small {
    color: var(--color-text-muted);
    font-size: 0.8em;
}

.node-detail-counts {
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--color-text-muted);
    margin-left: 10px;
}

.pdf-link {
    display: inline-block;
    padding: 2px 8px;
    background: var(--color-primary-light);
    color: var(--color-primary);
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.pdf-link:hover {
    background: var(--color-primary);
    color: white;
}

.pdf-badge {
    display: inline-block;
    color: var(--color-text-secondary);
    text-decoration: none;
    margin-left: 3px;
    vertical-align: middle;
    line-height: 0;
    opacity: 0.6;
    cursor: pointer;
}
.pdf-badge:hover {
    opacity: 1;
    color: var(--color-primary);
}

/* Lote Checkbox List */
.lote-list {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
}

.lote-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--color-bg-subtle);
    cursor: pointer;
    transition: background 0.15s;
}

.lote-item:last-child {
    border-bottom: none;
}

.lote-item:hover {
    background: #f8faf9;
}

.lote-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    flex-shrink: 0;
}

.lote-item-name {
    flex: 1;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--color-text);
}

.lote-item-volume {
    font-weight: 600;
    color: var(--color-primary);
    font-size: 0.9rem;
    white-space: nowrap;
}

.lote-item-gfs {
    color: var(--color-text-muted);
    font-size: 0.8rem;
    white-space: nowrap;
    min-width: 50px;
    text-align: right;
}

/* AUTEF Map */
.autef-map-container {
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid #e0e8e4;
    margin-bottom: 20px;
    padding: 10px 12px;
}

.autef-popup {
    font-size: 0.85rem;
    line-height: 1.5;
}

.autef-popup strong {
    font-size: 0.95rem;
    color: var(--color-primary);
}

.autef-popup-link {
    color: var(--color-primary);
    text-decoration: underline;
    cursor: pointer;
}

.autef-popup-link:hover {
    color: var(--color-primary-hover);
}

.autef-detail-section {
    margin-top: 20px;
    padding: 20px;
    background: #f8faf9;
    border: 2px solid var(--color-primary);
    border-radius: var(--radius-lg);
}

.autef-detail-cards .summary-card {
    padding: 10px 12px;
}

.autef-detail-cards .summary-value {
    font-size: 1.4rem;
}

.autef-detail-cards .summary-label {
    font-size: 0.75rem;
}

.autef-detail-cards {
    gap: 10px;
}

.leaflet-popup-content-wrapper {
    border-radius: var(--radius-lg);
    box-shadow: 0 3px 14px rgba(0,0,0,0.2);
}

.leaflet-popup-tip {
    box-shadow: none;
}

/* Responsive */
@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
        gap: 15px;
    }

    header h1 {
        font-size: 1.5rem;
    }

    .results-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }

    table {
        font-size: 0.85rem;
    }

    th, td {
        padding: 8px;
    }

    .tabs {
        flex-direction: column;
        gap: 5px;
    }

    .tab-btn {
        border-radius: var(--radius-md);
    }

    .summary-cards {
        flex-direction: column;
    }

    .sc-direction-options {
        flex-direction: column;
    }

    .summary-value {
        font-size: 2rem;
    }

    #autefMap {
        height: 350px !important;
    }
}

/* AUTEF Risk Assessment */
.risk-critical {
    background-color: var(--color-danger-light);
    color: var(--color-danger-dark);
}

.risk-high {
    background-color: var(--color-warning-light);
    color: var(--color-warning-dark);
}

.risk-medium {
    background-color: var(--color-warning-light);
    color: var(--color-warning-dark);
}

.risk-low {
    background-color: var(--color-primary-light);
    color: var(--color-success-dark);
}

#riskTable th,
#riskTable td {
    padding: 4px 5px;
    font-size: 0.78rem;
    white-space: nowrap;
}
#riskTable th {
    font-size: 0.72rem;
}

#riskTable th.sortable {
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}
#lookupTable th.sortable {
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

#riskTable th.sortable:hover,
#lookupTable th.sortable:hover {
    background-color: var(--color-primary-light);
}

#riskTable th.active-sort,
#lookupTable th.active-sort {
    background-color: var(--color-primary-light);
}

/* Risk table icons cell */
.risk-icons-cell {
    white-space: nowrap;
}

/* Fixed-width slot for each icon so columns align */
.icon-slot {
    display: inline-block;
    width: 20px;
    text-align: center;
    vertical-align: middle;
}

/* Polygon available icon */
.has-polygon {
    color: var(--color-primary);
    cursor: pointer;
    opacity: 0.5;
    vertical-align: middle;
    line-height: 0;
    text-decoration: none;
}
.has-polygon:hover {
    opacity: 1;
}

/* Polygon dropdown */

.poly-dropdown-wrap {
    position: relative;
    display: inline-block;
}
.poly-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    z-index: 100;
    min-width: 140px;
    padding: 4px 0;
}
.poly-dropdown-menu.show {
    display: block;
}
.poly-dropdown-menu a {
    display: block;
    padding: 5px 12px;
    font-size: 12px;
    color: var(--color-text);
    text-decoration: none;
    white-space: nowrap;
}
.poly-dropdown-menu a:hover {
    background: var(--color-bg-hover);
    color: var(--color-primary);
}

/* Column info icons in risk table */
.col-info {
    display: inline-block;
    cursor: help;
    color: #8aa4c4;
    font-size: 0.8rem;
    vertical-align: middle;
    margin-left: 2px;
    position: relative;
}

.col-info:hover {
    color: var(--color-primary);
}

.col-info-tooltip {
    display: none;
    position: fixed;
    background: var(--color-navy);
    color: #fff;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    font-size: 0.8rem;
    font-weight: normal;
    line-height: 1.4;
    width: 280px;
    white-space: normal;
    z-index: 9999;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    text-align: left;
}

.col-info:hover .col-info-tooltip {
    display: block;
}

.col-info-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: var(--color-navy);
}

/* Keep tooltip visible when near edges */
th:last-child .col-info-tooltip,
th:nth-last-child(2) .col-info-tooltip {
    left: auto;
    right: 0;
    transform: none;
}

th:last-child .col-info-tooltip::after,
th:nth-last-child(2) .col-info-tooltip::after {
    left: auto;
    right: 16px;
    transform: none;
}

th:first-child .col-info-tooltip,
th:nth-child(2) .col-info-tooltip {
    left: 0;
    transform: none;
}

th:first-child .col-info-tooltip::after,
th:nth-child(2) .col-info-tooltip::after {
    left: 16px;
    transform: none;
}

/* Area discrepancy flag in risk table */
.risk-area-flag {
    background-color: var(--color-danger-light);
    color: var(--color-danger-dark);
    cursor: help;
    position: relative;
}

/* Species comparison section headers */
.species-section-header {
    background-color: var(--color-bg-subtle);
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--color-text-secondary);
    padding: 8px 12px !important;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Risk flag column */
.risk-flag-cell {
    text-align: center;
    cursor: default;
}

.has-risk-flags {
    cursor: help;
}

.risk-flag-icon {
    color: var(--color-danger);
    font-size: 1rem;
}

.area-tooltip {
    position: fixed;
    background: var(--color-navy);
    color: white;
    padding: 8px 12px;
    border-radius: var(--radius-md);
    font-size: 0.8rem;
    white-space: nowrap;
    z-index: 9999;
    pointer-events: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* Area discrepancy alert */
.area-discrepancy-alert {
    background-color: #fff7ed;
    background-color: var(--color-warning-light);
    border: 1px solid var(--color-warning);
    border-left: 4px solid var(--color-warning);
    color: var(--color-warning-dark);
    padding: 8px 12px;
    border-radius: var(--radius-md);
    font-size: 0.82rem;
    margin-bottom: 10px;
    line-height: 1.4;
    overflow-wrap: break-word;
    word-wrap: break-word;
    transition: none;
}

/* Bookmark button */
.btn-bookmark {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--color-border);
    padding: 2px 4px;
    line-height: 1;
    transition: color 0.2s;
    vertical-align: middle;
}

.btn-bookmark:hover {
    color: var(--color-warning);
}

.btn-bookmark.saved {
    color: var(--color-warning);
}

/* Unsave button */
.btn-unsave {
    background: none;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-text-faint);
    cursor: pointer;
    padding: 2px 8px;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.btn-unsave:hover {
    color: var(--color-danger);
    border-color: var(--color-danger);
    background: var(--color-danger-light);
}

/* Note input in My AUTEFs */
.note-input {
    width: 100%;
    padding: 4px 8px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    min-width: 120px;
}

.note-input:focus {
    outline: none;
    border-color: var(--color-primary);
}

.note-cell {
    min-width: 150px;
}

.risk-autef-link {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 500;
}

.risk-autef-link:hover {
    text-decoration: underline;
}

/* Planet date selectors */
.planet-date-select {
    padding: 4px 8px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    background: white;
}

/* Risk table pagination */
.risk-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 0.85rem;
}
.risk-pagination .page-info {
    color: var(--color-text-secondary);
}
.risk-pagination .page-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}
.btn-page {
    padding: 4px 10px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: white;
    cursor: pointer;
    font-size: 0.82rem;
    color: var(--color-text);
}
.btn-page:hover:not(:disabled) {
    background: var(--color-primary-light);
    border-color: var(--color-primary-hover);
}
.btn-page:disabled {
    opacity: 0.4;
    cursor: default;
}
.btn-page-active {
    background: var(--color-primary-hover);
    color: white;
    border-color: var(--color-primary-hover);
    font-weight: bold;
}
.page-dots {
    padding: 0 4px;
    color: var(--color-text-faint);
}

/* NDFI overlay controls */
.btn-ndfi {
    padding: 3px 10px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: white;
    cursor: pointer;
    font-size: 0.8rem;
    color: var(--color-text);
}
.btn-ndfi:hover {
    background: var(--color-primary-light);
    border-color: var(--color-primary-hover);
}
.btn-ndfi.active {
    background: var(--color-primary-hover);
    color: white;
    border-color: var(--color-primary-hover);
}
.ndfi-legend {
    font-size: 0.75rem;
    color: var(--color-text-secondary);
    display: inline-flex;
    align-items: center;
    gap: 3px;
    margin-left: 6px;
}
.ndfi-swatch {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: var(--radius-sm);
    margin-left: 5px;
}

/* Inline bookmark star (used in AUTEF Exports tables) */
.btn-bookmark-inline {
    border: none;
    background: none;
    font-size: 1rem;
    color: var(--color-border);
    cursor: pointer;
    padding: 0;
    margin-right: 6px;
    vertical-align: middle;
    line-height: 1;
}
.btn-bookmark-inline:hover {
    color: var(--color-warning);
}
.btn-bookmark-inline.saved {
    color: var(--color-warning);
}

/* Entity sub-tabs inside My Entities panel */
.entity-subtabs {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
    border-bottom: 2px solid var(--color-border);
}
.entity-subtab {
    padding: 8px 14px;
    border: none;
    background: transparent;
    color: var(--color-text-secondary);
    font-size: 0.85rem;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.entity-subtab.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
    font-weight: 600;
}
.entity-subtab:hover {
    color: var(--color-primary);
}

/* Entity info panel (at top of Entity Results when searching by CPF) */
.entity-info-panel {
    background: var(--color-bg-subtle);
    border: 1px solid var(--color-border);
    border-left: 4px solid var(--color-primary);
    border-radius: var(--radius-md);
    padding: 14px 18px;
    margin-bottom: 16px;
}
.entity-info-primary-name {
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--color-navy);
    margin-bottom: 4px;
}
.entity-info-meta {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
}
.entity-info-meta code {
    background: var(--color-border);
    padding: 1px 6px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
}
.entity-info-network-link {
    white-space: nowrap;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-primary);
    text-decoration: none;
    padding: 6px 12px;
    border: 2px dashed var(--color-border);
    border-radius: var(--radius-md);
    transition: all 0.15s;
}
.entity-info-network-link:hover {
    border-color: var(--color-primary);
    background: var(--color-primary-light);
}
.entity-info-variants {
    margin-top: 6px;
    font-size: 0.85rem;
    color: var(--color-text-secondary);
}

/* Entity direction group headers */
.entity-group-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: var(--color-bg-subtle);
    border-radius: var(--radius-md);
    user-select: none;
    margin-bottom: 12px;
}
.entity-group-header:hover {
    background: var(--color-bg-hover);
}
.entity-group-count {
    color: var(--color-text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
}
.collapse-arrow {
    display: inline-block;
    width: 14px;
    font-size: 0.75rem;
    color: var(--color-text-secondary);
}
.entity-results-table {
    width: 100%;
    border-collapse: collapse;
}

/* Permit expand row */
.permit-expand-arrow {
    display: inline-block;
    font-size: 0.7rem;
    color: var(--color-text-secondary);
    user-select: none;
}
.permit-expand-cell:hover {
    background: var(--color-bg-hover);
}
.permit-detail-row > .permit-detail-cell {
    background: var(--color-bg-subtle);
    padding: 12px 16px;
    border-bottom: 1px solid var(--color-border);
}
.permit-detail-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
    background: white;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
}
.permit-detail-table th {
    background: var(--color-bg-hover);
    padding: 6px 10px;
    text-align: left;
    font-weight: 600;
    color: var(--color-text-secondary);
    border-bottom: 1px solid var(--color-border);
}
.permit-detail-table td {
    padding: 6px 10px;
    border-bottom: 1px solid var(--color-bg-hover);
}
.permit-detail-table code {
    background: var(--color-bg-hover);
    padding: 1px 5px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
}
.entity-actions {
    white-space: nowrap;
    text-align: right;
}
.entity-action-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    color: var(--color-primary);
    border-radius: var(--radius-sm);
    margin-left: 2px;
    text-decoration: none;
    transition: background 0.15s;
}
.entity-action-icon:hover {
    background: var(--color-primary-light);
    color: var(--color-navy-light);
}

/* Text-based entity links (company names, AUTEF lotes) */
a.entity-action-icon.entity-text-link {
    display: inline;
    width: auto;
    height: auto;
    margin-left: 0;
    color: inherit;
    border-radius: 0;
    transition: color 0.15s;
}
a.entity-action-icon.entity-text-link:hover {
    background: none;
    color: var(--color-primary);
    text-decoration: underline;
}

/* Permit results table column sizing */
#resultsTable {
    table-layout: fixed;
    width: 100%;
}
#resultsTable th:nth-child(1) { width: 30px; }   /* expand arrow */
#resultsTable th:nth-child(2) { width: 80px; }    /* GF ID */
#resultsTable th:nth-child(3) { width: 90px; }    /* Issue Date */
#resultsTable th:nth-child(4) { width: 18%; }     /* Origin */
#resultsTable th:nth-child(5) { width: 18%; }     /* Destination */
#resultsTable th:nth-child(6) { width: 10%; }     /* Municipality */
#resultsTable th:nth-child(7) { width: 50px; }    /* Type */
#resultsTable th:nth-child(8) { width: 90px; }    /* Status */
#resultsTable th:nth-child(9) { width: 100px; }   /* Last Checked */
#resultsTable th:nth-child(10) { width: 50px; }   /* PDF */
#resultsTable td {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
#resultsTable td:nth-child(4),
#resultsTable td:nth-child(5) {
    white-space: normal;
    font-size: 0.75rem;
    line-height: 1.3;
}
#resultsTable td.permit-detail-cell {
    overflow: visible;
    white-space: normal;
}
.entity-section-header.dir-incoming {
    color: var(--color-success);
    border-left: 3px solid var(--color-success);
}
.entity-section-header.dir-outgoing {
    color: var(--color-warning-dark);
    border-left: 3px solid var(--color-warning);
}

/* Entity resolve disambiguation table */
#entityResolveTable tr:hover {
    background: var(--color-primary-light);
}
#entityResolveTable .btn-small {
    padding: 4px 12px;
    font-size: 0.8rem;
}

/* Tablet breakpoint (768px - 1024px) */
@media (max-width: 1024px) and (min-width: 769px) {
    .container { padding: 12px; }
    header h1 { font-size: 1.5rem; }
    .tab-btn { padding: 10px 16px; font-size: 0.9rem; }
    .summary-cards { gap: 10px; }
    .summary-card { padding: 12px; }
    .summary-value { font-size: 1.8rem; }
    #riskTable th, #riskTable td { padding: 4px 6px; font-size: 0.75rem; }
    .entity-results-table th, .entity-results-table td { font-size: 0.82rem; }
}

/* Mobile improvements */
@media (max-width: 768px) {
    /* Slide-out panels: full width on mobile */
    .my-autefs-panel, .glossary-panel {
        width: 100vw !important;
        max-width: 100vw !important;
    }
    /* Header compact */
    .header-content { gap: 12px; }
    .header-logo { height: 40px; }
    header .subtitle { display: none; }
    .profile-email { max-width: 100px; font-size: 0.75rem; }
    /* Risk table horizontal scroll with readable font */
    #riskTableContainer { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    #riskTable { min-width: 900px; }
    #riskTable th, #riskTable td { font-size: 0.78rem; padding: 4px 5px; }
    /* Collapsible arrows larger on touch */
    .collapse-arrow { font-size: 1rem; width: 20px; }
    .entity-group-header { padding: 12px 14px; }
    /* Entity action icons larger tap targets */
    .entity-action-icon { width: 32px; height: 32px; }
    /* Bookmark stars larger tap target */
    .btn-bookmark, .btn-bookmark-inline { font-size: 1.2rem; }
}

/* Hover hints for discoverability */
.entity-group-header:hover .collapse-arrow {
    color: var(--color-primary);
}
.explore-exports-card:hover .summary-value,
.explore-network-card:hover .summary-value {
    transform: scale(1.05);
    transition: transform 0.15s;
}

/* Risk level text labels (supplement color coding) */
.risk-critical::after { content: ' Critical'; font-size: 0; }
.risk-high::after { content: ' High'; font-size: 0; }

/* Visually hidden text for screen readers */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Info icon tooltips (inline methodology popups) */
.info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 15px;
    height: 15px;
    border-radius: var(--radius-full);
    background: #cbd5e1;
    color: #334155;
    font-size: 0.65rem;
    font-weight: 700;
    cursor: pointer;
    margin-left: 3px;
    vertical-align: middle;
    position: relative;
    line-height: 1;
    transition: background 0.15s;
    user-select: none;
}
.info-icon:hover {
    background: #94a3b8;
    color: #fff;
}
.info-popup {
    display: none;
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    background: #1e293b;
    color: #e2e8f0;
    font-size: 0.78rem;
    font-weight: 400;
    line-height: 1.5;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    z-index: 1000;
    pointer-events: auto;
    text-align: left;
}
.info-popup::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #1e293b;
}
.info-icon.active .info-popup {
    display: block;
}
