/*
 * runtime_intake.css
 * ─────────────────────────────────────────────────────
 * Enterprise AI Runtime Control Tower design language.
 * Polished, CFO/leadership demo-ready styling.
 */

/* ══════════════════════════════════════════════════
   DESIGN TOKENS
   ══════════════════════════════════════════════════ */

:root {
    --rt-bg: #f8fafc;
    --rt-card: #ffffff;
    --rt-header-text: #0f172a;
    --rt-muted: #64748b;
    --rt-primary: #2563eb;
    --rt-primary-light: #dbeafe;
    --rt-primary-dark: #1d4ed8;
    --rt-success: #16a34a;
    --rt-success-light: #dcfce7;
    --rt-warning: #f59e0b;
    --rt-warning-light: #fef3c7;
    --rt-error: #dc2626;
    --rt-error-light: #fee2e2;
    --rt-border: #e2e8f0;
    --rt-border-light: #f1f5f9;
    --rt-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --rt-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --rt-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
    --rt-radius: 12px;
    --rt-radius-sm: 8px;
    --rt-radius-xs: 6px;
    --rt-transition: 0.2s ease;
}

/* ══════════════════════════════════════════════════
   PAGE HEADER
   ══════════════════════════════════════════════════ */

.rt-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.rt-page-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--rt-header-text);
    letter-spacing: -0.02em;
    margin: 0 0 6px 0;
    background: linear-gradient(135deg, var(--rt-primary), #7c3aed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.rt-page-subtitle {
    font-size: 0.925rem;
    color: var(--rt-muted);
    margin: 0;
    font-weight: 400;
    max-width: 520px;
}

.rt-header-actions {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

/* ══════════════════════════════════════════════════
   BUTTONS
   ══════════════════════════════════════════════════ */

.rt-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 0.875rem;
    font-weight: 600;
    border: none;
    border-radius: var(--rt-radius-sm);
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: all var(--rt-transition);
    white-space: nowrap;
}

.rt-btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.rt-btn-primary {
    background: linear-gradient(135deg, var(--rt-primary), #4f46e5);
    color: #fff;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}

.rt-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.45);
}

.rt-btn-primary:active {
    transform: translateY(0);
}

.rt-btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.rt-btn-secondary {
    background: var(--rt-card);
    color: var(--rt-header-text);
    border: 1px solid var(--rt-border);
    box-shadow: var(--rt-shadow);
}

.rt-btn-secondary:hover {
    background: var(--rt-border-light);
    border-color: #cbd5e1;
}

.rt-btn-warning {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #f59e0b;
    box-shadow: var(--rt-shadow);
}

.rt-btn-warning:hover {
    background: #fde68a;
    border-color: #d97706;
}

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

/* ══════════════════════════════════════════════════
   SECTIONS
   ══════════════════════════════════════════════════ */

.rt-section {
    margin-bottom: 28px;
}

.rt-section.hidden {
    display: none;
}

.hidden {
    display: none !important;
}

.rt-section-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.rt-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--rt-header-text);
    margin: 0;
}

.rt-section-icon {
    display: flex;
    align-items: center;
}

.rt-section-icon svg {
    width: 20px;
    height: 20px;
    color: var(--rt-primary);
}

.rt-registry-note {
    font-size: 0.8rem;
    color: var(--rt-muted);
    font-style: italic;
    margin-left: auto;
}

