/* ZIG ZAP - Modern & Playful Theme */

:root {
    /* Brand Colors */
    --brand-dark: #091620;
    --brand-blue: #467BC1;
    --brand-yellow: #EDCC25;
    --brand-white: #FFFFFF;
    --gradient-blue: linear-gradient(135deg, #467BC1 0%, #5a8dd4 100%);
    --gradient-yellow: linear-gradient(135deg, #EDCC25 0%, #f5d93f 100%);
    --gradient-dark: linear-gradient(135deg, #091620 0%, #0f2635 100%);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--brand-dark);
    line-height: 1.7;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
}

a {
    color: var(--brand-blue);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: #365f9a;
}

a:not(.btn):not(.nav-link) {
    position: relative;
}

a:not(.btn):not(.nav-link)::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background: var(--gradient-yellow);
    transition: width 0.3s ease;
}

a:not(.btn):not(.nav-link):hover::after {
    width: 100%;
}

.header-brand {
    background-color: var(--brand-white);
    box-shadow: 0 2px 10px rgba(9, 22, 32, 0.08);
}

.navbar-toggler {
    border: 2px solid var(--brand-blue);
    border-radius: 8px;
    padding: 8px 12px;
    background: transparent;
    transition: all 0.3s ease;
}

.navbar-toggler:hover {
    background: var(--brand-blue);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23467BC1' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    width: 24px;
    height: 24px;
    display: inline-block;
}

.navbar-toggler:hover .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23FFFFFF' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.nav-link {
    position: relative;
    font-weight: 500;
    color: var(--brand-dark) !important;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: var(--brand-blue) !important;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 3px;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gradient-yellow);
    transition: width 0.3s ease;
    border-radius: 3px;
}

.nav-link:hover::after {
    width: 70%;
}

.btn {
    font-weight: 600;
    padding: 0.75rem 2rem;
    border-radius: 50px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.3px;
    border: none;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:active::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: var(--gradient-blue) !important;
    color: var(--brand-white) !important;
    box-shadow: 0 4px 15px rgba(70, 123, 193, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(70, 123, 193, 0.4);
}

.btn-outline-primary {
    color: var(--brand-blue) !important;
    border: 2px solid var(--brand-blue) !important;
    background: transparent !important;
}

.btn-outline-primary:hover {
    background: var(--brand-blue) !important;
    color: var(--brand-white) !important;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(70, 123, 193, 0.3);
}

.btn-outline-dark {
    color: var(--brand-dark) !important;
    border: 2px solid var(--brand-dark) !important;
    background: transparent !important;
}

.btn-outline-dark:hover {
    background: var(--brand-dark) !important;
    color: var(--brand-white) !important;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(9, 22, 32, 0.3);
}

.btn-cta {
    background: var(--gradient-yellow) !important;
    color: var(--brand-dark) !important;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(237, 204, 37, 0.3);
    animation: pulse-glow 2s ease-in-out infinite;
}

.btn-cta:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 30px rgba(237, 204, 37, 0.5);
    animation: none;
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(237, 204, 37, 0.3);
    }
    50% {
        box-shadow: 0 6px 20px rgba(237, 204, 37, 0.5);
    }
}

.btn-lg {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
}

.btn-sm {
    padding: 0.5rem 1.5rem;
    font-size: 0.9rem;
}

.card {
    border-radius: 20px;
    border: none;
    transition: all 0.3s ease;
    background: var(--brand-white);
}

.card:hover {
    transform: translateY(-8px);
}

.shadow-brand {
    box-shadow: 0 4px 20px rgba(70, 123, 193, 0.15);
}

.card:hover.shadow-brand,
.shadow-brand:hover {
    box-shadow: 0 8px 35px rgba(70, 123, 193, 0.25);
}

.card-brand-blue {
    border-left: 5px solid var(--brand-blue);
    background: linear-gradient(to right, rgba(70, 123, 193, 0.05) 0%, var(--brand-white) 30%);
}

.card-brand-yellow {
    border-left: 5px solid var(--brand-yellow);
    background: linear-gradient(to right, rgba(237, 204, 37, 0.05) 0%, var(--brand-white) 30%);
}

.feature-icon-blue,
.feature-icon-yellow {
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 4px 15px rgba(70, 123, 193, 0.2);
}

.feature-icon-blue {
    background: var(--gradient-blue) !important;
    color: var(--brand-white) !important;
}

.feature-icon-yellow {
    background: var(--gradient-yellow) !important;
    color: var(--brand-dark) !important;
}

.card:hover .feature-icon-blue {
    transform: rotate(10deg) scale(1.15);
    box-shadow: 0 8px 25px rgba(70, 123, 193, 0.3);
}

.card:hover .feature-icon-yellow {
    transform: rotate(-10deg) scale(1.15);
    box-shadow: 0 8px 25px rgba(237, 204, 37, 0.3);
}

.bg-primary {
    background: var(--gradient-blue) !important;
    color: var(--brand-white) !important;
}

.bg-brand-yellow {
    background: var(--gradient-yellow) !important;
    color: var(--brand-dark) !important;
}

.bg-brand-dark {
    background: var(--gradient-dark) !important;
    color: var(--brand-white) !important;
}

.text-brand-dark {
    color: var(--brand-dark) !important;
}

.text-brand-blue {
    color: var(--brand-blue) !important;
}

.text-brand-yellow {
    color: var(--brand-yellow) !important;
}

.stat-number {
    color: var(--brand-blue);
    font-weight: 800;
    font-size: 3rem;
    line-height: 1;
}

.stat-number.yellow {
    color: var(--brand-yellow);
}

.auth-card {
    border-top: 4px solid var(--brand-blue);
    border-radius: 20px;
}

