/* AutomaJud - Estilos Profissionais */

:root {
    --primary-color: #2c3e50;
    --secondary-color: #34495e;
    --accent-color: #3498db;
    --success-color: #27ae60;
    --danger-color: #c0392b;
    --light-bg: #ecf0f1;
    --white: #ffffff;
    --text-primary: #2c3e50;
    --text-secondary: #7f8c8d;
    --border-color: #bdc3c7;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--light-bg);
    color: var(--text-primary);
    min-height: 100vh;
}

/* Header Fixo */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: var(--primary-color);
    color: var(--white);
    box-shadow: var(--shadow);
    z-index: 1000;
    padding: 1rem 0;
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand h1 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-name {
    font-weight: 500;
    font-size: 0.95rem;
}

.btn-logout {
    background-color: var(--danger-color);
    color: var(--white);
    border: none;
    padding: 0.5rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.3s ease;
}

.btn-logout:hover {
    background-color: #a93226;
}

/* Área Principal */
.main-content {
    margin-top: 80px;
    padding: 2rem 0;
    min-height: calc(100vh - 80px - 60px);
}

/* Cards/Frames */
.cards-section {
    margin-bottom: 2rem;
}

.cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.card {
    background: var(--white);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 2rem;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    border-color: var(--accent-color);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--accent-color);
}

.card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Área de Texto */
.text-section {
    background: var(--white);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 2rem;
}

.text-section h2 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 0.5rem;
}

.text-section p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1rem;
}

/* Tela de Login */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 2rem;
}

.login-card {
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    max-width: 500px;
    width: 100%;
    overflow: hidden;
}

.login-header {
    background: var(--primary-color);
    color: var(--white);
    padding: 2rem;
    text-align: center;
}

.login-header h1 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.login-header p {
    opacity: 0.9;
    font-size: 0.95rem;
}

.login-body {
    padding: 2rem;
}

.info-box {
    background: #e3f2fd;
    border-left: 4px solid var(--accent-color);
    padding: 1.5rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
}

.info-box h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.info-box ol {
    margin-left: 1.5rem;
    color: var(--text-secondary);
}

.info-box ol li {
    margin: 0.75rem 0;
    line-height: 1.5;
}

.btn-primary {
    background: var(--accent-color);
    color: var(--white);
    border: none;
    padding: 1rem 2rem;
    font-size: 1rem;
    border-radius: 6px;
    cursor: pointer;
    width: 100%;
    transition: background-color 0.3s ease;
    font-weight: 500;
}

.btn-primary:hover {
    background: #2980b9;
}

.help-text {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.help-text h4 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.help-text a {
    color: var(--accent-color);
    text-decoration: none;
}

.help-text a:hover {
    text-decoration: underline;
}

/* Loading */
.loading {
    text-align: center;
    padding: 3rem;
}

.spinner {
    border: 4px solid var(--light-bg);
    border-top: 4px solid var(--accent-color);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1.5rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Erro */
.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 1.5rem;
    border-radius: 6px;
    border-left: 4px solid var(--danger-color);
    margin-top: 1rem;
}

/* Footer */
.main-footer {
    background: var(--secondary-color);
    color: var(--white);
    text-align: center;
    padding: 1.5rem 0;
    font-size: 0.9rem;
}

.main-footer p {
    margin: 0.25rem 0;
    opacity: 0.9;
}

/* Responsividade */
@media (max-width: 768px) {
    .main-header .container {
        flex-direction: column;
        gap: 1rem;
    }

    .user-info {
        flex-direction: column;
        width: 100%;
    }

    .btn-logout {
        width: 100%;
    }

    .cards-container {
        grid-template-columns: 1fr;
    }

    .main-content {
        margin-top: 140px;
    }
}

/* Utilitários */
.text-center {
    text-align: center;
}

.mb-2 {
    margin-bottom: 1rem;
}

.mb-3 {
    margin-bottom: 1.5rem;
}

.mt-2 {
    margin-top: 1rem;
}

.hidden {
    display: none;
}