.rt-amount {
    text-align: right;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

/* ══════════════════════════════════════════════════
   PIPELINE — HORIZONTAL ANIMATED
   ══════════════════════════════════════════════════ */

/* ══════════════════════════════════════════════════
PIPELINE — CIRCULAR PROGRESS STEPPER
══════════════════════════════════════════════════ */

.rt-pipeline-scroll-wrapper {
    overflow-x: auto;
    padding: 14px 0 10px;
    -webkit-overflow-scrolling: touch;
}

.rt-pipeline-container {
    display: flex;
    align-items: flex-start;
    gap: 0;
    min-width: max-content;
    padding: 8px 4px 12px;
}

.rt-pipeline-stage {
    display: flex;
    align-items: flex-start;
    position: relative;
}

.rt-pipeline-stage:first-child .rt-stage-connector {
    display: none;
}

/* Connector line between circles */
.rt-stage-connector {
    width: 64px;
    height: 3px;
    background: #dbe3ef;
    margin-top: 31px;
    flex-shrink: 0;
    border-radius: 999px;
    transition: all 0.35s ease;
}

.rt-pipeline-stage.completed .rt-stage-connector {
    background: linear-gradient(90deg, var(--rt-success), #22c55e);
}

.rt-pipeline-stage.running .rt-stage-connector {
    background: linear-gradient(90deg, var(--rt-success), var(--rt-primary));
    animation: rt-connector-pulse 1.2s ease-in-out infinite;
}

@keyframes rt-connector-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.55; }
}

/* Remove rectangular card look */
.rt-stage-card {
    width: 92px;
    min-width: 92px;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;

    gap: 8px;
    transition: all 0.3s ease;
}

/* Circular step icon */
.rt-stage-icon-wrapper {
    width: 64px;
    height: 64px;
    border-radius: 50%;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #ffffff;
    border: 3px solid #dbeafe;
    box-shadow: 0 3px 10px rgba(15, 23, 42, 0.08);

    flex-shrink: 0;
    transition: all 0.3s ease;
}

.rt-stage-icon-wrapper svg {
    width: 24px;
    height: 24px;
    color: var(--rt-muted);
    transition: all 0.3s ease;
}

/* Running stage */
.rt-pipeline-stage.running .rt-stage-icon-wrapper {
    background: #ffffff;
    border-color: var(--rt-primary);
    box-shadow:
        0 0 0 6px rgba(37, 99, 235, 0.12),
        0 6px 16px rgba(37, 99, 235, 0.18);
    animation: rt-icon-pulse 1.2s ease-in-out infinite;
}

.rt-pipeline-stage.running .rt-stage-icon-wrapper svg {
    color: var(--rt-primary);
}

/* Completed stage */
.rt-pipeline-stage.completed .rt-stage-icon-wrapper {
    background: var(--rt-success);
    border-color: var(--rt-success);
    box-shadow:
        0 0 0 5px rgba(22, 163, 74, 0.12),
        0 6px 16px rgba(22, 163, 74, 0.18);
}

.rt-pipeline-stage.completed .rt-stage-icon-wrapper svg {
    color: #ffffff;
}

/* Failed stage */
.rt-pipeline-stage.failed .rt-stage-icon-wrapper {
    background: var(--rt-error);
    border-color: var(--rt-error);
    box-shadow:
        0 0 0 5px rgba(220, 38, 38, 0.12),
        0 6px 16px rgba(220, 38, 38, 0.18);
}

.rt-pipeline-stage.failed .rt-stage-icon-wrapper svg {
    color: #ffffff;
}

@keyframes rt-icon-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.06); }
}

/* Text below circle */
.rt-stage-info {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.rt-stage-title {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--rt-header-text);
    line-height: 1.18;
    white-space: normal;
    max-width: 92px;
}

/* Hide verbose description in stepper */
.rt-stage-desc {
    display: none;
}

/* Hide pending/completed badges. Circle color is enough. */
.rt-stage-badge {
    display: none;
}

/* ══════════════════════════════════════════════════
   MCP TOOL REGISTRY
   ══════════════════════════════════════════════════ */

.rt-tool-registry-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 10px;
}

.rt-tool-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--rt-card);
    border: 1px solid var(--rt-border);
    border-radius: var(--rt-radius-xs);
    box-shadow: var(--rt-shadow);
    transition: all var(--rt-transition);
}

.rt-tool-card:hover {
    border-color: var(--rt-primary);
    box-shadow: var(--rt-shadow-md);
}

.rt-tool-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: var(--rt-primary-light);
}

.rt-tool-icon svg {
    width: 14px;
    height: 14px;
    color: var(--rt-primary);
}

.rt-tool-info {
    flex: 1;
    min-width: 0;
}

