/* --- Ponto mostrando tracker --- */
/* Ponto de status do TopBar */
.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #555; /* Cinza quando inativo */
  display: inline-block;
  transition: background-color 0.3s ease;
}

/* Estado ativo: Vermelho piscando */
.status-dot.active {
  background-color: #ff3b30;
  box-shadow: 0 0 8px #ff3b30;
  animation: piscar 1.2s infinite alternate ease-in-out;
}

@keyframes piscar {
  0% { opacity: 1; }
  100% { opacity: 0.2; }
}

/* --- RESET & BASE --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
    background-color: #000000;
    color: #ffffff;
    height: 100vh;
    width: 100vw;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 8px;
    overflow: hidden;
}

/* --- BARRA SUPERIOR --- */
.top-bar {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 12px;
    border-bottom: 1px solid #18181b;
    background-color: #000000;
    z-index: 10;
}

.brand-section {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 9999px;
    background-color: #52525b;
}

.brand-title {
    font-size: 0.875rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #ffffff;
}

.accuracy-info {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #a1a1aa;
}

.accuracy-val {
    color: #ffffff;
    font-family: monospace;
    font-weight: 900;
}

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

/* --- GRADE DE QUADRANTES --- */
.dashboard-grid {
    width: 100%;
    flex: 1;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 8px;
    padding: 4px;
}

.quadrant-card {
    border: 1px solid #27272a;
    border-radius: 12px;
    background-color: #000000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 8px;
}

.card-label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #71717a;
    position: absolute;
    top: 8px;
    left: 12px;
}

.val-group {
    display: flex;
    align-items: baseline;
    justify-content: center;
}

.val-display {
    font-size: 3.25rem;
    font-weight: 900;
    color: #ffffff;
    font-family: monospace;
}

@media (min-width: 640px) {
    .val-display { font-size: 4.5rem; }
}
@media (min-width: 768px) {
    .val-display { font-size: 6rem; }
}

.val-unit {
    font-size: 1.25rem;
    font-weight: 700;
    color: #a1a1aa;
    margin-left: 4px;
}

.sub-text {
    font-size: 0.875rem;
    font-weight: 700;
    color: #a1a1aa;
    text-transform: uppercase;
}

/* --- PAINEL DO TEMPORIZADOR --- */
.timer-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.timer-btn-trigger {
    background: transparent;
    border: none;
    cursor: pointer;
    outline: none;
    transition: transform 0.1s;
}
.timer-btn-trigger:active {
    transform: scale(0.95);
}

.controls-matrix {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
}

/* --- BOTÕES & CONTROLES --- */
.btn-icon {
    width: 32px;
    height: 32px;
    padding: 6px;
    border-radius: 8px;
    background-color: #18181b;
    border: 1px solid #27272a;
    color: #ffffff;
    font-weight: 700;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.1s;
}
.btn-icon:active {
    transform: scale(0.95);
}

.btn-tool {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background-color: #18181b;
    border: 1px solid #27272a;
    color: #ffffff;
    font-weight: 700;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.1s;
}
.btn-tool:active {
    transform: scale(0.9);
}

.btn-red-5m {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background-color: rgba(69, 10, 10, 0.8);
    border: 1px solid #991b1b;
    color: #fecaca;
    font-weight: 700;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.1s;
}
.btn-red-5m:active {
    transform: scale(0.9);
}

.btn-primary {
    width: 100%;
    max-width: 320px;
    background-color: #4f46e5;
    color: #ffffff;
    font-weight: 900;
    font-size: 0.875rem;
    padding: 14px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: none;
    cursor: pointer;
    transition: transform 0.1s;
}
.btn-primary:active {
    transform: scale(0.95);
}

.btn-full-width {
    width: 100%;
    background-color: #18181b;
    border: 1px solid #27272a;
    color: #ffffff;
    font-weight: 700;
    font-size: 0.75rem;
    padding: 10px;
    border-radius: 12px;
    cursor: pointer;
}

.input-field {
    width: 100%;
    background-color: #18181b;
    border: 1px solid #27272a;
    border-radius: 12px;
    padding: 8px 12px;
    font-size: 0.875rem;
    font-weight: 700;
    color: #ffffff;
    outline: none;
}
.input-field:focus {
    border-color: #71717a;
}

/* --- OVERLAYS & MODAIS --- */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 50;
    background-color: rgba(0, 0, 0, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    text-align: center;
}

.modal-box-container {
    position: fixed;
    inset: 0;
    z-index: 50;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.hidden {
    display: none !important;
}

.icon-badge {
    width: 64px;
    height: 64px;
    border-radius: 9999px;
    background-color: rgba(79, 70, 229, 0.2);
    border: 1px solid #6366f1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.875rem;
    margin-bottom: 24px;
}

.modal-text-group {
    margin-bottom: 24px;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 900;
    text-transform: uppercase;
    color: #ffffff;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.modal-desc {
    font-size: 0.75rem;
    color: #a1a1aa;
    max-width: 320px;
    line-height: 1.5;
}

.modal-card {
    background-color: #09090b;
    border: 1px solid #27272a;
    border-radius: 16px;
    padding: 16px;
    width: 100%;
    max-width: 512px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #27272a;
    padding-bottom: 8px;
}

.btn-close {
    background: transparent;
    border: none;
    color: #a1a1aa;
    font-weight: 700;
    cursor: pointer;
    padding: 4px;
}
.btn-close:hover {
    color: #ffffff;
}

.input-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #a1a1aa;
    display: block;
    text-transform: uppercase;
    margin-bottom: 4px;
}
/* Alerta intermediário: Amarelo (entre 30s e 11s) */
.val-display.timer-alert-intermediario {
    color: #fdd700 !important;
}

/* Alerta final: Vermelho (entre 10s e 1s) */
.val-display.timer-alert-final {
    color: #ef4444 !important;
}   