/* NetSuite Agent Platform — Admin UI Styles */

:root {
    --color-bg: #f8f9fa;
    --color-white: #ffffff;
    --color-text: #212529;
    --color-text-muted: #6c757d;
    --color-border: #dee2e6;
    --color-primary: #0d6efd;
    --color-primary-hover: #0b5ed7;
    --color-green: #198754;
    --color-amber: #fd7e14;
    --color-red: #dc3545;
    --color-red-light: #f8d7da;
    --color-blue-light: #cfe2ff;
    --radius: 6px;
}

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

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

/* Navigation */
.nav-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
    background: var(--color-white);
    border-bottom: 1px solid var(--color-border);
    height: 56px;
}

.nav-left { display: flex; align-items: center; gap: 8px; }
.nav-right { display: flex; align-items: center; gap: 16px; }
.nav-brand { font-weight: 700; font-size: 14px; margin-right: 16px; }

.nav-tab {
    padding: 16px 12px;
    text-decoration: none;
    color: var(--color-text-muted);
    font-size: 14px;
    border-bottom: 2px solid transparent;
}

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

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

.nav-link {
    font-size: 13px;
    color: var(--color-text-muted);
    text-decoration: none;
}

.health-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    text-decoration: none;
    color: var(--color-text);
}

.health-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.health-dot.green { background: var(--color-green); }
.health-dot.amber { background: var(--color-amber); }
.health-dot.red { background: var(--color-red); }

/* Banners */
.banner {
    padding: 12px 24px;
    font-size: 14px;
}

.banner a { color: inherit; font-weight: 600; }

.banner-error {
    background: var(--color-red-light);
    color: var(--color-red);
    border-bottom: 1px solid var(--color-red);
}

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

/* Content */
.content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
}

h2 { margin-bottom: 20px; font-size: 22px; }
h3 { margin: 24px 0 12px; font-size: 16px; }

/* Metric Cards */
.metric-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.metric-card {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 20px;
}

.metric-label { font-size: 13px; color: var(--color-text-muted); }
.metric-value { font-size: 24px; font-weight: 700; margin-top: 4px; }

/* Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-size: 14px;
}

.data-table th, .data-table td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid var(--color-border);
}

.data-table th {
    background: var(--color-bg);
    font-weight: 600;
    font-size: 13px;
    color: var(--color-text-muted);
}

.empty-state { text-align: center; color: var(--color-text-muted); padding: 24px; }

/* Badges */
.badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.badge-success { background: #d1e7dd; color: var(--color-green); }
.badge-failed { background: var(--color-red-light); color: var(--color-red); }
.badge-partial { background: #fff3cd; color: #856404; }
.badge-skipped { background: #e2e3e5; color: var(--color-text-muted); }
.badge-pending { background: #e2e3e5; color: var(--color-text-muted); }

/* Buttons */
.btn {
    display: inline-block;
    padding: 8px 16px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--color-white);
    color: var(--color-text);
    font-size: 14px;
    cursor: pointer;
}

.btn:hover { background: var(--color-bg); }
.btn-primary { background: var(--color-primary); color: white; border-color: var(--color-primary); }
.btn-primary:hover { background: var(--color-primary-hover); }
.btn-small { padding: 4px 10px; font-size: 12px; }
.btn-large { padding: 12px 24px; font-size: 16px; }
.btn-secondary { background: var(--color-white); }

/* Bug Cards */
.bug-card {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 12px;
}

.bug-open { border-left: 4px solid var(--color-red); }
.bug-resolved { border-left: 4px solid var(--color-green); }

.bug-header { display: flex; justify-content: space-between; align-items: center; }
.bug-agent { font-weight: 600; }
.bug-meta { font-size: 13px; color: var(--color-text-muted); margin: 6px 0; }
.bug-actions { display: flex; gap: 8px; margin-top: 12px; }

/* Code Blocks */
.code-block {
    background: #f1f3f5;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 12px;
    font-family: 'SF Mono', 'Consolas', 'Liberation Mono', monospace;
    font-size: 13px;
    white-space: pre-wrap;
    word-wrap: break-word;
    max-height: 400px;
    overflow-y: auto;
}

/* Prompt Cards */
.prompt-card {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 16px;
}

.prompt-header { display: flex; justify-content: space-between; align-items: center; }
.prompt-name { font-weight: 600; font-size: 16px; }

.version-pill {
    background: var(--color-blue-light);
    color: var(--color-primary);
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.prompt-meta { font-size: 13px; color: var(--color-text-muted); margin: 6px 0 12px; }
.prompt-text { margin-bottom: 12px; }

.prompt-text[contenteditable="true"] {
    outline: 2px solid var(--color-primary);
    cursor: text;
}

.prompt-actions { display: flex; gap: 8px; margin-top: 12px; }
.version-history { margin-top: 16px; }

.change-note-area {
    margin: 12px 0;
}

.change-note-area label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 4px;
}

.hint { font-weight: 400; color: var(--color-text-muted); }

.change-note-input {
    width: 100%;
    padding: 8px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-size: 14px;
    resize: vertical;
}

/* Config */
.sync-trigger-section {
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.config-edit-input {
    padding: 4px 8px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-size: 14px;
}

.read-only-label {
    font-size: 12px;
    color: var(--color-text-muted);
}

/* Empty State */
.empty-state-card {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 48px;
    text-align: center;
    color: var(--color-text-muted);
}

.checkmark {
    display: block;
    font-size: 48px;
    color: var(--color-green);
    margin-bottom: 12px;
}

/* Resolved Section */
.resolved-section {
    margin-top: 24px;
}

.resolved-section summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--color-text-muted);
    margin-bottom: 12px;
}

/* Login */
.login-body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.login-card {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 40px;
    width: 360px;
    text-align: center;
}

.login-card h1 { font-size: 20px; margin-bottom: 4px; }
.login-subtitle { color: var(--color-text-muted); font-size: 14px; margin-bottom: 24px; }

.login-error {
    background: var(--color-red-light);
    color: var(--color-red);
    padding: 8px 12px;
    border-radius: var(--radius);
    font-size: 14px;
    margin-bottom: 16px;
}

.login-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-size: 14px;
    margin-bottom: 16px;
}

.login-btn { width: 100%; }

/* Tooltip */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip-text {
    background: var(--color-text);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
}

/* DB Explorer */
.card-link {
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.15s;
}

.card-link:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-color: var(--color-primary);
}

.metric-sub {
    font-size: 12px;
    color: var(--color-text-muted);
    margin-top: 4px;
}

.cell-truncate {
    max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
    justify-content: center;
}

.page-info {
    font-size: 14px;
    color: var(--color-text-muted);
}

/* Login checkbox */
.login-checkbox {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--color-text-muted);
    margin-bottom: 16px;
    justify-content: center;
    cursor: pointer;
}

/* Data Sources layout */
.ds-layout {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.ds-sources { flex: 1; min-width: 0; }
.ds-chat { flex: 1; min-width: 0; background: var(--color-white); border: 1px solid var(--color-border); border-radius: var(--radius); }

.ds-panel { }

.ds-sources .btn { margin-top: 16px; }

/* Chat header */
.ds-chat-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--color-border);
}

.ds-tabs { display: flex; gap: 4px; }

.ds-tab {
    padding: 4px 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--color-bg);
    cursor: pointer;
    font-size: 13px;
}

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

.ds-session-select { flex: 1; }
.ds-session-select select {
    width: 100%;
    padding: 4px 8px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-size: 13px;
}