@media (max-width: 992px) {
    .header-brand img {
        height: 50px !important;
    }
    
    .display-4, .display-3 {
        font-size: 2rem !important;
    }
    
    .display-5 {
        font-size: 1.75rem !important;
    }
    
    .btn-lg {
        padding: 0.85rem 2rem;
        font-size: 1rem;
    }
    
    .pricing-card-featured {
        transform: scale(1) !important;
        margin-top: 30px;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .header-brand img {
        height: 45px !important;
    }
    
    .display-4, .display-3 {
        font-size: 1.75rem !important;
    }
    
    .display-5 {
        font-size: 1.5rem !important;
    }
    
    .display-6 {
        font-size: 1.35rem !important;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .feature-icon-blue,
    .feature-icon-yellow {
        width: 70px !important;
        height: 70px !important;
    }
    
    .feature-icon-blue i,
    .feature-icon-yellow i {
        font-size: 2rem !important;
    }
    
    .btn {
        width: 100%;
        padding: 0.75rem 1.5rem;
    }
    
    .btn-lg {
        padding: 0.9rem 1.5rem;
    }
    
    .card-body {
        padding: 1.5rem !important;
    }
    
    .lead {
        font-size: 1.1rem !important;
    }
}

/* Footer */
.footer-dark {
    background: var(--gradient-dark);
    position: relative;
    overflow: hidden;
}

.footer-dark::before {
    content: '';
    position: absolute;
    top: 0;
    left: -50%;
    width: 200%;
    height: 2px;
    background: var(--gradient-yellow);
    opacity: 0.3;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.footer-links a:hover {
    color: var(--brand-yellow);
    padding-left: 5px;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--brand-white);
    border-radius: 50%;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-link:hover {
    background: var(--brand-yellow);
    color: var(--brand-dark);
    transform: translateY(-3px);
}

/* Pricing Page */
.pricing-page {
    background: #f8f9fa;
}

.pricing-hero {
    background: var(--gradient-dark);
    position: relative;
    overflow: hidden;
}

.pricing-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(237, 204, 37, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.pricing-hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(70, 123, 193, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.pricing-hero .badge {
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 1px;
    border-radius: 50px;
}

.pricing-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s ease;
    border: 2px solid transparent;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.pricing-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
}

.pricing-card-header {
    padding: 2rem 1.5rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.pricing-amount {
    position: relative;
}

.pricing-amount .currency {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--brand-dark);
    vertical-align: top;
}

.pricing-amount .price {
    font-size: 4rem;
    font-weight: 800;
    color: var(--brand-blue);
    line-height: 1;
}

.pricing-amount .period {
    font-size: 1rem;
    color: #6c757d;
    font-weight: 500;
}

.pricing-amount .price-free,
.pricing-amount .price-custom {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--brand-blue);
    line-height: 1;
}

.pricing-card-body {
    padding: 2rem 1.5rem;
}

.pricing-features li {
    padding: 0.75rem 0;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    color: var(--brand-dark);
    font-size: 0.95rem;
}

.pricing-features li i {
    color: var(--brand-blue);
    font-size: 1.2rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.pricing-features li span {
    flex: 1;
}

.btn-pricing {
    padding: 1rem 2rem;
    font-weight: 700;
    font-size: 1rem;
}

/* Featured Pricing Card - Enhanced */
.pricing-card-featured {
    position: relative;
    border: 3px solid var(--brand-blue) !important;
    box-shadow: 0 20px 60px rgba(70, 123, 193, 0.3) !important;
    z-index: 2;
}

.pricing-card-featured::before {
    content: '🔥 MAIS POPULAR';
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gradient-yellow);
    color: var(--brand-dark);
    padding: 8px 24px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.85rem;
    box-shadow: 0 4px 15px rgba(237, 204, 37, 0.4);
    z-index: 10;
    white-space: nowrap;
}

.pricing-card-featured:hover {
    transform: translateY(-15px) !important;
    box-shadow: 0 25px 70px rgba(70, 123, 193, 0.35) !important;
}

.pricing-card-featured .pricing-card-header {
    background: var(--gradient-blue) !important;
}

.pricing-card-featured .pricing-card-header h3,
.pricing-card-featured .pricing-card-header .currency,
.pricing-card-featured .pricing-card-header .period,
.pricing-card-featured .pricing-card-header .text-muted {
    color: white !important;
}

.pricing-card-featured .pricing-amount .price,
.pricing-card-featured .pricing-amount .price-free,
.pricing-card-featured .pricing-amount .price-custom {
    color: var(--brand-yellow) !important;
}

/* Guarantee Card */
.guarantee-card {
    background: var(--gradient-blue);
    color: white;
    padding: 3rem 2rem;
    border-radius: 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(70, 123, 193, 0.3);
}

.guarantee-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.guarantee-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* FAQ Cards */
.faq-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    border-left: 4px solid var(--brand-blue);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    height: 100%;
}

.faq-card:hover {
    transform: translateX(8px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.faq-card-yellow {
    border-left-color: var(--brand-yellow);
}

.faq-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

/* Final CTA */
.final-cta {
    background: var(--gradient-dark);
    padding: 4rem 2rem;
    border-radius: 20px;
    position: relative;
    overflow: hidden;
}

.final-cta::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(237, 204, 37, 0.15) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    border-radius: 50%;
}

/* Responsive Adjustments */
@media (max-width: 991px) {
    .pricing-card-featured {
        border: 2px solid var(--brand-blue) !important;
    }
    
    .pricing-card-featured:hover {
        transform: translateY(-10px) !important;
    }
    
    .pricing-amount .price {
        font-size: 3rem;
    }
    
    .guarantee-card {
        padding: 2rem 1.5rem;
    }
    
    .final-cta {
        padding: 3rem 1.5rem;
    }
}

/* About Page */
.about-page {
    background: #f8f9fa;
}

.about-hero {
    background: var(--gradient-dark);
    padding: 4rem 0;
    position: relative;
    overflow: hidden;
}

.about-hero::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(237, 204, 37, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.about-hero .badge {
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 1px;
    border-radius: 50px;
}

/* Mission Card */
.mission-card {
    background: white;
    border-radius: 25px;
    padding: 3rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    position: relative;
}

.mission-badge {
    width: 70px;
    height: 70px;
    background: var(--gradient-yellow);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 1rem;
    box-shadow: 0 5px 20px rgba(237, 204, 37, 0.3);
}

.mission-image {
    position: relative;
}

.mission-image img {
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    border-radius: 20px;
}

.image-float {
    position: absolute;
    top: -20px;
    right: -20px;
    width: 100px;
    height: 100px;
    background: var(--gradient-blue);
    border-radius: 50%;
    opacity: 0.2;
    animation: float 6s ease-in-out infinite;
}

/* Values Section */
.values-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.value-card {
    background: white;
    border-radius: 20px;
    padding: 2.5rem 2rem;
    height: 100%;
    transition: all 0.4s ease;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    border-top: 4px solid var(--brand-blue);
}

.value-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.value-card-featured {
    border-top-color: var(--brand-yellow);
    background: linear-gradient(135deg, #ffffff 0%, #fffef5 100%);
}

.value-emoji {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    display: inline-block;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.value-content h4 {
    font-size: 1.3rem;
}

/* Stats Section */
.stats-section {
    background: var(--gradient-dark);
    padding: 4rem 0;
    position: relative;
    overflow: hidden;
}

.stats-section::before {
    content: '';
    position: absolute;
    bottom: -50%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(70, 123, 193, 0.15) 0%, transparent 70%);
    border-radius: 50%;
}

.stat-box {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-box:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: scale(1.05);
}

.stat-box-featured {
    background: var(--gradient-yellow);
    border: none;
}

.stat-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.stat-number-about {
    font-size: 3rem;
    font-weight: 800;
    color: white;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-number-about.highlight {
    color: var(--brand-dark);
}

.stat-label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
    margin-bottom: 0;
}

.stat-box-featured .stat-label {
    color: var(--brand-dark);
    opacity: 0.8;
}

/* Tech Section */
.tech-section {
    background: white;
    padding: 5rem 0;
}

.tech-header {
    margin-bottom: 2rem;
}

.tech-badge {
    width: 60px;
    height: 60px;
    background: var(--gradient-blue);
    border-radius: 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 5px 20px rgba(70, 123, 193, 0.3);
}

.tech-list {
    margin: 0;
}

.tech-item {
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 15px;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    border-left: 4px solid var(--brand-blue);
}

.tech-item:hover {
    background: white;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transform: translateX(5px);
}

.tech-item-icon {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    background: var(--gradient-blue);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.tech-item-content strong {
    display: block;
    color: var(--brand-dark);
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.tech-item-content p {
    color: #6c757d;
    font-size: 0.9rem;
}

.tech-box {
    background: var(--gradient-yellow);
    border-radius: 25px;
    padding: 3rem;
    box-shadow: 0 15px 40px rgba(237, 204, 37, 0.3);
    position: relative;
    overflow: hidden;
}

.tech-box::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 70%);
    border-radius: 50%;
}

.tech-box-icon {
    width: 80px;
    height: 80px;
    background: var(--brand-dark);
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-yellow);
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 10px 30px rgba(9, 22, 32, 0.3);
}

/* About CTA */
.about-cta {
    background: var(--gradient-dark);
    padding: 5rem 0;
    position: relative;
    overflow: hidden;
}

.about-cta::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(237, 204, 37, 0.1) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    border-radius: 50%;
}

.about-cta-content {
    position: relative;
    z-index: 2;
}

.about-cta-icon {
    font-size: 5rem;
    margin-bottom: 1rem;
    animation: float 3s ease-in-out infinite;
}

.btn-outline-light {
    border: 2px solid white;
    color: white;
}

.btn-outline-light:hover {
    background: white;
    color: var(--brand-dark);
}

/* Responsive */
@media (max-width: 991px) {
    .mission-card {
        padding: 2rem;
    }
    
    .tech-section {
        padding: 3rem 0;
    }
    
    .tech-box {
        padding: 2rem;
        margin-top: 2rem;
    }
    
    .about-cta {
        padding: 3rem 0;
    }
    
    .stat-number-about {
        font-size: 2.5rem;
    }
}

/* Dashboard Styles */
.dashboard-stats-scroll {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
}

.dashboard-stat-card {
    background: white;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.05);
    min-width: 0;
}

.dashboard-stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    flex-shrink: 0;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    color: white;
}

.stat-icon-blue {
    background: var(--gradient-blue);
}

.stat-icon-yellow {
    background: var(--gradient-yellow);
    color: var(--brand-dark) !important;
}

.stat-icon-gradient {
    background: linear-gradient(135deg, var(--brand-blue) 0%, var(--brand-yellow) 100%);
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--brand-dark);
    line-height: 1;
    margin-bottom: 0.25rem;
}

