:root {
    /* Colors */
    --bg-main: #13141c;
    --bg-panel: rgba(26, 28, 38, 0.65);
    --border-panel: rgba(255, 255, 255, 0.08);
    --text-primary: #f8f9fa;
    --text-secondary: #9da0ac;
    --accent-primary: #7c4dff;
    --accent-success: #00e676;
    --accent-danger: #ff5252;
    --accent-warning: #ffd740;
    --accent-info: #40c4ff;
    
    /* Variables */
    --font-main: 'Inter', sans-serif;
    --radius-md: 12px;
    --radius-sm: 8px;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-main);
    background-image: radial-gradient(circle at 15% 50%, rgba(124, 77, 255, 0.05), transparent 25%),
                      radial-gradient(circle at 85% 30%, rgba(0, 230, 118, 0.03), transparent 25%);
    color: var(--text-primary);
    min-height: 100vh;
    overflow: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
}

.section-title {
    font-size: clamp(0.6rem, 1.2vh, 0.8rem);
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.75vh;
    font-weight: 600;
}

/* Glass Panels */
.glass-panel {
    background: var(--bg-panel);
    border: 1px solid var(--border-panel);
    border-radius: var(--radius-md);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

/* Layout */
.app-container {
    height: 100vh;
    width: 100vw;
    margin: 0;
    padding: 1.5vh 1.5vw;
    display: flex;
    flex-direction: column;
    gap: 1.5vh;
    overflow: hidden;
    box-sizing: border-box;
}

/* Topbar */
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    position: relative;
}

.logo-area {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.south-logo {
    max-height: 28px;
    object-fit: contain;
    margin-bottom: 2px;
}

.sync-status {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

.sync-label {
    font-weight: 500;
    color: var(--text-secondary);
}

/* iOS Switch Style */
.ios-switch {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 20px;
}

.ios-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.1);
    transition: .3s;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 1px;
    bottom: 1px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

input:checked + .slider {
    background-color: #34c759; /* iOS Green */
    border-color: #34c759;
}

input:checked + .slider:before {
    transform: translateX(16px);
}

.topbar h1 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.title-area {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    pointer-events: none;
}

.title-area h1 {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin: 0;
}

.status-area {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.sync-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-right: 1.5rem;
    border-right: 1px solid rgba(255,255,255,0.1);
}

.sync-label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
}

.update-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.last-update {
    font-size: 0.85rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 6px;
}

#last-sync-time {
    font-size: 0.65rem;
    color: var(--text-accent);
    opacity: 0.7;
}

.pulse-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: var(--accent-success);
    border-radius: 50%;
    margin-right: 6px;
    box-shadow: 0 0 8px var(--accent-success);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 230, 118, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(0, 230, 118, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 230, 118, 0); }
}

.pulse-dot.error {
    background-color: var(--accent-danger);
    box-shadow: 0 0 8px var(--accent-danger);
    animation: pulse-error 2s infinite;
}

