/* ===== Design System 2024 - Área do Cliente Pro ===== */

/* ===== Correção Global de SVGs ===== */
.acp-modal svg,
.acp-trigger-button svg,
.acp-button svg,
[class*="acp-"] svg {
    stroke: currentColor !important;
    fill: none !important;
    stroke-width: 2 !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Alvo também elementos internos (path, line, circle, polyline, etc) */
[class*="acp-"] svg * {
    stroke: currentColor !important;
    fill: none !important;
    stroke-width: inherit !important;
    stroke-linecap: inherit !important;
    stroke-linejoin: inherit !important;
}

:root {
    /* Cores Principais */
    --acp-primary: #1a365d;
    --acp-primary-light: #2c5282;
    --acp-primary-dark: #0f172a;
    --acp-secondary: #ea580c;
    --acp-secondary-light: #f59e0b;
    --acp-accent: #10b981;
    --acp-accent-light: #34d399;
    
    /* Cores de Status */
    --acp-success: #10b981;
    --acp-warning: #f59e0b;
    --acp-danger: #ef4444;
    --acp-info: #3b82f6;
    
    /* Cores Neutras */
    --acp-white: #ffffff;
    --acp-gray-50: #f9fafb;
    --acp-gray-100: #f3f4f6;
    --acp-gray-200: #e5e7eb;
    --acp-gray-300: #d1d5db;
    --acp-gray-400: #9ca3af;
    --acp-gray-500: #6b7280;
    --acp-gray-600: #4b5563;
    --acp-gray-700: #374151;
    --acp-gray-800: #1f2937;
    --acp-gray-900: #111827;
    
    /* Sombras */
    --acp-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --acp-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --acp-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --acp-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --acp-shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    
    /* Transições */
    --acp-transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --acp-transition-normal: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --acp-transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== Botão Trigger ===== */
.acp-trigger-button {
    position: fixed;
    top: 80px;
    right: 24px;
    z-index: 999;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 24px;
    background: linear-gradient(135deg, #ea580c 0%, #fb923c 100%);
    color: var(--acp-white);
    border: none;
    border-radius: 50px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: var(--acp-shadow-xl), 0 0 30px rgba(234, 88, 12, 0.4);
    transition: all var(--acp-transition-normal);
    animation: acp-float 3s ease-in-out infinite, acp-shimmer 3s linear infinite;
    background-size: 200% 100%;
}

/* Ícone dentro do botão flutuante */
.acp-trigger-button .acp-button-icon { 
    color: var(--acp-white) !important;
}

/* Correção específica para SVG do botão trigger */
.acp-trigger-button svg {
    stroke: var(--acp-white) !important;
    fill: none !important;
    stroke-width: 2.5 !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

@keyframes acp-float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.acp-trigger-button:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: var(--acp-shadow-2xl), 0 0 50px rgba(234, 88, 12, 0.6), 0 0 80px rgba(251, 146, 60, 0.3);
    background: linear-gradient(135deg, #fb923c 0%, #ea580c 100%);
}

/* Efeito de brilho no botão */
@keyframes acp-shimmer {
    0% {
        background-position: 200% center;
    }
    100% {
        background-position: -200% center;
    }
}

.acp-button-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.acp-button-icon svg {
    width: 100% !important;
    height: 100% !important;
    stroke: currentColor !important;
    fill: none !important;
    stroke-width: 2.5 !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.acp-button-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: var(--acp-danger);
    border-radius: 50%;
    border: 3px solid var(--acp-white);
    animation: acp-pulse 2s ease-in-out infinite;
}

.acp-badge-dot {
    width: 6px;
    height: 6px;
    background: var(--acp-white);
    border-radius: 50%;
}

@keyframes acp-pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
    }
}

/* ===== Modal Container ===== */
.acp-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
}

.acp-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.acp-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    animation: acp-fade-in var(--acp-transition-normal) forwards;
}

