/* ============================================
   ROOT VARIABLES
   ============================================ */
:root {
    --primary-dark: #0a1628;
    --card-bg: #0f1f3a;
    --card-header-bg: #1a3a5c;
    --text-primary: #00f5ff;
    --text-white: #ffffff;
    --text-gray: rgba(255, 255, 255, 0.7);
    --text-placeholder: rgba(255, 255, 255, 0.35);
    --input-bg: rgba(255, 255, 255, 0.05);
    --input-border: rgba(0, 255, 255, 0.15);
    --shadow-color: rgba(0, 0, 0, 0.4);
}

/* ============================================
   BODY
   ============================================ */
body {
    background: var(--primary-dark);
    color: #e0e6f0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
}

/* ============================================
   NAVBAR
   ============================================ */
.navbar {
    background: linear-gradient(135deg, #0f1f3a 0%, #1a2f4f 100%) !important;
    border-bottom: 1px solid rgba(0, 255, 255, 0.15);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: #00f5ff !important;
    text-shadow: 0 0 20px rgba(0, 245, 255, 0.3);
}

.navbar-brand img {
    height: 32px;
    margin-right: 10px;
}

/* ============================================
   CARDS
   ============================================ */
.card {
    background: var(--card-bg);
    border: 1px solid rgba(0, 255, 255, 0.1);
    border-radius: 16px;
    box-shadow: 0 8px 32px var(--shadow-color);
}

.card-header {
    background: var(--card-header-bg) !important;
    border-bottom: 1px solid rgba(0, 255, 255, 0.1);
    border-radius: 16px 16px 0 0 !important;
    color: var(--text-primary);
    font-weight: 600;
}

.card-body {
    color: var(--text-white);
}

/* ============================================
   FORMS - INPUT TEXT
   ============================================ */
.form-control {
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    color: var(--text-white);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-control::placeholder {
    color: var(--text-placeholder);
    opacity: 1;
}

.form-control:-ms-input-placeholder {
    color: var(--text-placeholder);
}

.form-control::-ms-input-placeholder {
    color: var(--text-placeholder);
}

.form-control:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: #00f5ff;
    box-shadow: 0 0 0 3px rgba(0, 245, 255, 0.15);
    color: var(--text-white);
}

.form-control.is-invalid {
    border-color: #ff4444 !important;
    background-color: rgba(255, 68, 68, 0.05) !important;
}

.form-control.is-invalid:focus {
    box-shadow: 0 0 0 3px rgba(255, 68, 68, 0.15) !important;
}

/* ============================================
   FORMS - SELECT
   ============================================ */
.form-select {
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    color: var(--text-white);
    border-radius: 10px;
    padding: 0.75rem 2.25rem 0.75rem 1rem;
    transition: all 0.3s ease;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='rgba(255,255,255,0.5)' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
}

.form-select:focus {
    background-color: rgba(255, 255, 255, 0.08);
    border-color: #00f5ff;
    box-shadow: 0 0 0 3px rgba(0, 245, 255, 0.15);
    color: var(--text-white);
}

.form-select option {
    background-color: var(--card-bg);
    color: var(--text-gray);
    padding: 0.5rem 1rem;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.form-select option:hover,
.form-select option:focus,
.form-select option:active,
.form-select option:checked {
    background-color: var(--card-header-bg);
    color: var(--text-white);
}

.form-select.is-invalid {
    border-color: #ff4444 !important;
    background-color: rgba(255, 68, 68, 0.05) !important;
}

.form-select.is-invalid:focus {
    box-shadow: 0 0 0 3px rgba(255, 68, 68, 0.15) !important;
}

/* ============================================
   FORMS - LABEL
   ============================================ */
.form-label {
    color: var(--text-gray);
    font-weight: 500;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.35rem;
}

/* ============================================
   FORMS - TEXTAREA
   ============================================ */
textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

textarea.form-control::placeholder {
    color: var(--text-placeholder);
}

/* ============================================
   FORMS - INPUT GROUP
   ============================================ */
.input-group .form-control {
    border-radius: 10px 0 0 10px;
}

.input-group .btn {
    border-radius: 0 10px 10px 0;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn-primary {
    background: linear-gradient(135deg, #00f5ff, #0088ff);
    border: none;
    border-radius: 10px;
    font-weight: 600;
    color: #0a1628;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 245, 255, 0.3);
}

.btn-primary:disabled {
    opacity: 0.5;
    transform: none;
}

.btn-outline-info {
    border: 1px solid rgba(0, 245, 255, 0.3);
    color: #00f5ff;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.btn-outline-info:hover {
    background: rgba(0, 245, 255, 0.1);
    border-color: #00f5ff;
    color: #00f5ff;
}

.btn-outline-danger {
    border: 1px solid rgba(255, 68, 68, 0.3);
    color: #ff4444;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.btn-outline-danger:hover {
    background: rgba(255, 68, 68, 0.1);
    border-color: #ff4444;
    color: #ff4444;
}

.btn-warning {
    background: linear-gradient(135deg, #ffc800, #ff8800);
    border: none;
    border-radius: 10px;
    font-weight: 600;
    color: #0a1628;
    transition: all 0.3s ease;
}

.btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 200, 0, 0.3);
}

.btn-success {
    background: linear-gradient(135deg, #00ff64, #00cc44);
    border: none;
    border-radius: 10px;
    font-weight: 600;
    color: #0a1628;
    transition: all 0.3s ease;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 255, 100, 0.3);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-gray);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-white);
}

.btn-sm {
    font-size: 0.75rem;
    padding: 0.25rem 0.6rem;
}

/* ============================================
   BADGES
   ============================================ */
.company-badge {
    background: rgba(0, 245, 255, 0.1);
    color: #00f5ff;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
}

.badge-status {
    font-size: 0.65rem;
    padding: 0.25rem 0.6rem;
    border-radius: 20px;
}

.badge-status.pending {
    background: rgba(255, 200, 0, 0.15);
    color: #ffc800;
}

.badge-status.in_progress {
    background: rgba(0, 245, 255, 0.15);
    color: #00f5ff;
}

.badge-status.completed {
    background: rgba(0, 255, 100, 0.15);
    color: #00ff64;
}

.badge-status.cancelled {
    background: rgba(255, 68, 68, 0.15);
    color: #ff4444;
}

.badge-active {
    background: rgba(0, 255, 100, 0.2);
    color: #00ff64;
}

.badge-inactive {
    background: rgba(255, 0, 0, 0.2);
    color: #ff4444;
}

.badge-trigger {
    background: rgba(0, 245, 255, 0.15);
    color: #00f5ff;
    font-size: 0.7rem;
    padding: 0.25rem 0.6rem;
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
    cursor: help;
}

.badge-trigger:hover {
    white-space: normal;
    overflow: visible;
    max-width: none;
    position: relative;
    z-index: 10;
}

/* ============================================
   TABLES
   ============================================ */
.table {
    color: #e0e6f0;
}

.table thead th {
    background: var(--card-header-bg) !important;
    color: var(--text-primary) !important;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
}

.table tbody td {
    background: var(--card-bg) !important;
    color: var(--text-white) !important;
    vertical-align: middle;
}

.table tbody tr {
    transition: all 0.2s ease;
}

.table tbody tr:hover td {
    background: rgba(0, 255, 255, 0.05) !important;
}

/* ============================================
   ALERTS
   ============================================ */
.alert-success {
    background: rgba(0, 255, 100, 0.1) !important;
    border: 1px solid rgba(0, 255, 100, 0.2) !important;
    color: #00ff64 !important;
}

.alert-warning {
    background: rgba(255, 200, 0, 0.1) !important;
    border: 1px solid rgba(255, 200, 0, 0.2) !important;
    color: #ffc800 !important;
}

.alert-danger {
    background: rgba(255, 68, 68, 0.1) !important;
    border: 1px solid rgba(255, 68, 68, 0.2) !important;
    color: #ff4444 !important;
}

.alert-info {
    background: rgba(0, 245, 255, 0.1) !important;
    border: 1px solid rgba(0, 245, 255, 0.2) !important;
    color: #00f5ff !important;
}

/* ============================================
   MODAL
   ============================================ */
.modal-content {
    background: var(--card-bg);
    color: #e0e6f0;
    border: 1px solid rgba(0, 255, 255, 0.1);
    border-radius: 16px;
}

.modal-header {
    border-bottom: 1px solid rgba(0, 255, 255, 0.1);
    color: var(--text-primary);
}

.modal-footer {
    border-top: 1px solid rgba(0, 255, 255, 0.1);
}

.btn-close {
    filter: invert(1);
}

/* ============================================
   TOAST
   ============================================ */
.toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 9999;
    min-width: 300px;
}