.stat-label {
    color: #6c757d;
    font-size: 0.875rem;
    font-weight: 500;
}

.dashboard-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.dashboard-card .card-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.dashboard-card .card-body {
    padding: 1.5rem;
}

.quick-action-btn {
    width: 100%;
    padding: 1.25rem 1rem;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
    color: var(--brand-dark);
}

.quick-action-btn i {
    font-size: 2rem;
    color: var(--brand-blue);
    transition: all 0.3s ease;
}

.quick-action-btn span {
    font-weight: 600;
    font-size: 0.9rem;
}

.quick-action-btn:hover {
    background: var(--gradient-blue);
    border-color: var(--brand-blue);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(70, 123, 193, 0.3);
}

.quick-action-btn:hover i {
    color: var(--brand-yellow);
    transform: scale(1.1);
}

.activity-stat-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.activity-stat-item:last-child {
    border-bottom: none;
}

.activity-stat-icon {
    width: 50px;
    height: 50px;
    background: var(--gradient-blue);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.activity-stat-content {
    flex: 1;
}

.activity-stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--brand-dark);
    line-height: 1;
}

.activity-stat-label {
    color: #6c757d;
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.2s ease;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-item:hover {
    background: #f8f9fa;
    margin: 0 -1rem;
    padding: 1rem;
    border-radius: 10px;
}

.activity-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #e9ecef 0%, #f8f9fa 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-blue);
    font-size: 1.2rem;
    flex-shrink: 0;
}

.activity-content {
    flex: 1;
}

.activity-description {
    color: var(--brand-dark);
    font-size: 0.95rem;
    font-weight: 500;
}

.activity-time {
    font-size: 0.85rem;
}

.activity-link {
    width: 30px;
    height: 30px;
    background: var(--brand-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.activity-link:hover {
    background: var(--brand-yellow);
    color: var(--brand-dark);
    transform: scale(1.1);
}

.status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.status-item:last-child {
    border-bottom: none;
}

.status-label {
    display: flex;
    align-items: center;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--brand-dark);
}

.status-label i {
    font-size: 0.5rem;
}

/* Responsive Dashboard */
@media (max-width: 1199px) {
    .dashboard-stats-scroll {
        grid-template-columns: repeat(3, 1fr);
        overflow-x: auto;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 0.5rem;
        /* Ocultar scrollbar mas manter funcionalidade */
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE/Edge */
    }
    
    .dashboard-stats-scroll::-webkit-scrollbar {
        display: none; /* Chrome, Safari, Opera */
    }
    
    .stat-value {
        font-size: 1.75rem;
    }
    
    .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }
}

