- Migrate from React CRA to Next.js 15 with modern architecture - Implement comprehensive shadcn/ui component library - Create complete dashboard system with layouts and navigation - Build authentication pages (login, register) with proper forms - Implement vote management pages (active, upcoming, history, archives) - Add user profile management with security settings - Configure Tailwind CSS with custom dark theme (accent: #e8704b) - Setup TypeScript with strict type checking - Backup old React-based frontend to .backups/frontend-old - All pages compile successfully and build passes linting Pages created: - Home page with hero section and features - Authentication (login/register) - Dashboard with stats and vote cards - Vote management (active, upcoming, history, archives) - User profile with form validation 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
464 lines
7.7 KiB
CSS
464 lines
7.7 KiB
CSS
/* ===== Dashboard Page Styles ===== */
|
|
|
|
.dashboard-page {
|
|
background-color: var(--light-gray);
|
|
min-height: 100vh;
|
|
padding: var(--spacing-xl) 0;
|
|
}
|
|
|
|
.dashboard-header {
|
|
margin-bottom: var(--spacing-2xl);
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
flex-wrap: wrap;
|
|
gap: var(--spacing-lg);
|
|
}
|
|
|
|
.dashboard-header h1 {
|
|
color: var(--primary-dark);
|
|
font-size: 2.5rem;
|
|
}
|
|
|
|
.dashboard-header p {
|
|
color: var(--dark-gray);
|
|
font-size: 1.1rem;
|
|
margin: 0;
|
|
}
|
|
|
|
/* ===== Stats Grid ===== */
|
|
|
|
.stats-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
|
|
gap: var(--spacing-lg);
|
|
margin-bottom: var(--spacing-2xl);
|
|
}
|
|
|
|
.stat-card {
|
|
background-color: var(--white);
|
|
border-radius: var(--radius-xl);
|
|
padding: var(--spacing-lg);
|
|
box-shadow: var(--shadow-md);
|
|
display: flex;
|
|
gap: var(--spacing-lg);
|
|
align-items: flex-start;
|
|
transition: all 0.3s ease;
|
|
border-left: 4px solid var(--border-gray);
|
|
}
|
|
|
|
.stat-card:hover {
|
|
box-shadow: var(--shadow-lg);
|
|
transform: translateY(-4px);
|
|
}
|
|
|
|
.stat-icon {
|
|
width: 60px;
|
|
height: 60px;
|
|
border-radius: var(--radius-lg);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
flex-shrink: 0;
|
|
font-size: 1.5rem;
|
|
}
|
|
|
|
.stat-icon.active {
|
|
background-color: rgba(16, 185, 129, 0.1);
|
|
color: var(--success-green);
|
|
}
|
|
|
|
.stat-icon.future {
|
|
background-color: rgba(37, 99, 235, 0.1);
|
|
color: var(--primary-blue);
|
|
}
|
|
|
|
.stat-icon.completed {
|
|
background-color: rgba(34, 197, 94, 0.1);
|
|
color: #22c55e;
|
|
}
|
|
|
|
.stat-icon.total {
|
|
background-color: rgba(249, 115, 22, 0.1);
|
|
color: var(--warning-orange);
|
|
}
|
|
|
|
.stat-content {
|
|
flex-grow: 1;
|
|
}
|
|
|
|
.stat-value {
|
|
font-size: 2.5rem;
|
|
font-weight: 800;
|
|
color: var(--primary-dark);
|
|
line-height: 1;
|
|
margin-bottom: var(--spacing-sm);
|
|
}
|
|
|
|
.stat-label {
|
|
font-size: 0.95rem;
|
|
color: var(--dark-gray);
|
|
margin-bottom: var(--spacing-md);
|
|
}
|
|
|
|
.stat-link {
|
|
display: inline-block;
|
|
color: var(--primary-blue);
|
|
font-weight: 600;
|
|
font-size: 0.9rem;
|
|
text-decoration: none;
|
|
transition: all 0.2s ease;
|
|
}
|
|
|
|
.stat-link:hover {
|
|
color: var(--primary-dark);
|
|
text-decoration: underline;
|
|
}
|
|
|
|
/* ===== Tabs ===== */
|
|
|
|
.dashboard-tabs {
|
|
display: flex;
|
|
gap: var(--spacing-md);
|
|
margin-bottom: var(--spacing-xl);
|
|
border-bottom: 2px solid var(--border-gray);
|
|
overflow-x: auto;
|
|
-webkit-overflow-scrolling: touch;
|
|
}
|
|
|
|
.tab {
|
|
padding: var(--spacing-md) var(--spacing-lg);
|
|
background: none;
|
|
border: none;
|
|
border-bottom: 3px solid transparent;
|
|
cursor: pointer;
|
|
color: var(--dark-gray);
|
|
font-weight: 600;
|
|
font-size: 0.95rem;
|
|
transition: all 0.3s ease;
|
|
white-space: nowrap;
|
|
margin-bottom: -2px;
|
|
}
|
|
|
|
.tab:hover {
|
|
color: var(--primary-blue);
|
|
}
|
|
|
|
.tab.active {
|
|
color: var(--primary-blue);
|
|
border-bottom-color: var(--primary-blue);
|
|
}
|
|
|
|
/* ===== Action Section ===== */
|
|
|
|
.action-section {
|
|
background: linear-gradient(135deg, rgba(37, 99, 235, 0.05), rgba(30, 58, 95, 0.05));
|
|
border-left: 4px solid var(--warning-orange);
|
|
padding: var(--spacing-xl);
|
|
border-radius: var(--radius-lg);
|
|
margin-bottom: var(--spacing-2xl);
|
|
}
|
|
|
|
.action-section h2 {
|
|
color: var(--primary-dark);
|
|
margin-bottom: var(--spacing-sm);
|
|
}
|
|
|
|
.section-subtitle {
|
|
color: var(--dark-gray);
|
|
font-size: 0.95rem;
|
|
margin-bottom: var(--spacing-lg);
|
|
}
|
|
|
|
/* ===== Votes Section ===== */
|
|
|
|
.votes-section h2 {
|
|
color: var(--primary-dark);
|
|
margin-bottom: var(--spacing-xl);
|
|
}
|
|
|
|
.votes-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
|
|
gap: var(--spacing-lg);
|
|
margin-bottom: var(--spacing-lg);
|
|
}
|
|
|
|
/* ===== Empty State ===== */
|
|
|
|
.empty-state {
|
|
text-align: center;
|
|
padding: var(--spacing-2xl);
|
|
background-color: var(--white);
|
|
border-radius: var(--radius-xl);
|
|
border: 2px dashed var(--border-gray);
|
|
}
|
|
|
|
.empty-icon {
|
|
font-size: 4rem;
|
|
margin-bottom: var(--spacing-lg);
|
|
}
|
|
|
|
.empty-state h3 {
|
|
color: var(--primary-dark);
|
|
margin-bottom: var(--spacing-md);
|
|
}
|
|
|
|
.empty-state p {
|
|
color: var(--dark-gray);
|
|
font-size: 1rem;
|
|
}
|
|
|
|
/* ===== Mobile Responsive ===== */
|
|
|
|
@media (max-width: 768px) {
|
|
.dashboard-page {
|
|
padding: var(--spacing-lg) 0;
|
|
}
|
|
|
|
.dashboard-header h1 {
|
|
font-size: 1.75rem;
|
|
}
|
|
|
|
.stat-card {
|
|
flex-direction: column;
|
|
text-align: center;
|
|
}
|
|
|
|
.stat-icon {
|
|
width: 50px;
|
|
height: 50px;
|
|
margin: 0 auto;
|
|
}
|
|
|
|
.stat-value {
|
|
font-size: 1.75rem;
|
|
}
|
|
|
|
.votes-grid {
|
|
grid-template-columns: 1fr;
|
|
}
|
|
|
|
.dashboard-tabs {
|
|
overflow-x: auto;
|
|
}
|
|
|
|
.tab {
|
|
padding: var(--spacing-md);
|
|
font-size: 0.85rem;
|
|
}
|
|
}
|
|
.dashboard-page {
|
|
min-height: 100vh;
|
|
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
|
padding: 20px;
|
|
}
|
|
|
|
.dashboard-header {
|
|
background: white;
|
|
padding: 20px;
|
|
border-radius: 10px;
|
|
margin-bottom: 20px;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
|
}
|
|
|
|
.dashboard-header h1 {
|
|
color: #333;
|
|
margin: 0;
|
|
}
|
|
|
|
.header-user-info {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 15px;
|
|
}
|
|
|
|
.logout-btn {
|
|
background: #d32f2f;
|
|
color: white;
|
|
padding: 8px 16px;
|
|
border: none;
|
|
border-radius: 5px;
|
|
cursor: pointer;
|
|
font-weight: bold;
|
|
transition: background 0.3s;
|
|
}
|
|
|
|
.logout-btn:hover {
|
|
background: #b71c1c;
|
|
}
|
|
|
|
.dashboard-container {
|
|
max-width: 1000px;
|
|
margin: 0 auto;
|
|
}
|
|
|
|
.dashboard-section {
|
|
background: white;
|
|
padding: 20px;
|
|
border-radius: 10px;
|
|
margin-bottom: 20px;
|
|
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
|
}
|
|
|
|
.dashboard-section h2 {
|
|
color: #333;
|
|
margin-top: 0;
|
|
border-bottom: 2px solid #667eea;
|
|
padding-bottom: 10px;
|
|
}
|
|
|
|
.election-item {
|
|
background: #f5f5f5;
|
|
padding: 15px;
|
|
border-radius: 5px;
|
|
margin-bottom: 15px;
|
|
}
|
|
|
|
.election-item h3 {
|
|
margin: 0 0 10px 0;
|
|
color: #333;
|
|
}
|
|
|
|
.election-item p {
|
|
margin: 5px 0;
|
|
color: #666;
|
|
}
|
|
|
|
.vote-item {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
background: #f5f5f5;
|
|
padding: 15px;
|
|
border-radius: 5px;
|
|
margin-bottom: 10px;
|
|
border-left: 4px solid #667eea;
|
|
}
|
|
|
|
.vote-item-info {
|
|
flex: 1;
|
|
}
|
|
|
|
.vote-item-info h4 {
|
|
margin: 0 0 5px 0;
|
|
color: #333;
|
|
}
|
|
|
|
.vote-item-info p {
|
|
margin: 0;
|
|
color: #999;
|
|
font-size: 0.9em;
|
|
}
|
|
|
|
.vote-status {
|
|
padding: 5px 10px;
|
|
border-radius: 20px;
|
|
font-size: 0.85em;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.vote-status.voted {
|
|
background: #c8e6c9;
|
|
color: #2e7d32;
|
|
}
|
|
|
|
.vote-status.pending {
|
|
background: #fff9c4;
|
|
color: #f57f17;
|
|
}
|
|
|
|
.results-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
|
|
gap: 15px;
|
|
}
|
|
|
|
.candidate-result {
|
|
background: #f5f5f5;
|
|
padding: 15px;
|
|
border-radius: 5px;
|
|
}
|
|
|
|
.candidate-result h4 {
|
|
margin: 0 0 10px 0;
|
|
color: #333;
|
|
}
|
|
|
|
.progress-bar-container {
|
|
background: #ddd;
|
|
border-radius: 10px;
|
|
height: 20px;
|
|
overflow: hidden;
|
|
margin-bottom: 5px;
|
|
}
|
|
|
|
.progress-bar {
|
|
background: linear-gradient(90deg, #667eea, #764ba2);
|
|
height: 100%;
|
|
transition: width 0.3s ease;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: flex-end;
|
|
padding: 0 5px;
|
|
color: white;
|
|
font-size: 0.8em;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.candidate-result p {
|
|
margin: 0;
|
|
color: #666;
|
|
font-size: 0.9em;
|
|
}
|
|
|
|
.vote-btn {
|
|
background: #4caf50;
|
|
color: white;
|
|
padding: 10px 20px;
|
|
border: none;
|
|
border-radius: 5px;
|
|
cursor: pointer;
|
|
font-weight: bold;
|
|
margin-top: 10px;
|
|
transition: background 0.3s;
|
|
}
|
|
|
|
.vote-btn:hover {
|
|
background: #45a049;
|
|
}
|
|
|
|
.empty-message {
|
|
text-align: center;
|
|
color: #999;
|
|
padding: 20px;
|
|
}
|
|
|
|
@media (max-width: 768px) {
|
|
.dashboard-header {
|
|
flex-direction: column;
|
|
gap: 15px;
|
|
}
|
|
|
|
.header-user-info {
|
|
width: 100%;
|
|
justify-content: space-between;
|
|
}
|
|
|
|
.results-grid {
|
|
grid-template-columns: 1fr;
|
|
}
|
|
|
|
.vote-item {
|
|
flex-direction: column;
|
|
align-items: flex-start;
|
|
}
|
|
|
|
.vote-status {
|
|
margin-top: 10px;
|
|
}
|
|
}
|