@keyframes acp-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.acp-modal-container {
    position: relative;
    width: 90%;
    max-width: 450px;
    max-height: 85vh;
    animation: acp-slide-up var(--acp-transition-slow) cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Modal mais larga quando estiver na área do cliente */
.acp-modal[data-step="3"] .acp-modal-container {
    max-width: 1200px;
    width: 95%;
}

@keyframes acp-slide-up {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ===== Modal Card ===== */
.acp-modal-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(249, 250, 251, 0.95));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    border: 1px solid rgba(26, 54, 93, 0.1);
    box-shadow: var(--acp-shadow-2xl), 0 0 0 1px rgba(255, 255, 255, 0.8) inset;
    overflow: hidden;
}

/* ===== Modal Header ===== */
.acp-modal-header {
    position: relative;
    padding: 20px 24px;
    background: linear-gradient(135deg, #ea580c 0%, #fb923c 100%);
    color: var(--acp-white);
    text-align: center;
}

.acp-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--acp-transition-normal);
    z-index: 10001; /* garantir visibilidade acima do header */
}

.acp-modal-close:hover {
    background: var(--acp-white);
    transform: rotate(90deg) scale(1.1);
}

.acp-modal-close:hover svg {
    stroke: var(--acp-danger);
}

.acp-modal-close svg {
    width: 18px;
    height: 18px;
    stroke: var(--acp-primary-dark) !important; /* contraste sobre círculo claro */
    fill: none !important;
    stroke-width: 2 !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
    transition: stroke var(--acp-transition-normal);
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.acp-modal-logo {
    width: 56px;
    height: 56px;
    margin: 0 auto 12px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.acp-modal-logo svg {
    width: 32px !important;
    height: 32px !important;
    stroke: var(--acp-white) !important;
    fill: none !important;
    stroke-width: 2 !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.acp-modal-title {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 6px;
    letter-spacing: -0.02em;
    color: var(--acp-white) !important;
}

.acp-modal-subtitle {
    font-size: 13px;
    opacity: 0.9;
    margin: 0;
}

/* ===== Modal Body ===== */
.acp-modal-body {
    padding: 24px 24px;
    max-height: calc(85vh - 180px);
    overflow-y: auto;
}

/* ===== Steps ===== */
.acp-step {
    display: none;
    animation: acp-fade-in-scale var(--acp-transition-normal) forwards;
}

.acp-step.active {
    display: block;
}

@keyframes acp-fade-in-scale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.acp-step-header {
    text-align: center;
    margin-bottom: 24px;
}

.acp-step-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 12px;
    background: linear-gradient(135deg, #ea580c 0%, #fb923c 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--acp-shadow-lg), 0 0 30px rgba(234, 88, 12, 0.3);
}

.acp-step-icon.acp-icon-success {
    background: linear-gradient(135deg, var(--acp-success), var(--acp-accent-light));
}

.acp-step-icon svg {
    width: 24px;
    height: 24px;
    stroke: var(--acp-white);
}

.acp-step-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--acp-gray-800);
    margin: 0 0 6px;
}

.acp-step-description {
    font-size: 13px;
    color: var(--acp-gray-600);
    margin: 0;
}

/* ===== Forms ===== */
.acp-form {
    margin-top: 24px;
}

.acp-form-group {
    margin-bottom: 16px;
}

.acp-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.acp-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--acp-gray-700);
    margin-bottom: 8px;
}

.acp-input-group {
    position: relative;
}

.acp-input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: var(--acp-gray-400);
}

.acp-input-icon svg {
    width: 100%;
    height: 100%;
}

.acp-input {
    width: 100%;
    padding: 12px 16px;
    padding-left: 44px;
    background: var(--acp-white);
    border: 2px solid var(--acp-gray-200);
    border-radius: 12px;
    font-size: 15px;
    color: var(--acp-gray-800);
    transition: all var(--acp-transition-normal);
}

.acp-input:focus {
    outline: none;
    border-color: var(--acp-primary);
    box-shadow: 0 0 0 4px rgba(26, 54, 93, 0.1);
}

.acp-input-code {
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 8px;
    padding-left: 16px;
}

.acp-input-helper {
    display: block;
    font-size: 12px;
    color: var(--acp-gray-500);
    margin-top: 6px;
}