/* Chat messages */
.ds-messages {
    height: 400px;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ds-msg {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: var(--radius);
    font-size: 14px;
    line-height: 1.5;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.ds-msg-user {
    align-self: flex-end;
    background: var(--color-primary);
    color: white;
}

.ds-msg-assistant {
    align-self: flex-start;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
}

.ds-typing { color: var(--color-text-muted); font-style: italic; }

/* Chat input */
.ds-input-row {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid var(--color-border);
}

.ds-input-row input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-size: 14px;
}

/* Proposal cards */
.ds-proposal-card {
    background: var(--color-white);
    border: 2px solid var(--color-primary);
    border-radius: var(--radius);
    padding: 16px;
    margin: 8px 0;
    max-width: 90%;
}

.ds-proposal-summary {
    font-weight: 600;
    margin-bottom: 12px;
    font-size: 14px;
}

.ds-proposal-item {
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 12px;
    margin-bottom: 8px;
}

.ds-proposal-header { margin-bottom: 6px; }
.ds-proposal-reason { font-size: 13px; color: var(--color-text-muted); margin-bottom: 6px; }
.ds-proposal-fields { font-size: 12px; color: var(--color-text-muted); margin-bottom: 8px; }
.ds-proposal-add-all { margin-top: 8px; }

/* Proposal success/error states */
.ds-proposal-success {
    border-color: var(--color-green);
    background: #f0fdf4;
}

.ds-success-icon { color: var(--color-green); font-size: 18px; font-weight: bold; }
.ds-success-text { color: var(--color-green); }

.ds-proposal-error {
    border-color: var(--color-red);
    background: #fef2f2;
}

.ds-error-icon { color: var(--color-red); font-size: 18px; font-weight: bold; }
.ds-error-text { color: var(--color-red); }

.ds-btn-done {
    background: #d1e7dd;
    color: var(--color-green);
    border-color: var(--color-green);
    cursor: default;
}

/* Layer 3: catalog comparison panel — rendered inside each
   proposed table item after fetchAndRenderCatalogComparison()
   resolves. Two-column read-only display of proposed fields
   (left, with ✓ / ✗ markers) vs. catalog fields (right). When
   the record type is missing from the live catalog, the whole
   panel collapses to a single amber warning line. */
.ds-catalog-compare {
    margin-top: 10px;
    padding: 10px 12px;
    background: #f8f9fa;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-size: 12px;
}

.ds-catalog-compare-warning {
    background: #fff3cd;
    border-color: var(--color-amber);
}

.ds-catalog-warning {
    margin: 0;
    color: var(--color-amber);
    font-size: 13px;
}

.ds-catalog-compare-columns {
    display: flex;
    gap: 16px;
}

.ds-catalog-compare-col {
    flex: 1;
    min-width: 0;
}

.ds-catalog-compare-col h5 {
    margin: 0 0 6px;
    font-size: 11px;
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.ds-catalog-compare-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ds-catalog-compare-list li {
    padding: 2px 0;
    line-height: 1.6;
    word-break: break-all;
}

.ds-catalog-compare-list code {
    font-size: 11px;
    background: transparent;
    padding: 0;
}

.ds-compare-ok { color: var(--color-green); }
.ds-compare-miss { color: var(--color-red); }

.ds-compare-check,
.ds-compare-cross {
    font-weight: bold;
}

.ds-compare-type {
    color: var(--color-text-muted);
    font-size: 11px;
    font-style: italic;
}

/* Add-field proposal styling */
.ds-compare-existing { color: var(--color-text-muted); font-weight: bold; }
.ds-compare-new { color: var(--color-green); font-weight: bold; }
.ds-compare-tag-existing { color: var(--color-text-muted); font-size: 11px; font-style: italic; }
.ds-compare-tag-new { color: var(--color-green); font-size: 11px; font-weight: 600; }
.ds-compare-add-summary { color: var(--color-text-muted); font-size: 13px; font-style: italic; }

.ds-compare-empty {
    color: var(--color-text-muted);
    font-style: italic;
}

/* Layer 4: replace-existing flow. Rendered inside a
   ds-proposal-error card when the registration attempt returned
   a conflict (pg_table_name already exists). The button
   re-submits the registration with replace=true; the hint
   explains the "add only, never drop" semantics. On success, the
   item flips to ds-proposal-success and
   replaceItemWithReplaceSuccess populates a Replaced badge plus
   any warnings from the backend (columns left in place / type
   mismatches). */
.ds-replace-btn {
    margin-top: 10px;
    background: var(--color-amber);
    color: white;
    border-color: var(--color-amber);
}

.ds-replace-btn:hover {
    background: #e86a00;
    border-color: #e86a00;
}

.ds-replace-hint {
    margin: 8px 0 0;
    font-size: 12px;
    color: var(--color-text-muted);
    font-style: italic;
}

.ds-replace-warnings {
    margin-top: 10px;
    padding: 8px 10px;
    background: #fff3cd;
    border: 1px solid var(--color-amber);
    border-radius: var(--radius);
}

.ds-replace-warning {
    margin: 0 0 6px;
    font-size: 12px;
    color: var(--color-amber);
    line-height: 1.4;
}

.ds-replace-warning:last-child {
    margin-bottom: 0;
}

/* Prompt viewer */
.ds-prompt-section { padding: 16px; }
.ds-prompt-section h4 { margin-bottom: 8px; font-size: 14px; }

.ds-prompt-display {
    background: #f1f3f5;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 12px;
    font-family: 'SF Mono', monospace;
    font-size: 13px;
    white-space: pre-wrap;
    max-height: 300px;
    overflow-y: auto;
}

.ds-schema-display {
    background: #f1f3f5;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 12px;
    font-size: 12px;
    max-height: 400px;
    overflow-y: auto;
}

.ds-prompt-actions { display: flex; gap: 8px; margin-top: 8px; }

#prompt-textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-family: 'SF Mono', monospace;
    font-size: 13px;
    resize: vertical;
}

/* Schema catalog */
.ds-schema-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    margin-bottom: 12px;
    font-size: 13px;
}

