﻿/* ===== FLUXPRO v1.0 - ESTILOS GLOBAIS ===== */
:root {
    --primary-red: #D93B48;
    --primary-blue: #3A59AC;
    --secondary-blue: #6887C8;
    --danger-red: #D93636;
    --light-gray: #F2F2F2;
    --success-green: #28a745;
    --warning-yellow: #ffc107;
    --info-cyan: #17a2b8;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8f0 100%);
    min-height: 100vh;
    color: #333;
}

/* HEADER */
.header {
    background: linear-gradient(135deg, var(--primary-blue) 0%, #2a4590 100%);
    color: white;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo {
    height: 50px;
    background: white;
    border-radius: 8px;
    padding: 5px;
    object-fit: contain;
}

.system-title {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid white;
}

.user-name {
    font-weight: 600;
    color: white;
    font-size: 1.1rem;
}

.user-role {
    background: var(--primary-red);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
}

/* CONTAINER */
.container {
    max-width: 1400px;
    margin: 30px auto;
    padding: 0 20px;
}

/* CARDS */
.card {
    background: white;
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    border: 1px solid #e9ecef;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--light-gray);
}

.card-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-blue);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* BOTÕES */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.btn-primary { background: var(--primary-blue); color: white; }
.btn-primary:hover { background: #2a4590; }
.btn-success { background: var(--success-green); color: white; }
.btn-success:hover { background: #218838; }
.btn-danger { background: var(--danger-red); color: white; }
.btn-danger:hover { background: #b82b2b; }
.btn-warning { background: var(--warning-yellow); color: #212529; }
.btn-warning:hover { background: #e0a800; }
.btn-info { background: var(--secondary-blue); color: white; }
.btn-info:hover { background: #4e6fa8; }
.btn-secondary { background: #6c757d; color: white; }

.btn-lg {
    padding: 20px 30px;
    font-size: 1.2rem;
    min-height: 160px;
    flex-direction: column;
}

.btn-block {
    width: 100%;
    display: block;
}

/* FORMULÁRIOS */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #444;
    font-size: 0.95rem;
}

.form-control, .form-select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s;
    background: white;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-blue);
    outline: none;
    box-shadow: 0 0 0 4px rgba(58,89,172,0.1);
}

.form-control-sm {
    padding: 8px 12px;
    font-size: 0.9rem;
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

/* GRID 3x3 */
.grid-3x3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 20px 0;
}

@media (max-width: 992px) { .grid-3x3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 768px) { .grid-3x3 { grid-template-columns: 1fr; } }

/* TABELAS */
.table-container {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

.table th {
    background: var(--primary-blue);
    color: white;
    padding: 15px;
    text-align: left;
    font-weight: 700;
    font-size: 0.95rem;
}

.table td {
    padding: 12px 15px;
    border-bottom: 1px solid #dee2e6;
}

.table tbody tr:hover {
    background: rgba(58,89,172,0.05);
}

/* STATUS */
.status-verde {
    background: var(--success-green);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-block;
}

.status-amarelo {
    background: var(--warning-yellow);
    color: #212529;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-block;
}

.status-vermelho {
    background: var(--danger-red);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-block;
}

.status-transparente {
    background: transparent;
    color: #333;
    border: 2px solid #dee2e6;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-block;
}

/* MODAIS */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.2s ease-out;
}

.modal-content {
    background: white;
    border-radius: 16px;
    padding: 30px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
    transform: scale(0.95);
    animation: scaleIn 0.2s ease-out forwards;
}

.modal-header {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #eee;
}

.modal-footer {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 30px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scaleIn {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* TOAST MESSAGES */
.toast-message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 14px 24px;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
    z-index: 9999;
    font-size: 1rem;
    font-weight: 500;
    min-width: 300px;
    max-width: 500px;
    animation: slideIn 0.3s ease-out;
    color: white;
}

.toast-success { background: var(--success-green); }
.toast-error { background: var(--danger-red); }
.toast-warning { background: var(--warning-yellow); color: #212529; }
.toast-info { background: var(--secondary-blue); }

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

/* PDF VIEWER */
.pdf-viewer {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90vw;
    height: 90vh;
    background: white;
    border-radius: 16px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.3);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.pdf-viewer-header {
    background: var(--primary-blue);
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pdf-viewer-body {
    flex: 1;
    overflow: auto;
    padding: 20px;
    background: #f5f5f5;
}

.pdf-viewer-body iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: white;
}

.pdf-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

.pdf-controls button {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s;
}

.pdf-controls button:hover {
    background: rgba(255,255,255,0.3);
}

/* LOGIN PAGE */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    padding: 20px;
}

.login-card {
    background: white;
    border-radius: 16px;
    padding: 50px;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.25);
    text-align: center;
}

.login-logo {
    height: 90px;
    margin-bottom: 25px;
    object-fit: contain;
}

.login-title {
    font-size: 2.3rem;
    color: var(--primary-blue);
    font-weight: 900;
    margin-bottom: 8px;
}

.login-subtitle {
    color: #666;
    margin-bottom: 40px;
    font-size: 1.05rem;
}

.login-input-group {
    margin-bottom: 25px;
    text-align: left;
    position: relative;
}

.login-label {
    display: block;
    margin-bottom: 10px;
    font-weight: 700;
    color: #444;
}

.login-input {
    width: 100%;
    padding: 18px;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 1.1rem;
    transition: all 0.3s;
}

.login-input:focus {
    border-color: var(--primary-blue);
    outline: none;
    box-shadow: 0 0 0 4px rgba(58,89,172,0.15);
}

.password-toggle {
    position: absolute;
    right: 15px;
    top: 52px;
    cursor: pointer;
    color: #777;
    font-size: 1.2rem;
}

.login-button {
    width: 100%;
    padding: 18px;
    background: var(--primary-blue);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.2rem;
    font-weight: 800;
    cursor: pointer;
    margin-top: 10px;
    transition: all 0.3s;
}

.login-button:hover {
    background: #2a4590;
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(58,89,172,0.3);
}

.login-error {
    color: var(--danger-red);
    margin-top: 15px;
    font-weight: 600;
    display: none;
    background: #f8d7da;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #f5c6cb;
}

.version {
    position: fixed;
    bottom: 20px;
    right: 20px;
    color: rgba(255,255,255,0.7);
    font-size: 0.9rem;
}

/* UTILITÁRIOS */
.text-center { text-align: center; }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }
.ml-10 { margin-left: 10px; }
.mr-10 { margin-right: 10px; }
.hidden { display: none !important; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-10 { gap: 10px; }
.gap-20 { gap: 20px; }

/* RESPONSIVO */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .user-info {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .card-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .btn-lg {
        min-height: 140px;
        font-size: 1.1rem;
    }
}