@media (max-width: 767px) {
    .dashboard-stats-scroll {
        display: flex;
        grid-template-columns: none;
        gap: 1rem;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 1rem;
        margin-left: -1rem;
        margin-right: -1rem;
        padding-left: 1rem;
        padding-right: 1rem;
        /* Ocultar scrollbar mas manter funcionalidade */
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE/Edge */
    }
    
    .dashboard-stats-scroll::-webkit-scrollbar {
        display: none; /* Chrome, Safari, Opera */
    }
    
    .dashboard-stat-card {
        flex: 0 0 220px;
        scroll-snap-align: start;
        padding: 1rem;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
    
    .stat-icon {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
    }
    
    .quick-action-btn {
        padding: 1rem;
    }
    
    .quick-action-btn i {
        font-size: 1.5rem;
    }
}

/* Contacts Tabs */
.contacts-tabs-wrapper {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.contacts-tabs-scroll {
    display: flex;
    gap: 0;
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.contacts-tabs-scroll::-webkit-scrollbar {
    height: 6px;
}

.contacts-tabs-scroll::-webkit-scrollbar-thumb {
    background: rgba(70, 123, 193, 0.3);
    border-radius: 3px;
}

.contacts-tab {
    flex: 0 0 auto;
    padding: 1rem 1.5rem;
    border: none;
    background: transparent;
    color: #6c757d;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
}

.contacts-tab i {
    font-size: 1.1rem;
}

.contacts-tab:hover {
    background: rgba(70, 123, 193, 0.05);
    color: var(--brand-blue);
}

.contacts-tab.active {
    color: var(--brand-blue);
    border-bottom-color: var(--brand-blue);
    background: rgba(70, 123, 193, 0.05);
}

/* Aba de adicionar lista */
.contacts-tab-add {
    color: #28a745;
    border-left: 1px dashed rgba(0, 0, 0, 0.1);
}

.contacts-tab-add:hover {
    background: rgba(40, 167, 69, 0.08);
    color: #218838;
}

/* Container da aba com botão de edição */
.contacts-tab-with-edit {
    position: relative;
    display: flex;
    align-items: stretch;
}

.contacts-tab-with-edit .contacts-tab {
    padding-right: 2.5rem;
}

.contacts-tab-edit-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #adb5bd;
    padding: 4px 6px;
    font-size: 0.75rem;
    cursor: pointer;
    opacity: 0;
    transition: all 0.2s ease;
    border-radius: 4px;
    z-index: 5;
}

.contacts-tab-with-edit:hover .contacts-tab-edit-btn {
    opacity: 1;
}

.contacts-tab-edit-btn:hover {
    background: rgba(255, 193, 7, 0.15);
    color: #e0a800;
}

@media (max-width: 767px) {
    .contacts-tab {
        padding: 0.875rem 1.25rem;
        font-size: 0.9rem;
    }
    
    .contacts-tab-with-edit .contacts-tab {
        padding-right: 2rem;
    }
    
    .contacts-tab-edit-btn {
        opacity: 1; /* Sempre visível no mobile */
        right: 4px;
    }
}

/* Mobile Contact Cards */
.contact-cards-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contact-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.contact-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(70, 123, 193, 0.05) 0%, rgba(237, 204, 37, 0.05) 100%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.contact-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #467BC1 0%, #5a8fd4 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.contact-info {
    flex: 1;
    min-width: 0;
}

.contact-name {
    font-weight: 600;
    color: #212529;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.contact-card-body {
    padding: 12px 16px;
}

.contact-detail {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 6px;
}

.contact-detail:last-child {
    margin-bottom: 0;
}

.contact-detail i {
    width: 18px;
    text-align: center;
}

.contact-card-actions {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    background: #f8f9fa;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.text-truncate-cell {
    max-width: 200px;
    display: inline-block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Agents Styles */
.agent-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    overflow: hidden;
}

.agent-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.agent-card-header {
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(70, 123, 193, 0.05) 0%, rgba(237, 204, 37, 0.05) 100%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.agent-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #467BC1 0%, #5a8fd4 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.75rem;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(70, 123, 193, 0.3);
}

.agent-info {
    flex: 1;
    min-width: 0;
}

.agent-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--brand-dark);
    margin-bottom: 0.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.agent-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.agent-status-badge.status-connected {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.agent-status-badge.status-disconnected {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

.agent-status-badge.status-connecting {
    background: rgba(255, 193, 7, 0.1);
    color: #ffc107;
}

.agent-card-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.agent-detail-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    color: #6c757d;
}

.agent-detail-item i {
    font-size: 1.1rem;
    flex-shrink: 0;
}

.agent-detail-item span {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.agent-card-footer {
    padding: 1rem 1.5rem;
    background: #f8f9fa;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    gap: 0.75rem;
}

.agent-card-footer .btn {
    flex: 1;
    border-radius: 8px;
    font-weight: 500;
}

@media (max-width: 767px) {
    .agent-card-header {
        padding: 1.25rem;
    }
    
    .agent-icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
    
    .agent-name {
        font-size: 1rem;
    }
}

/* Agent Details Styles */
.agent-detail-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.agent-detail-header {
    padding: 2rem;
    background: linear-gradient(135deg, rgba(70, 123, 193, 0.08) 0%, rgba(237, 204, 37, 0.08) 100%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.agent-detail-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #467BC1 0%, #5a8fd4 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2.5rem;
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(70, 123, 193, 0.3);
}

.agent-detail-title h4 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--brand-dark);
    margin-bottom: 0.5rem;
}

.agent-id-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(70, 123, 193, 0.1);
    color: var(--brand-blue);
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.agent-detail-body {
    padding: 2rem;
}

.detail-section {
    margin-bottom: 1.5rem;
}

.detail-section-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6c757d;
    font-weight: 700;
    margin-bottom: 1rem;
}

.detail-item {
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 10px;
    margin-bottom: 0.75rem;
}

.detail-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #6c757d;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.detail-label i {
    font-size: 1.1rem;
}

.detail-value {
    font-size: 0.95rem;
    color: var(--brand-dark);
    padding-left: 1.6rem;
}

.agent-detail-footer {
    padding: 1.5rem 2rem;
    background: #f8f9fa;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    gap: 1rem;
}

.agent-detail-footer .btn {
    flex: 1;
    border-radius: 10px;
    font-weight: 500;
    padding: 0.75rem;
}

