:root {
    /* AGR Corporate Colors */
    --agr-green: #006847;
    --agr-gold: #F2A900;

    /* Header/Footer palette (aligned with sorteio SEI) */
    --bg: #ffffff;
    --card: #E9F5EC;
    --accent: #00534b;
    --muted: #556b63;

    /* Structural Colors */
    --bg-body: #f4f6f9;
    --bg-surface: #ffffff;
    --border-color: #dee2e6;

    /* Typography */
    --text-primary: #212529;
    --text-secondary: #6c757d;
    --font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ====== HEADER / PAGE TOP ====== */
.page-header-wrapper {
    width: 100%;
    background: var(--bg);
}

.container {
    width: 1100px;
    max-width: 96%;
    margin: 0 auto;
}

.page-header-wrapper .container,
.green-bar .container {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 0 30px;
}

header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 16px;
    margin-bottom: 16px;
}

.logo {
    width: 130px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

h1 {
    font-family: var(--font-family);
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    color: #112720;
    line-height: 1.25;
}

h2 {
    font-size: 14px;
    margin: 2px 0 0;
    color: var(--muted);
    font-weight: 600;
}

p.lead {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.35;
}

.pt-36 {
    padding-top: 16px;
    padding-bottom: 4px;
}

/* Green bar below header */
.green-bar {
    width: 100%;
    height: 40px;
    background: linear-gradient(135deg, var(--accent), #003a34);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
}

.green-bar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.btn-green-bar {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    padding: 4px 14px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.btn-green-bar:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-green-bar:active {
    transform: scale(0.96);
}

.btn-green-bar svg {
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

#btn-back:hover svg {
    transform: translateX(-4px);
}

#btn-new:hover svg {
    transform: translateY(-2px);
}

/* Main Container */
.main-container {
    max-width: 1400px;
    width: 100%;
    margin: 15px auto 30px; /* Reduzido a margem superior para compensar o header maior */
    padding: 0 30px 40px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    flex: 1;
}

/* Responsividade do Header */
@media (max-width: 768px) {
    .pt-36 {
        padding-top: 12px;
    }
    header {
        flex-direction: column;
        text-align: center;
        gap: 10px;
        margin-bottom: 10px;
    }
    .logo {
        margin: 0 auto;
        width: 110px;
        height: 44px;
    }
    h1 {
        font-size: 15px !important;
    }
    h2 {
        font-size: 13px !important;
    }
    p.lead {
        font-size: 11px !important;
    }
}

/* Cards */
.card {
    background-color: var(--bg-surface);
    border: 1px solid rgba(0, 104, 71, 0.08);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 104, 71, 0.04), 0 1px 3px rgba(0, 0, 0, 0.02);
    transition: box-shadow 0.3s ease, transform 0.3s ease, border-color 0.3s ease;
}

.card-highlight {
    border-top: 4px solid var(--agr-green);
}

.card-header {
    padding: 14px 24px;
    border-bottom: 1px solid var(--border-color);
    background-color: #fafbfc;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.card-header.flex-between {
    justify-content: space-between;
}

.card-header h2 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--agr-green);
}

.actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.badge {
    background-color: #e8f4f0;
    color: var(--agr-green);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid #c2e2d6;
}

.badge-ai {
    background-color: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
    box-shadow: none;
    letter-spacing: 0.5px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.card-body {
    padding: 24px;
}

.card-body-scroll {
    max-height: 750px;
    overflow-y: auto;
    padding: 0;
}

.card-body-scroll .data-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
}

.instructions {
    margin-bottom: 20px;
    color: var(--text-secondary);
}

/* File Status Bar */
.file-status-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background-color: #e8f5e9;
    border: 1px solid #c8e6c9;
    border-radius: 6px;
    color: #2e7d32;
    font-size: 0.9rem;
    font-weight: 500;
}

.file-status-icon {
    font-weight: 700;
    font-size: 1.1rem;
}