.toast-custom {
    background: var(--card-bg);
    border: 1px solid rgba(0, 255, 255, 0.15);
    border-radius: 16px;
    box-shadow: 0 8px 32px var(--shadow-color);
    padding: 1.5rem;
    margin-bottom: 1rem;
    animation: slideInRight 0.3s ease;
}

.toast-custom .toast-title {
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.toast-custom .toast-body {
    color: var(--text-white);
}

@keyframes slideInRight {
    from {
        transform: translateX(100px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ============================================
   PASSWORD DISPLAY
   ============================================ */
.password-display {
    font-size: 2.5rem;
    font-family: 'Courier New', monospace;
    letter-spacing: 8px;
    background: rgba(0, 245, 255, 0.05);
    border: 2px solid rgba(0, 245, 255, 0.2);
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
    color: #ffc800;
    margin: 1rem 0;
}

.password-display .label {
    font-size: 0.7rem;
    color: var(--text-placeholder);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
}

/* ============================================
   PLACE FORM EXTENDED
   ============================================ */
.place-form-extended {
    display: none;
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(0, 245, 255, 0.03);
    border: 1px solid rgba(0, 245, 255, 0.1);
    border-radius: 12px;
}

.place-form-extended.show {
    display: block;
}

/* ============================================
   TEMPLATE BADGE
   ============================================ */
.template-badge {
    background: rgba(255, 200, 0, 0.1);
    color: #ffc800;
    font-size: 0.6rem;
    padding: 0.1rem 0.4rem;
    border-radius: 10px;
    margin-left: 0.5rem;
}

/* ============================================
   SIDEBAR
   ============================================ */
.sidebar {
    position: fixed;
    top: 62px;
    left: 0;
    width: var(--sidebar-width, 320px);
    height: calc(100vh - 62px);
    background: var(--card-bg);
    border-right: 1px solid rgba(0, 255, 255, 0.1);
    padding: 1rem 0;
    overflow-y: auto;
    z-index: 1000;
    transition: all 0.3s ease;
}

.sidebar::-webkit-scrollbar {
    width: 4px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(0, 245, 255, 0.3);
    border-radius: 10px;
}

.sidebar .section-title {
    padding: 0.8rem 1.5rem;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-placeholder);
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar .section-title .badge {
    font-size: 0.6rem;
}

/* ============================================
   MAP CONTROLS
   ============================================ */
.map-controls {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 1000;
    background: var(--card-bg);
    border-radius: 12px;
    padding: 0.5rem;
    border: 1px solid rgba(0, 255, 255, 0.1);
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
}

.map-controls .btn {
    font-size: 0.75rem;
    padding: 0.25rem 0.6rem;
}

.map-controls .btn:disabled {
    opacity: 0.4;
}

.trajectory-info {
    font-size: 0.65rem;
    color: var(--text-placeholder);
    padding: 0.25rem 0.5rem;
    display: flex;
    align-items: center;
}

/* ============================================
   TRAJECTORY
   ============================================ */
.trajectory-point {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 1px solid #00f5ff;
    background: rgba(0, 245, 255, 0.3);
}

.trajectory-point.start {
    background: #00ff64;
    border-color: #00ff64;
    width: 14px;
    height: 14px;
}

.trajectory-point.end {
    background: #ff4444;
    border-color: #ff4444;
    width: 14px;
    height: 14px;
}

.anim-marker {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ffc800;
    border: 3px solid #ffc800;
    box-shadow: 0 0 30px rgba(255, 200, 0, 0.8);
    animation: pulse-dot 0.5s infinite;
}

@keyframes pulse-dot {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.3;
    }
    100% {
        opacity: 1;
    }
}

/* ============================================
   DEVICE ITEMS
   ============================================ */
.device-item {
    padding: 0.5rem 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.device-item:hover {
    background: rgba(0, 255, 255, 0.05);
    color: var(--text-white);
}

.device-item.active {
    background: rgba(0, 255, 255, 0.08);
    color: var(--text-primary);
    border-left-color: var(--text-primary);
}

.device-item .status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 10px;
    flex-shrink: 0;
}

.device-item .status-dot.online {
    background: #00ff64;
    box-shadow: 0 0 8px rgba(0, 255, 100, 0.3);
    animation: pulse-dot 2s infinite;
}

.device-item .status-dot.offline {
    background: #ff4444;
    box-shadow: 0 0 8px rgba(255, 68, 68, 0.3);
}

.device-item .device-name {
    flex: 1;
    font-weight: 500;
}

.device-item .device-time {
    font-size: 0.6rem;
    color: var(--text-placeholder);
}

/* ============================================
   SELECTED TRIGGERS
   ============================================ */
.selected-triggers-container {
    min-height: 50px;
    border: 2px dashed rgba(0, 245, 255, 0.15);
    border-radius: 10px;
    padding: 0.5rem;
    margin-top: 0.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    transition: all 0.3s ease;
}

.selected-triggers-container.drag-over {
    border-color: var(--text-primary);
    background: rgba(0, 245, 255, 0.05);
}

.selected-triggers-container .empty-text {
    color: var(--text-placeholder);
    font-size: 0.8rem;
    width: 100%;
    text-align: center;
    padding: 0.25rem;
}

.trigger-tag {
    background: rgba(0, 245, 255, 0.12);
    border: 1px solid rgba(0, 245, 255, 0.2);
    border-radius: 20px;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    color: var(--text-white);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    max-width: 250px;
}

.trigger-tag .trigger-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
    cursor: help;
}

.trigger-tag .trigger-text:hover {
    white-space: normal;
    overflow: visible;
    max-width: none;
    position: relative;
    z-index: 10;
    background: var(--card-bg);
    padding: 0.25rem 0.5rem;
    border-radius: 8px;
    border: 1px solid rgba(0, 245, 255, 0.2);
}

.trigger-tag .remove-trigger {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    padding: 0;
    font-size: 0.8rem;
    transition: all 0.2s ease;
}

.trigger-tag .remove-trigger:hover {
    color: #ff4444;
}

.trigger-tag .remove-trigger:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        top: 0;
        border-right: none;
        border-bottom: 1px solid rgba(0, 255, 255, 0.1);
        max-height: 300px;
    }

    .main-content {
        margin-left: 0;
        padding: 0.5rem;
    }

    #map {
        height: 400px;
    }

    .map-controls {
        top: 5px;
        left: 5px;
        padding: 0.25rem;
    }

    .toast-container {
        left: 20px;
        right: 20px;
        min-width: auto;
    }

    .password-display {
        font-size: 1.5rem;
        letter-spacing: 4px;
        padding: 1rem;
    }

    .card-body {
        padding: 1rem;
    }

    .form-label {
        font-size: 0.75rem;
    }
}