@keyframes pulse-error {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(255, 82, 82, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(255, 82, 82, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(255, 82, 82, 0); }
}

.pulse-dot.warning {
    background-color: var(--accent-warning);
    box-shadow: 0 0 8px var(--accent-warning);
    animation: pulse-warning 2s infinite;
}

@keyframes pulse-warning {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(255, 215, 64, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(255, 215, 64, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(255, 215, 64, 0); }
}

/* Buttons */
button {
    cursor: pointer;
    font-family: inherit;
    border: none;
    outline: none;
    transition: var(--transition);
}

.btn-secondary {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.85rem;
    font-weight: 500;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

.btn-icon {
    background: transparent;
    color: var(--text-secondary);
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon:hover {
    color: var(--text-primary);
}

.btn-primary {
    background: var(--accent-primary);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 1rem;
    margin-top: 1rem;
}

.btn-primary:hover {
    filter: brightness(1.1);
}

/* Filters */
.filters-container {
    display: flex;
    gap: 1.5vw;
    padding: 0.75vh 1vw;
    flex-wrap: wrap;
    position: relative;
    z-index: 110;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-group label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 600;
    letter-spacing: 0.5px;
}

select {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    padding: 0.5rem 2.5rem 0.5rem 1rem;
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.9rem;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%239da0ac' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    cursor: pointer;
}

select:focus {
    outline: none;
    border-color: var(--accent-primary);
}

/* KPIs Grid */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.5vw;
}

.kpi-card {
    padding: 1.5vh 1vw;
    display: flex;
    flex-direction: column;
    gap: 0.5vh;
}

.kpi-card h3 {
    font-size: clamp(0.6rem, 1.2vh, 0.8rem);
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.kpi-value {
    font-size: clamp(1.8rem, 5vh, 3rem);
    font-weight: 700;
    line-height: 1;
}

.highlight-white {
    color: var(--text-primary);
}

.highlight-negative {
    color: var(--accent-danger);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.highlight-positive {
    color: var(--accent-success);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Types Grid */
.types-grid {
    display: flex;
    flex-wrap: nowrap;
    gap: 1vw;
    overflow: hidden;
}

.type-card {
    flex: 1;
    min-width: 0;
    padding: 1.5vh 0.5vw;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 0.5vh;
}

.color-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin-right: 6px;
    box-shadow: 0 0 4px rgba(0,0,0,0.3);
}

.type-number {
    font-size: clamp(1.5rem, 4vh, 2.5rem);
    font-weight: 700;
    color: var(--text-primary);
}

.type-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

.placeholder-card {
    padding: 1.5rem;
    text-align: center;
    color: var(--text-secondary);
}

/* Charts Grid */
.charts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5vw;
}

.chart-card {
    padding: 1.5vh 1vw;
    min-height: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.chart-subtitle {
    font-size: clamp(0.7rem, 1.2vh, 0.8rem);
    color: var(--text-secondary);
    margin-top: -0.5vh;
    margin-bottom: 1.5vh;
}

.chart-wrapper {
    flex: 1;
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 0;
}

/* Charts Carousel */
.charts-carousel-container {
    position: relative;
    width: 100%;
    margin-top: 0;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.chart-carousel-viewport {
    overflow-x: auto;
    overflow-y: hidden;
    width: 100%;
    scrollbar-width: none;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    flex: 1;
    min-height: 0;
    display: flex;
}

.chart-carousel-viewport::-webkit-scrollbar {
    display: none;
}

.chart-carousel-track {
    display: flex;
    width: 100%;
    gap: 1.5vw;
}

.chart-slide-item {
    flex: 0 0 calc(50% - 0.75vw);
    min-height: 0;
    height: 100%;
    scroll-snap-align: start;
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 1vw;
    margin-top: 1vh;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2);
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.carousel-dot:hover {
    background-color: rgba(255, 255, 255, 0.5);
}

.carousel-dot.active {
    background-color: var(--accent-primary);
    transform: scale(1.2);
    box-shadow: 0 0 8px rgba(124, 77, 255, 0.6);
}

/* Modal Config */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(10, 10, 12, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.overlay.active {
    opacity: 1;
    pointer-events: all;
}

.config-modal {
    padding: 2.5rem;
    width: 100%;
    max-width: 450px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    transform: translateY(20px);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.overlay.active .config-modal {
    transform: translateY(0);
}

.config-modal h2 {
    font-size: 1.5rem;
    color: var(--text-primary);
}

.config-modal p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.input-group label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.input-group input {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    padding: 0.85rem 1rem;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.input-group input:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: rgba(124, 77, 255, 0.05);
}

/* Spinner */
.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border-top-color: var(--accent-primary);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Animations */
.fade-in {
    opacity: 0;
    animation: fadeIn 0.6s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }
.delay-6 { animation-delay: 0.6s; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (max-width: 1400px) {
    .kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 900px) {
    body, .app-container {
        height: auto;
        min-height: 100vh;
        overflow-y: auto;
        overflow-x: hidden;
    }
    
    .types-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
        overflow: visible;
    }
    
    .type-card {
        padding: 1rem;
    }
    
    .chart-wrapper {
        min-height: 300px;
    }
    
    .charts-carousel-container {
        min-height: 400px;
    }

    .charts-grid {
        grid-template-columns: 1fr;
    }
    .chart-slide-item {
        flex: 0 0 100% !important;
    }

    /* P0 Modal Adjustment */
    .multi-task .p0-modal-body {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .app-container {
        padding: 1rem;
        gap: 1rem;
    }
    .kpi-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    .kpi-value {
        font-size: 1.5rem;
    }
    .types-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .status-area {
        flex-direction: column;
        align-items: flex-end;
        gap: 0.5rem;
    }

    /* P0 Modal Mobile */
    .glass-panel-p0 {
        padding: 1rem;
        border-radius: 1rem;
    }
    .p0-info-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        margin-bottom: 1rem;
    }
    .p0-timer {
        font-size: 2rem;
    }
    .p0-value-highlight {
        font-size: 1.1rem;
    }
    .p0-modal-header {
        margin-bottom: 1rem;
    }
    .p0-badge {
        font-size: 0.65rem;
        padding: 0.35rem 0.75rem;
    }
}

@media (max-width: 480px) {
    .kpi-grid {
        grid-template-columns: 1fr;
    }
    .kpi-card {
        padding: 1rem;
    }
    .title-area h1 {
        font-size: 1rem;
    }
}

/* Multi-select Dropdown */
.multi-select {
    position: relative;
    width: 250px;
    user-select: none;
}

.multi-select-trigger {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: left;
    transition: var(--transition);
}

.multi-select-trigger:hover {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
}

.multi-select.active .multi-select-trigger {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(124, 77, 255, 0.2);
}

.multi-select-trigger span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 8px;
}

.multi-select-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 100%;
    background: #1a1c26;
    border: 1px solid var(--border-panel);
    border-radius: var(--radius-sm);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    z-index: 120;
    display: none;
    max-height: 400px;
    overflow: hidden;
    padding: 0;
}

.multi-select.active .multi-select-dropdown {
    display: block;
    animation: fadeIn 0.2s ease-out;
}

.multi-select-search {
    padding: 10px;
    border-bottom: 1px solid var(--border-panel);
    background: #1a1c26;
    position: sticky;
    top: 0;
    z-index: 5;
}

.multi-select-search input {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.85rem;
    outline: none;
    transition: var(--transition);
}

.multi-select-search input:focus {
    border-color: var(--accent-primary);
    background: rgba(124, 77, 255, 0.05);
}

.multi-select-options {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px;
    max-height: 300px;
    overflow-y: auto;
}

.multi-select-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.multi-select-option:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.multi-select-option.selected {
    color: var(--text-primary);
    background: rgba(124, 77, 255, 0.1);
}

.multi-select-option input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--accent-primary);
    cursor: pointer;
}

/* WhatsApp Button */
.whatsapp-btn {
    color: #25D366;
}

.whatsapp-btn:hover {
    color: #128C7E;
    transform: scale(1.1);
}

.whatsapp-btn.loading {
    animation: spin 1s infinite linear;
    opacity: 0.7;
    pointer-events: none;
}

/* Custom scrollbar for dropdown */
.multi-select-dropdown::-webkit-scrollbar {
    width: 6px;
}
.multi-select-dropdown::-webkit-scrollbar-track {
    background: transparent;
}
.multi-select-dropdown::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}
.multi-select-dropdown::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Modal Alerta P0 */
.p0-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: none; /* Hidden by default */
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.p0-modal-overlay.active {
    display: flex;
    opacity: 1;
}

.glass-panel-p0 {
    background: rgba(30, 10, 10, 0.85);
    border: 2px solid rgba(255, 50, 50, 0.4);
    box-shadow: 0 0 30px rgba(255, 0, 0, 0.2), inset 0 0 15px rgba(255, 0, 0, 0.1);
    border-radius: 1rem;
    padding: 1.5rem;
    max-width: 650px;
    width: 95%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    position: relative;
    animation: p0-pulse-border 2s infinite;
}

.p0-modal-body {
    overflow-y: auto;
    padding-right: 10px;
}

.p0-modal-body::-webkit-scrollbar {
    width: 6px;
}
.p0-modal-body::-webkit-scrollbar-thumb {
    background: rgba(255, 50, 50, 0.3);
    border-radius: 10px;
}

.p0-task-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0.75rem;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.p0-task-item:last-child {
    margin-bottom: 0;
}

.glass-panel-p0.multi-task {
    max-width: 1000px;
    width: 98%;
}

.multi-task .p0-modal-body {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 1.5rem;
    padding-bottom: 1rem;
}

.multi-task .p0-task-item {
    padding: 1rem;
    margin-bottom: 0;
}

.multi-task .p0-info-grid {
    gap: 1rem;
    margin-bottom: 1rem;
}

.multi-task .p0-value-highlight {
    font-size: 1.25rem;
}

.multi-task .p0-sla-container {
    padding: 1rem;
    margin-bottom: 1rem;
}

.multi-task .p0-timer {
    font-size: 1.8rem;
}

@keyframes p0-pulse-border {
    0% { border-color: rgba(255, 50, 50, 0.4); box-shadow: 0 0 20px rgba(255, 0, 0, 0.2); }
    50% { border-color: rgba(255, 50, 50, 0.8); box-shadow: 0 0 40px rgba(255, 0, 0, 0.4); }
    100% { border-color: rgba(255, 50, 50, 0.4); box-shadow: 0 0 20px rgba(255, 0, 0, 0.2); }
}

.p0-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.p0-progress-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

.p0-progress-rect {
    fill: none;
    stroke: #ff1744;
    stroke-width: 6px; /* Volta a ser 6px para impacto */
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    stroke-linecap: round;
    filter: drop-shadow(0 0 12px rgba(255, 23, 68, 0.9));
    transition: stroke-dashoffset 0.3s linear;
    /* Usando CSS para dimensões do rect dentro do SVG */
    x: 3px;
    y: 3px;
    width: calc(100% - 6px);
    height: calc(100% - 6px);
}

.p0-modal-overlay.active .p0-progress-rect {
    animation: p0-progress-perimeter 30s linear forwards;
}

@keyframes p0-progress-perimeter {
    from { stroke-dashoffset: 0; } /* Full border */
    to { stroke-dashoffset: 1; }   /* Empty border */
}

.p0-badge {
    background: var(--accent-danger);
    color: white;
    padding: 0.4rem 0.75rem;
    border-radius: 0.4rem;
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 1px;
}

.btn-close-p0 {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
}

.btn-close-p0:hover {
    color: white;
}

.p0-info-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.p0-info-item label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.p0-value-highlight {
    font-size: 1.25rem;
    font-weight: 800;
    color: white;
    font-family: 'Inter', sans-serif;
}

.p0-sla-container {
    background: rgba(0, 0, 0, 0.3);
    padding: 1.5rem;
    border-radius: 1rem;
    text-align: center;
    margin-bottom: 2rem;
}

.p0-timer {
    font-size: 2.5rem;
    font-weight: 800;
    color: white;
    font-variant-numeric: tabular-nums;
    margin-top: 0.25rem;
}

.p0-working-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    font-weight: 600;
    color: var(--text-secondary);
}

.p0-working-status.active {
    background: rgba(0, 230, 118, 0.15);
    color: #4caf50;
    border: 1px solid rgba(0, 230, 118, 0.3);
}

.pulse-indicator {
    width: 10px;
    height: 10px;
    background: #4caf50;
    border-radius: 50%;
    display: none;
}

.p0-working-status.active .pulse-indicator {
    display: block;
    box-shadow: 0 0 0 rgba(76, 175, 80, 0.4);
    animation: p0-pulse-green 2s infinite;
}

@keyframes p0-pulse-green {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(76, 175, 80, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(76, 175, 80, 0); }
}
