/* =====================================
   VARIÁVEIS E CONFIGURAÇÕES GLOBAIS - ZARNS
===================================== */
:root {
    --primary: #00A86B;        /* Verde Zarns principal */
    --primary-dark: #00875A;    /* Verde Zarns escuro */
    --primary-light: #4CDE9C;   /* Verde Zarns claro */
    --secondary: #1e4b3c;       /* Verde mais escuro para cards */
    --dark: #0a3529;            /* Verde bem escuro para fundo */
    --darker: #05231b;          /* Verde quase preto para sidebar */
    --light: #e2e8f0;
    --light-gray: #f8fafc;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
    --zarns-gradient: linear-gradient(135deg, #00A86B 0%, #00875A 100%);
    --zarns-glow: rgba(0, 168, 107, 0.3);
}

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

body {
    background: var(--dark);
    font-family: 'Inter', sans-serif;
    color: var(--light);
    line-height: 1.6;
}

/* =====================================
   NAVBAR SUPERIOR
===================================== */
.navbar {
    background: var(--darker) !important;
    padding: 1rem 2rem;
    border-bottom: 2px solid var(--primary) !important;
    box-shadow: 0 4px 20px var(--zarns-glow);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: white !important;
}

.navbar-brand i {
    color: var(--primary);
    font-size: 1.8rem;
    filter: drop-shadow(0 0 5px var(--primary));
}

/* =====================================
   SIDEBAR
===================================== */
.sidebar {
    background: var(--darker);
    min-height: calc(100vh - 72px);
    border-right: 2px solid var(--primary);
    padding: 2rem 0;
    box-shadow: 4px 0 20px var(--zarns-glow);
}

.sidebar-link {
    color: var(--light);
    text-decoration: none;
    padding: 1rem 1.5rem;
    margin: 0.2rem 1rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.sidebar-link i {
    font-size: 1.3rem;
    width: 24px;
    color: var(--primary);
    transition: all 0.3s ease;
}

.sidebar-link:hover {
    background: var(--primary);
    color: white;
    transform: translateX(5px);
    box-shadow: 0 5px 15px var(--zarns-glow);
}

.sidebar-link:hover i {
    color: white;
}

/* =====================================
   CARDS
===================================== */
.card {
    background: var(--secondary);
    border: 1px solid var(--primary);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px var(--zarns-glow);
    border-color: var(--primary-light);
}

.card-header {
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid var(--primary);
    padding: 1.2rem;
    font-weight: 600;
    color: var(--light);
}

.card-header i {
    color: var(--primary);
}

.card-body {
    padding: 1.8rem;
}

/* =====================================
   FORMULÁRIOS
===================================== */
.form-control, .form-select {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--primary);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    color: white;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    background: rgba(0, 0, 0, 0.4);
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px var(--zarns-glow);
    color: white;
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--light);
}

/* =====================================
   BOTÕES
===================================== */
.btn {
    border-radius: 14px;
    padding: 0.75rem 1.8rem;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #006B44 100%);
    box-shadow: 0 5px 20px var(--zarns-glow);
    transform: translateY(-2px);
}

.btn-outline-primary {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline-primary:hover {
    background: var(--primary);
    color: white;
}

/* =====================================
   TABELAS
===================================== */
.table {
    background: var(--secondary);
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 0;
}

.table thead {
    background: var(--darker);
    border-bottom: 2px solid var(--primary);
}

.table thead th {
    color: var(--primary);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    padding: 1rem;
}

.table tbody tr {
    border-bottom: 1px solid var(--primary);
    transition: all 0.3s ease;
}

.table tbody tr:hover {
    background: rgba(0, 168, 107, 0.1);
}

.table td {
    padding: 1rem;
    vertical-align: middle;
}

/* =====================================
   BADGES
===================================== */
.badge {
    padding: 0.5rem 1rem;
    border-radius: 30px;
    font-weight: 500;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.badge-primary {
    background: var(--primary);
    color: white;
}

.badge-success {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    border: 1px solid #10b981;
}

.badge-warning {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
    border: 1px solid #f59e0b;
}

.badge-danger {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid #ef4444;
}

.badge-info {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
    border: 1px solid #3b82f6;
}

.badge-em-atendimento {
    background: rgba(0, 168, 107, 0.2);
    color: var(--primary);
    border: 1px solid var(--primary);
}

.badge-aberto {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
    border: 1px solid #f59e0b;
}

.badge-finalizado {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    border: 1px solid #10b981;
}

/* =====================================
   PÁGINAS DE LOGIN
===================================== */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--dark) 0%, var(--darker) 100%);
    padding: 2rem;
}

.login-card {
    background: var(--secondary);
    border-radius: 30px;
    padding: 3rem;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    border: 2px solid var(--primary);
}

.login-card h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: white;
    font-weight: 700;
}

.login-card h2 i {
    color: var(--primary);
    font-size: 3rem;
    display: block;
    margin-bottom: 1rem;
    filter: drop-shadow(0 0 10px var(--primary));
}

/* =====================================
   BOTÕES DE EQUIPAMENTOS (SALA.PHP)
===================================== */
.btn-equipamento {
    background: var(--secondary);
    border: 2px solid var(--primary);
    border-radius: 16px;
    color: var(--light);
    transition: all 0.3s ease;
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    width: 100%;
}

.btn-equipamento:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-5px);
    box-shadow: 0 10px 25px var(--zarns-glow);
}

.btn-equipamento:hover i {
    color: white !important;
}

.btn-equipamento i {
    transition: all 0.3s ease;
    color: var(--primary);
}

.btn-equipamento-ativo {
    background: rgba(239, 68, 68, 0.2);
    border: 2px solid var(--danger);
    border-radius: 16px;
    color: var(--danger);
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: not-allowed;
    opacity: 0.8;
    width: 100%;
}

.btn-equipamento-ativo i {
    color: var(--danger) !important;
}

.btn-equipamento-selecionado {
    background: var(--primary);
    border: 2px solid var(--primary);
    border-radius: 16px;
    color: white;
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transform: scale(0.98);
    box-shadow: 0 0 20px var(--zarns-glow);
    width: 100%;
}

.btn-equipamento-selecionado i {
    color: white !important;
}

.btn-equipamento-selecionado:hover {
    transform: scale(1.02);
    background: var(--primary-dark);
}

/* =====================================
   CARDS DE SALAS
===================================== */
.sala-card {
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
    background: var(--secondary);
    border-radius: 16px;
    overflow: hidden;
}

.sala-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 10px 25px var(--zarns-glow);
}

.sala-card .sala-icone i {
    transition: all 0.3s ease;
    color: var(--primary);
}

.sala-card:hover .sala-icone i {
    transform: scale(1.1);
    color: var(--primary-light);
}

/* =====================================
   UTILITÁRIOS
===================================== */
.text-primary {
    color: var(--primary) !important;
}

.bg-primary {
    background: var(--primary) !important;
}

.border-primary {
    border-color: var(--primary) !important;
}

/* =====================================
   ANIMAÇÕES
===================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.content {
    animation: fadeIn 0.5s ease-out;
}

.card {
    animation: slideIn 0.3s ease-out;
}

/* =====================================
   RESPONSIVIDADE
===================================== */
@media (max-width: 768px) {
    .sidebar {
        min-height: auto;
        padding: 1rem;
    }
    
    .content {
        padding: 1.5rem;
    }
    
    .login-card {
        padding: 2rem;
        margin: 1rem;
    }
    
    .btn-equipamento,
    .btn-equipamento-ativo,
    .btn-equipamento-selecionado {
        min-height: 150px;
    }
}