/* Dropzone */
.dropzone {
    border: 2px dashed #adb5bd;
    border-radius: 4px;
    background-color: #f8f9fa;
    padding: 50px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dropzone:hover,
.dropzone.dragover {
    border-color: var(--agr-green);
    background-color: #e8f4f0;
    transform: scale(1.01);
}

.upload-icon {
    margin-bottom: 12px;
    transition: transform 0.3s ease;
}

.dropzone:hover .upload-icon {
    transform: translateY(-4px);
}

.dropzone h3 {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.dropzone p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Loading */
.loading-section {
    text-align: center;
    padding: 40px 0;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e9ecef;
    border-top: 4px solid var(--agr-green);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px auto;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.loading-section h3 {
    font-size: 1.2rem;
    color: var(--text-primary);
    margin-bottom: 8px;
}

/* Data Table */
.data-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    /* Adicionado para garantir que o 420px seja respeitado */
}

.data-table th,
.data-table td {
    padding: 10px 8px;
    border-bottom: 1px solid var(--border-color);
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.data-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    text-align: left;
}

.data-table td {
    font-size: 0.85rem;
    vertical-align: middle;
}

/* Largura e alinhamentos específicos das colunas */
.data-table th:first-child,
.data-table td:first-child {
    font-weight: 600;
    color: #495057;
    width: 30%;
    text-align: left;
}

.data-table th:nth-child(3),
.data-table td:nth-child(3) {
    width: 35%;
    text-align: center;
}

/* Indicativo Visual de Edição */
.data-table td[contenteditable="true"] {
    background-color: rgba(0, 104, 71, 0.04);
    border-bottom: 1px dashed var(--agr-green);
    cursor: text;
    transition: all 0.2s;
}
.data-table td[contenteditable="true"]:hover {
    background-color: rgba(0, 104, 71, 0.08);
}
.data-table td[contenteditable="true"]:focus {
    background-color: #fff;
    outline: 2px solid var(--agr-green);
    outline-offset: -2px;
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table tbody tr:nth-child(even) {
    background-color: #f8f9fa;
}

.data-table tr {
    transition: background-color 0.2s ease;
    page-break-inside: avoid;
    break-inside: avoid;
}

.data-table tr:hover {
    background-color: #f0f4f3;
}

/* Document Textarea */
.document-textarea {
    width: 100%;
    min-height: 700px;
    padding: 32px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 14px;
    line-height: 1.7;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    resize: vertical;
    background-color: #fff;
    color: var(--text-primary);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.document-textarea:focus {
    border-color: var(--agr-green);
    box-shadow: 0 0 0 3px rgba(0, 104, 71, 0.1);
}

/* Buttons */
.btn {
    padding: 8px 16px;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary {
    background-color: var(--agr-green);
    color: white;
    box-shadow: 0 2px 4px rgba(0, 104, 71, 0.2);
}

.btn-primary:hover {
    background-color: #004d34;
    box-shadow: 0 4px 8px rgba(0, 104, 71, 0.3);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-outline {
    background-color: transparent;
    border-color: var(--border-color);
    color: var(--text-primary);
}

.btn-outline:hover {
    background-color: #f8f9fa;
    border-color: #adb5bd;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.btn-outline:active {
    transform: scale(0.98);
}

.btn-secondary {
    background-color: #ffffff;
    color: #5f6368;
    border: 1px solid #dadce0;
    font-weight: 500;
    letter-spacing: 0.25px;
}

.btn-secondary:hover {
    background-color: #f8f9fa;
    border-color: #bdc1c6;
    color: #3c4043;
    box-shadow: 0 1px 2px 0 rgba(60,64,67,0.302), 0 1px 3px 1px rgba(60,64,67,0.149);
}

/* Específico para o botão Ver Histórico Geral e botões de Exportação */
#btn-view-all-history,
#btn-export-json,
#btn-export-xlsx,
#btn-export-pdf {
    transition: all 0.3s ease;
}

#btn-view-all-history:hover,
#btn-export-json:hover,
#btn-export-xlsx:hover,
#btn-export-pdf:hover {
    background-color: var(--agr-green);
    border-color: var(--agr-green);
    color: #ffffff;
    box-shadow: 0 4px 8px rgba(0, 104, 71, 0.25);
    transform: translateY(-1px);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
    border-radius: 4px;
}

.hidden {
    display: none !important;
}

/* Grid para Lado a Lado */
.results-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: start;
}

@media (max-width: 1024px) {
    .results-grid {
        grid-template-columns: 1fr;
    }
}

/* ====== PAGE FOOTER ====== */
.page-footer {
    width: 100%;
    background-color: var(--accent);
    padding: 24px 0;
    margin-top: auto;
}

.footer-container {
    width: 1100px;
    max-width: 96%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.footer-logo {
    height: 48px;
    object-fit: contain;
}

.footer-info {
    color: #ffffff;
    font-size: 13px;
    line-height: 1.6;
    max-width: 650px;
    text-align: right;
}

@media (max-width: 880px) {
    .footer-container {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }
    .footer-info {
        text-align: center;
    }
}

/* History Grid */
.history-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 16px;
}

/* Corrige o hover dos history-items para não deslocar a borda verde do card-header acima */
.history-item {
    border: 1px solid rgba(0, 104, 71, 0.08);
    border-radius: 10px;
    padding: 16px;
    background-color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 104, 71, 0.02), 0 1px 3px rgba(0, 0, 0, 0.01);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
    z-index: 1;
}

.history-item:hover {
    border-color: var(--agr-green);
    box-shadow: 0 8px 24px rgba(0, 104, 71, 0.08);
    transform: translateY(-2px);
}

/* ====== MODAL DE HISTÓRICO GERAL (Padrão AGR Goiás) ====== */
.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(6px);
}

.modal.hidden {
    display: none !important;
}

.modal-content {
    background-color: var(--bg-surface);
    border: 1px solid rgba(0, 104, 71, 0.08);
    border-radius: 12px;
    width: 90%;
    max-width: 700px;
    box-shadow: 0 10px 30px rgba(0, 104, 71, 0.12), 0 1px 3px rgba(0, 0, 0, 0.04);
    animation: modalFadeIn 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    border-top: 4px solid var(--agr-green);
}

@keyframes modalFadeIn {
    from { transform: scale(0.95) translateY(8px); opacity: 0; }
    to { transform: scale(1) translateY(0); opacity: 1; }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 24px;
    border-bottom: 1px solid var(--border-color);
    background-color: #fafbfc;
}

.modal-header h2 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--agr-green);
    margin: 0;
}

