fix(admin): alinhar menu lateral a esquerda, adicionar modo Claro/Escuro e visibilidade total dos botoes no admin
Build and Deploy (Gitea Actions) / build-and-deploy (push) Successful in 2m39s
Details
Build and Deploy (Gitea Actions) / build-and-deploy (push) Successful in 2m39s
Details
This commit is contained in:
parent
dfe35e9acc
commit
e7b3aee448
|
|
@ -1,6 +1,6 @@
|
|||
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');
|
||||
|
||||
:root {
|
||||
:root, [data-theme="dark"] {
|
||||
--bg-primary: #080810;
|
||||
--bg-secondary: #0e0e1a;
|
||||
--bg-card: #141425;
|
||||
|
|
@ -9,8 +9,8 @@
|
|||
--border-color: rgba(255,255,255,0.06);
|
||||
--border-active: rgba(245,158,11,0.5);
|
||||
--text-primary: #f0f0f5;
|
||||
--text-secondary: #8888a0;
|
||||
--text-muted: #55556a;
|
||||
--text-secondary: #cbd5e1;
|
||||
--text-muted: #64748b;
|
||||
--accent: #f59e0b;
|
||||
--accent-hover: #d97706;
|
||||
--accent-glow: rgba(245,158,11,0.15);
|
||||
|
|
@ -30,6 +30,32 @@
|
|||
--radius-xl: 24px;
|
||||
}
|
||||
|
||||
[data-theme="light"] {
|
||||
--bg-primary: #f8fafc;
|
||||
--bg-secondary: #ffffff;
|
||||
--bg-card: #ffffff;
|
||||
--bg-card-hover: #f1f5f9;
|
||||
--bg-elevated: #e2e8f0;
|
||||
--border-color: #cbd5e1;
|
||||
--border-active: #f59e0b;
|
||||
--text-primary: #0f172a;
|
||||
--text-secondary: #334155;
|
||||
--text-muted: #64748b;
|
||||
--accent: #f59e0b;
|
||||
--accent-hover: #d97706;
|
||||
--accent-glow: rgba(245,158,11,0.15);
|
||||
--success: #16a34a;
|
||||
--success-bg: rgba(22,163,74,0.1);
|
||||
--warning: #d97706;
|
||||
--warning-bg: rgba(217,119,6,0.1);
|
||||
--danger: #dc2626;
|
||||
--danger-bg: rgba(220,38,38,0.1);
|
||||
--info: #2563eb;
|
||||
--info-bg: rgba(37,99,235,0.1);
|
||||
--gradient-primary: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
|
||||
--shadow-glow: 0 0 20px rgba(245,158,11,0.1);
|
||||
}
|
||||
|
||||
* { margin: 0; padding: 0; box-sizing: border-box; }
|
||||
html, body { height: 100%; }
|
||||
|
||||
|
|
@ -63,9 +89,12 @@ body {
|
|||
.sidebar-nav { flex: 1; padding: 16px 12px; overflow-y: auto; }
|
||||
.nav-section-title { font-size: 11px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1.2px; padding: 16px 12px 8px; }
|
||||
.nav-item {
|
||||
display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--radius-sm);
|
||||
display: flex !important; align-items: center !important; justify-content: flex-start !important; text-align: left !important; gap: 12px; padding: 10px 12px; border-radius: var(--radius-sm);
|
||||
color: var(--text-secondary); font-size: 14px; font-weight: 500; cursor: pointer; border: none;
|
||||
background: none; width: 100%; text-align: left; transition: all 0.2s; text-decoration: none; font-family: inherit;
|
||||
background: none; width: 100%; transition: all 0.2s; text-decoration: none; font-family: inherit;
|
||||
}
|
||||
.sidebar .nav-item {
|
||||
justify-content: flex-start !important; text-align: left !important;
|
||||
}
|
||||
.nav-item:hover { background: var(--bg-card); color: var(--text-primary); }
|
||||
.nav-item.active { background: var(--accent-glow); color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }
|
||||
|
|
@ -104,22 +133,22 @@ body {
|
|||
.stat-value { font-size: 28px; font-weight: 800; letter-spacing: -1px; line-height: 1.2; }
|
||||
.stat-label { font-size: 13px; color: var(--text-secondary); margin-top: 2px; }
|
||||
|
||||
.btn, button:not(.tab):not(.toggle) {
|
||||
.btn, button:not(.tab):not(.toggle):not(.nav-item) {
|
||||
display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 8px 16px; border-radius: 6px;
|
||||
font-size: 13.5px; font-weight: 500; cursor: pointer; border: 1px solid transparent; background: transparent;
|
||||
box-shadow: none !important; outline: none; transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.08s ease; font-family: inherit; user-select: none;
|
||||
}
|
||||
.btn:active, button:not(.tab):not(.toggle):active {
|
||||
.btn:active, button:not(.tab):not(.toggle):not(.nav-item):active {
|
||||
transform: scale(0.95) !important;
|
||||
}
|
||||
.btn-primary { background: var(--accent); color: white; border: 1px solid transparent; }
|
||||
.btn-primary:hover { background: var(--accent-hover); color: white; filter: brightness(1.15); }
|
||||
.btn-secondary { background: rgba(255, 255, 255, 0.04); color: var(--text-primary); border: 1px solid var(--border-color); }
|
||||
.btn-secondary:hover { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.2); color: white; }
|
||||
.btn-danger { background: rgba(239, 68, 68, 0.1); color: #ef4444; border: 1px solid rgba(239, 68, 68, 0.25); }
|
||||
.btn-danger:hover { background: rgba(239, 68, 68, 0.25); border-color: rgba(239, 68, 68, 0.5); color: #f87171; }
|
||||
.btn-ghost { background: rgba(255, 255, 255, 0.03); color: var(--text-secondary); border: 1px solid rgba(255, 255, 255, 0.08); padding: 6px 10px; }
|
||||
.btn-ghost:hover { color: var(--text-primary); background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.25); }
|
||||
.btn-secondary { background: var(--bg-elevated); color: var(--text-primary); border: 1px solid var(--border-color); }
|
||||
.btn-secondary:hover { background: var(--border-color); color: var(--text-primary); }
|
||||
.btn-danger { background: var(--danger-bg); color: var(--danger); border: 1px solid rgba(239, 68, 68, 0.25); }
|
||||
.btn-danger:hover { background: var(--danger); color: white; }
|
||||
.btn-ghost { background: transparent; color: var(--text-secondary); border: 1px solid transparent; padding: 6px 10px; }
|
||||
.btn-ghost:hover { color: var(--text-primary); background: var(--bg-elevated); border-color: var(--border-color); }
|
||||
.btn-ghost[style*="danger"], .btn-ghost[style*="239, 68, 68"], .btn-ghost.danger {
|
||||
background: rgba(239, 68, 68, 0.1) !important; border: 1px solid rgba(239, 68, 68, 0.2) !important; color: #ef4444 !important;
|
||||
}
|
||||
|
|
@ -287,3 +316,131 @@ tr:hover td { background: var(--bg-card-hover); }
|
|||
transform: translateY(0) scale(1);
|
||||
}
|
||||
}
|
||||
|
||||
/* === LIGHT THEME OVERRIDES FOR ADMIN === */
|
||||
[data-theme="light"] .sidebar {
|
||||
background: #ffffff;
|
||||
border-right: 1px solid #e2e8f0;
|
||||
}
|
||||
|
||||
[data-theme="light"] .topbar {
|
||||
background: rgba(255, 255, 255, 0.95);
|
||||
border-bottom: 1px solid #e2e8f0;
|
||||
}
|
||||
|
||||
[data-theme="light"] .nav-item {
|
||||
color: #475569 !important;
|
||||
}
|
||||
|
||||
[data-theme="light"] .nav-item:hover {
|
||||
background: #f1f5f9 !important;
|
||||
color: #0f172a !important;
|
||||
}
|
||||
|
||||
[data-theme="light"] .nav-item.active {
|
||||
background: rgba(245, 158, 11, 0.15) !important;
|
||||
color: #f59e0b !important;
|
||||
}
|
||||
|
||||
[data-theme="light"] .card {
|
||||
background: #ffffff;
|
||||
border-color: #e2e8f0;
|
||||
box-shadow: 0 1px 4px rgba(0,0,0,0.05);
|
||||
}
|
||||
|
||||
[data-theme="light"] .stat-card {
|
||||
background: #ffffff;
|
||||
border-color: #e2e8f0;
|
||||
}
|
||||
|
||||
[data-theme="light"] .form-input, [data-theme="light"] .form-select, [data-theme="light"] .form-textarea {
|
||||
background: #ffffff;
|
||||
border-color: #cbd5e1;
|
||||
color: #0f172a;
|
||||
}
|
||||
|
||||
[data-theme="light"] .btn-primary {
|
||||
background: #f59e0b !important;
|
||||
color: #ffffff !important;
|
||||
}
|
||||
|
||||
[data-theme="light"] .btn-primary:hover {
|
||||
background: #d97706 !important;
|
||||
color: #ffffff !important;
|
||||
}
|
||||
|
||||
[data-theme="light"] .btn-secondary {
|
||||
background: #f1f5f9 !important;
|
||||
color: #0f172a !important;
|
||||
border: 1px solid #cbd5e1 !important;
|
||||
}
|
||||
|
||||
[data-theme="light"] .btn-secondary:hover {
|
||||
background: #e2e8f0 !important;
|
||||
color: #0f172a !important;
|
||||
border-color: #94a3b8 !important;
|
||||
}
|
||||
|
||||
[data-theme="light"] .btn-ghost {
|
||||
background: transparent !important;
|
||||
color: #475569 !important;
|
||||
border: 1px solid transparent !important;
|
||||
}
|
||||
|
||||
[data-theme="light"] .btn-ghost:hover {
|
||||
background: #f1f5f9 !important;
|
||||
color: #0f172a !important;
|
||||
border-color: #cbd5e1 !important;
|
||||
}
|
||||
|
||||
[data-theme="light"] .btn-danger {
|
||||
background: #fee2e2 !important;
|
||||
color: #dc2626 !important;
|
||||
border: 1px solid #fca5a5 !important;
|
||||
}
|
||||
|
||||
[data-theme="light"] .btn-danger:hover {
|
||||
background: #dc2626 !important;
|
||||
color: #ffffff !important;
|
||||
}
|
||||
|
||||
[data-theme="light"] .tabs {
|
||||
border-bottom-color: #e2e8f0;
|
||||
}
|
||||
|
||||
[data-theme="light"] .tab {
|
||||
color: #475569;
|
||||
}
|
||||
|
||||
[data-theme="light"] .tab:hover {
|
||||
color: #0f172a;
|
||||
}
|
||||
|
||||
[data-theme="light"] .tab.active {
|
||||
color: #f59e0b;
|
||||
}
|
||||
|
||||
[data-theme="light"] table th {
|
||||
background: #f8fafc;
|
||||
color: #475569;
|
||||
border-bottom-color: #e2e8f0;
|
||||
}
|
||||
|
||||
[data-theme="light"] table td {
|
||||
border-bottom-color: #e2e8f0;
|
||||
color: #0f172a;
|
||||
}
|
||||
|
||||
[data-theme="light"] table tr:hover td {
|
||||
background: #f1f5f9;
|
||||
}
|
||||
|
||||
[data-theme="light"] .modal {
|
||||
background: #ffffff;
|
||||
border-color: #e2e8f0;
|
||||
box-shadow: 0 20px 40px rgba(0,0,0,0.15);
|
||||
}
|
||||
|
||||
[data-theme="light"] .modal-header, [data-theme="light"] .modal-footer {
|
||||
border-color: #e2e8f0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
'use client';
|
||||
import { useState, useEffect, useRef } from 'react';
|
||||
import { LayoutDashboard, Users, CreditCard, Package, Settings, Shield, TrendingUp, Bell, LogOut, User, CheckCircle, AlertCircle } from 'lucide-react';
|
||||
import { LayoutDashboard, Users, CreditCard, Package, Settings, Shield, TrendingUp, Bell, LogOut, User, CheckCircle, AlertCircle, Sun, Moon } from 'lucide-react';
|
||||
import { useRouter } from 'next/navigation';
|
||||
import AdminDashboard from '@/components/AdminDashboard';
|
||||
import Tenants from '@/components/Tenants';
|
||||
|
|
@ -40,6 +40,21 @@ export default function AdminPage() {
|
|||
const [adminName, setAdminName] = useState('Super Admin');
|
||||
const [adminEmail, setAdminEmail] = useState('admin@agendapro.com');
|
||||
|
||||
const [theme, setTheme] = useState<'dark' | 'light'>('dark');
|
||||
|
||||
useEffect(() => {
|
||||
const savedTheme = (localStorage.getItem('agendapro_admin_theme') as 'dark' | 'light') || 'dark';
|
||||
setTheme(savedTheme);
|
||||
document.documentElement.setAttribute('data-theme', savedTheme);
|
||||
}, []);
|
||||
|
||||
const toggleTheme = () => {
|
||||
const newTheme = theme === 'dark' ? 'light' : 'dark';
|
||||
setTheme(newTheme);
|
||||
localStorage.setItem('agendapro_admin_theme', newTheme);
|
||||
document.documentElement.setAttribute('data-theme', newTheme);
|
||||
};
|
||||
|
||||
const notifRef = useRef<HTMLDivElement>(null);
|
||||
const profileRef = useRef<HTMLDivElement>(null);
|
||||
|
||||
|
|
@ -208,6 +223,14 @@ export default function AdminPage() {
|
|||
<p>{pages[currentPage]?.subtitle}</p>
|
||||
</div>
|
||||
<div className="flex-gap">
|
||||
<button
|
||||
type="button"
|
||||
className="btn-ghost btn-icon"
|
||||
onClick={toggleTheme}
|
||||
title={theme === 'dark' ? 'Alternar para Modo Claro' : 'Alternar para Modo Escuro'}
|
||||
>
|
||||
{theme === 'dark' ? <Sun size={20} style={{ color: '#f59e0b' }} /> : <Moon size={20} style={{ color: '#6C63FF' }} />}
|
||||
</button>
|
||||
<div style={{ position: 'relative' }} ref={notifRef}>
|
||||
<button className="btn-ghost btn-icon" style={{ position: 'relative' }} onClick={handleNotificationClick}>
|
||||
<Bell size={20} />
|
||||
|
|
|
|||
Loading…
Reference in New Issue