/* --- ORIGINAL CSS --- */
/* Custom scrollbar */
.table-container::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
.table-container::-webkit-scrollbar-track {
    background: #f1f1f1; 
}
.table-container::-webkit-scrollbar-thumb {
    background: #cbd5e1; 
    border-radius: 4px;
}
.table-container::-webkit-scrollbar-thumb:hover {
    background: #94a3b8; 
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}
.toggle-switch input { 
    opacity: 0;
    width: 0;
    height: 0;
}
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}
.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}
input:checked + .slider {
    background-color: #fc5e36;
}
input:checked + .slider:before {
    transform: translateX(20px);
}
.gradient-bg {
    background-color: #f3f4f6;
    background-image: radial-gradient(#e5e7eb 1px, transparent 1px);
    background-size: 20px 20px;
}

/* Custom Tooltip */
#custom-tooltip {
    position: fixed;
    background-color: #1f2937;
    color: #fff;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.85rem;
    line-height: 1.4;
    pointer-events: none;
    z-index: 10000;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    max-width: 300px;
    opacity: 0;
    transition: opacity 0.15s ease-in-out;
    transform: translate(-50%, -100%);
    margin-top: -10px;
}
#custom-tooltip.visible {
    opacity: 1;
}
#custom-tooltip .tooltip-title {
    font-weight: 700;
    margin-bottom: 4px;
    display: block;
    color: #e0e7ff;
}
#custom-tooltip .tooltip-link {
    color: #fdac93;
    display: block;
    margin-top: 6px;
    font-size: 0.75rem;
    word-break: break-all;
}
tbody tr {
    transition: background-color 0.2s;
}
tbody tr:hover {
    background-color: #f3f4f6;
}

/* --- SIDEBAR MINIMIZATION STYLES --- */
#history-sidebar {
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    width: 20rem; 
    z-index: 30; 
}
main {
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%; 
}
#history-sidebar.sidebar-minimized {
    width: 4rem !important; 
}
main:not(.main-minimized) {
    margin-left: 20rem; 
}
main.main-minimized {
    margin-left: 4rem !important; 
}
#history-sidebar.sidebar-minimized .sidebar-text,
#history-sidebar.sidebar-minimized h2,
#history-sidebar.sidebar-minimized #newProcessBtn span,
#history-sidebar.sidebar-minimized .history-item-card p,
#history-sidebar.sidebar-minimized .history-meta,
#history-sidebar.sidebar-minimized .header-actions h2 {
    display: none !important;
}
#history-sidebar.sidebar-minimized .header-actions {
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}
#history-sidebar.sidebar-minimized .history-list-container {
    padding: 1rem 0.5rem;
    text-align: center;
}
#history-sidebar.sidebar-minimized .history-item-card {
    padding: 0.5rem;
    text-align: center;
}
#history-sidebar.sidebar-minimized .history-status-badge {
    position: static;
    margin-bottom: 0.5rem;
    font-size: 0.6rem;
    padding: 2px 4px;
}
#toggle-icon {
    transition: transform 0.3s ease-in-out;
}
#history-sidebar.sidebar-minimized #toggle-icon {
    transform: rotate(180deg);
}

#Step4Section {
    overflow-x: hidden; 
    position: relative;
    z-index: 1;
    background-color: white;
}
.step4-tabs-container {
        border-bottom: 2px solid #e5e7eb;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 2; 
    background: white;
}
main {
    position: relative;
    z-index: 10;
}

