/* =============================================
   RESET E CONFIGURAÇÕES GERAIS
   ============================================= */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #2c2c2c;
    font-family: 'Nunito', sans-serif;
    color: #ddd;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Utilitários de Layout */
.login-body {
    justify-content: center;
    align-items: center;
}

.index-body {
    align-items: center;
}

body.align-top {
    justify-content: flex-start;
    align-items: center;
}

.container {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
    flex: 1; 
    display: flex;
    flex-direction: column;
    padding-top: 30px;
}

.container.align-top {
    justify-content: flex-start !important;
}

/* Empilhamento Vertical (Espaçamento Padronizado) */
.v-stack { 
    display: flex; 
    flex-direction: column; 
    gap: 5px; 
    align-items: center; 
    justify-content: center; 
}

/* Empilhamento Horizontal */
.h-stack {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 5px;
    align-items: center;
    justify-content: center;
}

/* =============================================
   FORMULÁRIO DE LOGIN E LOGOS
   ============================================= */
.dron__logo {
    text-align: center;
    margin-bottom: 10px;
}

.dron__logo img {
    width: 340px;
    height: auto;
    margin-top: 30px;
}

/* Padronização da Logo para todas as páginas (Exceto Login) */
.dron__logo-sub img {
    width: 320px;
    height: auto;
    display: block;
    margin: 10px auto 0;
}

.dron__form {
    width: 100%;
    max-width: 340px;
    background: #363636; 
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.4);
    position: relative;
}

.form__input input {
    width: 100%;
    padding: 12px;
    margin: 8px 0;
    border-radius: 6px;
    border: 1px solid #555;
    background: #444;
    color: #ddd;
    font-size: 16px;
}

/* Botão Padrão (Login) */
.dron__btn {
    width: 100%;
    padding: 15px;
    background-color: #0066cc;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
    margin-top: 10px;
    text-decoration: none;
    text-align: center;
    display: inline-block;
    box-sizing: border-box;
}

.dron__btn:hover {
    background-color: #0052a3; 
}

/* Botões de Cabeçalho (+ Novo Canal / + Novo Usuário) */
header .dron__btn {
    width: 155px; 
    height: 30px; 
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 0;
    font-size: 13px;
}

.forgotLink {
    color: #fff;
    text-decoration: none;
    display: block;
    font-size: 14px;
    text-align: center;
    margin-top: 15px;
}

.form-error {
    border: 2px solid #ff4d4d !important;
    animation: shake 0.4s ease-in-out;
}

.error-floating {
    position: absolute;
    top: -55px;
    left: 50%;
    transform: translateX(-50%);
    background: #ff4d4d;
    color: white;
    padding: 10px 18px;
    border-radius: 6px;
    font-size: 13px;
    white-space: nowrap;
    z-index: 100;
}

.error-floating::after {
    content: "";
    position: absolute;
    top: 100%; 
    left: 50%; 
    margin-left: -6px;
    border-width: 6px; 
    border-style: solid;
    border-color: #ff4d4d transparent transparent transparent;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-8px); }
    50% { transform: translateX(8px); }
    75% { transform: translateX(-8px); }
}

/* =============================================
   MENU SUPERIOR E CABEÇALHO (NAVBAR)
   ============================================= */
.navbar {
    width: 100%;
    background-color: #222;
    padding: 10px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.nav-content {
    display: flex;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 8px;
}

.nav-links {
    list-style: none;
    display: flex;
    width: 100%;
    justify-content: center;
    gap: 10px;
    align-items: center;
}

.nav-links li {
    display: flex;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: #fff;
    padding: 6px 12px;
    border-radius: 5px;
    transition: all 0.3s ease;
    border-bottom: 2px solid transparent;
    font-size: 14px;
}

.nav-links a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-bottom: 2px solid rgba(255, 255, 255, 0.5);
}

.nav-links a.active {
    background-color: rgba(255, 255, 255, 0.15);
    border-bottom: 2px solid #fff !important;
    font-weight: 600;
}

.nav-links a.nav-sair {
    color: #ff6b6b !important;
    font-weight: 600;
}

.nav-links a.nav-sair:hover {
    background-color: rgba(255, 107, 107, 0.15);
    border-bottom: 2px solid #ff6b6b;
    color: #ff5252 !important;
}

.index-header {
    width: 100%;
    text-align: center;
    padding-top: 0px;
}

.index-header h1 {
    color: #ffffff;
    margin-top: 15px;
}

.index-header h3 {
    margin-bottom: 5px;
}

.index-header p {
    color: #bbb;
}