/* ============================================
   LOADING OVERLAY GLOBAL (fora do @media)
   ============================================ */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 22, 40, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 1.5rem;
    animation: fadeIn 0.2s ease;
}

.loading-overlay.show {
    display: flex;
}

.loading-overlay .loading-spinner {
    width: 80px;
    height: 80px;
    position: relative;
}

.loading-overlay .loading-spinner::before,
.loading-overlay .loading-spinner::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    border: 3px solid transparent;
    animation: spin 1.5s linear infinite;
}

.loading-overlay .loading-spinner::before {
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-top-color: #00f5ff;
    border-right-color: #00f5ff;
}

.loading-overlay .loading-spinner::after {
    top: 12px;
    left: 12px;
    right: 12px;
    bottom: 12px;
    border-bottom-color: #0088ff;
    border-left-color: #0088ff;
    animation-direction: reverse;
    animation-duration: 1s;
}

.loading-overlay .loading-text {
    color: var(--text-primary, #00f5ff);
    font-weight: 600;
    font-size: 1.1rem;
    letter-spacing: 1px;
    text-shadow: 0 0 20px rgba(0, 245, 255, 0.3);
}

.loading-overlay .loading-subtext {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.85rem;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ============================================
   LOADING INLINE (para botões)
   ============================================ */
.btn-loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.btn-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* ============================================
   LOADING SKELETON (para tabelas)
   ============================================ */
.skeleton {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.03) 25%,
        rgba(255, 255, 255, 0.08) 50%,
        rgba(255, 255, 255, 0.03) 75%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: 8px;
    height: 20px;
    margin: 8px 0;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ============================================
   POPUP DE ALERTA STICKY (fora do @media)
   ============================================ */
#alertPopupContainer {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 99998;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 420px;
    pointer-events: none;
}

.alert-popup {
    background: var(--card-bg);
    border: 2px solid #ff4444;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6),
                0 0 40px rgba(255, 68, 68, 0.3);
    padding: 1rem 1.25rem;
    color: var(--text-white);
    transform: translateX(120%);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    pointer-events: auto;
    overflow: hidden;
    position: relative;
}

.alert-popup::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #ff4444, #ff8888, #ff4444);
    animation: alert-stripe 2s linear infinite;
    background-size: 200% 100%;
}