/* ===== Buttons ===== */
.acp-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--acp-transition-normal);
}

.acp-button svg {
    width: 18px;
    height: 18px;
}

.acp-button-primary {
    width: 100%;
    background: linear-gradient(135deg, #ea580c 0%, #fb923c 100%);
    color: var(--acp-white);
    box-shadow: var(--acp-shadow-lg), 0 0 20px rgba(234, 88, 12, 0.3);
}

.acp-button-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--acp-shadow-xl), 0 0 30px rgba(234, 88, 12, 0.4);
    background: linear-gradient(135deg, #fb923c 0%, #ea580c 100%);
}

.acp-button-outline {
    background: var(--acp-white);
    color: var(--acp-primary);
    border: 2px solid var(--acp-gray-200);
}

.acp-button-outline:hover {
    background: var(--acp-gray-50);
    border-color: var(--acp-primary);
}

.acp-button-secondary {
    background: var(--acp-gray-100);
    color: var(--acp-gray-700);
}

.acp-button-secondary:hover {
    background: var(--acp-gray-200);
}

.acp-button-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    background: var(--acp-white);
    border: 1px solid var(--acp-gray-200);
    border-radius: 50%;
    position: relative; /* para centralizar fallback */
}

.acp-button-icon:hover {
    background: var(--acp-gray-50);
    border-color: var(--acp-gray-300);
}

/* Fallback visual para ícone do botão flutuante (data URI) */
.acp-button-icon::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 18px;
    height: 18px;
    transform: translate(-50%, -50%);
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
    /* Ícone pessoa (stroke: #1a365d) */
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231a365d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'/><circle cx='12' cy='7' r='4'/></svg>");
    pointer-events: none;
    z-index: 2;
}

/* Fallback para botão fechar (usa caractere ×) */
.acp-modal-close::before {
    content: "\00D7"; /* × */
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 20px;
    font-weight: 700;
    line-height: 1;
    color: var(--acp-primary-dark);
    pointer-events: none;
}

/* ===== Verification Options ===== */
.acp-verification-option {
    margin-bottom: 24px;
}

.acp-option-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--acp-gray-50);
    border: 2px solid var(--acp-gray-200);
    border-radius: 12px;
    margin-bottom: 16px;
}

.acp-option-icon {
    width: 48px;
    height: 48px;
    background: var(--acp-white);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.acp-option-icon svg {
    width: 24px;
    height: 24px;
    stroke: var(--acp-primary);
}

.acp-option-content {
    flex: 1;
}

.acp-option-content h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--acp-gray-800);
    margin: 0 0 4px;
}

.acp-option-content p {
    font-size: 13px;
    color: var(--acp-gray-600);
    margin: 0;
}

/* ===== Client Area ===== */
.acp-client-area {
    min-height: 400px;
}

.acp-client-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: var(--acp-gray-50);
    border-radius: 12px;
    margin-bottom: 24px;
}

.acp-client-avatar {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--acp-primary), var(--acp-primary-light));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.acp-client-avatar svg {
    width: 28px;
    height: 28px;
    stroke: var(--acp-white);
}

.acp-client-info {
    flex: 1;
}

.acp-client-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--acp-gray-800);
    margin: 0 0 4px;
}

.acp-client-type {
    font-size: 13px;
    color: var(--acp-gray-600);
    margin: 0;
}

/* ===== Client Navigation ===== */
.acp-client-nav {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    overflow-x: auto;
    padding-bottom: 8px;
}

.acp-nav-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--acp-white);
    border: 2px solid var(--acp-gray-200);
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    color: var(--acp-gray-600);
    cursor: pointer;
    transition: all var(--acp-transition-normal);
    white-space: nowrap;
}

.acp-nav-item:hover {
    background: var(--acp-gray-50);
    border-color: var(--acp-gray-300);
}

.acp-nav-item.active {
    background: linear-gradient(135deg, var(--acp-primary), var(--acp-primary-light));
    border-color: var(--acp-primary);
    color: var(--acp-white);
}

.acp-nav-item svg {
    width: 18px;
    height: 18px;
}

