/**
 * LuTech Soluções Digitais - Estilos de Autenticação e Portal (auth-style.css)
 * 
 * Estilos específicos para a página de Login (login.html) e o Portal do Cliente (portal.html).
 * Alinhado com a paleta de cores e identidade de design da LuTech.
 */

/* ==========================================
   1. ESTILOS DA PÁGINA DE LOGIN (login.html)
   ========================================== */

.login-body {
    background: radial-gradient(circle at 50% 50%, #17202a 0%, #0d1117 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    position: relative;
    overflow-y: auto;
}

/* Efeito de luzes de fundo decorativas */
.login-body::before,
.login-body::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: var(--primary);
    filter: blur(150px);
    opacity: 0.15;
    z-index: 0;
}
.login-body::before {
    top: 10%;
    left: 10%;
}
.login-body::after {
    bottom: 10%;
    right: 10%;
}

.login-wrapper {
    width: 100%;
    max-width: 450px;
    z-index: 1;
}

.login-logo {
    text-align: center;
    margin-bottom: 30px;
}

.login-logo img {
    height: 60px;
}

/* Card de Vidro (Glassmorphism) */
.auth-card {
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    color: white;
    transition: var(--transition);
}

.auth-card h2 {
    font-size: 1.8rem;
    margin-bottom: 8px;
    color: white;
    font-weight: 700;
}

.auth-card .subtitle {
    font-size: 0.95rem;
    color: #a0aec0;
    margin-bottom: 30px;
}

/* Abas de alternância de formulário */
.auth-tabs {
    display: flex;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 25px;
    gap: 15px;
}

.auth-tab {
    padding: 10px 5px;
    background: none;
    border: none;
    color: #a0aec0;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    transition: var(--transition);
}

.auth-tab.active {
    color: var(--primary-light);
}

.auth-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary-light);
}

/* Campos de Formulário Estilizados */
.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #cbd5e0;
    margin-bottom: 8px;
}

.input-icon-wrapper {
    position: relative;
}

.input-icon-wrapper i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #718096;
    font-size: 1rem;
    transition: var(--transition);
}

.auth-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 14px 15px 14px 45px;
    font-size: 0.95rem;
    color: white;
    transition: var(--transition);
}

.auth-input::placeholder {
    color: #718096;
}

.auth-input:focus {
    outline: none;
    border-color: var(--primary-light);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(0, 180, 182, 0.2);
}

.auth-input:focus + i {
    color: var(--primary-light);
}

/* Links adicionais */
.forgot-link {
    display: block;
    text-align: right;
    font-size: 0.85rem;
    color: var(--primary-light);
    text-decoration: none;
    margin-bottom: 25px;
    transition: var(--transition);
}

.forgot-link:hover {
    text-decoration: underline;
}

/* Botões */
.btn-auth-submit {
    width: 100%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    padding: 14px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 8px 20px rgba(0, 137, 138, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-auth-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(0, 137, 138, 0.35);
    filter: brightness(1.1);
}

.btn-auth-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Alert Boxes para Erros/Sucessos */
.alert {
    padding: 12px 15px;
    border-radius: 10px;
    font-size: 0.88rem;
    margin-bottom: 20px;
    display: none;
    align-items: center;
    gap: 10px;
    animation: fadeIn 0.3s ease;
}

.alert-error {
    background: rgba(224, 86, 86, 0.15);
    border: 1px solid rgba(224, 86, 86, 0.3);
    color: #fc8181;
}

.alert-success {
    background: rgba(72, 187, 120, 0.15);
    border: 1px solid rgba(72, 187, 120, 0.3);
    color: #68d391;
}

.alert-info {
    background: rgba(49, 130, 206, 0.15);
    border: 1px solid rgba(49, 130, 206, 0.3);
    color: #63b3ed;
}

/* Ocultar elementos */
.hidden {
    display: none !important;
}


/* ==========================================
   2. ESTILOS DO PORTAL DO CLIENTE (portal.html)
   ========================================== */

.portal-body {
    background-color: #f4f6f8;
    color: var(--text-dark);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header do Portal */
.portal-header {
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.portal-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.portal-logo img {
    height: 40px;
}

.portal-user-menu {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-profile-info {
    text-align: right;
}

.user-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-dark);
    display: block;
}

.user-company {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.btn-logout {
    background: rgba(224, 86, 86, 0.1);
    color: #e53e3e;
    border: 1px solid rgba(224, 86, 86, 0.2);
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
}

.btn-logout:hover {
    background: #e53e3e;
    color: white;
    box-shadow: 0 4px 12px rgba(229, 62, 62, 0.2);
}

/* Área de Conteúdo Principal */
.portal-main {
    flex-grow: 1;
    padding: 40px 0;
}

.portal-welcome {
    margin-bottom: 30px;
}

.portal-welcome h1 {
    font-size: 2.2rem;
    color: var(--secondary);
    margin-bottom: 5px;
}

.portal-welcome p {
    color: var(--text-muted);
}



/* Grade de Estatísticas */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 40px;
}

.stat-card {
    background: white;
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0, 0, 0, 0.02);
    display: flex;
    align-items: center;
    gap: 15px;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(0, 137, 138, 0.1);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.stat-icon.warning {
    background: rgba(230, 126, 34, 0.1);
    color: #e67e22;
}

.stat-icon.success {
    background: rgba(46, 204, 113, 0.1);
    color: #2ecc71;
}

.stat-info h3 {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--secondary);
}

.stat-progress {
    width: 100%;
    height: 6px;
    background: #e2e8f0;
    border-radius: 10px;
    margin-top: 10px;
    overflow: hidden;
}

.stat-progress-bar {
    height: 100%;
    background: var(--primary);
    border-radius: 10px;
    transition: width 1s ease-in-out;
}

/* Seção de Robôs Ativos */
.dashboard-section {
    background: white;
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0, 0, 0, 0.02);
    margin-bottom: 40px;
}