@keyframes alert-stripe {
    0% { background-position: 0% 0%; }
    100% { background-position: 200% 0%; }
}

.alert-popup.show {
    transform: translateX(0);
    opacity: 1;
}

.alert-popup-flash {
    animation: alert-flash 0.5s ease 2;
}

@keyframes alert-flash {
    0%, 100% { box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6), 0 0 40px rgba(255, 68, 68, 0.3); }
    50% { box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6), 0 0 60px rgba(255, 68, 68, 0.8); }
}

.alert-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 68, 68, 0.2);
}

.alert-popup-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #ff4444;
    font-weight: 700;
    font-size: 1rem;
}

.alert-popup-title i {
    font-size: 1.2rem;
    animation: pulse-icon 1.5s infinite;
}

@keyframes pulse-icon {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

.alert-popup-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.alert-popup-close:hover {
    background: rgba(255, 68, 68, 0.15);
    color: #ff4444;
    transform: scale(1.1);
}

.alert-popup-body {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.alert-popup-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}

.alert-popup-label {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.alert-popup-value {
    color: var(--text-white);
    font-weight: 500;
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
}

.alert-popup-status {
    color: #ffc800;
    font-weight: 600;
}

.alert-popup-message {
    margin-top: 0.75rem;
    padding: 0.6rem 0.75rem;
    background: rgba(0, 245, 255, 0.05);
    border: 1px solid rgba(0, 245, 255, 0.15);
    border-radius: 8px;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.4;
}

.alert-popup-message i {
    color: var(--text-primary);
    margin-right: 0.3rem;
}

.alert-popup-message strong {
    color: var(--text-primary);
}

.alert-popup-actions {
    margin-top: 0.75rem;
    display: flex;
    gap: 0.5rem;
}

.alert-popup-actions .btn {
    flex: 1;
    font-size: 0.75rem;
    padding: 0.35rem 0.75rem;
    border-radius: 8px;
}

/* Responsivo do popup */
@media (max-width: 480px) {
    #alertPopupContainer {
        left: 10px;
        right: 10px;
        bottom: 10px;
        max-width: none;
    }

    .alert-popup {
        padding: 0.85rem 1rem;
    }

    .alert-popup-title {
        font-size: 0.9rem;
    }

    .alert-popup-value,
    .alert-popup-row {
        font-size: 0.75rem;
    }
}