.close-modal {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s ease;
    line-height: 1;
}

.close-modal:hover {
    background-color: #fce8e6;
    color: #c5221f;
}

.modal-body {
    padding: 20px 24px 24px;
}

/* Barra de Pesquisa do Modal */
#history-search-input {
    width: 100%;
    padding: 10px 16px 10px 40px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: var(--font-family);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236c757d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 12px center;
}

#history-search-input:focus {
    border-color: var(--agr-green);
    box-shadow: 0 0 0 3px rgba(0, 104, 71, 0.1);
}

#history-search-input::placeholder {
    color: #94a3b8;
}

/* Grid de Itens do Modal */
.history-modal-grid {
    max-height: 420px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-right: 2px;
}

.history-modal-grid::-webkit-scrollbar {
    width: 6px;
}

.history-modal-grid::-webkit-scrollbar-track {
    background: transparent;
}

.history-modal-grid::-webkit-scrollbar-thumb {
    background-color: rgba(0, 104, 71, 0.15);
    border-radius: 3px;
}

.history-modal-grid::-webkit-scrollbar-thumb:hover {
    background-color: rgba(0, 104, 71, 0.3);
}

/* Card individual de processo dentro do Modal */
.history-modal-item {
    padding: 14px 18px;
    background-color: #ffffff;
    border: 1px solid rgba(0, 104, 71, 0.08);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    border-left: 3px solid transparent;
}

.history-modal-item:hover {
    border-color: rgba(0, 104, 71, 0.12);
    border-left-color: var(--agr-green);
    background-color: #f6faf8;
    transform: translateX(2px);
    box-shadow: 0 4px 12px rgba(0, 104, 71, 0.06);
}

.history-modal-item-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-grow: 1;
    min-width: 0;
}

.history-modal-item-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--agr-green);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.history-modal-item-sub {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.history-modal-item-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    min-width: fit-content;
    flex-shrink: 0;
}

.history-modal-item-date {
    font-size: 0.75rem;
    color: #80868b;
    white-space: nowrap;
}


.history-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.history-item-title {
    font-weight: 600;
    color: var(--agr-green);
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
}

.history-item-date {
    font-size: 0.8rem;
    color: var(--text-secondary);
    white-space: nowrap;
    flex-shrink: 0;
    text-align: right;
}

