:root {
    /* Brand Colors Neoenergia */
    --neo-green-dark: #007749;
    --neo-green-light: #509E2F;
    --neo-green-hover: #005F3A;
    --neo-yellow: #FFC72C;
    
    /* Backgrounds */
    --bg-main: #F4F6F8;
    --bg-card: #FFFFFF;
    
    /* Texts */
    --text-primary: #333333;
    --text-secondary: #666666;
    --text-muted: #999999;
    
    /* Status */
    --success: #007749; /* Usando o verde da marca como sucesso */
    --danger: #DC3545;
    --warning: #FFC72C;
    
    /* Borders */
    --border-color: #E2E8F0;
    --border-radius: 8px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    min-height: 100vh;
}

/* Layout Base (Sidebar) */
.app-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 250px;
    background-color: var(--neo-green-dark);
    color: white;
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
}

.sidebar .logo {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    text-align: center;
}

.sidebar .logo img {
    height: 48px;
    filter: brightness(0) invert(1);
}

.sidebar nav {
    display: flex;
    flex-direction: column;
    padding: 1rem 0;
    flex-grow: 1;
}

.sidebar nav a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 1rem 1.5rem;
    opacity: 0.85;
    transition: all 0.2s;
    border-left: 4px solid transparent;
}

.sidebar nav a:hover, .sidebar nav a.active {
    opacity: 1;
    background: rgba(255,255,255,0.05);
    border-left-color: var(--neo-yellow);
}

/* Main Content Area */
.main-content {
    flex-grow: 1;
    margin-left: 250px;
    padding: 2rem;
    width: calc(100% - 250px);
}

/* Container & Cards */
.container {
    max-width: 100%;
}

.card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.header-actions h2 {
    color: var(--neo-green-dark);
    font-size: 1.5rem;
}

/* Buttons */
.btn {
    background: var(--neo-green-dark);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.btn:hover {
    background: var(--neo-green-hover);
}

.btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.btn-danger {
    background: var(--danger);
}
.btn-danger:hover {
    background: #c82333;
}

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

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

input, select {
    width: 100%;
    padding: 0.85rem 1rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    background: #FFFFFF;
    color: var(--text-primary);
    font-size: 1rem;
    transition: border-color 0.2s;
}

input:focus, select:focus {
    outline: none;
    border-color: var(--neo-green-dark);
    box-shadow: 0 0 0 3px rgba(0, 119, 73, 0.1);
}

.password-group {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 1rem;
    top: 2.2rem;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.2rem;
}

/* Tables */
.table-container {
    overflow-x: auto;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

th {
    text-align: left;
    padding: 1rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    border-bottom: 2px solid var(--border-color);
    background: #f8fafc;
}

td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}

tr:hover td {
    background: #f8fafc;
}

.badge {
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    background: rgba(0, 119, 73, 0.1);
    color: var(--neo-green-dark);
}

/* Modal */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: white;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-header h3 {
    color: var(--neo-green-dark);
}

.btn-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
}

.btn-close:hover {
    color: var(--text-primary);
}

/* Login Page Specifics */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--neo-green-dark) 0%, var(--neo-green-light) 100%);
    padding: 1rem;
}

.login-card {
    background: white;
    padding: 2.5rem;
    border-radius: var(--border-radius);
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.login-card h2 {
    color: var(--neo-green-dark);
    text-align: center;
    margin-bottom: 2rem;
}