.ds-schema-filters {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.ds-schema-filters .btn.active {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

.ds-source-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
}

.schema-row {
    cursor: pointer;
}

.schema-row:hover {
    background: var(--color-bg);
}

.schema-detail-row {
    background: #f1f3f5;
}

.schema-detail-cell {
    padding: 0 !important;
    border-bottom: 1px solid var(--color-border);
}

.schema-detail-panel {
    padding: 16px 24px 20px 40px;
    background: #f1f3f5;
}

.schema-fields-table {
    font-size: 13px;
    background: var(--color-white);
    margin-bottom: 12px;
}

.schema-fields-table code {
    font-family: 'SF Mono', 'Consolas', monospace;
    font-size: 12px;
    color: var(--color-primary);
}

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

/* Column health warning/failed rows on the Data Sources page. */
.data-table td.column-health-warning {
    background: #fff3cd;
    color: var(--color-amber);
    font-size: 13px;
    padding: 8px 12px;
    border-left: 3px solid var(--color-amber);
}
.data-table td.column-health-failed {
    background: var(--color-red-light);
    color: var(--color-red);
    font-size: 13px;
    padding: 8px 12px;
    border-left: 3px solid var(--color-red);
}

/* badge-warning for degraded status on status page */
.badge-warning {
    background: #fff3cd;
    color: #664d03;
    border: 1px solid #ffecb5;
}

/* Reports chat builder (step 2b) — slide-in chat panel on
   the reports page. Mirrors the datasources panel pattern but
   uses .rpt-* prefix to avoid cross-page coupling. */
.rpt-layout {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.rpt-main { flex: 1; min-width: 0; }

.rpt-chat {
    flex: 1;
    min-width: 0;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    max-height: 80vh;
}

.rpt-chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    border-bottom: 1px solid var(--color-border);
}

.rpt-chat-header h4 { margin: 0; font-size: 14px; }

.rpt-messages {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    min-height: 300px;
    max-height: 60vh;
}

.rpt-msg {
    margin-bottom: 10px;
    padding: 8px 12px;
    border-radius: var(--radius);
    font-size: 14px;
    white-space: pre-wrap;
    word-break: break-word;
}

.rpt-msg-user {
    background: var(--color-primary);
    color: white;
    margin-left: 20%;
}

.rpt-msg-assistant {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    margin-right: 10%;
}

.rpt-typing { color: var(--color-text-muted); font-style: italic; }

.rpt-input-row {
    display: flex;
    gap: 8px;
    padding: 12px;
    border-top: 1px solid var(--color-border);
}

.rpt-input-row input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-size: 14px;
}

/* Report proposal card — rendered inside the chat when the AI
   emits a <report> block. Shows name, badge, description,
   truncated SQL, a live 5-row preview, and a Save/Update button. */
.rpt-proposal-card {
    background: var(--color-white);
    border: 2px solid var(--color-primary);
    border-radius: var(--radius);
    padding: 16px;
    margin: 8px 0;
    max-width: 95%;
}

