/* ========================================
   DRAWER - AGUARDANDO SEMEIO
   ======================================== */

/* Drawer Overlay */
.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.drawer-overlay.open {
    display: block;
    opacity: 1;
}

/* Drawer Container */
.drawer-container {
    position: fixed;
    top: 0;
    right: -600px;
    width: 600px;
    height: 100vh;
    background: #FFFFFF;
    box-shadow: -4px 0 16px rgba(0, 0, 0, 0.1);
    z-index: 1001;
    display: flex;
    flex-direction: column;
    transition: right 0.3s ease;
    overflow: hidden;
}

.drawer-overlay.open .drawer-container {
    right: 0;
}

/* Drawer Header */
.drawer-header {
    display: flex;
    flex-direction: column;
    padding: 24px;
    border-bottom: 1px solid #E7E9E9;
    background: #FFFFFF;
    flex-shrink: 0;
}

.drawer-header-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.drawer-title-section {
    flex: 1;
}

.drawer-title {
    font-family: 'Archivo', -apple-system, sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #18191A;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.drawer-subtitle {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Archivo', -apple-system, sans-serif;
    font-size: 13px;
    color: #61666A;
    margin: 0;
    line-height: 1.4;
}

.drawer-subtitle-separator {
    color: #9CA3AF;
}

.drawer-header-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-shrink: 0;
}

.drawer-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    background: #D1FAE5;
    color: #065F46;
    border-radius: 4px;
    font-family: 'Archivo', -apple-system, sans-serif;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.drawer-close-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: transparent;
    border: 1px solid #E7E9E9;
    border-radius: 6px;
    color: #61666A;
    cursor: pointer;
    transition: all 0.2s ease;
}

.drawer-close-btn:hover {
    background: #F9FAFA;
    border-color: #D1D5DB;
}

.drawer-close-btn i {
    width: 18px;
    height: 18px;
}

/* Drawer Content */
.drawer-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px 16px;
}

/* Scrollbar personalizada */
.drawer-content::-webkit-scrollbar {
    width: 8px;
}

.drawer-content::-webkit-scrollbar-track {
    background: #F9FAFA;
}

.drawer-content::-webkit-scrollbar-thumb {
    background: #D1D5DB;
    border-radius: 4px;
}

.drawer-content::-webkit-scrollbar-thumb:hover {
    background: #9CA3AF;
}

/* Drawer Section */
.drawer-section {
    margin-bottom: 20px;
}

.drawer-section:last-child {
    margin-bottom: 0;
}

.drawer-section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: #F9FAFA;
    border: 1px solid #E7E9E9;
    border-radius: 6px;
    user-select: none;
}

.drawer-section-icon {
    width: 18px;
    height: 18px;
    color: #61666A;
    flex-shrink: 0;
}

.drawer-section-title {
    font-family: 'Archivo', -apple-system, sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #18191A;
    margin: 0;
    flex: 1;
}

.drawer-section-body {
    padding: 16px;
    background: #FFFFFF;
    border: 1px solid #E7E9E9;
    border-top: none;
    border-bottom-left-radius: 6px;
    border-bottom-right-radius: 6px;
}

/* Tabs */
.drawer-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid #E7E9E9;
    margin-bottom: 16px;
}

.drawer-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 12px 16px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    font-family: 'Archivo', -apple-system, sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: #61666A;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.drawer-tab:hover {
    color: #0068AB;
    background: rgba(0, 104, 171, 0.05);
}

.drawer-tab.active {
    color: #0068AB;
    border-bottom-color: #0068AB;
}

.drawer-tab i {
    width: 14px;
    height: 14px;
}

/* Form Fields */
.drawer-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 0;
}

.drawer-form-row.full {
    grid-template-columns: 1fr;
}

.drawer-form-row:not(:last-child) {
    margin-bottom: 20px;
}

.drawer-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.drawer-form-label {
    font-family: 'Archivo', -apple-system, sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: #61666A;
    text-transform: none;
}

.drawer-form-input {
    width: 100%;
    height: 40px;
    padding: 0 12px;
    background: #FFFFFF;
    border: 1px solid #E7E9E9;
    border-radius: 6px;
    font-family: 'Archivo', -apple-system, sans-serif;
    font-size: 13px;
    color: #18191A;
    transition: all 0.2s ease;
}

.drawer-form-input:focus {
    outline: none;
    border-color: #0068AB;
    box-shadow: 0 0 0 3px rgba(0, 104, 171, 0.1);
}