.section-title-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    border-bottom: 1px solid #edf2f7;
    padding-bottom: 15px;
}

.section-title-wrapper h2 {
    font-size: 1.35rem;
    color: var(--secondary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title-wrapper h2 i {
    color: var(--primary);
}

/* Tabela de Robôs */
.table-responsive {
    overflow-x: auto;
}

.portal-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.portal-table th {
    background: #f7fafc;
    padding: 12px 15px;
    font-weight: 600;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    border-bottom: 2px solid #edf2f7;
}

.portal-table td {
    padding: 18px 15px;
    border-bottom: 1px solid #edf2f7;
    font-size: 0.92rem;
}

.portal-table tr:hover td {
    background: #f8fcfc;
}

.bot-name {
    font-weight: 600;
    color: var(--secondary);
    display: block;
}

.bot-description {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
}

.status-badge::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
}

.status-running {
    background: #ebf8ff;
    color: #2b6cb0;
}
.status-running::before {
    background: #3182ce;
    animation: pulse 1.5s infinite;
}

.status-idle {
    background: #e6fffa;
    color: #234e52;
}
.status-idle::before {
    background: #319795;
}

.status-error {
    background: #fff5f5;
    color: #9b2c2c;
}
.status-error::before {
    background: #e53e3e;
}

/* Monospaced Log Viewer Widget */
.log-viewer-wrapper {
    background: #1a202c;
    border-radius: 12px;
    padding: 20px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.85rem;
    color: #a0aec0;
    max-height: 250px;
    overflow-y: auto;
    border: 1px solid #2d3748;
}

.log-line {
    margin-bottom: 6px;
    line-height: 1.4;
}

.log-line.info {
    color: #63b3ed;
}

.log-line.success {
    color: #68d391;
}

.log-line.warning {
    color: #f6e05e;
}

.log-timestamp {
    color: #4a5568;
    margin-right: 8px;
}

/* Layout de Duas Colunas (Portal) */
.portal-grid-two-cols {
    display: grid;
    grid-template-columns: 1.8fr 1.2fr;
    gap: 30px;
}

/* Seção de Suporte */
.support-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0, 0, 0, 0.02);
}

.support-channel {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border-radius: 10px;
    background: #f7fafc;
    margin-bottom: 15px;
    text-decoration: none;
    color: var(--text-dark);
    transition: var(--transition);
    border: 1px solid #edf2f7;
}

.support-channel:hover {
    background: #f1fafa;
    border-color: var(--primary-light);
    transform: translateX(5px);
}

.support-channel i {
    font-size: 1.5rem;
    color: var(--primary);
}

.support-channel.whatsapp i {
    color: #2ecc71;
}

.support-channel-info h4 {
    font-size: 0.95rem;
    margin-bottom: 2px;
}

.support-channel-info p {
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* Formulário de chamado rápido */
.support-form-quick {
    margin-top: 25px;
}

.support-form-quick h3 {
    font-size: 1rem;
    margin-bottom: 15px;
    color: var(--secondary);
}

.support-form-quick textarea {
    width: 100%;
    background: #f7fafc;
    border: 1px solid #edf2f7;
    border-radius: 8px;
    padding: 12px;
    font-size: 0.9rem;
    height: 100px;
    resize: none;
    margin-bottom: 15px;
    transition: var(--transition);
}

.support-form-quick textarea:focus {
    outline: none;
    background: white;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 137, 138, 0.15);
}


/* ==========================================
   3. ANIMAÇÕES E RESPONSIVIDADE COMUNS
   ========================================== */

@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(49, 130, 206, 0.5);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 6px rgba(49, 130, 206, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(49, 130, 206, 0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsividade do Portal */
@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 1024px) {
    .portal-grid-two-cols {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .portal-nav {
        flex-direction: column;
        height: auto;
        padding: 15px 0;
        gap: 15px;
    }

    .portal-user-menu {
        width: 100%;
        justify-content: space-between;
    }

    .portal-main {
        padding: 20px 0;
    }

    .auth-card {
        padding: 25px;
    }
}