.rt-tool-name {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--rt-header-text);
    font-family: 'Courier New', monospace;
    word-break: break-all;
}

.rt-tool-status {
    font-size: 0.68rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 20px;
    flex-shrink: 0;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.rt-tool-status.registered {
    background: var(--rt-success-light);
    color: var(--rt-success);
}

.rt-tool-status.missing {
    background: var(--rt-error-light);
    color: var(--rt-error);
}

.rt-tool-status.unavailable {
    background: var(--rt-warning-light);
    color: var(--rt-warning);
}

/* ══════════════════════════════════════════════════
   SUMMARY CARDS
   ══════════════════════════════════════════════════ */

.rt-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 14px;
}

.rt-summary-card {
    background: var(--rt-card);
    border: 1px solid var(--rt-border);
    border-radius: var(--rt-radius);
    padding: 18px 16px;
    box-shadow: var(--rt-shadow);
    text-align: center;
    transition: all var(--rt-transition);
    position: relative;
    overflow: hidden;
}

.rt-summary-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    border-radius: var(--rt-radius) var(--rt-radius) 0 0;
}

.rt-summary-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--rt-shadow-md);
}

.rt-summary-card.total::before { background: linear-gradient(90deg, var(--rt-primary), #7c3aed); }
.rt-summary-card.qty-due::before { background: linear-gradient(90deg, #f97316, #fb923c); }
.rt-summary-card.price-var::before { background: linear-gradient(90deg, var(--rt-warning), #fbbf24); }
.rt-summary-card.exception-value::before {
    background: linear-gradient(
        90deg,
        #b91c1c,
        #dc2626
    );
}

.rt-summary-card.aging::before {
    background: linear-gradient(90deg, #dc2626, #ef4444);
}
.rt-summary-card.short-pay::before { background: linear-gradient(90deg, #8b5cf6, #a78bfa); }
.rt-summary-card.cogs-gl::before { background: linear-gradient(90deg, #06b6d4, #22d3ee); }
.rt-summary-card.inv-pdf::before { background: linear-gradient(90deg, var(--rt-success), #4ade80); }
.rt-summary-card.po-pdf::before { background: linear-gradient(90deg, #ec4899, #f472b6); }

.rt-summary-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--rt-header-text);
    margin-bottom: 4px;
    line-height: 1;
}

.rt-summary-label {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--rt-muted);
}

/* ══════════════════════════════════════════════════
   DATA TABS
   ══════════════════════════════════════════════════ */

.rt-data-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--rt-border);
    margin-bottom: 0;
    overflow-x: auto;
}

.rt-dtab {
    padding: 10px 20px;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    color: var(--rt-muted);
    background: transparent;
    border: none;
    cursor: pointer;
    position: relative;
    white-space: nowrap;
    transition: color var(--rt-transition);
}

.rt-dtab::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: transparent;
    transition: background var(--rt-transition);
}

.rt-dtab:hover {
    color: var(--rt-primary);
}

.rt-dtab.active {
    color: var(--rt-primary);
}

.rt-dtab.active::after {
    background: var(--rt-primary);
}

/* ══════════════════════════════════════════════════
   DATA TABLE
   ══════════════════════════════════════════════════ */

.rt-data-content {
    background: var(--rt-card);
    border: 1px solid var(--rt-border);
    border-top: none;
    border-radius: 0 0 var(--rt-radius) var(--rt-radius);
    overflow: hidden;
}

.rt-table-wrapper {
    overflow-x: auto;
    max-height: 480px;
    overflow-y: auto;
}

.rt-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}

.rt-table thead {
    position: sticky;
    top: 0;
    z-index: 2;
}

.rt-table th {
    background: linear-gradient(to bottom, #f8fafc, #f1f5f9);
    color: var(--rt-muted);
    font-weight: 600;
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 10px 12px;
    text-align: left;
    white-space: nowrap;
    border-bottom: 2px solid var(--rt-border);
}

.rt-table td {
    padding: 9px 12px;
    border-bottom: 1px solid var(--rt-border-light);
    color: var(--rt-header-text);
    white-space: nowrap;
}

.rt-table tbody tr {
    transition: background var(--rt-transition);
}

.rt-table tbody tr:hover {
    background: #f8fafc;
}

.rt-table tbody tr.clickable {
    cursor: pointer;
}

.rt-table tbody tr.clickable:hover {
    background: var(--rt-primary-light);
}

/* Exception badges */
.rt-exception-badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 20px;
    white-space: nowrap;
}

.rt-exception-badge.qty-due {
    background: #fff7ed;
    color: #ea580c;
}

.rt-exception-badge.price-var {
    background: var(--rt-warning-light);
    color: #d97706;
}

.rt-exception-badge.short-pay {
    background: #f5f3ff;
    color: #7c3aed;
}

.rt-exception-badge.cogs-gl {
    background: #e0e7ff;
    color: #4338ca;
}

/* Workbench Button */
.rt-workbench-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--rt-bg);
    border: 1px solid var(--rt-border);
    border-radius: 6px;
    color: var(--rt-header-text);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.rt-workbench-btn svg {
    width: 14px;
    height: 14px;
    color: var(--rt-primary);
}

.rt-workbench-btn:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

/* Status badges */
.rt-status-badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 20px;
    white-space: nowrap;
}

.rt-status-badge.approved {
    background: var(--rt-success-light);
    color: var(--rt-success);
}

.rt-status-badge.pending {
    background: var(--rt-warning-light);
    color: #d97706;
}

.rt-status-badge.exception {
    background: var(--rt-error-light);
    color: var(--rt-error);
}

/* PDF icon button */
.rt-pdf-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all var(--rt-transition);
    background: var(--rt-error-light);
    color: var(--rt-error);
}

.rt-pdf-btn:hover {
    background: var(--rt-error);
    color: #fff;
    transform: scale(1.1);
}

.rt-pdf-btn:disabled {
    background: var(--rt-border-light);
    color: #cbd5e1;
    cursor: not-allowed;
    transform: none;
}

.rt-pdf-btn svg {
    width: 16px;
    height: 16px;
}

/* ══════════════════════════════════════════════════
   RIGHT-SIDE DRAWER
   ══════════════════════════════════════════════════ */

.rt-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(2px);
    pointer-events: none;
}

.rt-drawer-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}

.rt-drawer {
    position: fixed;
    top: 0;
    right: -520px;
    width: 500px;
    max-width: 90vw;
    height: 100vh;
    background: var(--rt-card);
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.12);
    z-index: 999;
    display: flex;
    flex-direction: column;
    transition: right 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

.rt-drawer.visible {
    right: 0;
}

.rt-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid var(--rt-border);
    background: linear-gradient(135deg, #f8fafc, #eef2ff);
    flex-shrink: 0;
}

.rt-drawer-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--rt-header-text);
    margin: 0;
}

.rt-drawer-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 6px;
    color: var(--rt-muted);
    transition: all var(--rt-transition);
}

