:root {
    --primary-color: #1a2a3a;
    --secondary-color: #2c3e50;
    --accent-color: #3498db;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --bg-color: #f4f7f6;
    --sidebar-bg: #1a2a3a;
    --sidebar-hover: rgba(255, 255, 255, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg-color);
    color: #333;
}

.admin-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    background: var(--sidebar-bg);
    color: white;
    padding: 2rem 1rem;
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 3rem;
    color: white;
}

.nav-menu {
    list-style: none;
    flex-grow: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.8rem 1rem;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
}

.nav-item:hover,
.nav-item.active {
    background: var(--sidebar-hover);
    color: white;
}

/* Submenus */
.nav-item-dropdown {
    display: flex;
    flex-direction: column;
    margin-bottom: 0.5rem;
}

.submenu {
    list-style: none;
    padding-left: 2.8rem;
    padding-top: 0.2rem;
    padding-bottom: 0.5rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.nav-item-dropdown:hover .submenu {
    max-height: 200px;
}

.submenu li {
    padding: 0.6rem 0;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: color 0.3s;
}

.submenu li:hover {
    color: white;
}

/* Main Content */
.main-content {
    padding: 2rem;
    min-height: 100vh;
    background: var(--bg-color);
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    background: white;
    padding: 1.2rem 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    text-align: center;
}

.content-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

/* Badges */
.badge {
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-draft {
    background: #e0e0e0;
    color: #616161;
}

.badge-pending {
    background: #fff3e0;
    color: #ef6c00;
}

.badge-published {
    background: #e8f5e9;
    color: #2e7d32;
}

.badge-revision {
    background: #ffebee;
    color: #c62828;
}

/* Buttons */
.btn-primary {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 0.7rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
}

.btn-primary:hover {
    background: #2980b9;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

th {
    text-align: left;
    color: #7f8c8d;
    font-size: 0.85rem;
    padding: 1rem;
    border-bottom: 2px solid #f0f3f4;
}

td {
    padding: 0.8rem 1rem;
    border-bottom: 1px solid #f0f3f4;
    vertical-align: middle;
}

/* Modal System */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: none;
    /* Controlado via JS e ID */
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.modal-content {
    background: white;
    padding: 2.5rem;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    position: relative;
    animation: modalIn 0.3s ease;
}

@keyframes modalIn {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--primary-color);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.9rem;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

.btn-cancel {
    padding: 0.8rem 1.5rem;
    border: 1px solid #ddd;
    border-radius: 10px;
    background: white;
    cursor: pointer;
    font-weight: 600;
    transition: 0.3s;
}

.btn-save {
    padding: 0.8rem 2rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 700;
    transition: 0.3s;
}

.btn-save:hover {
    background: var(--sidebar-bg);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Estilos de Revisão e Notificação */
.row-revision {
    background-color: rgba(231, 76, 60, 0.1) !important;
}

.row-revision td {
    border-bottom: 2px solid var(--danger-color) !important;
}

.nav-item {
    position: relative;
}

.notification-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    background: var(--danger-color);
    color: white;
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 50%;
    font-weight: 800;
    display: none;
    /* Ativado via JS se houver notificações */
    border: 2px solid var(--sidebar-bg);
}

.clickable-row {
    cursor: pointer;
    transition: background 0.2s;
}

.clickable-row:hover {
    background: rgba(0, 0, 0, 0.02);
}