.rpt-proposal-header { margin-bottom: 6px; }
.rpt-proposal-header strong { font-size: 14px; }

.rpt-proposal-desc {
    font-size: 13px;
    color: var(--color-text-muted);
    margin: 4px 0 10px;
}

.rpt-proposal-sql {
    margin-bottom: 10px;
}

.rpt-proposal-sql label {
    font-size: 12px;
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.rpt-proposal-sql pre {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 10px 12px;
    font-size: 12px;
    font-family: 'SF Mono', 'Consolas', monospace;
    white-space: pre-wrap;
    word-break: break-all;
    margin: 4px 0 0;
    max-height: 200px;
    overflow-y: auto;
}

.rpt-proposal-preview { margin-bottom: 10px; }

.rpt-preview-loading {
    font-size: 13px;
    color: var(--color-text-muted);
    font-style: italic;
    margin: 0;
}

.rpt-preview-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--color-text-muted);
    margin: 0 0 4px;
}

.rpt-preview-table {
    font-size: 12px;
}

.rpt-preview-error {
    background: var(--color-red-light);
    color: var(--color-red);
    padding: 8px 10px;
    border-radius: var(--radius);
    font-size: 13px;
}

.rpt-preview-empty {
    font-size: 13px;
    color: var(--color-text-muted);
    font-style: italic;
    margin: 0;
}

.rpt-proposal-actions { margin-top: 8px; }

.rpt-btn-done {
    background: #d1e7dd;
    color: var(--color-green);
    border-color: var(--color-green);
    cursor: default;
}

/* Share panel (Phase 2 Step 2) */
.share-panel {
    margin-top: 8px;
    padding: 10px 12px;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
}

.share-url-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.share-url-input {
    flex: 1;
    padding: 6px 10px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-size: 12px;
    font-family: monospace;
    background: var(--color-white);
    color: var(--color-text);
    min-width: 0;
}

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

.share-status {
    font-size: 12px;
    font-weight: 600;
}

.share-status-active { color: var(--color-green); }
.share-status-disabled { color: var(--color-text-muted); }

.share-btn-disable {
    color: var(--color-red);
    border-color: var(--color-red);
}
.share-btn-disable:hover {
    background: var(--color-red-light);
}

/* Field catalog ns_name display */
code.ns-name {
    color: var(--color-text-muted);
    font-size: 11px;
}

/* Schedule panel (Phase 2 Step 3) */
.schedule-panel {
    margin-top: 8px;
    padding: 10px 12px;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
}

.schedule-status-line {
    font-size: 13px;
    margin-bottom: 10px;
}

.schedule-status-line code {
    background: var(--color-white);
    padding: 2px 6px;
    border-radius: 3px;
    border: 1px solid var(--color-border);
    font-size: 12px;
}

.schedule-presets {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.schedule-presets label {
    font-size: 12px;
    font-weight: 600;
    color: var(--color-text-muted);
}

.schedule-form-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.schedule-form-row label {
    font-size: 12px;
    font-weight: 600;
    color: var(--color-text-muted);
    min-width: 65px;
}

.schedule-cron-input,
.schedule-recipients-input {
    flex: 1;
    padding: 6px 10px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-size: 13px;
}

.schedule-cron-input {
    font-family: monospace;
    max-width: 200px;
}

.schedule-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
}

.schedule-loading {
    font-size: 13px;
    color: var(--color-text-muted);
    font-style: italic;
}

/* Report email form (Phase 2 Step 1) */
.report-email-form {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    padding: 8px 12px;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
}

.report-email-form .email-input {
    flex: 1;
    padding: 6px 10px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-size: 13px;
    min-width: 180px;
}

.email-status {
    font-size: 12px;
    white-space: nowrap;
}

.email-status-success { color: var(--color-green); }
.email-status-error { color: var(--color-red); }

/* Responsive */
@media (max-width: 768px) {
    .metric-cards { grid-template-columns: repeat(2, 1fr); }
    .nav-bar { padding: 0 12px; }
    .content { padding: 16px; }
    .rpt-layout { flex-direction: column; }
    .report-email-form { flex-wrap: wrap; }
}