.rt-drawer-close:hover {
    background: var(--rt-error-light);
    color: var(--rt-error);
}

.rt-drawer-close svg {
    width: 18px;
    height: 18px;
}

.rt-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
}

.rt-drawer-section {
    margin-bottom: 22px;
}

.rt-drawer-section-title {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--rt-primary);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.rt-drawer-section-title::before {
    content: '';
    width: 3px;
    height: 14px;
    background: var(--rt-primary);
    border-radius: 2px;
}

.rt-drawer-field {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 6px 0;
    border-bottom: 1px solid var(--rt-border-light);
    gap: 12px;
}

.rt-drawer-field:last-child {
    border-bottom: none;
}

.rt-drawer-label {
    font-size: 0.78rem;
    color: var(--rt-muted);
    font-weight: 500;
    flex-shrink: 0;
    min-width: 120px;
}

.rt-drawer-value {
    font-size: 0.82rem;
    color: var(--rt-header-text);
    font-weight: 600;
    text-align: right;
    word-break: break-word;
}

/* Agent Action Box */
.rt-agent-action-box {
    background: linear-gradient(135deg, #eef2ff, #dbeafe);
    border: 1px solid #c7d2fe;
    border-radius: var(--rt-radius-sm);
    padding: 14px 16px;
    margin-top: 8px;
}

.rt-agent-action-box .rt-action-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--rt-primary);
    margin-bottom: 6px;
}