/* --- TABS & EDITOR --- */
.tabs-nav {
    display: flex;
    background: #f3f4f6;
    border-radius: 0.5rem;
    padding: 0.25rem;
    margin-bottom: 1rem;
}
.tab-btn {
    flex: 1;
    padding: 0.5rem;
    text-align: center;
    font-size: 0.875rem;
    font-weight: 500;
    color: #4b5563;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}
.tab-btn:hover {
    background: #e5e7eb;
}
.tab-btn.active {
    background: white;
    color: #eb6425;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.tab-pane {
    display: none;
    height: 100%;
    flex-direction: column;
}
.tab-pane.active {
    display: flex;
}
.article-editor  {
    width: 100%;
    min-height: 2000px;
    padding: 2rem;
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    font-family: 'Georgia', serif;
    font-size: 1.125rem;
    line-height: 1.8;
    color: #1f2937;
    resize: none;
    outline: none;
    box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.05);
}
.article-editor:focus {
    border-color: #ec5223;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}
.chat-messages {
    flex-grow: 1;
    overflow-y: auto;
    padding: 1rem;
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    max-height: 400px;
}
.message {
    margin-bottom: 1rem;
    max-width: 80%;
    padding: 0.75rem 1rem;
    border-radius: 1rem;
    font-size: 0.9rem;
    line-height: 1.4;
    animation: fadeIn 0.3s ease-out;
}
.message.user {
    background-color: #e07562;
    color: white;
    align-self: flex-end;
    margin-left: auto;
    border-bottom-right-radius: 0.25rem;
}
.message.ai {
    background-color: #e5e7eb;
    color: #1f2937;
    align-self: flex-start;
    margin-right: auto;
    border-bottom-left-radius: 0.25rem;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
.typing-indicator {
    font-style: italic;
    color: #6b7280;
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
    display: none;
}
.typing-indicator.active {
    display: block;
}
.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.75rem;
    overflow-y: auto;
    max-height: 400px;
    padding: 0.5rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    background: #f9fafb;
}
.image-card {
    position: relative;
    cursor: pointer;
    border-radius: 0.375rem;
    overflow: hidden;
    aspect-ratio: 1;
    border: 2px solid transparent;
    transition: all 0.2s;
}
.image-card:hover {
    border-color: #f8780e;
    transform: scale(1.05);
}
.image-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.image-card-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
}
.image-card:hover .image-card-overlay {
    opacity: 1;
}
.add-icon {
    color: white;
    background: #e65e29;
    padding: 0.5rem;
    border-radius: 50%;
}