.drawer-form-input::placeholder {
    color: #9CA3AF;
}

.drawer-form-value {
    font-family: 'Archivo', -apple-system, sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: #18191A;
    padding: 0;
    line-height: 1.5;
}

/* Info Message */
.drawer-info-message {
    font-family: 'Archivo', -apple-system, sans-serif;
    font-size: 13px;
    color: #61666A;
    font-style: italic;
    padding: 12px 16px;
    background: #F9FAFA;
    border-radius: 4px;
}

/* Destaque para seção de Informações Gerais */
.drawer-section:first-child .drawer-section-body {
    background: #F9FAFA;
}

/* Botões de Ação (Termo de Retirada e Etiquetas) */
.drawer-action-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.drawer-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    background: #FFFFFF;
    border: 1px solid #E7E9E9;
    border-radius: 6px;
    font-family: 'Archivo', -apple-system, sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #18191A;
    cursor: pointer;
    transition: all 0.2s ease;
}

.drawer-action-btn:hover {
    background: #F9FAFA;
    border-color: #0068AB;
    color: #0068AB;
}

.drawer-action-btn:hover .drawer-action-icon {
    color: #0068AB;
}

.drawer-action-icon {
    width: 18px;
    height: 18px;
    color: #61666A;
    transition: all 0.2s ease;
}

/* Estimativas Box */
.drawer-estimativas {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.drawer-estimativa-card {
    padding: 16px;
    background: #F9FAFA;
    border: 1px solid #E7E9E9;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.drawer-estimativa-card.highlight {
    background: #EFF6FF;
    border-color: #BFDBFE;
}

.drawer-estimativa-label {
    font-family: 'Archivo', -apple-system, sans-serif;
    font-size: 11px;
    font-weight: 500;
    color: #61666A;
    line-height: 1.3;
}

.drawer-estimativa-card.highlight .drawer-estimativa-label {
    color: #1E40AF;
}

.drawer-estimativa-value {
    font-family: 'Archivo', -apple-system, sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: #18191A;
    line-height: 1;
}

.drawer-estimativa-card.highlight .drawer-estimativa-value {
    color: #0068AB;
}

/* Tabela Insumos */
.drawer-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0;
    background: #FFFFFF;
    border: 1px solid #E7E9E9;
    border-radius: 6px;
    overflow: hidden;
}

.drawer-table thead {
    background: #F9FAFA;
}

.drawer-table th {
    padding: 12px 16px;
    text-align: left;
    font-family: 'Archivo', -apple-system, sans-serif;
    font-size: 11px;
    font-weight: 700;
    color: #61666A;
    text-transform: capitalize;
    letter-spacing: 0;
    border-bottom: 1px solid #E7E9E9;
}

.drawer-table td {
    padding: 14px 16px;
    font-family: 'Archivo', -apple-system, sans-serif;
    font-size: 13px;
    color: #18191A;
    border-bottom: 1px solid #F3F4F6;
}

.drawer-table tbody tr:last-child td {
    border-bottom: none;
}

.drawer-table tbody tr:hover {
    background: #F9FAFA;
}

.drawer-table-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.drawer-table-badge.ok {
    background: #D1FAE5;
    color: #065F46;
}

.drawer-table-badge.baixo {
    background: #FEF3C7;
    color: #92400E;
}

/* Drawer Footer */
.drawer-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px 24px;
    border-top: 1px solid #E7E9E9;
    background: #FFFFFF;
    flex-shrink: 0;
}

.drawer-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 42px;
    padding: 0 24px;
    border-radius: 6px;
    font-family: 'Archivo', -apple-system, sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.drawer-btn-secondary {
    background: #FFFFFF;
    color: #18191A;
    border: 1px solid #E7E9E9;
}

.drawer-btn-secondary:hover {
    background: #F9FAFA;
    border-color: #D1D5DB;
}

.drawer-btn-primary {
    background: #0068AB;
    color: #FFFFFF;
    border: 1px solid #0068AB;
}

.drawer-btn-primary:hover {
    background: #005a94;
    border-color: #005a94;
}

.drawer-btn i {
    width: 18px;
    height: 18px;
}

/* Responsive */
@media (max-width: 768px) {
    .drawer-container {
        width: 100%;
        right: -100%;
    }

    .drawer-form-row {
        grid-template-columns: 1fr;
    }

    .drawer-estimativas {
        grid-template-columns: 1fr;
    }

    .drawer-action-buttons {
        grid-template-columns: 1fr;
    }
}