.rt-agent-action-box .rt-action-text {
    font-size: 0.85rem;
    color: var(--rt-header-text);
    font-weight: 500;
    line-height: 1.5;
}

/* Drawer attachment buttons */
.rt-drawer-attach-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    font-size: 0.78rem;
    font-weight: 600;
    border: 1px solid var(--rt-border);
    border-radius: var(--rt-radius-xs);
    background: var(--rt-card);
    cursor: pointer;
    transition: all var(--rt-transition);
    color: var(--rt-header-text);
    margin-right: 8px;
    margin-bottom: 6px;
}

.rt-drawer-attach-btn:hover {
    border-color: var(--rt-primary);
    color: var(--rt-primary);
    background: var(--rt-primary-light);
}

.rt-drawer-attach-btn svg {
    width: 14px;
    height: 14px;
}

/* SOP Mapping Badge */
.rt-sop-badge {
    display: inline-block;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: var(--rt-radius-xs);
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    color: var(--rt-success);
    border: 1px solid #bbf7d0;
}

/* ══════════════════════════════════════════════════
   SUCCESS BANNER
   ══════════════════════════════════════════════════ */

.rt-success-banner {
    margin-top: 24px;
    margin-bottom: 24px;
    animation: rt-slide-up 0.5s ease;
}

.rt-success-banner.hidden {
    display: none;
}

.rt-success-banner-content {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px 24px;
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    border: 1px solid #bbf7d0;
    border-radius: var(--rt-radius);
    box-shadow: var(--rt-shadow-md);
}

.rt-success-icon svg {
    width: 28px;
    height: 28px;
    color: var(--rt-success);
    flex-shrink: 0;
}

.rt-success-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.rt-success-text strong {
    font-size: 0.95rem;
    color: #166534;
}

.rt-success-text span {
    font-size: 0.85rem;
    color: #15803d;
}

.rt-mcp-note {
    font-style: italic;
    opacity: 0.8;
    margin-top: 4px;
}

@keyframes rt-slide-up {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ══════════════════════════════════════════════════
   TOAST NOTIFICATIONS
   ══════════════════════════════════════════════════ */

.rt-toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rt-toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    border-radius: var(--rt-radius-sm);
    box-shadow: var(--rt-shadow-lg);
    font-size: 0.85rem;
    font-weight: 500;
    animation: rt-toast-in 0.3s ease;
    max-width: 420px;
}

.rt-toast.success {
    background: var(--rt-success);
    color: #fff;
}

.rt-toast.error {
    background: var(--rt-error);
    color: #fff;
}

.rt-toast.info {
    background: var(--rt-primary);
    color: #fff;
}

.rt-toast.warning {
    background: var(--rt-warning);
    color: #fff;
}

@keyframes rt-toast-in {
    from { opacity: 0; transform: translateX(40px); }
    to { opacity: 1; transform: translateX(0); }
}

/* ══════════════════════════════════════════════════
   EMPTY STATE
   ══════════════════════════════════════════════════ */

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

.rt-empty-state svg {
    width: 48px;
    height: 48px;
    margin-bottom: 12px;
    opacity: 0.4;
}

.rt-empty-state p {
    font-size: 0.9rem;
    margin: 0;
}

/* ══════════════════════════════════════════════════
   LOADING SPINNER
   ══════════════════════════════════════════════════ */

.rt-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: rt-spin 0.6s linear infinite;
}

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

/* ══════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .rt-page-header {
        flex-direction: column;
    }
    
    .rt-header-actions {
        width: 100%;
    }
    
    .rt-header-actions .rt-btn {
        flex: 1;
        justify-content: center;
    }
    
    .rt-summary-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .rt-tool-registry-grid {
        grid-template-columns: 1fr;
    }
    
    .rt-drawer {
        width: 100%;
        max-width: 100vw;
    }
}
