/* Importação de Variáveis do CSS Global */
/* NOTA: Assumimos que as variáveis de cor (ex: --color-bg, --color-primary)
   estão definidas no arquivo style.css principal, que deve ser importado. */

/* --- Admin Login --- */
.admin-login-body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: var(--color-bg);
}
.login-container {
    background: var(--color-surface);
    padding: 2.5rem;
    border-radius: 10px;
    width: 100%;
    max-width: 400px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.login-container h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--color-primary);
}
.login-container .btn {
    width: 100%;
}
.error-message {
    color: #FF6B6B;
    font-size: 0.9rem;
    text-align: center;
    margin-top: 1rem;
    display: none;
}

/* --- Admin Dashboard Layout --- */
.admin-dashboard-body {
    display: flex;
    background: #0A0A12; /* Fundo ainda mais escuro para o admin */
}
.admin-sidebar {
    width: 250px;
    background: var(--color-surface);
    min-height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1001;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}
.sidebar-header {
    padding: 1.5rem;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.sidebar-header h3 {
    color: var(--color-primary);
    font-size: 1.5rem;
}
.sidebar-nav ul {
    list-style: none;
    padding-top: 1rem;
}
.sidebar-nav li a {
    display: block;
    padding: 1rem 1.5rem;
    color: var(--color-text-muted);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}
.sidebar-nav li a:hover,
.sidebar-nav li a.active {
    background: rgba(0, 191, 255, 0.1);
    color: var(--color-primary);
    border-left-color: var(--color-primary);
}
#logout-button {
    color: #FF6B6B;
}

.admin-content {
    margin-left: 250px;
    flex-grow: 1;
    padding: 2rem;
}

.admin-section {
    display: none;
}
.admin-section.active {
    display: block;
}
.admin-section h2 {
    font-size: 2rem;
    color: var(--color-primary);
    margin-bottom: 2rem;
}

/* --- Estatísticas e Gráficos --- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}
.stat-card {
    background: var(--color-surface);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.stat-card h4 {
    color: var(--color-text-muted);
    font-size: 1rem;
    margin-bottom: 0.5rem;
}
.stat-card p {
    font-size: 2rem;
    font-weight: 700;
}
#stat-ganhos { color: #4CAF50; }
#stat-gastos { color: #FF6B6B; }
#stat-balanco { color: var(--color-primary); }

.chart-container {
    background: var(--color-surface);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

/* --- Formulários Admin --- */
.admin-form {
    background: var(--color-surface);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}
.admin-form h3 {
    margin-bottom: 1rem;
    color: var(--color-primary);
}
.admin-form input,
.admin-form textarea,
.admin-form select {
    margin-bottom: 1rem;
}
.form-group-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 1.5rem;
}
.form-group-checkbox input[type="checkbox"] {
    width: auto;
    margin-bottom: 0;
}
.form-group-checkbox label {
    margin-bottom: 0;
    font-weight: normal;
}

/* --- Listagem (Entregas, Produtos, etc) --- */
#entregas-container, 
#lista-produtos, 
#lista-portfolio,
#lista-transacoes-manuais,
#lista-cupons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--color-surface);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    flex-wrap: wrap;
    gap: 1rem;
}
.list-item-info {
    flex-grow: 1;
}
.list-item-info p {
    font-weight: 600;
    font-size: 1.1rem;
}
.list-item-info span {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    display: block;
}
.list-item-info span .status-active {
    color: #4CAF50;
    font-weight: 600;
}
.list-item-info span .status-inactive {
    color: #FF6B6B;
    font-weight: 600;
}
.list-item-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}
.list-item-actions .btn {
    padding: 8px 12px;
    font-size: 0.9rem;
}
.btn-delete {
    background: #FF6B6B;
    color: white;
}
.btn-edit {
    background: #FFC107;
    color: #0F0F1A;
}

.admin-input-small {
    padding: 8px;
    background: var(--color-bg);
    min-width: 250px;
}

/* --- Modal do Briefing --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    padding: 1rem;
}
.modal-content {
    background: var(--color-surface);
    padding: 2.5rem;
    border-radius: 10px;
    width: 90%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.modal-close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2rem;
    color: var(--color-text-muted);
    cursor: pointer;
    transition: color 0.3s ease;
}
.modal-close-btn:hover {
    color: var(--color-primary);
}
.modal-content h2 {
    margin-bottom: 2rem;
}
.briefing-item {
    margin-bottom: 1.5rem;
}
.briefing-item h4 {
    font-size: 1rem;
    color: var(--color-primary);
    margin-bottom: 0.5rem;
    font-weight: 600;
}
.briefing-item p {
    font-size: 1rem;
    color: var(--color-text);
    background: var(--color-bg);
    padding: 10px;
    border-radius: 5px;
    white-space: pre-wrap;
}
.briefing-item p.not-filled {
    color: var(--color-text-muted);
    font-style: italic;
}