/* ========================================
   FERRAMENTAS SSMA - DESIGN MODERNO 2025
   ======================================== */

:root {
    /* Paleta de cores profissional */
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --info-color: #17a2b8;
    --light-color: #ecf0f1;
    --dark-color: #34495e;
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-success: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --shadow-light: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-medium: 0 8px 30px rgba(0,0,0,0.12);
    --shadow-heavy: 0 15px 35px rgba(0,0,0,0.15);
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset e base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Tipografia moderna */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    letter-spacing: -0.02em;
}

.display-4 {
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Navbar moderna */
.navbar-modern {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0,0,0,0.1);
    box-shadow: var(--shadow-light);
    padding: 1rem 0;
}

.navbar-modern .navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary-color) !important;
    display: flex;
    align-items: center;
}

.navbar-modern .navbar-brand i {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.8rem;
}

.navbar-modern .nav-link {
    color: var(--dark-color) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    border-radius: var(--border-radius);
    transition: var(--transition);
    position: relative;
}

.navbar-modern .nav-link:hover {
    background: var(--gradient-primary);
    color: white !important;
    transform: translateY(-2px);
}

.navbar-modern .nav-link i {
    margin-right: 0.5rem;
    transition: var(--transition);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    padding: 4rem 0;
    margin-bottom: 3rem;
    border-radius: 0 0 50px 50px;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="%23667eea" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.hero-subtitle {
    font-size: 1.3rem;
    color: #6c757d;
    margin-bottom: 2rem;
    font-weight: 400;
}

/* Cards modernos */
.card-modern {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    transition: var(--transition);
    overflow: hidden;
    position: relative;
}

.card-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-primary);
}

.card-modern:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-heavy);
}

.card-modern .card-body {
    padding: 2rem;
}

.card-modern .card-title {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.card-modern .card-title i {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    font-size: 1.2rem;
}

.card-modern .badge-code {
    background: var(--gradient-secondary);
    color: white;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    display: inline-block;
}

.card-modern .card-text {
    color: #6c757d;
    line-height: 1.6;
    margin-bottom: 2rem;
}

/* Botões modernos */
.btn-modern {
    border: none;
    border-radius: 25px;
    padding: 0.75rem 2rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn-modern::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    transition: all 0.6s ease;
    transform: translate(-50%, -50%);
}

.btn-modern:hover::before {
    width: 300px;
    height: 300px;
}

.btn-modern-primary {
    background: var(--gradient-primary);
    color: white;
}

.btn-modern-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
    color: white;
}

.btn-modern-success {
    background: var(--gradient-success);
    color: white;
}

.btn-modern-success:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
    color: white;
}

.btn-modern-secondary {
    background: var(--gradient-secondary);
    color: white;
}

.btn-modern-secondary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
    color: white;
}

/* Container principal */
.main-container {
    flex: 1;
    padding: 2rem 0;
}

/* Grid de formulários */
.forms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

/* Footer moderno */
.footer-modern {
    background: var(--primary-color);
    color: white;
    padding: 3rem 0 1rem;
    margin-top: auto;
    position: relative;
    overflow: hidden;
}

.footer-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
}

.footer-modern .footer-brand {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
}

.footer-modern .footer-brand i {
    color: var(--warning-color);
    margin-right: 0.5rem;
}

.footer-modern .developer-info {
    background: rgba(255,255,255,0.1);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    backdrop-filter: blur(10px);
}

.footer-modern .developer-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--warning-color);
    margin-bottom: 0.5rem;
}

.footer-modern .contact-link {
    color: white;
    text-decoration: none;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
}

.footer-modern .contact-link:hover {
    color: var(--warning-color);
    transform: translateX(5px);
}

/* Área administrativa */
.admin-header {
    background: var(--gradient-primary);
    color: white;
    padding: 2rem 0;
    margin-bottom: 2rem;
    border-radius: 0 0 25px 25px;
}

.admin-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    overflow: hidden;
}

.admin-card .card-header {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 1.5rem;
    font-weight: 600;
}

/* Tabelas modernas */
.table-modern {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-light);
}

.table-modern thead {
    background: var(--gradient-primary);
    color: white;
}

.table-modern thead th {
    border: none;
    font-weight: 600;
    padding: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.9rem;
}

.table-modern tbody td {
    padding: 1rem;
    border-color: #f8f9fa;
}

.table-modern tbody tr:hover {
    background: rgba(102, 126, 234, 0.05);
}

/* Formulários modernos */
.form-modern .form-label {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.form-modern .form-control,
.form-modern .form-select {
    border: 2px solid #e9ecef;
    border-radius: var(--border-radius);
    padding: 0.75rem 1rem;
    transition: var(--transition);
    font-size: 1rem;
}

.form-modern .form-control:focus,
.form-modern .form-select:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

/* Alertas modernos */
.alert-modern {
    border: none;
    border-radius: var(--border-radius);
    padding: 1rem 1.5rem;
    font-weight: 500;
    margin-bottom: 2rem;
}

.alert-modern-success {
    background: linear-gradient(135deg, rgba(39, 174, 96, 0.1) 0%, rgba(46, 204, 113, 0.1) 100%);
    color: var(--success-color);
    border-left: 4px solid var(--success-color);
}

.alert-modern-danger {
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.1) 0%, rgba(192, 57, 43, 0.1) 100%);
    color: var(--accent-color);
    border-left: 4px solid var(--accent-color);
}

.alert-modern-info {
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.1) 0%, rgba(41, 128, 185, 0.1) 100%);
    color: var(--info-color);
    border-left: 4px solid var(--info-color);
}

/* Responsividade */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .forms-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .card-modern .card-body {
        padding: 1.5rem;
    }
    
    .admin-header {
        padding: 1.5rem 0;
    }
}

@media (max-width: 576px) {
    .hero-section {
        padding: 2rem 0;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .card-modern .card-title {
        flex-direction: column;
        text-align: center;
    }
    
    .card-modern .card-title i {
        margin-right: 0;
        margin-bottom: 0.5rem;
    }
}

/* Animações suaves */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.stagger-children > * {
    animation: fadeInUp 0.6s ease-out;
}

.stagger-children > *:nth-child(1) { animation-delay: 0.1s; }
.stagger-children > *:nth-child(2) { animation-delay: 0.2s; }
.stagger-children > *:nth-child(3) { animation-delay: 0.3s; }
.stagger-children > *:nth-child(4) { animation-delay: 0.4s; }
.stagger-children > *:nth-child(5) { animation-delay: 0.5s; }
.stagger-children > *:nth-child(6) { animation-delay: 0.6s; }

/* Loading spinner moderno */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(102, 126, 234, 0.1);
    border-left-color: var(--secondary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Scrollbar personalizada */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* Utilitários */
.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-glass {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
}

.shadow-modern {
    box-shadow: var(--shadow-medium);
}

.border-modern {
    border: 2px solid rgba(102, 126, 234, 0.1) !important;
}

.cursor-pointer {
    cursor: pointer;
}

/* Estado de loading para cards */
.card-loading {
    opacity: 0.7;
    pointer-events: none;
    position: relative;
}

.card-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(102, 126, 234, 0.2);
    border-left-color: var(--secondary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
