:root {
    --primary-color: #4ECDC4;
    --secondary-color: #E63946;
    --accent-color: #45B7D1;
    --success-color: #198754;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-bg: #F8F9FA;
    --card-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    --text-dark: #2C3E50;
    --text-light: #7F8C8D;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: linear-gradient(135deg, #F5F7FA 0%, #E8F4F8 100%);
    min-height: 100vh;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-dark);
}

/* Login */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(78, 205, 196, 0.15);
    padding: 50px 40px;
    width: 100%;
    max-width: 480px;
    animation: fadeIn 0.6s ease;
    border-top: 5px solid var(--primary-color);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}

.login-logo {
    text-align: center;
    margin-bottom: 35px;
}

.login-logo img {
    max-height: 120px;
    max-width: 280px;
    object-fit: contain;
    margin-bottom: 15px;
}

.login-icon {
    font-size: 4rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    display: block;
}

.login-logo h2 {
    color: var(--text-dark);
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.login-logo p {
    color: var(--text-light);
    font-size: 0.95rem;
}

.form-control {
    border-radius: 12px;
    padding: 14px 18px;
    border: 2px solid #E8F4F8;
    transition: all 0.3s;
    font-size: 1rem;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(78, 205, 196, 0.25);
    outline: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border: none;
    border-radius: 12px;
    padding: 14px;
    font-weight: 600;
    transition: all 0.3s;
    color: white;
    box-shadow: 0 4px 15px rgba(78, 205, 196, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(78, 205, 196, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color), #28a745);
    border: none;
    border-radius: 12px;
    padding: 14px;
    font-weight: 600;
    color: white;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

/* Navbar */
.navbar-custom {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    box-shadow: 0 2px 15px rgba(78, 205, 196, 0.3);
    padding: 15px 0;
}

.navbar-custom .navbar-brand {
    font-weight: 700;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.navbar-custom .navbar-brand img {
    height: 45px;
    object-fit: contain;
}

/* Cards */
.dashboard-card {
    background: white;
    border-radius: 15px;
    box-shadow: var(--card-shadow);
    border: none;
    padding: 30px;
    margin-bottom: 25px;
}

.stat-card {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 25px;
    box-shadow: var(--card-shadow);
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card:nth-child(2) {
    background: linear-gradient(135deg, var(--success-color), #28a745);
}

.stat-card:nth-child(3) {
    background: linear-gradient(135deg, var(--warning-color), #FFD93D);
    color: #2C3E50;
}

.stat-card:nth-child(4) {
    background: linear-gradient(135deg, var(--secondary-color), #FF6B6B);
}

.stat-icon {
    font-size: 3rem;
    opacity: 0.9;
}

/* Sidebar */
.sidebar {
    background: white;
    border-radius: 15px;
    box-shadow: var(--card-shadow);
    padding: 25px;
    margin-bottom: 25px;
}

.sidebar .nav-link {
    color: var(--text-dark);
    padding: 14px 20px;
    border-radius: 10px;
    margin-bottom: 8px;
    transition: all 0.3s;
    font-weight: 500;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    transform: translateX(5px);
}

.sidebar .nav-link i {
    margin-right: 12px;
    width: 20px;
    text-align: center;
}

/* Greeting */
.greeting-card {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    border-radius: 20px;
    padding: 35px;
    margin-bottom: 30px;
    box-shadow: 0 5px 20px rgba(78, 205, 196, 0.3);
}

.greeting-icon {
    font-size: 3.5rem;
    margin-bottom: 15px;
}

/* Exam Cards */
.exam-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 20px;
    border-left: 5px solid var(--primary-color);
    box-shadow: var(--card-shadow);
    transition: all 0.3s;
}

.exam-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.12);
}

.exam-card.ready {
    border-left-color: var(--success-color);
}

.exam-card.pending {
    border-left-color: var(--warning-color);
}

.status-badge {
    padding: 8px 18px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.status-ready {
    background: #D4F1E8;
    color: #2D7A5F;
}

.status-pending {
    background: var(--warning-color);
    color: #8B6914;
}

/* Tables */
.table thead th {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    border: none;
    padding: 15px;
    font-weight: 600;
}

.table tbody td {
    padding: 15px;
    vertical-align: middle;
    border-color: #E8F4F8;
}

.table-hover tbody tr:hover {
    background: #F8F9FA;
}

/* Action Buttons */
.action-btn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    margin: 0 3px;
    border: none;
    cursor: pointer;
}

.action-btn:hover {
    transform: scale(1.1);
}

.btn-edit {
    background: var(--warning-color);
    color: #8B6914;
}

.btn-delete {
    background: var(--danger-color);
    color: white;
}

.btn-view {
    background: var(--primary-color);
    color: white;
}

/* Search */
.search-box {
    position: relative;
    margin-bottom: 25px;
}

.search-box input {
    padding-left: 45px;
    border-radius: 12px;
    border: 2px solid #E8F4F8;
    padding: 12px 18px;
    width: 100%;
}

.search-box i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
}

/* Copyright Footer - FIXO */
.copyright-footer {
    text-align: center;
    padding: 25px;
    background: linear-gradient(135deg, #2C3E50, #34495E);
    color: rgba(255,255,255,0.9);
    font-size: 0.9rem;
    margin-top: 50px;
}

.copyright-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.copyright-footer a:hover {
    text-decoration: underline;
}

/* Recibo */
.recibo-container {
    background: white;
    border: 2px solid var(--primary-color);
    border-radius: 15px;
    padding: 30px;
    max-width: 600px;
    margin: 0 auto;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.recibo-header {
    text-align: center;
    border-bottom: 3px solid var(--primary-color);
    padding-bottom: 20px;
    margin-bottom: 25px;
}

.recibo-header img {
    max-height: 80px;
    margin-bottom: 10px;
}

.recibo-header h1 {
    color: var(--text-dark);
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.recibo-highlight {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    padding: 15px;
    border-radius: 10px;
    margin: 20px 0;
    text-align: center;
}

.login-info {
    background: #F8F9FA;
    padding: 15px;
    border-radius: 10px;
    border-left: 4px solid var(--primary-color);
    margin: 20px 0;
}

.login-credentials {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 15px 0;
}

.credential-box {
    background: white;
    padding: 12px;
    border-radius: 8px;
    border: 2px solid #E8F4F8;
    text-align: center;
}

.credential-label {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-bottom: 5px;
}

.credential-value {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-dark);
}

.btn-print {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border: none;
    padding: 12px 35px;
    font-size: 1rem;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(78, 205, 196, 0.3);
    transition: all 0.3s;
}

.btn-print:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(78, 205, 196, 0.4);
}

@media print {
    .no-print { display: none !important; }
    body { background: white; padding: 0; }
    .recibo-container { border: 2px solid #000; box-shadow: none; max-width: 100%; }
}

@media (max-width: 768px) {
    .login-card { padding: 40px 25px; }
    .stat-card { padding: 20px; }
    .greeting-card { padding: 25px; }
}

/* Botões de Exame Uniformes */
.exam-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
    flex-wrap: wrap;
}

.btn-exam {
    flex: 1;
    min-width: 100px;
    padding: 10px 15px;
    border-radius: 10px;
    font-weight: 500;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.3s;
    text-decoration: none;
    border: none;
    cursor: pointer;
}

.btn-view {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
}

.btn-download {
    background: linear-gradient(135deg, #6c757d, #5a6268);
    color: white;
}

.btn-print {
    background: linear-gradient(135deg, var(--secondary-color), #FF6B6B);
    color: white;
}

.btn-exam:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    color: white;
}

/* Relatórios */
.report-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: var(--card-shadow);
    border-top: 4px solid var(--primary-color);
}

.stat-box {
    text-align: center;
    padding: 20px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.stat-box h3 { font-size: 2rem; margin: 10px 0 5px; }
.stat-box.small { padding: 15px; }
.stat-box.small h3 { font-size: 1.5rem; }

.tab-relatorios .nav-link {
    border: none;
    color: #666;
    font-weight: 500;
    padding: 12px 25px;
    border-radius: 10px 10px 0 0;
    margin-right: 5px;
}

.tab-relatorios .nav-link.active {
    background: white;
    color: var(--primary-color);
    font-weight: 600;
    border-bottom: 3px solid var(--primary-color);
}

.tab-content {
    background: white;
    border-radius: 0 15px 15px 15px;
    padding: 25px;
    box-shadow: var(--card-shadow);
}

.badge-acesso { 
    padding: 6px 14px; 
    border-radius: 20px; 
    font-size: 0.8rem;
    font-weight: 500;
}

.badge-login { background: #d1f0eb; color: #0d6e5a; }
.badge-view { background: #e3f2fd; color: #1976d2; }
.badge-download { background: #fff3e0; color: #e65100; }
.badge-print { background: #f3e5f5; color: #7b1fa2; }

.filter-bar {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 20px;
}

/* Configurações de Cor */
.color-preview {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    border: 3px solid white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: inline-block;
    margin-left: 10px;
    vertical-align: middle;
}

.color-input-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
}

.form-control-color {
    width: 80px;
    height: 50px;
    padding: 5px;
    border-radius: 10px;
    cursor: pointer;
}
