<style>
        /* =============================================
           APP SHELL STYLES
           ============================================= */
        :root {
            --swept-blue: #3592FF;
            --swept-dark-blue: #2e72d9;
            --swept-light-blue: #e5f0ff;
            --swept-green: #00C79F;
            --swept-dark: #37383F;
            --swept-light-gray: #F5F5F7;
            --swept-gray: #E0E0E0;
            --swept-red: #FF647C;
            --swept-orange: #F59E0B;
            --swept-yellow: #FCD34D;

            --topbar-height: 64px;
        }

        .contract-renewal-tool-embed * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        .contract-renewal-tool-embed {
            font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
            background: #f5f7fa;
            color: #1e293b;
            line-height: 1.5;
        }

        /* App Layout */
        .app-layout {
            display: flex;
            min-height: 100vh;
        }

        /* Main Content */
        .app-main {
            flex: 1;
            margin-left: 0;
            display: flex;
            flex-direction: column;
            min-height: 100vh;
        }

        /* Topbar */
        .app-topbar {
            height: var(--topbar-height);
            background: white;
            border-bottom: 1px solid #e2e8f0;
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0 1.5rem;
            position: sticky;
            top: 0;
            z-index: 50;
            transition: transform 0.2s ease;
        }

        .app-topbar.topbar-hidden {
            transform: translateY(-100%);
        }

        .topbar-title {
            font-size: 1.25rem;
            font-weight: 600;
            color: var(--swept-dark);
        }

        .topbar-subtitle {
            font-size: 0.8rem;
            color: #64748b;
            margin-top: 0.1rem;
        }

        .topbar-actions {
            display: flex;
            gap: 0.75rem;
        }

        /* Buttons */
        .btn {
            display: inline-flex;
            align-items: center;
            gap: 0.4rem;
            padding: 0.5rem 1rem;
            border-radius: 8px;
            font-size: 0.875rem;
            font-weight: 500;
            cursor: pointer;
            border: none;
            transition: all 0.15s;
            min-height: 40px;
        }

        .btn-icon {
            width: 16px;
            height: 16px;
            stroke: currentColor;
            fill: none;
            stroke-width: 2;
        }

        .btn-ghost {
            background: transparent;
            color: #475569;
        }

        .btn-ghost:hover {
            background: #f1f5f9;
        }

        .btn-primary {
            background: linear-gradient(135deg, var(--swept-blue), var(--swept-dark-blue));
            color: white;
        }

        .btn-primary:hover {
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(53, 146, 255, 0.3);
        }

        .btn-secondary {
            background: #f1f5f9;
            color: #475569;
        }

        .btn-secondary:hover {
            background: #e2e8f0;
        }

        .btn-success {
            background: linear-gradient(135deg, #06B68A, #018F72);
            color: #ffffff;
            font-weight: 700;
        }

        .btn-success:hover {
            background: linear-gradient(135deg, #05a97f, #017e65);
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(1, 143, 114, 0.32);
        }

        /* App Content */
        .app-content {
            flex: 1;
            padding: 1.5rem;
        }

        /* Feedback Section */
        .feedback-section {
            background: #eef2f7;
            padding: 3rem 1.5rem;
            text-align: center;
        }

        .feedback-section__inner {
            max-width: 800px;
            margin: 0 auto;
        }

        /* =============================================
           CONTRACT RENEWAL STYLES
           ============================================= */
        .renewal-container {
            max-width: 1200px;
            margin: 0 auto;
        }

        /* Contract Selector Card */
        .selector-card {
            background: white;
            border-radius: 12px;
            padding: 1.5rem;
            margin-bottom: 1.5rem;
            box-shadow: 0 1px 3px rgba(0,0,0,0.1);
        }

        .selector-card h3 {
            font-size: 0.9rem;
            color: #64748b;
            margin-bottom: 1rem;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .selector-row {
            display: flex;
            gap: 1rem;
            align-items: flex-end;
        }

        .selector-row .form-group {
            flex: 1;
        }

        .form-group label {
            display: block;
            font-size: 0.85rem;
            font-weight: 500;
            color: #475569;
            margin-bottom: 0.4rem;
        }

        select, input, textarea {
            width: 100%;
            padding: 0.6rem 0.75rem;
            border: 1px solid #e2e8f0;
            border-radius: 8px;
            font-size: 0.9rem;
            font-family: inherit;
            transition: all 0.2s;
        }

        select:focus, input:focus, textarea:focus {
            outline: none;
            border-color: var(--swept-blue);
            box-shadow: 0 0 0 3px rgba(53, 146, 255, 0.1);
        }

        .contract-period {
            background: #f8fafc;
            padding: 0.75rem 1rem;
            border-radius: 8px;
            font-size: 0.9rem;
            color: #64748b;
        }

        .contract-period strong {
            color: #1e293b;
        }

        /* Comparison Grid */
        .comparison-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 1.5rem;
            margin-bottom: 1.5rem;
        }

        .comparison-card {
            background: white;
            border-radius: 12px;
            padding: 1.5rem;
            box-shadow: 0 1px 3px rgba(0,0,0,0.1);
        }

        .comparison-card.original {
            border-top: 4px solid var(--swept-blue);
        }

        .comparison-card.actual {
            border-top: 4px solid var(--swept-orange);
        }

        .comparison-card h3 {
            font-size: 0.85rem;
            color: #64748b;
            margin-bottom: 1rem;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .comparison-card h3 .badge {
            padding: 0.2rem 0.5rem;
            border-radius: 4px;
            font-size: 0.7rem;
            font-weight: 600;
        }

        .comparison-card.original h3 .badge {
            background: var(--swept-light-blue);
            color: var(--swept-blue);
        }

        .comparison-card.actual h3 .badge {
            background: #FEF3C7;
            color: #D97706;
        }

        .metric-row {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0.75rem 0;
            border-bottom: 1px solid #f1f5f9;
        }

        .metric-row:last-child {
            border-bottom: none;
        }

        .metric-label {
            font-size: 0.9rem;
            color: #475569;
        }

        .metric-value {
            font-size: 1.1rem;
            font-weight: 600;
            color: #1e293b;
        }

        .metric-value.highlight {
            font-size: 1.25rem;
        }

        .metric-input {
            width: 120px;
            text-align: right;
        }

        /* Variance Indicators */
        .variance-badge {
            display: inline-flex;
            align-items: center;
            gap: 0.25rem;
            padding: 0.2rem 0.5rem;
            border-radius: 4px;
            font-size: 0.75rem;
            font-weight: 600;
            margin-left: 0.5rem;
        }

        .variance-badge.negative {
            background: #FEE2E2;
            color: #DC2626;
        }

        .variance-badge.positive {
            background: #D1FAE5;
            color: #059669;
        }

        .variance-badge.warning {
            background: #FEF3C7;
            color: #D97706;
        }

        /* Scope Creep Section */
        .scope-creep-card {
            background: white;
            border-radius: 12px;
            padding: 1.5rem;
            margin-bottom: 1.5rem;
            box-shadow: 0 1px 3px rgba(0,0,0,0.1);
            border-top: 4px solid var(--swept-red);
        }

        .scope-creep-card h3 {
            font-size: 0.85rem;
            color: #64748b;
            margin-bottom: 1rem;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .scope-creep-card h3 .alert-icon {
            color: var(--swept-red);
        }

        .scope-list {
            margin-bottom: 1rem;
        }

        .scope-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0.75rem;
            background: #FEF2F2;
            border-radius: 8px;
            margin-bottom: 0.5rem;
            border-left: 3px solid var(--swept-red);
        }

        .scope-item-info {
            flex: 1;
        }

        .scope-item-desc {
            font-weight: 500;
            color: #1e293b;
        }

        .scope-item-date {
            font-size: 0.8rem;
            color: #64748b;
        }

        .scope-item-hours {
            font-weight: 600;
            color: var(--swept-red);
            margin-right: 1rem;
        }

        .scope-item-remove {
            background: none;
            border: none;
            color: #94a3b8;
            cursor: pointer;
            font-size: 1.25rem;
            padding: 0.25rem;
        }

        .scope-item-remove:hover {
            color: var(--swept-red);
        }

        .scope-add-form {
            display: grid;
            grid-template-columns: 2fr 1fr 1fr auto;
            gap: 0.75rem;
            align-items: flex-end;
            padding-top: 1rem;
            border-top: 1px solid #f1f5f9;
        }

        .scope-total {
            background: #FEF2F2;
            padding: 0.75rem 1rem;
            border-radius: 8px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-top: 1rem;
        }

        .scope-total-label {
            font-weight: 500;
            color: #991B1B;
        }

        .scope-total-value {
            font-size: 1.1rem;
            font-weight: 700;
            color: var(--swept-red);
        }

        /* Recommendation Card */
        .recommendation-card {
            background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 100%);
            border-radius: 12px;
            padding: 1.5rem;
            margin-bottom: 1.5rem;
            border: 1px solid #93C5FD;
        }

        .recommendation-card h3 {
            font-size: 0.85rem;
            color: #1E40AF;
            margin-bottom: 1rem;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .recommendation-content {
            display: grid;
            grid-template-columns: 2fr 1fr;
            gap: 1.5rem;
            align-items: center;
        }

        .recommendation-rate {
            text-align: center;
            padding: 1rem;
            background: white;
            border-radius: 12px;
            box-shadow: 0 2px 8px rgba(30, 64, 175, 0.1);
        }

        .recommendation-rate-label {
            font-size: 0.85rem;
            color: #64748b;
            margin-bottom: 0.5rem;
        }

        .recommendation-rate-value {
            font-size: 2rem;
            font-weight: 700;
            color: #1E40AF;
        }

        .recommendation-rate-change {
            font-size: 0.9rem;
            color: #059669;
            font-weight: 600;
            margin-top: 0.25rem;
        }

        .recommendation-details p {
            margin-bottom: 0.75rem;
            color: #1E40AF;
        }

        .recommendation-details strong {
            color: #1e293b;
        }

        .margin-slider {
            margin-top: 1rem;
        }

        .margin-slider label {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 0.5rem;
            font-size: 0.85rem;
            color: #1E40AF;
        }

        .margin-slider input[type="range"] {
            width: 100%;
            accent-color: var(--swept-blue);
        }

        .recommendation-actions {
            display: flex;
            gap: 0.75rem;
            margin-top: 1.5rem;
        }

        /* Empty State */
        .empty-state {
            text-align: center;
            padding: 3rem;
            color: #64748b;
        }

        .empty-state-icon {
            font-size: 3rem;
            margin-bottom: 1rem;
        }

        .empty-state h3 {
            font-size: 1.1rem;
            color: #1e293b;
            margin-bottom: 0.5rem;
        }

        /* Toast */
        .toast {
            position: fixed;
            bottom: 2rem;
            right: 2rem;
            background: #1e293b;
            color: white;
            padding: 1rem 1.5rem;
            border-radius: 8px;
            display: flex;
            align-items: center;
            gap: 0.75rem;
            box-shadow: 0 4px 12px rgba(0,0,0,0.2);
            transform: translateY(100px);
            opacity: 0;
            transition: all 0.3s;
            z-index: 1000;
        }

        .toast.show {
            transform: translateY(0);
            opacity: 1;
        }

        .toast.error {
            background: var(--swept-red);
        }

        .toast.success {
            background: var(--swept-green);
        }

        /* Saved Renewals Modal */
        .modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0,0,0,0.5);
            display: none;
            align-items: center;
            justify-content: center;
            z-index: 1000;
        }

        .modal-overlay.show {
            display: flex;
        }

        .modal {
            background: white;
            border-radius: 12px;
            width: 90%;
            max-width: 600px;
            max-height: 80vh;
            overflow: hidden;
            display: flex;
            flex-direction: column;
        }

        .modal-header {
            padding: 1rem 1.5rem;
            border-bottom: 1px solid #e2e8f0;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .modal-header h2 {
            font-size: 1.1rem;
            font-weight: 600;
        }

        .modal-close {
            background: none;
            border: none;
            font-size: 1.5rem;
            color: #64748b;
            cursor: pointer;
        }

        .modal-body {
            padding: 1rem 1.5rem;
            overflow-y: auto;
            flex: 1;
        }

        .saved-renewal-item {
            padding: 1rem;
            border: 1px solid #e2e8f0;
            border-radius: 8px;
            margin-bottom: 0.75rem;
            cursor: pointer;
            transition: all 0.15s;
        }

        .saved-renewal-item:hover {
            border-color: var(--swept-blue);
            background: #f8fafc;
        }

        .saved-renewal-item h4 {
            font-weight: 600;
            color: #1e293b;
            margin-bottom: 0.25rem;
        }

        .saved-renewal-item p {
            font-size: 0.85rem;
            color: #64748b;
        }

        .saved-renewal-item .renewal-meta {
            display: flex;
            gap: 1rem;
            margin-top: 0.5rem;
            font-size: 0.8rem;
        }

        .saved-renewal-item .renewal-meta span {
            display: flex;
            align-items: center;
            gap: 0.25rem;
        }

        /* Responsive */
        @media (max-width: 1024px) {
            .comparison-grid {
                grid-template-columns: 1fr;
            }

            .recommendation-content {
                grid-template-columns: 1fr;
            }
        }

        @media (max-width: 768px) {
            .selector-row {
                flex-direction: column;
            }

            .scope-add-form {
                grid-template-columns: 1fr;
            }

            .app-topbar {
                flex-direction: column;
                align-items: flex-start;
                gap: 1rem;
                padding: 1rem;
                height: auto;
            }

            .topbar-actions {
                width: 100%;
                flex-wrap: wrap;
            }
        }
    </style>

/* ===== WORKBENCH FRAME OVERRIDES (embedded, not a standalone page) ===== */
.contract-renewal-tool-embed .app-topbar { position: static; top: auto; z-index: auto; border-radius: 0; min-height: 0; padding: 0.75rem 1rem; }
.contract-renewal-tool-embed .app-main { min-height: 0; }
.contract-renewal-tool-embed .app-content { padding-top: 1.25rem; }
.contract-renewal-tool-embed .app-topbar .topbar-title, .contract-renewal-tool-embed .app-topbar .topbar-subtitle { display: none; }
.contract-renewal-tool-embed .topbar-left:empty { display: none; }