/* WhatsApp Connection Card */
.whatsapp-connection-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.whatsapp-card-header {
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: white;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.whatsapp-card-header i {
    font-size: 2rem;
}

.whatsapp-card-header h5 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.whatsapp-status-box {
    margin: 2rem;
    padding: 1.5rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.whatsapp-status-box.status-connected {
    background: rgba(40, 167, 69, 0.1);
    border: 2px solid #28a745;
}

.whatsapp-status-box.status-disconnected {
    background: rgba(220, 53, 69, 0.1);
    border: 2px solid #dc3545;
}

.whatsapp-status-box.status-connecting {
    background: rgba(255, 193, 7, 0.1);
    border: 2px solid #ffc107;
}

.whatsapp-status-box.status-loading {
    background: rgba(108, 117, 125, 0.1);
    border: 2px solid #6c757d;
}

.status-icon {
    font-size: 2rem;
}

.whatsapp-status-box.status-connected .status-icon {
    color: #28a745;
}

.whatsapp-status-box.status-disconnected .status-icon {
    color: #dc3545;
}

.whatsapp-status-box.status-connecting .status-icon {
    color: #ffc107;
}

.whatsapp-status-box.status-loading .status-icon {
    color: #6c757d;
}

.status-text {
    font-size: 1.1rem;
    font-weight: 600;
}

.qrcode-container {
    padding: 2rem;
    text-align: center;
}

.qrcode-instruction {
    font-size: 0.95rem;
    color: #6c757d;
    margin-bottom: 1.5rem;
}

.qrcode-box {
    display: inline-block;
    padding: 1.5rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 2px solid #e8e8e8;
}

.qrcode-image {
    width: 250px;
    height: 250px;
    display: block;
}

.qrcode-update-info {
    margin-top: 1rem;
    font-size: 0.85rem;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.whatsapp-actions {
    padding: 0 2rem 2rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.whatsapp-actions .btn {
    border-radius: 10px;
    font-weight: 500;
    padding: 0.75rem 1.5rem;
}

.whatsapp-help-box {
    margin: 0 2rem 2rem 2rem;
    padding: 1.5rem;
    background: rgba(70, 123, 193, 0.05);
    border-radius: 12px;
    border-left: 4px solid var(--brand-blue);
    display: flex;
    gap: 1rem;
}

.help-icon {
    font-size: 1.5rem;
    color: var(--brand-blue);
}

.help-content {
    flex: 1;
    font-size: 0.9rem;
}

.help-content strong {
    color: var(--brand-dark);
}

.help-content ol {
    font-size: 0.85rem;
    color: #6c757d;
    padding-left: 1.25rem;
}

.help-content ol li {
    margin-bottom: 0.25rem;
}

@media (max-width: 991px) {
    .agent-detail-header {
        padding: 1.5rem;
    }
    
    .agent-detail-icon {
        width: 60px;
        height: 60px;
        font-size: 2rem;
    }
    
    .agent-detail-title h4 {
        font-size: 1.25rem;
    }
}

/* Agent Form Styles */
.agent-form-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.agent-form-header {
    padding: 2rem;
    background: linear-gradient(135deg, rgba(70, 123, 193, 0.08) 0%, rgba(237, 204, 37, 0.08) 100%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.form-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, #467BC1 0%, #5a8fd4 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(70, 123, 193, 0.3);
}

.agent-form-header h4 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--brand-dark);
    margin-bottom: 0.25rem;
}

.agent-form-body {
    padding: 2rem;
}

.form-group-modern {
    margin-bottom: 1.75rem;
}

.form-label-modern {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--brand-dark);
    margin-bottom: 0.75rem;
}

.form-label-modern i {
    font-size: 1.1rem;
}

.form-control-modern {
    width: 100%;
    padding: 0.875rem 1.25rem;
    font-size: 0.95rem;
    border: 2px solid #e8e8e8;
    border-radius: 10px;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.form-control-modern:focus {
    outline: none;
    border-color: #467BC1;
    background: white;
    box-shadow: 0 0 0 3px rgba(70, 123, 193, 0.1);
}

.form-control-modern::placeholder {
    color: #adb5bd;
}

.form-hint {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: #6c757d;
    font-style: italic;
}

.form-text-modern {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: #dc3545;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.agent-form-footer {
    padding: 1.5rem 2rem;
    background: #f8f9fa;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.agent-form-footer .btn {
    border-radius: 10px;
    font-weight: 500;
    padding: 0.75rem 2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.agent-form-footer .btn i {
    font-size: 1.1rem;
}

@media (max-width: 767px) {
    .agent-form-header {
        padding: 1.5rem;
    }
    
    .form-icon {
        width: 55px;
        height: 55px;
        font-size: 1.75rem;
    }
    
    .agent-form-header h4 {
        font-size: 1.25rem;
    }
    
    .agent-form-body {
        padding: 1.5rem;
    }
    
    .agent-form-footer {
        flex-direction: column;
    }
    
    .agent-form-footer .btn {
        width: 100%;
        justify-content: center;
    }
}

/* ========================================
   AUTOMATION STYLES
   ======================================== */

/* Automation Cards - List View */
.automation-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(70, 123, 193, 0.1);
    transition: all 0.3s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.automation-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 30px rgba(70, 123, 193, 0.2);
}

.automation-card-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.automation-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--gradient-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.automation-card-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--brand-dark);
    margin: 0;
    line-height: 1.4;
}

.automation-card-description {
    line-height: 1.5;
    max-height: 3rem;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.automation-card-body {
    padding: 1.5rem;
    flex-grow: 1;
}

.automation-stats {
    display: flex;
    gap: 1.5rem;
}

.automation-stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.automation-stat-item i {
    font-size: 0.75rem;
}

.automation-stat-item .stat-label {
    color: #6c757d;
}

.automation-stat-item .stat-value {
    font-weight: 700;
    color: var(--brand-dark);
}

.automation-card-footer {
    padding: 1.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    gap: 0.75rem;
}

.automation-card-footer .btn {
    transition: all 0.3s ease;
}

.automation-card-footer .btn-primary {
    background: var(--gradient-blue);
    border: none;
}

.automation-card-footer .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(70, 123, 193, 0.3);
}

/* Automation Tabs - Edit View */
.automation-tabs-wrapper {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.automation-tabs-scroll {
    display: flex;
    gap: 0;
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.automation-tabs-scroll::-webkit-scrollbar {
    height: 4px;
}

.automation-tabs-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.automation-tabs-scroll::-webkit-scrollbar-thumb {
    background: rgba(70, 123, 193, 0.3);
    border-radius: 4px;
}

.automation-tabs-scroll::-webkit-scrollbar-thumb:hover {
    background: var(--brand-blue);
}

.automation-tab {
    flex: 0 0 auto;
    padding: 1rem 1.5rem;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: #6c757d;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.automation-tab i {
    font-size: 1.125rem;
}

.automation-tab:hover {
    background: rgba(70, 123, 193, 0.05);
    color: var(--brand-blue);
}

.automation-tab.active {
    color: var(--brand-blue);
    border-bottom-color: var(--brand-blue);
    background: rgba(70, 123, 193, 0.05);
}

/* Automation Canvas Container */
.automation-canvas-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 1.5rem;
}

.automation-toolbar {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.automation-toolbar .btn {
    transition: all 0.3s ease;
}

.automation-toolbar .btn:hover {
    transform: translateY(-2px);
}

/* Flowchart Nodes - N8N Style Compacto */
.flowchart-node {
    position: absolute;
    padding: 0;
    background: white;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    cursor: move;
    width: 220px;
    max-width: 220px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    user-select: none;
    transition: all 0.2s ease;
    overflow: visible;
}

.flowchart-node:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
    border-color: #cbd5e1;
}

.flowchart-node.selected {
    border-color: var(--brand-blue);
    border-width: 2px;
    box-shadow: 0 0 0 3px rgba(70, 123, 193, 0.1), 0 4px 12px rgba(0, 0, 0, 0.1);
}

.flowchart-node.connection-target {
    cursor: pointer !important;
    animation: pulse-border 1s ease-in-out infinite;
}

@keyframes pulse-border {
    0%, 100% {
        border-color: var(--brand-blue);
        box-shadow: 0 0 0 3px rgba(70, 123, 193, 0.2);
    }
    50% {
        border-color: #5a8dd4;
        box-shadow: 0 0 0 5px rgba(70, 123, 193, 0.1);
    }
}

.node-header {
    padding: 0;
    border-radius: 8px 8px 0 0;
    position: relative;
    overflow: hidden;
    height: 40px;
    display: flex;
    align-items: center;
    background: #fafbfc;
}

.node-header::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    z-index: 2;
}

.node-header i {
    position: absolute;
    left: 12px;
    font-size: 18px;
    z-index: 1;
}

.node-header span {
    position: absolute;
    left: 40px;
    right: 12px;
    font-weight: 600;
    font-size: 13px;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.node-body {
    padding: 10px 12px;
    font-size: 12px;
    color: #64748b;
    line-height: 1.4;
    word-wrap: break-word;
    overflow-wrap: break-word;
    background: white;
    max-height: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    border-radius: 0 0 8px 8px;
}

/* Node Type Colors - Design Limpo com Barra Lateral */
.flowchart-node.trigger .node-header::before { 
    background: linear-gradient(180deg, #10b981 0%, #059669 100%); 
}
.flowchart-node.trigger .node-header i { 
    color: #10b981; 
}

.flowchart-node.action .node-header::before { 
    background: linear-gradient(180deg, var(--brand-blue) 0%, #3a6bac 100%);
}
.flowchart-node.action .node-header i { 
    color: var(--brand-blue); 
}

.flowchart-node.bot_message .node-header::before { 
    background: linear-gradient(180deg, #8b5cf6 0%, #7c3aed 100%); 
}
.flowchart-node.bot_message .node-header i { 
    color: #8b5cf6; 
}

.flowchart-node.http .node-header::before { 
    background: linear-gradient(180deg, var(--brand-blue) 0%, #3a6bac 100%);
}
.flowchart-node.http .node-header i { 
    color: var(--brand-blue); 
}

.flowchart-node.http_request .node-header::before { 
    background: linear-gradient(180deg, #64748b 0%, #475569 100%); 
}
.flowchart-node.http_request .node-header i { 
    color: #64748b; 
}

.flowchart-node.condition .node-header::before { 
    background: linear-gradient(180deg, var(--brand-yellow) 0%, #d4a006 100%);
}
.flowchart-node.condition .node-header i { 
    color: var(--brand-yellow); 
}

.flowchart-node.delay .node-header::before { 
    background: linear-gradient(180deg, #f59e0b 0%, #d97706 100%); 
}
.flowchart-node.delay .node-header i { 
    color: #f59e0b; 
}

.flowchart-node.positive_intent .node-header::before { 
    background: linear-gradient(180deg, #10b981 0%, #059669 100%); 
}
.flowchart-node.positive_intent .node-header i { 
    color: #10b981; 
}

.flowchart-node.negative_intent .node-header::before { 
    background: linear-gradient(180deg, #ef4444 0%, #dc2626 100%); 
}
.flowchart-node.negative_intent .node-header i { 
    color: #ef4444; 
}

.flowchart-node.end .node-header::before { 
    background: linear-gradient(180deg, #ef4444 0%, #dc2626 100%); 
}
.flowchart-node.end .node-header i { 
    color: #ef4444; 
}

/* Node Connector - para criar conexões */
.node-connector {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: white;
    border: 2px solid #94a3b8;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    cursor: crosshair;
    z-index: 10;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    opacity: 0;
}

.flowchart-node:hover .node-connector,
.flowchart-node.selected .node-connector {
    opacity: 1;
}

.node-connector:hover {
    background: var(--brand-blue);
    border-color: var(--brand-blue);
    transform: translateY(-50%) scale(1.3);
    box-shadow: 0 0 0 4px rgba(70, 123, 193, 0.15);
}

/* Node Edit Button */
.node-edit-btn {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    min-width: 24px;
    min-height: 24px;
    border: none;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 4px;
    color: #475569;
    cursor: pointer;
    opacity: 0;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    z-index: 10;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.node-edit-btn i {
    font-size: 11px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.node-edit-btn i::before {
    display: block;
}

/* Node header span deve truncar para dar espaço ao botão */
.node-header span {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.flowchart-node:hover .node-edit-btn,
.flowchart-node.selected .node-edit-btn {
    opacity: 1;
}

.node-edit-btn:hover {
    background: var(--brand-blue);
    color: white;
}

.node-edit-btn:active {
    transform: translateY(-50%) scale(0.95);
}

/* Fullscreen controls pointer-events */
.flowchart-container.fullscreen .exit-fullscreen-btn,
.flowchart-container.fullscreen .fullscreen-zoom-controls {
    pointer-events: auto !important;
    z-index: 10060;
}

.flowchart-container.fullscreen .fullscreen-zoom-controls .btn {
    pointer-events: auto !important;
    position: relative;
    z-index: 10061;
}

/* Garantir que controles funcionem quando pan-mode + fullscreen estão ativos */
.flowchart-container.fullscreen.pan-mode .exit-fullscreen-btn,
.flowchart-container.fullscreen.pan-mode .fullscreen-zoom-controls,
.flowchart-container.fullscreen.pan-mode .fullscreen-zoom-controls * {
    pointer-events: auto !important;
    z-index: 10062 !important;
    cursor: default !important;
}

/* Ícones dentro de botões não devem capturar eventos */
.fullscreen-zoom-controls .btn i,
.exit-fullscreen-btn i {
    pointer-events: none;
}

/* Botão add-node no dropdown */
.add-node-btn {
    padding: 0.25rem 0.5rem;
}

.text-orange {
    color: #f59e0b !important;
}

/* Responsive */
@media (max-width: 768px) {
    .flowchart-node {
        width: 180px;
        max-width: 180px;
    }
    
    .node-header {
        padding: 10px 14px;
        font-size: 12px;
    }
    
    .node-body {
        padding: 10px 14px;
        font-size: 11px;
    }
    
    .automation-card {
        margin-bottom: 1rem;
    }
    
    .automation-stats {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .automation-card-footer {
        flex-direction: column;
    }
    
    .automation-card-footer .btn {
        width: 100%;
    }
}

/* ===========================================
   AUTOMATION EDIT PAGE - RESPONSIVO
   =========================================== */

/* Toolbar responsivo */
@media (max-width: 991.98px) {
    .automation-toolbar {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .automation-toolbar .btn {
        font-size: 0.8rem;
        padding: 0.375rem 0.75rem;
    }
    
    .automation-toolbar .ms-auto {
        margin-left: 0 !important;
        width: 100%;
        margin-top: 0.5rem;
    }
    
    /* Canvas container - padding menor */
    .automation-canvas-container {
        padding: 1rem;
    }
    
    /* Dica do editor mais compacta */
    .automation-canvas-container .small.text-muted {
        font-size: 0.7rem !important;
    }
    
    /* Zoom controls empilhados */
    .automation-canvas-container .d-flex.justify-content-between {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .zoom-controls {
        justify-content: center;
    }
}

@media (max-width: 767.98px) {
    /* Tabs menores */
    .automation-tab {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
    
    .automation-tab i {
        font-size: 1rem;
    }
    
    /* Toolbar horizontal no mobile (já que só tem ícones) */
    .automation-toolbar {
        flex-wrap: wrap;
        gap: 0.5rem;
        justify-content: flex-start;
    }
    
    .automation-toolbar .btn {
        flex: 0 0 auto;
        width: auto;
        padding: 0.375rem 0.5rem;
    }
    
    .automation-toolbar .ms-auto {
        margin-left: auto !important;
        margin-top: 0;
        border-top: none;
        padding-top: 0;
    }
    
    /* Canvas container */
    .automation-canvas-container {
        padding: 0.75rem;
        border-radius: 8px;
    }
    
    /* Flowchart - altura menor (mas não em fullscreen) */
    .flowchart-container:not(.fullscreen) {
        height: 400px !important;
        min-height: 400px;
    }
    
    /* Fullscreen deve ocupar tela toda */
    .flowchart-container.fullscreen {
        height: 100vh !important;
        width: 100vw !important;
    }
    
    /* Esconder dica longa no mobile */
    .automation-canvas-container > .mb-3 > .d-flex > p.small.text-muted {
        display: none;
    }
    
    /* Controles de zoom mais compactos */
    .zoom-controls {
        width: 100%;
        justify-content: space-between;
        background: #f8f9fa;
        padding: 0.5rem;
        border-radius: 8px;
    }
    
    .zoom-controls .btn {
        padding: 0.25rem 0.5rem;
    }
    
    /* Nodes menores no mobile */
    .flowchart-node {
        width: 160px !important;
        max-width: 160px !important;
    }
    
    .node-header {
        height: 36px;
    }
    
    .node-header span {
        font-size: 11px;
        left: 36px;
    }
    
    .node-header i {
        font-size: 14px;
        left: 10px;
    }
    
    .node-body {
        padding: 8px 10px;
        font-size: 10px;
        max-height: 60px;
        -webkit-line-clamp: 2;
    }
    
    /* Botão editar sempre visível no mobile */
    .node-edit-btn {
        opacity: 1;
        width: 22px;
        height: 22px;
        font-size: 10px;
        right: 6px;
    }
    
    /* Node connector sempre visível no mobile */
    .node-connector {
        opacity: 1;
        width: 24px;
        height: 24px;
        right: -12px;
        /* Área de toque maior */
        touch-action: none;
    }
    
    /* Node header span precisa de espaço para o botão edit */
    .node-header span {
        flex: 1;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        padding-right: 4px;
    }
    
    /* Context menu responsivo */
    .context-menu {
        min-width: 180px;
        max-width: 90vw;
    }
    
    .context-menu-item {
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
    }
    
    /* Filtros do Kanban empilhados */
    .automation-canvas-container .row .col-md-6 {
        margin-bottom: 0.5rem;
    }
    
    /* Kanban colunas menores */
    .kanban-column {
        flex: 0 0 240px;
        max-height: calc(100vh - 280px);
    }
    
    .kanban-column-header {
        padding: 10px 12px;
    }
    
    .kanban-column-header h6 {
        font-size: 12px;
    }
    
    .kanban-card {
        padding: 10px;
    }
    
    .kanban-card-header strong {
        font-size: 0.85rem;
    }
    
    .kanban-card-info {
        font-size: 0.75rem;
    }
}

/* Mobile muito pequeno */
@media (max-width: 575.98px) {
    /* Container sem padding */
    .container.py-4 {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
        padding-top: 0.5rem !important;
    }
    
    /* Tabs wrapper sem margin */
    .automation-tabs-wrapper {
        margin-bottom: 0.75rem;
        border-radius: 8px;
    }
    
    .automation-tab {
        padding: 0.6rem 0.75rem;
        font-size: 0.8rem;
    }
    
    /* Toolbar mais compacto */
    .automation-toolbar {
        margin-bottom: 0.75rem;
        padding-bottom: 0.75rem;
    }
    
    .automation-toolbar .btn {
        font-size: 0.75rem;
        padding: 0.3rem 0.5rem;
    }
    
    /* Flowchart ainda menor (mas não em fullscreen) */
    .flowchart-container:not(.fullscreen) {
        height: 350px !important;
        min-height: 350px;
    }
    
    /* Fullscreen - garantir tela cheia */
    .flowchart-container.fullscreen {
        height: 100vh !important;
        width: 100vw !important;
        min-height: 100vh !important;
    }
    
    /* Zoom controls inline */
    .zoom-controls {
        padding: 0.375rem;
    }
    
    .zoom-controls .mx-2 {
        margin-left: 0.25rem !important;
        margin-right: 0.25rem !important;
        font-size: 0.7rem;
    }
    
    /* Nodes ainda menores */
    .flowchart-node {
        width: 140px !important;
        max-width: 140px !important;
    }
    
    .node-header {
        height: 32px;
    }
    
    .node-header span {
        font-size: 10px;
        left: 30px;
    }
    
    .node-header i {
        font-size: 12px;
        left: 8px;
    }
    
    .node-body {
        padding: 6px 8px;
        font-size: 9px;
        max-height: 50px;
    }
    
    /* Botão editar ainda menor */
    .node-edit-btn {
        width: 20px;
        height: 20px;
        font-size: 9px;
        right: 4px;
    }
    
    .node-header span {
        right: 28px;
    }
    
    /* Kanban menores */
    .kanban-column {
        flex: 0 0 200px;
    }
    
    .kanban-board {
        gap: 10px;
        padding: 10px 0;
    }
}

/* Fullscreen adjustments para mobile */
@media (max-width: 767.98px) {
    .flowchart-container.fullscreen {
        border-radius: 0;
        touch-action: manipulation;
    }
    
    .exit-fullscreen-btn {
        top: 10px;
        right: 10px;
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .fullscreen-zoom-controls {
        bottom: 10px;
        right: 10px;
        padding: 6px;
    }
    
    .fullscreen-zoom-controls .btn {
        padding: 0.2rem 0.4rem;
    }
}

/* ================================================
   KANBAN BOARD - TRELLO INSPIRED
   ================================================ */

.kanban-board {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding: 16px 0;
    scroll-behavior: smooth;
    cursor: default;
}

.kanban-board.kanban-dragging {
    cursor: grab !important;
    user-select: none;
}

.kanban-board.kanban-dragging * {
    cursor: grab !important;
}

.kanban-board::-webkit-scrollbar {
    height: 12px;
}

.kanban-board::-webkit-scrollbar-track {
    background: #f1f3f5;
    border-radius: 6px;
}

.kanban-board::-webkit-scrollbar-thumb {
    background: #adb5bd;
    border-radius: 6px;
}

.kanban-board::-webkit-scrollbar-thumb:hover {
    background: #868e96;
}

/* Kanban Column */
.kanban-column {
    flex: 0 0 280px;
    background: #f1f3f5;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 300px);
}

/* Column Header */
.kanban-column-header {
    padding: 12px 16px;
    border-radius: 12px 12px 0 0;
    color: white;
    font-size: 14px;
    font-weight: 600;
}

.kanban-column-header h6 {
    font-size: 14px;
    font-weight: 600;
}

.kanban-column-header .badge {
    font-size: 11px;
    padding: 4px 8px;
    font-weight: 600;
}

/* Header Colors */
.header-trigger { background: linear-gradient(135deg, #10b981 0%, #059669 100%); }
.header-action { background: linear-gradient(135deg, #467BC1 0%, #3a6bac 100%); }
.header-condition { background: linear-gradient(135deg, #EDCC25 0%, #d4a006 100%); }
.header-bot { background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%); }
.header-http { background: linear-gradient(135deg, #64748b 0%, #475569 100%); }
.header-positive { background: linear-gradient(135deg, #10b981 0%, #059669 100%); }
.header-negative { background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%); }

/* Cards Container */
.kanban-cards-container {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
    min-height: 100px;
}

.kanban-cards-container.drag-over {
    background: rgba(70, 123, 193, 0.05);
}

.kanban-cards-container::-webkit-scrollbar {
    width: 8px;
}

.kanban-cards-container::-webkit-scrollbar-track {
    background: transparent;
}

.kanban-cards-container::-webkit-scrollbar-thumb {
    background: #ced4da;
    border-radius: 4px;
}

.kanban-cards-container::-webkit-scrollbar-thumb:hover {
    background: #adb5bd;
}

/* Empty State */
.kanban-empty {
    text-align: center;
    padding: 32px 16px;
    color: #868e96;
}

.kanban-empty i {
    font-size: 32px;
    opacity: 0.5;
    display: block;
    margin-bottom: 8px;
}

.kanban-empty p {
    margin: 0;
    font-size: 13px;
}

/* Kanban Card */
.kanban-card {
    background: white;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    cursor: grab;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.kanban-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.kanban-card:active {
    cursor: grabbing;
}

.kanban-card-paused {
    border-color: #ef4444;
    background: #fef2f2;
}

/* Card Header */
.kanban-card-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 8px;
}

.kanban-card-header strong {
    font-size: 14px;
    color: #1e293b;
    line-height: 1.4;
    flex: 1;
}

.kanban-card-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 8px;
}

.badge-active {
    background: #d1fae5;
    color: #065f46;
}

.badge-paused {
    background: #fee2e2;
    color: #991b1b;
}

.kanban-card-badge i {
    font-size: 10px;
}

/* Card Info */
.kanban-card-info {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #64748b;
    font-size: 12px;
    margin-bottom: 8px;
}

.kanban-card-info i {
    font-size: 11px;
}

/* Card Footer */
.kanban-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #e2e8f0;
}

.kanban-card-time {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #94a3b8;
    font-size: 11px;
}

.kanban-card-time i {
    font-size: 10px;
}

/* Card Actions */
.kanban-card-actions {
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.kanban-card:hover .kanban-card-actions {
    opacity: 1;
}

.kanban-action-btn {
    background: transparent;
    border: none;
    color: #64748b;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.kanban-action-btn:hover {
    background: #f1f5f9;
    color: #467BC1;
}

.kanban-action-btn:active {
    transform: scale(0.95);
}

/* Responsive */
@media (max-width: 768px) {
    .kanban-column {
        flex: 0 0 240px;
    }
    
    .kanban-card-actions {
        opacity: 1;
    }
}

/* Page Header Responsive */
@media (max-width: 576px) {
    .w-100.w-md-auto {
        width: 100% !important;
    }
    
    .w-100.w-md-auto .d-flex {
        justify-content: center;
    }
    
    /* Abas compactas no mobile */
    .contacts-tab {
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
    }
    
    .contacts-tab i {
        font-size: 1rem;
    }
    
    .contacts-tab-with-edit .contacts-tab {
        padding-right: 1.75rem;
    }
    
    /* Empty state compacto */
    .empty-state-icon {
        opacity: 0.7;
    }
}

@media (min-width: 576px) {
    .w-sm-auto {
        width: auto !important;
    }
}

@media (min-width: 768px) {
    .w-md-auto {
        width: auto !important;
    }
}

/* Utilitários responsivos extras */
@media (min-width: 576px) {
    .flex-sm-grow-0 {
        flex-grow: 0 !important;
    }
}

/* Modal de edição de lista - melhorias mobile */
@media (max-width: 575.98px) {
    #editListModal .modal-footer {
        padding: 0.75rem;
    }
    
    #editListModal .nav-tabs .nav-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }
    
    #editListModal .alert {
        font-size: 0.8125rem;
    }
    
    #editListModal .card-body {
        padding: 0.75rem;
    }
}

/* ===========================================
   CHAT RESPONSIVO - Mobile First
   =========================================== */

/* Container do chat - base */
.chat-container {
    position: relative;
}

/* Sidebar do chat - drawer no mobile */
.chat-sidebar {
    transition: transform 0.3s ease, opacity 0.3s ease;
    z-index: 10;
}

/* Chat principal */
.chat-main {
    transition: opacity 0.3s ease;
}

/* Botão voltar mobile - oculto por padrão */
.chat-back-btn {
    display: none;
}

/* Media Query para tablets e mobile */
@media (max-width: 991.98px) {
    /* Container preenche toda a altura disponível */
    .chat-container {
        height: calc(100vh - 140px) !important;
        overflow: hidden;
    }
    
    /* Sidebar como drawer - tela cheia */
    .chat-sidebar {
        position: absolute !important;
        top: 0;
        left: 0;
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
        height: 100% !important;
        z-index: 20;
        transform: translateX(0);
        opacity: 1;
        background: #fff !important;
    }
    
    /* Sidebar oculta quando chat está aberto */
    .chat-sidebar.chat-hidden {
        transform: translateX(-100%);
        opacity: 0;
        pointer-events: none;
    }
    
    /* Chat principal - tela cheia */
    .chat-main {
        position: absolute !important;
        top: 0;
        left: 0;
        width: 100% !important;
        height: 100% !important;
        z-index: 15;
        transform: translateX(100%);
        opacity: 0;
        pointer-events: none;
    }
    
    /* Chat principal visível quando selecionado */
    .chat-main.chat-visible {
        transform: translateX(0);
        opacity: 1;
        pointer-events: auto;
    }
    
    /* Botão voltar visível no mobile */
    .chat-back-btn {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        background: transparent;
        border: none;
        color: var(--brand-blue);
        font-size: 1.25rem;
        margin-right: 0.5rem;
        flex-shrink: 0;
        transition: background-color 0.2s ease;
    }
    
    .chat-back-btn:hover,
    .chat-back-btn:active {
        background-color: rgba(70, 123, 193, 0.1);
    }
    
    /* Header do chat - ajustes mobile */
    .chat-header {
        padding: 0.75rem !important;
    }
    
    .chat-header h6 {
        font-size: 0.95rem;
    }
    
    /* Área de mensagens - altura dinâmica */
    .chat-messages {
        padding: 1rem !important;
    }
    
    /* Balões de mensagem - largura maior no mobile */
    .message-bubble {
        max-width: 85% !important;
    }
    
    /* Input de mensagem - ajustes mobile */
    .chat-input {
        padding: 0.75rem !important;
    }
    
    /* Select de role menor no mobile */
    .chat-input select.form-select {
        flex: 0 0 110px !important;
        font-size: 0.8rem !important;
        padding: 0.5rem 0.75rem !important;
    }
    
    /* Input de texto maior */
    .chat-message-input {
        font-size: 1rem !important;
        padding: 0.75rem 1rem !important;
    }
    
    /* Botão enviar */
    .chat-input .btn-send {
        width: 44px !important;
        height: 44px !important;
    }
    
    /* Lista de chats - items maiores para touch */
    .chat-item {
        padding: 1rem !important;
    }
    
    /* Modais responsivos */
    .chat-container .position-fixed > .bg-white.rounded {
        width: 95vw !important;
        max-width: 400px;
        max-height: 90vh !important;
    }
    
    /* Offcanvas responsivo */
    .offcanvas {
        width: 100% !important;
        max-width: 100% !important;
    }
}

/* Media Query para mobile pequeno */
@media (max-width: 575.98px) {
    .chat-container {
        height: calc(100vh - 120px) !important;
    }
    
    /* Header mais compacto */
    .chat-header {
        padding: 0.5rem 0.75rem !important;
    }
    
    .chat-header h6 {
        font-size: 0.9rem;
    }
    
    .chat-header small {
        font-size: 0.7rem;
    }
    
    /* Balões ainda maiores */
    .message-bubble {
        max-width: 90% !important;
        padding: 8px 12px !important;
    }
    
    .message-bubble p {
        font-size: 0.875rem !important;
    }
    
    /* Input área mais compacta */
    .chat-input {
        padding: 0.5rem !important;
    }
    
    .chat-input .d-flex {
        gap: 0.5rem !important;
    }
    
    /* Esconder select de role em telas muito pequenas */
    .chat-input select.form-select {
        flex: 0 0 90px !important;
        font-size: 0.75rem !important;
        padding: 0.4rem 0.5rem !important;
    }
    
    .chat-message-input {
        padding: 0.6rem 0.75rem !important;
    }
    
    .chat-input .btn-send {
        width: 40px !important;
        height: 40px !important;
    }
    
    .chat-input .btn-send i {
        font-size: 1rem !important;
    }
    
    /* Sidebar do chat - padding menor */
    .chat-sidebar > .p-3 {
        padding: 0.75rem !important;
    }
    
    /* Rodapé sidebar */
    .chat-sidebar .border-top.p-3 {
        padding: 0.75rem !important;
    }
    
    .chat-sidebar .border-top .btn {
        padding: 0.375rem 0.75rem !important;
        font-size: 0.8rem !important;
    }
}

/* Animação suave para transições */
@media (prefers-reduced-motion: no-preference) {
    .chat-sidebar,
    .chat-main {
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                    opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
}

/* Reduzir movimento para usuários que preferem */
@media (prefers-reduced-motion: reduce) {
    .chat-sidebar,
    .chat-main {
        transition: none;
    }
}
