/* Reset e configurações gerais */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Login Page */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-container {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
}

.login-container h1 {
    color: #333;
    margin-bottom: 10px;
    text-align: center;
}

.login-container h2 {
    color: #666;
    margin-bottom: 30px;
    text-align: center;
    font-size: 1.2rem;
    font-weight: normal;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.login-info {
    margin-top: 20px;
    text-align: center;
    color: #666;
    font-size: 0.9rem;
}

/* Formulários */
.form-group {
	margin-bottom: 20px;
	margin-top: 10px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #555;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.form-group textarea {
    min-height: 200px;
    resize: vertical;
}

.current-image {
    margin-top: 10px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 5px;
}

.current-image p {
    margin-bottom: 5px;
    font-size: 0.9rem;
    color: #666;
}

/* Botões */
.btn {
    display: inline-block;
    padding: 10px 20px;
    background: #667eea;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s;
}

.btn:hover {
    background: #5a67d8;
}

.btn-large {
    padding: 15px 30px;
    font-size: 18px;
}

.btn-small {
    padding: 5px 10px;
    font-size: 14px;
}

.btn-danger {
    background: #e53e3e;
}

.btn-danger:hover {
    background: #c53030;
}

.btn-cancel {
    background: #a0aec0;
}

.btn-cancel:hover {
    background: #718096;
}

.logout {
    background: #e53e3e;
}

.logout:hover {
    background: #c53030;
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 20px;
}

/* Alertas */
.alert {
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.alert.success {
    background: #c6f6d5;
    color: #22543d;
    border: 1px solid #9ae6b4;
}

.alert.error {
    background: #fed7d7;
    color: #742a2a;
    border: 1px solid #fc8181;
}

/* Header */
.admin-header {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.admin-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
}

.admin-header h1 {
    font-size: 1.5rem;
    color: #333;
}

.admin-header nav {
    display: flex;
    gap: 15px;
    align-items: center;
}

.main-header {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 40px;
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
}

.main-header h1 {
    color: #333;
    font-size: 2rem;
}

.main-header nav {
    display: flex;
    gap: 20px;
}

.main-header nav a {
    color: #666;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.main-header nav a:hover {
    color: #667eea;
}

/* Dashboard */
.dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stats-card {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    text-align: center;
}

.stats-card h3 {
    color: #666;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: #667eea;
}

.quick-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
}

/* Tabela de notícias */
.crud-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.news-table {
    width: 100%;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.news-table thead {
    background: #667eea;
    color: white;
}

.news-table th,
.news-table td {
    padding: 15px;
    text-align: left;
}

.news-table tbody tr {
    border-bottom: 1px solid #eee;
}

.news-table tbody tr:hover {
    background: #f8f9fa;
}

.news-table .actions {
    display: flex;
    gap: 5px;
}

.no-data {
    text-align: center;
    padding: 40px;
    color: #666;
    background: white;
    border-radius: 10px;
}

/* Formulário de notícias */
.news-form {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

/* Grid de notícias (página principal) */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

.news-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.news-card-image {
    height: 200px;
    overflow: hidden;
}

.news-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.news-card:hover .news-card-image img {
    transform: scale(1.05);
}

.news-card-content {
    padding: 25px;
}

.news-card-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 0.9rem;
    color: #666;
}

.news-card-date {
    display: flex;
    align-items: center;
    gap: 5px;
}

.news-card h2 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: #333;
    line-height: 1.3;
}

.news-card-subtitle {
    color: #666;
    margin-bottom: 15px;
    font-size: 1rem;
    font-style: italic;
}

.news-card-excerpt {
    color: #666;
    margin-bottom: 20px;
    line-height: 1.6;
}

.news-card-button {
    display: inline-block;
    background: #667eea;
    color: white;
    padding: 8px 15px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: background 0.3s;
}

.news-card-button:hover {
    background: #5a67d8;
}

/* Detalhes da notícia */
.news-detail {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    margin: 40px 0;
}

.news-image {
    height: 400px;
    overflow: hidden;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-content {
    padding: 40px;
}

.news-meta {
    margin-bottom: 20px;
    color: #666;
}

.news-date {
    display: flex;
    align-items: center;
    gap: 5px;
}

.news-detail h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: #333;
    line-height: 1.2;
}

.news-detail h2 {
    font-size: 1.5rem;
    margin-bottom: 30px;
    color: #666;
    font-weight: normal;
    font-style: italic;
}

.news-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #444;
    margin-bottom: 30px;
}

.news-text p {
    margin-bottom: 20px;
}

.no-news {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.no-news i {
    margin-bottom: 20px;
    color: #cbd5e0;
}

.no-news h2 {
    margin-bottom: 10px;
    font-size: 1.5rem;
}

/* Footer */
.main-footer {
    background: #333;
    color: white;
    padding: 30px 0;
    margin-top: 60px;
    text-align: center;
}

.main-footer p {
    opacity: 0.8;
}

/* Responsividade */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .admin-header .container,
    .main-header .container {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .admin-header nav,
    .main-header nav {
        flex-direction: column;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
    }
    
    .news-detail h1 {
        font-size: 2rem;
    }
    
    .news-content {
        padding: 25px;
    }
    
    .quick-actions {
        flex-direction: column;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .news-table {
        display: block;
        overflow-x: auto;
    }
}