/* ===== Tab Content ===== */
.acp-tab-content {
    display: none;
}

.acp-tab-content.active {
    display: block;
    animation: acp-fade-in var(--acp-transition-normal) forwards;
}

.acp-section-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--acp-gray-800);
    margin: 0 0 20px;
}

/* ===== Dashboard Grid ===== */
.acp-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.acp-stat-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: var(--acp-white);
    border: 2px solid var(--acp-gray-200);
    border-radius: 12px;
    transition: all var(--acp-transition-normal);
}

.acp-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--acp-shadow-lg);
}

.acp-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.acp-stat-icon svg {
    width: 24px;
    height: 24px;
    stroke: var(--acp-white);
}

.acp-stat-icon-blue {
    background: linear-gradient(135deg, #3b82f6, #60a5fa);
}

.acp-stat-icon-green {
    background: linear-gradient(135deg, #10b981, #34d399);
}

.acp-stat-icon-orange {
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
}

.acp-stat-icon-purple {
    background: linear-gradient(135deg, #8b5cf6, #a78bfa);
}

.acp-stat-content h4 {
    font-size: 12px;
    font-weight: 600;
    color: var(--acp-gray-600);
    margin: 0 0 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.acp-stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--acp-gray-800);
    margin: 0;
}

.acp-stat-date {
    font-size: 14px;
}

/* ===== Empty States ===== */
.acp-empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--acp-gray-500);
    font-size: 14px;
}

/* ===== Footer ===== */
.acp-modal-footer {
    padding: 16px 24px;
    background: var(--acp-gray-50);
    border-top: 1px solid var(--acp-gray-200);
}

.acp-footer-text {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 12px;
    color: var(--acp-gray-600);
    margin: 0;
}

.acp-footer-text svg {
    width: 16px;
    height: 16px;
    stroke: var(--acp-success);
}

/* ===== Fullscreen Option ===== */
.acp-fullscreen-option {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--acp-gray-200);
    text-align: center;
}