.history-item-details {
    font-size: 0.85rem;
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.history-item-details strong {
    font-weight: 600;
}

/* AI Audit Styles */
.audit-ok {
    display: inline-block;
    vertical-align: middle;
    line-height: 1.2;
    color: #2e7d32;
    background-color: #e8f5e9;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid #c8e6c9;
    text-align: center;
}

.audit-ok svg {
    width: 12px;
    height: 12px;
    display: inline-block;
    vertical-align: middle;
    margin-top: -2px;
    margin-right: 2px;
}

.audit-diff {
    display: inline-block;
    vertical-align: middle;
    line-height: 1.2;
    color: #b71c1c;
    background-color: #ffebee;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid #ffcdd2;
    text-align: center;
}

.audit-diff svg {
    width: 12px;
    height: 12px;
    display: inline-block;
    vertical-align: middle;
    margin-top: -2px;
    margin-right: 2px;
}

.audit-empty {
    color: #9e9e9e;
    font-size: 0.75rem;
    font-style: italic;
    display: inline-block;
    padding: 3px 8px;
    text-align: center;
}

.audit-processing {
    display: inline-block;
    vertical-align: middle;
    line-height: 1.2;
    color: #0277bd;
    background-color: #e1f5fe;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid #b3e5fc;
    text-align: center;
}

.audit-processing svg,
.audit-processing .spinner-small {
    width: 12px;
    height: 12px;
    display: inline-block;
    vertical-align: middle;
    margin-top: -2px;
    margin-right: 2px;
}

.spinner-small {
    width: 12px;
    height: 12px;
    border: 2px solid #0277bd;
    border-bottom-color: transparent;
    border-radius: 50%;
    display: inline-block;
    box-sizing: border-box;
    animation: rotation 1s linear infinite;
}

@keyframes rotation {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Custom Scrollbar for scrollable bodies and textareas */
.card-body-scroll::-webkit-scrollbar,
.document-textarea::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.card-body-scroll::-webkit-scrollbar-track,
.document-textarea::-webkit-scrollbar-track {
    background: #f8f9fa;
    border-radius: 4px;
}

.card-body-scroll::-webkit-scrollbar-thumb,
.document-textarea::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.card-body-scroll::-webkit-scrollbar-thumb:hover,
.document-textarea::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}



/* ==========================================================================
   SKELETON LOADER
   ========================================================================== */
.skeleton-line {
    background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
    background-size: 200% 100%;
    animation: loading-pulse 1.5s infinite;
    height: 16px;
    margin: 8px 0;
    border-radius: 4px;
    display: inline-block;
}



@keyframes loading-pulse {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.skeleton-table {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.skeleton-table-header {
    display: flex;
    justify-content: space-between;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--border-color);
}

.skeleton-table-row {
    display: flex;
    justify-content: space-between;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

/* ==========================================================================
   FLOATING QUEUE PANEL
   ========================================================================== */
.queue-panel {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 340px;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.queue-panel:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

.queue-panel.minimized {
    height: 40px;
    transform: translateY(0);
}

.queue-panel-header {
    background-color: var(--agr-green);
    color: white;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
}



.queue-toggle-btn {
    background: transparent;
    border: none;
    color: white;
    font-size: 10px;
    cursor: pointer;
    outline: none;
    transition: transform 0.3s;
}

.queue-panel.minimized #queue-toggle-btn {
    transform: rotate(180deg);
}

.queue-panel-body {
    max-height: 250px;
    overflow-y: auto;
    background-color: var(--bg-surface);
    transition: max-height 0.3s ease;
}

.queue-panel.minimized .queue-panel-body {
    max-height: 0;
    overflow: hidden;
}

.queue-items-list {
    display: flex;
    flex-direction: column;
}

.queue-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    border-bottom: 1px solid var(--border-color);
    font-size: 13px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.queue-item.clickable {
    cursor: pointer;
}

.queue-item.clickable:hover {
    background-color: rgba(0, 104, 71, 0.05);
}

.queue-item:last-child {
    border-bottom: none;
}

.queue-item-name {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 60%;
    color: var(--text-primary);
}

.queue-item-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
}

.queue-status-waiting {
    color: var(--text-secondary);
}

.queue-status-processing {
    color: #0277bd;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.queue-status-done {
    color: #2e7d32;
}

.queue-status-error {
    color: #d32f2f;
}

/* Queue Status Indicators & Animations */
.queue-status-indicator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
}

.queue-dot-waiting {
    width: 8px;
    height: 8px;
    background-color: #94a3b8;
    border-radius: 50%;
    animation: dot-pulse 1.2s infinite ease-in-out;
}

@keyframes dot-pulse {
    0% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.2);
        opacity: 1;
    }
    100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
}