/* =============================================
   CARDS DA PÁGINA INICIAL
   ============================================= */
.grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    padding: 20px 0 40px 0;
    width: 100%;
}

.card-link {
    text-decoration: none;
}

.card {
    background: #0066cc;
    padding: 25px 10px;
    border-radius: 15px;
    text-align: center;
    color: #fff;
    transition: all 0.3s ease;
    height: 100%;
}

.card:hover {
    transform: translateY(-8px);
    background: #0052a3;
}

/* =============================================
   TABELAS, STATUS E BOTÕES COMPACTOS
   ============================================= */
.content-table {
    width: 100%;
    background: #363636;
    border-radius: 12px;
    overflow-x: auto;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.dron__table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

.dron__table th, .dron__table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #444;
}

.dron__table th {
    background-color: #1a1a1a !important;
    color: #ffffff;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.5px;
    padding: 15px 10px;
}

.dron__table tr:hover {
    background-color: #3e3e3e;
}

/* Indicadores de Status (Pontos pulsantes) */
.status-dot { 
    height: 10px; 
    width: 10px; 
    border-radius: 50%; 
    display: inline-block; 
    margin-bottom: 4px; 
}
.pulse-green { 
    background-color: #2ed573; 
    box-shadow: 0 0 0 rgba(46,213,115,0.4); 
    animation: pulse-g 2s infinite; 
}
.pulse-yellow { 
    background-color: #ffa502; 
    box-shadow: 0 0 0 rgba(255,165,2,0.4); 
    animation: pulse-y 2s infinite; 
}
.dot-red { 
    background-color: #ff4757; 
}

@keyframes pulse-g { 
    0% {box-shadow:0 0 0 0 rgba(46,213,115,0.7);} 
    70% {box-shadow:0 0 0 10px rgba(46,213,115,0);} 
    100% {box-shadow:0 0 0 0 transparent;} 
}
@keyframes pulse-y { 
    0% {box-shadow:0 0 0 0 rgba(255,165,2,0.7);} 
    70% {box-shadow:0 0 0 10px rgba(255,165,2,0);} 
    100% {box-shadow:0 0 0 0 transparent;} 
}

/* Textos de Dados e Links de Cópia */
.static-data {
    font-size: 11px; 
    color: #aaa;
    font-family: monospace;
}

.copy-link { 
    cursor: pointer; 
    font-size: 11px; 
    color: #aaa; 
    font-family: monospace; 
    transition: 0.2s; 
}
.copy-link:hover { 
    color: #3498db; 
    text-decoration: underline; 
}

/* Botões Padrão (Agora com a cor do cabeçalho da tabela) */
.btn-compact { 
    background: #1a1a1a; 
    border: 1px solid #1a1a1a; 
    color: #fff; 
    width: 95px; 
    height: 20px; 
    line-height: 18px; 
    border-radius: 3px; 
    cursor: pointer; 
    font-size: 10px; 
    text-decoration: none; 
    display: inline-block; 
    text-align: center; 
    font-weight: bold; 
    box-sizing: border-box; 
    transition: 0.2s;
}
.btn-compact:hover { 
    background: #333333; 
    border-color: #333333; 
}
.btn-compact:disabled { 
    opacity: 0.3; 
    cursor: not-allowed; 
}

/* Botão Compacto de Sucesso (Ativar) */
.btn-compact.btn-success {
    background: #2ed573;
    border: 1px solid #2ed573;
    color: #ffffff;
}
.btn-compact.btn-success:hover {
    background: #27ae60; 
    border-color: #27ae60;
}

/* Botão Compacto de Excluir/Resetar (Perigo) - Agora com contorno herdado */
.btn-compact.btn-danger {
    background: #ff4757;
    border: 1px solid #1a1a1a;
    color: #ffffff;
}
.btn-compact.btn-danger:hover {
    background: #ff6b81; 
    border-color: #333333;
}

/* Cores de Texto Utilitárias */
.txt-red { color: #ff4757 !important; }

/* =============================================
   RODAPÉ E RESPONSIVIDADE
   ============================================= */
footer, .footer {
    width: 100%;
    text-align: center;
    padding: 10px 0;
    font-size: 12px;
    color: #ffffff;
    margin-top: 0; 
    flex-shrink: 0;
}

@media (max-width: 480px) {
    .nav-links {
        gap: 10px;
        padding: 0 10px;
        width: 100%;
        justify-content: space-around;
    }
    
    .nav-links a {
        font-size: 12px;
        padding: 6px 10px;
    }
}