/* ===== Loading ===== */
.acp-loading {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 2147483000; /* acima de qualquer overlay */
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.acp-loading.active {
    display: flex;
}

.acp-spinner {
    width: 48px;
    height: 48px;
    position: relative;
    animation: acp-spin 1s linear infinite;
}

@keyframes acp-spin {
    100% { transform: rotate(360deg); }
}

.acp-spinner div {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 4px solid transparent;
    border-top-color: var(--acp-primary);
    border-radius: 50%;
    animation: acp-spin 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}

.acp-spinner div:nth-child(2) {
    border-top-color: var(--acp-primary-light);
    animation-delay: -0.3s;
}

.acp-spinner div:nth-child(3) {
    border-top-color: var(--acp-secondary);
    animation-delay: -0.6s;
}

.acp-spinner div:nth-child(4) {
    border-top-color: var(--acp-accent);
    animation-delay: -0.9s;
}

.acp-loading p {
    margin-top: 16px;
    font-size: 14px;
    color: var(--acp-gray-600);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .acp-trigger-button {
        top: 110px;
        right: 16px;
        transition: transform var(--acp-transition-normal), opacity var(--acp-transition-normal);
    }
    
    .acp-trigger-button.hidden-on-scroll {
        transform: translateX(150px);
        opacity: 0;
        pointer-events: none;
    }
    
    .acp-modal-container {
        width: 95%;
    }
    
    .acp-modal-body {
        padding: 24px 16px;
    }
    
    .acp-form-grid {
        grid-template-columns: 1fr;
    }
    
    .acp-dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .acp-client-nav {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* ===== Notificações ===== */
.acp-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px 24px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    color: white;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    animation: acp-notification-in 0.3s ease-out forwards;
    max-width: 400px;
    backdrop-filter: blur(10px);
}

.acp-notification-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.acp-notification-error {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.acp-notification-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.acp-notification-info {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

@keyframes acp-notification-in {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes acp-notification-out {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100px);
    }
}

/* ===== Tabelas Modernas ===== */
.acp-table-container {
    width: 100%;
    overflow-x: auto;
    border-radius: 12px;
    background: white;
    box-shadow: var(--acp-shadow-sm);
}

.acp-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 14px;
}

.acp-table thead th {
    background: linear-gradient(135deg, var(--acp-primary) 0%, var(--acp-primary-light) 100%);
    color: white;
    font-weight: 600;
    text-align: left;
    padding: 16px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: sticky;
    top: 0;
    z-index: 10;
}

.acp-table thead th:first-child {
    border-top-left-radius: 12px;
}

.acp-table thead th:last-child {
    border-top-right-radius: 12px;
}

.acp-table tbody tr {
    border-bottom: 1px solid var(--acp-gray-200);
    transition: all var(--acp-transition-fast);
}

.acp-table tbody tr:hover {
    background: var(--acp-gray-50);
    transform: scale(1.01);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

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

.acp-table tbody td {
    padding: 16px;
    vertical-align: middle;
}

.acp-table-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.acp-action-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all var(--acp-transition-fast);
    position: relative;
}

.acp-action-btn:hover {
    transform: scale(1.1);
    box-shadow: var(--acp-shadow-md);
}

.acp-action-btn.acp-btn-primary {
    background: linear-gradient(135deg, var(--acp-info) 0%, #2563eb 100%);
    color: white;
}

.acp-action-btn.acp-btn-success {
    background: linear-gradient(135deg, var(--acp-success) 0%, #059669 100%);
    color: white;
}

.acp-action-btn.acp-btn-warning {
    background: linear-gradient(135deg, var(--acp-warning) 0%, #d97706 100%);
    color: white;
}

.acp-action-btn svg {
    width: 18px !important;
    height: 18px !important;
    stroke: currentColor !important;
    fill: none !important;
    stroke-width: 2 !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.acp-dropdown {
    position: relative;
    display: inline-block;
}

.acp-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 4px;
    background: white;
    border-radius: 8px;
    box-shadow: var(--acp-shadow-xl);
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--acp-transition-fast);
    z-index: 1000;
}

.acp-dropdown.active .acp-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.acp-dropdown-item {
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all var(--acp-transition-fast);
    border-bottom: 1px solid var(--acp-gray-100);
}

.acp-dropdown-item:last-child {
    border-bottom: none;
}

.acp-dropdown-item:hover {
    background: var(--acp-gray-50);
}

.acp-dropdown-item svg {
    width: 16px !important;
    height: 16px !important;
    color: var(--acp-gray-600);
    stroke: currentColor !important;
    fill: none !important;
    stroke-width: 2 !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.acp-dropdown-item span {
    font-size: 14px;
    color: var(--acp-gray-700);
}

/* Modal de Andamentos */
.acp-andamentos-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.acp-andamentos-modal.active {
    display: flex;
}

.acp-andamentos-container {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 900px;
    max-height: 85vh;
    overflow: hidden;
    box-shadow: var(--acp-shadow-2xl);
    display: flex;
    flex-direction: column;
}

.acp-andamentos-header {
    padding: 24px;
    background: linear-gradient(135deg, var(--acp-primary) 0%, var(--acp-primary-light) 100%);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.acp-andamentos-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.acp-andamentos-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--acp-transition-fast);
}

.acp-andamentos-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.acp-andamentos-close svg {
    width: 20px;
    height: 20px;
    color: white;
}

.acp-andamentos-content {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.acp-andamento-item {
    padding: 16px;
    border-left: 3px solid var(--acp-info);
    background: var(--acp-gray-50);
    border-radius: 8px;
    margin-bottom: 16px;
}

.acp-andamento-item:last-child {
    margin-bottom: 0;
}

.acp-andamento-date {
    font-size: 12px;
    color: var(--acp-gray-500);
    font-weight: 600;
    margin-bottom: 8px;
}

.acp-andamento-text {
    font-size: 14px;
    color: var(--acp-gray-700);
    line-height: 1.6;
}

/* ===== Acessibilidade ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }
}

*:focus-visible {
    outline: 2px solid var(--acp-primary);
    outline-offset: 2px;
}