/* --- STATUS CARD STYLES --- */
.status-card-container {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    animation: slideDown 0.3s ease-out;
}
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- TOAST NOTIFICATION STYLES --- */
#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.toast {
    display: flex;
    align-items: center;
    background-color: white;
    color: #1f2937;
    padding: 1rem 1.25rem;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border-left: 4px solid transparent;
    min-width: 300px;
    animation: slideIn 0.3s ease-out forwards;
    opacity: 0;
    font-size: 0.9rem;
}
.toast.success { border-left-color: #10b981; }
.toast.error { border-left-color: #ef4444; }
.toast.info { border-left-color: #e95916; }
.toast-icon {
    margin-right: 0.75rem;
    font-weight: bold;
}
@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

/* --- HISTORY SIDEBAR STYLES --- */
.history-item-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}
.history-item-card:hover {
    border-color: #3b82f6;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}
.history-status-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 2px 8px;
    border-radius: 99px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
}
/* Draft / Draft Generated */
.status-draft {
  background-color: #dbeafe; /* light blue */
  color: #1e40af; /* dark blue */
}

/* Published */
.status-published {
  background-color: #e7e09e; /* bright lime green */
  color: #034119; /* forest green */
}

/* Approved */
.status-approved {
  background-color: #bbf7d0; /* bright lime green */
  color: #15803d; /* forest green */
}

/* Pending */
.status-pending {
  background-color: #fef9c3; /* soft yellow */
  color: #854d0e; /* amber brown */
}

/* Failed */
.status-failed {
  background-color: #adadad; /* light red */
  color: #991b1b; /* dark red */
}

/* Unknown or fallback */
.status-unknown {
  background-color: #f3f4f6; /* grayish */
  color: #374151; /* gray text */
}

/* Awaiting User Selection */
.status-awaiting_user_selection {
  background-color: #ffedd5; /* soft peach/orange tone */
  color: #aa4a24; /* warm deep orange */
}

.status-published{
  background-color: #949494; /* soft peach/orange tone */
  color: #062c01; /* warm deep orange */
}

.status-disapproved{
  background-color: #b4b4b4; /* soft peach/orange tone */
  color: #570a00; /* warm deep orange */
}
.status-in_refinement {
  background-color: #ffedd5; /* soft peach/orange tone */
  color: #0c8ec2; /* warm deep orange */
}
.status-search_term_generation{
    background-color: #ebe6e6; /* soft peach/orange tone */
    color: #d40ce6; /* warm deep orange */
}
.status-data_cpollection{
    background-color: #615f5c; /* soft peach/orange tone */
    color: #4146da; /* warm deep orange */
}
.history-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.5rem;
}
.line-clamp-1 { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.btn-new-process {
    background-color: #2563eb;
    color: white;
    font-weight: 500;
    border-radius: 0.375rem;
    padding: 0.375rem 0.75rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}
.btn-new-process:hover {
    background-color: #1d4ed8;
    transform: translateY(-1px);
}

#preview-modal-body {
    line-height: 1.6;
    color: #374151;
    max-height: 70vh;
    overflow-y: auto;
}
#preview-modal-body h1 { font-size: 1.8rem; font-weight: bold; margin-bottom: 1rem; border-bottom: 1px solid #e5e7eb; padding-bottom: 0.5rem; }
#preview-modal-body h2 { font-size: 1.5rem; font-weight: bold; margin-top: 1.5rem; margin-bottom: 0.75rem; }
#preview-modal-body p { margin-bottom: 1rem; }
#preview-modal-body ul { list-style-type: disc; padding-left: 1.5rem; margin-bottom: 1rem; }
#preview-modal-body ol { list-style-type: decimal; padding-left: 1.5rem; margin-bottom: 1rem; }
#preview-modal-body blockquote { border-left: 4px solid #3b82f6; padding-left: 1rem; color: #6b7280; font-style: italic; margin-bottom: 1rem; }
#preview-modal-body img { max-width: 100%; border-radius: 0.5rem; margin: 1rem 0; }
#preview-modal-body code { background-color: #f3f4f6; padding: 0.2rem 0.4rem; border-radius: 0.25rem; font-family: monospace; font-size: 0.9em; }
#preview-modal-body pre { background-color: #1f2937; color: #f9fafb; padding: 1rem; border-radius: 0.5rem; overflow-x: auto; margin-bottom: 1rem; }
#preview-modal-body pre code { background-color: transparent; color: inherit; padding: 0; }

.history-sidebar { border-right: 1px solid #e5e7eb; background-color: #f9fafb; }
.history-detail-item { padding: 1rem; border-bottom: 1px solid #e5e7eb; cursor: pointer; transition: background-color 0.2s; }
.history-detail-item:hover { background-color: #f3f4f6; }
.history-detail-item.active { background-color: #e0f2fe; border-left: 4px solid #0ea5e9; }
.history-query { font-weight: 600; font-size: 0.9rem; color: #111827; margin-bottom: 0.25rem; }
.history-content-display h3 { font-size: 1.1rem; font-weight: bold; margin-bottom: 0.5rem; color: #374151; }
.history-section { margin-bottom: 1.5rem; }
.history-section-label { text-transform: uppercase; font-size: 0.75rem; letter-spacing: 0.05em; color: #9ca3af; margin-bottom: 0.5rem; font-weight: 600; }
.history-box { background: white; padding: 1rem; border: 1px solid #e5e7eb; border-radius: 0.5rem; font-size: 0.9rem; color: #4b5563; max-height: 300px; overflow-y: auto; white-space: pre-wrap; }

.image-history-detail-item { padding: 1rem; border-bottom: 1px solid #e5e7eb; cursor: pointer; transition: background-color 0.2s; display: flex; align-items: center; gap: 0.75rem; }
.image-history-detail-item:hover { background-color: #f3f4f6; }
.image-history-detail-item.active { background-color: #f3e8ff; border-left: 4px solid #9333ea; }
.image-history-thumb { width: 40px; height: 40px; border-radius: 4px; object-fit: cover; background-color: #e5e7eb; }
.image-history-text { flex: 1; min-width: 0; }
.image-history-prompt { font-size: 0.85rem; font-weight: 500; color: #374151; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.image-history-time { font-size: 0.7rem; color: #6b7280; }
.image-preview-large { max-width: 100%; max-height: 60vh; border-radius: 0.5rem; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1); }

/* --- STEP 4 SPECIFIC STYLES --- */
.step4-tab {
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    color: #6b7280;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    transition: all 0.2s;
}
.step4-tab:hover {
    color: #e4341d;
}
.step4-tab.active {
    color: #e44f14;
    border-bottom-color: #eb6425;
}
.step4-content {
    display: none;
    animation: fadeIn 0.3s ease-out;
    position: relative;
    z-index: 20;
    background: white;
}
.step4-content.active {
    display: block;
}
.step4-list-item {
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
    background: #f9fafb;
    transition: all 0.2s;
}
.step4-list-item.selected {
    border-color: #3b82f6;
    background: #eff6ff;
    box-shadow: 0 0 0 1px #3b82f6;
}
.step4-list-header {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
    gap: 0.5rem;
}
.step4-meta {
    font-size: 0.75rem;
    color: #6b7280;
    margin-bottom: 0.5rem;
    display: flex;
    gap: 1rem;
}
.seo-good { color: #10b981; font-weight: bold; }
.seo-bad { color: #ef4444; font-weight: bold; }

/* --- NEW STEP 4 SUMMARY STYLES --- */
.summary-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.2s;
}
.summary-card:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}
.summary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    border-bottom: 1px solid #f3f4f6;
    padding-bottom: 0.75rem;
}
.summary-platform-badge {
    background-color: #eff6ff;
    color: #1d4ed8;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    text-transform: uppercase;
}
.summary-stats {
    font-size: 0.75rem;
    color: #6b7280;
}

/* Hashtag Editor Styles */
.tag-editor-container {
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    padding: 0.5rem;
    margin-bottom: 1rem;
    background: #f9fafb;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
}
.tag-editor-container:focus-within {
    border-color: #3b82f6;
    background: #fff;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}
.summary-tag {
    background-color: #e0e7ff;
    color: #df2d16;
    font-size: 0.875rem;
    padding: 0.125rem 0.625rem;
    border-radius: 0.375rem;
    display: inline-flex;
    align-items: center;
    user-select: none;
}
.summary-tag span.remove-tag {
    cursor: pointer;
    margin-left: 0.375rem;
    font-weight: bold;
    opacity: 0.6;
}
.summary-tag span.remove-tag:hover {
    opacity: 1;
}
.tag-input {
    border: none;
    outline: none;
    flex: 1;
    min-width: 120px;
    font-size: 0.875rem;
    color: #374151;
    background: transparent;
}

/* Split View for Edit/Preview */
.summary-split-view {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    height: 300px;
}
.summary-editor-col, .summary-preview-col {
    display: flex;
    flex-direction: column;
    height: 100%;
}
.summary-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #6b7280;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}
.summary-textarea {
    width: 100%;
    height: 100%;
    padding: 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    resize: none;
    font-family: 'Georgia', serif;
    font-size: 1rem;
    line-height: 1.6;
    outline: none;
    color: #1f2937;
}
.summary-textarea:focus {
    border-color: #e4651c;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}
.summary-preview-box {
    flex: 1;
    padding: 1rem;
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    overflow-y: auto;
    color: #1f2937;
    line-height: 1.6;
    /* Markdown Styles */
}
.summary-preview-box h1, .summary-preview-box h2, .summary-preview-box h3 { font-size: 1.1em; font-weight: bold; margin-bottom: 0.5em; margin-top: 1em; }
.summary-preview-box p { margin-bottom: 0.5em; }
.summary-preview-box ul { list-style-type: disc; padding-left: 1.5em; }
.summary-preview-box blockquote { border-left: 4px solid #e5e7eb; padding-left: 1em; color: #6b7280; font-style: italic; }


    /* --- Translation Tab Custom Styles --- */
        .translation-container {
            height: 100%;
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }

        .trans-progress-section {
            background: #f8fafc;
            border-bottom: 1px solid #e2e8f0;
            padding: 1rem;
        }

        .trans-progress-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 1rem;
            font-size: 0.85rem;
            margin-bottom: 0.5rem;
        }

        .trans-progress-item {
            display: flex;
            justify-content: space-between;
        }

        .trans-progress-bar-bg {
            height: 6px;
            background: #e2e8f0;
            border-radius: 3px;
            overflow: hidden;
        }
        .trans-progress-bar-fill {
            height: 100%;
            background: #ec520a;
            transition: width 0.3s ease;
        }

        .trans-main-area {
            display: flex;
            flex: 1;
            overflow: hidden;
        }

        .trans-sidebar {
            width: 240px;
            border-right: 1px solid #e2e8f0;
            background: #fff;
            overflow-y: auto;
            flex-shrink: 0;
        }

        .trans-lang-item {
            padding: 0.75rem 1rem;
            cursor: pointer;
            border-bottom: 1px solid #f1f5f9;
            transition: background 0.2s;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        .trans-lang-item:hover { background: #f8fafc; }
        .trans-lang-item.active { background: #eff6ff; border-left: 4px solid #3b82f6; }
        .trans-lang-status { font-size: 0.7rem; padding: 2px 6px; border-radius: 4px; background: #e2e8f0; color: #64748b; }
        .trans-lang-status.completed { background: #dcfce7; color: #166534; }

        .trans-content-area {
            flex: 1;
            padding: 1.5rem;
            overflow-y: auto;
            background: #f8fafc;
        }

        .trans-section-card {
            background: #fff;
            border: 1px solid #e2e8f0;
            border-radius: 0.5rem;
            padding: 1rem;
            margin-bottom: 1.5rem;
            box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
        }
        .trans-section-title {
            font-weight: 600;
            color: #334155;
            margin-bottom: 0.75rem;
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .trans-input-row {
            display: flex;
            gap: 0.5rem;
            align-items: flex-start;
        }
        .trans-input-flex { flex: 1; }
        .trans-input {
            width: 100%;
            padding: 0.5rem;
            border: 1px solid #cbd5e1;
            border-radius: 0.375rem;
            font-size: 0.9rem;
            font-family: inherit;
            resize: vertical;
        }
        .trans-input:focus { outline: none; ring: 2px solid #3b82f6; border-color: #3b82f6; }
        
        .trans-btn-icon {
            padding: 0.4rem;
            border: 1px solid #e2e8f0;
            background: white;
            border-radius: 0.375rem;
            cursor: pointer;
            color: #64748b;
            transition: all 0.2s;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .trans-btn-icon:hover { background: #f1f5f9; color: #3b82f6; }

        .trans-footer {
            padding: 1rem;
            border-top: 1px solid #e2e8f0;
            background: #fff;
            display: flex;
            justify-content: flex-end;
            gap: 0.75rem;
        }

        /* Summary Split */
        .summary-split { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
        .summary-group label { display: block; font-size: 0.75rem; color: #64748b; margin-bottom: 0.25rem; }

        /* Loading State */
        .trans-loading-overlay {
            position: absolute;
            inset: 0;
            background: rgba(255,255,255,0.8);
            z-index: 10;
            display: flex;
            justify-content: center;
            align-items: center;
            backdrop-filter: blur(1px);
        }

     .md-toolbar-container {
            display: flex;
            flex-direction: column;
        }
        
        .md-toolbar {
            display: flex;
            flex-wrap: wrap;
            gap: 4px;
            padding: 8px;
            background-color: #f9fafb; /* gray-50 */
            border: 1px solid #e5e7eb; /* gray-200 */
            border-bottom: none;
            border-top-left-radius: 0.5rem;
            border-top-right-radius: 0.5rem;
            align-items: center;
        }

        .md-btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 28px;
            height: 28px;
            padding: 4px;
            border-radius: 4px;
            color: #4b5563; /* gray-600 */
            background-color: white;
            border: 1px solid #e5e7eb;
            cursor: pointer;
            transition: all 0.2s;
        }

        .md-btn:hover {
            background-color: #f3f4f6; /* gray-100 */
            color: #111827; /* gray-900 */
            border-color: #d1d5db;
        }

        .md-btn.active {
            background-color: #dbeafe; /* blue-100 */
            color: #1d4ed8; /* blue-700 */
            border-color: #93c5fd;
        }

        /* Adjust textarea border to fit toolbar */
        .has-toolbar {
            border-top-left-radius: 0 !important;
            border-top-right-radius: 0 !important;
            border-top: none !important;
            min-height: 150px; /* Ensure reasonable height */
        }

         
        
        .history-card-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 6px;
        }

        .delete-process-btn {
            background: none;
            border: none;
            cursor: pointer;
            transition: color 0.2s ease;
        }

        .delete-process-btn:hover {
            color: #dc2626; /* Tailwind’s red-600 */
        }
