* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Tela de Login */
.login-container {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.glass-panel {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    padding: 40px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    border: 1px solid rgba(255, 255, 255, 0.18);
    width: 100%;
    max-width: 400px;
}

.glass-panel h2, .glass-panel h3 {
    color: white;
    text-align: center;
    margin-bottom: 30px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: white;
    font-weight: 500;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.8);
    font-size: 16px;
}

.form-group input:focus {
    outline: none;
    background: white;
    box-shadow: 0 0 0 2px rgba(255,255,255,0.5);
}

.btn-login {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
}

.btn-login:hover {
    transform: translateY(-2px);
}

.links {
    margin-top: 20px;
    text-align: center;
}

.links a {
    color: white;
    text-decoration: none;
    margin: 0 10px;
    font-size: 14px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.links a:hover {
    text-decoration: underline;
}

.message {
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 20px;
    display: none;
}

.message.success {
    background: rgba(76, 175, 80, 0.9);
    color: white;
    display: block;
}

.message.error {
    background: rgba(244, 67, 54, 0.9);
    color: white;
    display: block;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    justify-content: center;
    align-items: center;
}

.modal-content {
    position: relative;
    width: 90%;
    max-width: 500px;
}

.close {
    position: absolute;
    right: 20px;
    top: 10px;
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

/* Dashboard */
.dashboard {
    display: flex;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.sidebar {
    width: 250px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.logo h3 {
    color: white;
    text-align: center;
    padding: 20px 0;
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

.nav-menu {
    flex: 1;
    margin-top: 30px;
    list-style: none;
}

.nav-menu li {
    margin-bottom: 10px;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    padding: 10px 15px;
    display: block;
    border-radius: 5px;
    transition: background 0.3s;
}

.nav-menu a:hover, .nav-menu a.active {
    background: rgba(255, 255, 255, 0.2);
}

.admin-section {
    margin-top: 30px;
}

.admin-section h4 {
    color: rgba(255,255,255,0.7);
    padding: 10px 15px;
    font-size: 14px;
}

.user-info {
    padding: 20px 0;
    border-top: 1px solid rgba(255,255,255,0.2);
    color: white;
    text-align: center;
}

.btn-logout {
    display: inline-block;
    margin-top: 10px;
    padding: 5px 15px;
    background: rgba(255,255,255,0.2);
    color: white;
    text-decoration: none;
    border-radius: 3px;
    font-size: 14px;
}

.content {
    flex: 1;
    padding: 30px;
}

.content header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    color: white;
}

.badge {
    padding: 5px 10px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
}

.badge.admin {
    background: #ffd700;
    color: #333;
}

.badge.user {
    background: #4caf50;
    color: white;
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    padding: 20px;
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
}

.card-value {
    font-size: 32px;
    font-weight: bold;
    margin-top: 10px;
}

.container {
      display: grid;
      place-items: center;
}

.recent-activity {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    padding: 20px;
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
}

.recent-activity h3 {
    margin-bottom: 20px;
}

.recent-activity table {
    width: 100%;
    border-collapse: collapse;
}

.recent-activity th,
.recent-activity td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

.recent-activity th {
    font-weight: 600;
    color: rgba(255,255,255,0.7);
}

.recent-activity td {
    color: white;
}


/* Dashboard com background */
.dashboard {
    display: flex;
    min-height: 100vh;
    background-image: url('../assets/bgimg.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
}

/* Overlay com desfoque */
.dashboard::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    backdrop-filter: blur(8px);
    background: rgba(255, 255, 255, 0.1);
    z-index: 0;
}

/* Sidebar com efeito glass */
.sidebar {
    width: 280px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(12px);
    padding: 25px;
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    z-index: 1;
    box-shadow: 4px 0 15px rgba(0, 0, 0, 0.1);
}

.logo {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.logo img {
    width: 150px;
    height: auto;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}

.user-info {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 25px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.user-info .user-name {
    color: white;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 5px;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.3);
}

.user-info .user-role {
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
    background: rgba(255, 255, 255, 0.2);
    display: inline-block;
    padding: 3px 12px;
    border-radius: 15px;
    margin-top: 5px;
}

.user-info .user-role.admin {
    background: #ffd700;
    color: #333;
}

.nav-menu {
    flex: 1;
    list-style: none;
}

.nav-menu li {
    margin-bottom: 8px;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    padding: 12px 15px;
    display: block;
    border-radius: 8px;
    transition: all 0.3s;
    font-weight: 500;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
    border: 1px solid transparent;
}

.nav-menu a:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateX(5px);
}

.nav-menu a.active {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
    font-weight: 600;
}

.nav-menu a i {
    margin-right: 10px;
    width: 20px;
    display: inline-block;
}

.admin-section {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.admin-section h4 {
    color: rgba(255, 255, 255, 0.9);
    padding: 0 15px 10px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.btn-logout {
    display: block;
    margin-top: 20px;
    padding: 12px;
    background: rgba(220, 53, 69, 0.8);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    transition: all 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-logout:hover {
    background: rgba(220, 53, 69, 1);
    transform: translateY(-2px);
}

/* Conteúdo principal */
.content {
    flex: 1;
    padding: 30px;
    position: relative;
    z-index: 1;
    overflow-y: auto;
}

.content header {
    margin-bottom: 30px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    padding: 20px 25px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.content header h1 {
    color: white;
    font-size: 28px;
    font-weight: 600;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    margin: 0;
}

.content header p {
    color: rgba(255, 255, 255, 0.9);
    margin-top: 5px;
    font-size: 14px;
}

/* Cards de funções - Versão corrigida */
.functions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 25px;
    margin-top: 25px;
}

.function-card {
    background: rgba(255, 255, 255, 0.9); /* Fundo mais claro */
    backdrop-filter: blur(8px);
    border-radius: 15px;
    padding: 25px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.3);
    text-decoration: none;
    color: #2c5530; /* Verde escuro para o texto */
    display: block;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.function-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.95);
    border-color: #2c5530;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.function-card .icon {
    width: 90px;
    height: 90px;
    margin: 0 auto 20px;
    background: rgba(44, 85, 48, 0.1); /* Verde claro transparente */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(44, 85, 48, 0.2);
    transition: all 0.3s;
}

.function-card:hover .icon {
    border-color: #2c5530;
    background: rgba(44, 85, 48, 0.15);
}

.function-card .icon img {
    width: 55px;
    height: 55px;
    object-fit: contain;
    /* Removido o filter que colocava máscara branca */
}

.function-card h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2c5530; /* Verde escuro */
}

.function-card p {
    font-size: 14px;
    color: #4a6b4e; /* Verde médio */
    line-height: 1.4;
}

/* Header do dashboard */
.content header {
    margin-bottom: 30px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    padding: 25px 30px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.content header h1 {
    color: #2c5530; /* Verde escuro */
    font-size: 28px;
    font-weight: 600;
    margin: 0;
}

.content header p {
    color: #4a6b4e; /* Verde médio */
    margin-top: 8px;
    font-size: 15px;
}

/* Sidebar ajustes */
.sidebar {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    border-right: 1px solid rgba(44, 85, 48, 0.2);
}

.nav-menu a {
    color: #2c5530;
    font-weight: 500;
}

.nav-menu a:hover {
    background: rgba(44, 85, 48, 0.1);
    border-color: rgba(44, 85, 48, 0.2);
}

.nav-menu a.active {
    background: rgba(44, 85, 48, 0.15);
    border-color: rgba(44, 85, 48, 0.3);
    font-weight: 600;
    color: #1e3a21;
}

.admin-section h4 {
    color: #2c5530;
    opacity: 0.8;
}

/* User info no sidebar */
.user-info {
    background: rgba(44, 85, 48, 0.1);
    border: 1px solid rgba(44, 85, 48, 0.2);
}

.user-info .user-name {
    color: #2c5530;
}

.user-info .user-role {
    color: #4a6b4e;
    background: rgba(44, 85, 48, 0.15);
}

.user-info .user-role.admin {
    background: #ffd700;
    color: #333;
}

/* Botão logout */
.btn-logout {
    background: rgba(44, 85, 48, 0.8);
    color: white;
}

.btn-logout:hover {
    background: #2c5530;
}

/* Logo ajuste */
.logo {
    border-bottom: 1px solid rgba(44, 85, 48, 0.2);
}

.logo img {
    filter: none; /* Remove qualquer filtro */
}

/* Modal de administração */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 30px;
    width: 90%;
    max-width: 450px;
    position: relative;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.modal-content h3 {
    color: #333;
    margin-bottom: 20px;
    font-size: 22px;
    text-align: center;
}

.modal-content .form-group {
    margin-bottom: 20px;
}

.modal-content .form-group label {
    display: block;
    margin-bottom: 5px;
    color: #555;
    font-weight: 500;
}

.modal-content .form-group input,
.modal-content .form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

.modal-content .form-group input:focus,
.modal-content .form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.modal-content .btn-primary {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
}

.modal-content .btn-primary:hover {
    transform: translateY(-2px);
}

.modal-content .close {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #999;
}

.modal-content .close:hover {
    color: #333;
}

.message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 3000;
    animation: slideIn 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.message.success {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
}

.message.error {
    background: linear-gradient(135deg, #f44336 0%, #da190b 100%);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}