Replace CRA boilerplate with custom dashboard setup, remove unused files, and add new styles and components.
Some checks failed
continuous-integration/drone Build was killed

This commit is contained in:
2025-11-16 11:52:12 -04:00
parent a78a146129
commit deb38ca331
27 changed files with 1458 additions and 164 deletions

674
src/styles/components.css Normal file
View File

@@ -0,0 +1,674 @@
/* Sidebar Styles */
.sidebar {
width: var(--sidebar-width);
background: linear-gradient(180deg, var(--secondary) 0%, #1e293b 100%);
color: white;
padding: 0;
transition: var(--transition);
box-shadow: var(--shadow-lg);
z-index: 100;
position: fixed;
height: 100vh;
overflow-y: auto;
display: flex;
flex-direction: column;
}
.logo-container {
padding: 24px 20px;
border-bottom: 1px solid rgba(255,255,255,0.1);
display: flex;
align-items: center;
justify-content: space-between;
}
.logo {
display: flex;
align-items: center;
}
.logo-icon {
background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
width: 40px;
height: 40px;
border-radius: 10px;
display: flex;
align-items: center;
justify-content: center;
margin-right: 12px;
box-shadow: 0 4px 6px rgba(99, 102, 241, 0.3);
}
.logo-text {
font-size: 1.25rem;
font-weight: 700;
}
.logo-text span {
color: var(--primary-light);
}
.nav-container {
flex: 1;
padding: 20px 0;
}
.nav-links {
list-style: none;
}
.nav-links li {
margin: 4px 16px;
border-radius: 10px;
overflow: hidden;
transition: var(--transition);
}
.nav-links li.active {
background: rgba(99, 102, 241, 0.15);
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.nav-links li:hover:not(.active) {
background: rgba(255, 255, 255, 0.05);
}
.nav-links a {
color: white;
text-decoration: none;
display: flex;
align-items: center;
padding: 14px 16px;
font-weight: 500;
transition: var(--transition);
}
.nav-links i {
margin-right: 12px;
font-size: 1.2rem;
width: 24px;
text-align: center;
}
.nav-links .badge {
margin-left: auto;
background: var(--primary);
color: white;
border-radius: 20px;
padding: 4px 10px;
font-size: 0.75rem;
font-weight: 600;
}
.sidebar-footer {
padding: 20px;
border-top: 1px solid rgba(255,255,255,0.1);
margin-top: auto;
}
.user-info {
display: flex;
align-items: center;
}
.user-avatar {
width: 40px;
height: 40px;
border-radius: 50%;
background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
display: flex;
align-items: center;
justify-content: center;
color: white;
font-weight: 600;
margin-right: 12px;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
.user-details {
flex: 1;
}
.user-name {
font-weight: 600;
font-size: 0.9rem;
}
.user-role {
font-size: 0.75rem;
color: rgba(255, 255, 255, 0.7);
}
/* Main Content */
.main-content {
flex: 1;
padding: 30px;
margin-left: var(--sidebar-width);
transition: var(--transition);
}
.header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 30px;
padding: 20px 0;
}
.page-title {
color: var(--secondary);
font-weight: 700;
font-size: 1.8rem;
display: flex;
align-items: center;
}
.page-title i {
margin-right: 12px;
color: var(--primary);
background: rgba(99, 102, 241, 0.1);
width: 50px;
height: 50px;
border-radius: 12px;
display: flex;
align-items: center;
justify-content: center;
}
.header-actions {
display: flex;
align-items: center;
gap: 16px;
}
.search-box {
position: relative;
background: white;
border-radius: 10px;
padding: 10px 16px;
box-shadow: var(--shadow);
display: flex;
align-items: center;
width: 300px;
}
.search-box i {
color: var(--gray);
margin-right: 10px;
}
.search-box input {
border: none;
outline: none;
background: transparent;
width: 100%;
font-size: 0.9rem;
}
/* Button Styles */
.btn {
padding: 12px 24px;
border: none;
border-radius: 10px;
cursor: pointer;
font-weight: 600;
transition: var(--transition);
display: inline-flex;
align-items: center;
justify-content: center;
box-shadow: var(--shadow);
font-size: 0.9rem;
}
.btn i {
margin-right: 8px;
}
.btn-primary {
background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
color: white;
}
.btn-primary:hover {
transform: translateY(-2px);
box-shadow: 0 6px 12px rgba(99, 102, 241, 0.3);
}
.btn-success {
background: linear-gradient(135deg, var(--success) 0%, #34d399 100%);
color: white;
}
.btn-warning {
background: linear-gradient(135deg, var(--warning) 0%, #fbbf24 100%);
color: white;
}
.btn-danger {
background: linear-gradient(135deg, var(--danger) 0%, #f87171 100%);
color: white;
}
.btn-outline {
background: transparent;
border: 2px solid var(--primary);
color: var(--primary);
}
.btn-sm {
padding: 8px 16px;
font-size: 0.8rem;
}
/* Card Styles */
.dashboard-cards {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
gap: 24px;
margin-bottom: 40px;
}
.card {
background: white;
border-radius: var(--radius);
box-shadow: var(--shadow);
padding: 24px;
transition: var(--transition);
border: 1px solid rgba(0,0,0,0.03);
position: relative;
overflow: hidden;
}
.card::before {
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 4px;
}
.card.primary::before {
background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 100%);
}
.card.success::before {
background: linear-gradient(90deg, var(--success) 0%, #34d399 100%);
}
.card.warning::before {
background: linear-gradient(90deg, var(--warning) 0%, #fbbf24 100%);
}
.card.danger::before {
background: linear-gradient(90deg, var(--danger) 0%, #f87171 100%);
}
.card:hover {
transform: translateY(-5px);
box-shadow: var(--shadow-lg);
}
.card-header {
display: flex;
justify-content: space-between;
align-items: flex-start;
margin-bottom: 20px;
}
.card-icon {
width: 60px;
height: 60px;
border-radius: 12px;
display: flex;
align-items: center;
justify-content: center;
font-size: 1.8rem;
color: white;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
.card-icon.primary {
background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
}
.card-icon.success {
background: linear-gradient(135deg, var(--success) 0%, #34d399 100%);
}
.card-icon.warning {
background: linear-gradient(135deg, var(--warning) 0%, #fbbf24 100%);
}
.card-icon.danger {
background: linear-gradient(135deg, var(--danger) 0%, #f87171 100%);
}
.card-value {
font-size: 2.2rem;
font-weight: 700;
margin-bottom: 5px;
color: var(--dark);
}
.card-title {
color: var(--gray);
font-size: 0.95rem;
font-weight: 500;
}
.card-trend {
display: flex;
align-items: center;
margin-top: 10px;
font-size: 0.85rem;
font-weight: 600;
}
.card-trend.up {
color: var(--success);
}
.card-trend.down {
color: var(--danger);
}
/* Section Title */
.section-title {
font-size: 1.4rem;
font-weight: 600;
margin-bottom: 20px;
color: var(--secondary);
display: flex;
align-items: center;
}
.section-title i {
margin-right: 10px;
color: var(--primary);
background: rgba(99, 102, 241, 0.1);
width: 40px;
height: 40px;
border-radius: 10px;
display: flex;
align-items: center;
justify-content: center;
}
/* Table Styles */
.table-container {
background: white;
border-radius: var(--radius);
box-shadow: var(--shadow);
overflow: hidden;
margin-bottom: 40px;
border: 1px solid rgba(0,0,0,0.03);
}
.table-header {
padding: 20px 24px;
border-bottom: 1px solid rgba(0,0,0,0.05);
display: flex;
justify-content: space-between;
align-items: center;
flex-wrap: wrap;
gap: 16px;
}
.table-actions {
display: flex;
gap: 12px;
flex-wrap: wrap;
}
table {
width: 100%;
border-collapse: collapse;
}
th, td {
padding: 16px 24px;
text-align: left;
border-bottom: 1px solid rgba(0,0,0,0.05);
}
th {
background-color: #f8fafc;
font-weight: 600;
color: var(--secondary);
font-size: 0.85rem;
text-transform: uppercase;
letter-spacing: 0.5px;
}
tr:last-child td {
border-bottom: none;
}
tr:hover {
background-color: #f8fafc;
}
.status {
padding: 6px 12px;
border-radius: 20px;
font-size: 0.8rem;
font-weight: 600;
display: inline-flex;
align-items: center;
}
.status i {
margin-right: 5px;
}
.status.pending {
background-color: rgba(245, 158, 11, 0.1);
color: var(--warning);
}
.status.completed {
background-color: rgba(16, 185, 129, 0.1);
color: var(--success);
}
.status.failed {
background-color: rgba(239, 68, 68, 0.1);
color: var(--danger);
}
.actions {
display: flex;
gap: 8px;
}
.actions button {
width: 36px;
height: 36px;
border: none;
border-radius: 8px;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
transition: var(--transition);
}
.actions .view {
background: rgba(99, 102, 241, 0.1);
color: var(--primary);
}
.actions .execute {
background: rgba(16, 185, 129, 0.1);
color: var(--success);
}
.actions .cancel {
background: rgba(239, 68, 68, 0.1);
color: var(--danger);
}
.actions button:hover {
transform: scale(1.1);
}
/* Form Styles */
.form-container {
background: white;
border-radius: var(--radius);
box-shadow: var(--shadow);
padding: 30px;
margin-bottom: 40px;
border: 1px solid rgba(0,0,0,0.03);
}
.form-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 25px;
padding-bottom: 15px;
border-bottom: 1px solid rgba(0,0,0,0.05);
flex-wrap: wrap;
gap: 16px;
}
.form-header h3 {
color: var(--secondary);
font-weight: 600;
display: flex;
align-items: center;
}
.form-header h3 i {
margin-right: 10px;
color: var(--primary);
}
.form-group {
margin-bottom: 25px;
}
label {
display: block;
margin-bottom: 10px;
font-weight: 600;
color: var(--secondary);
}
input, select, textarea {
width: 100%;
padding: 14px 16px;
border: 1px solid #e2e8f0;
border-radius: 8px;
font-size: 1rem;
transition: var(--transition);
background: #f8fafc;
}
input:focus, select:focus, textarea:focus {
outline: none;
border-color: var(--primary);
box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
background: white;
}
textarea {
min-height: 120px;
resize: vertical;
}
.form-row {
display: flex;
gap: 20px;
}
.form-row .form-group {
flex: 1;
}
/* Request Detail */
.detail-container {
background: white;
border-radius: var(--radius);
box-shadow: var(--shadow);
padding: 30px;
margin-bottom: 40px;
border: 1px solid rgba(0,0,0,0.03);
}
.detail-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 25px;
padding-bottom: 20px;
border-bottom: 1px solid rgba(0,0,0,0.05);
flex-wrap: wrap;
gap: 16px;
}
.detail-header h3 {
color: var(--secondary);
font-weight: 600;
display: flex;
align-items: center;
}
.detail-header h3 i {
margin-right: 10px;
color: var(--primary);
}
.detail-actions {
display: flex;
gap: 12px;
flex-wrap: wrap;
}
.detail-section {
margin-bottom: 30px;
}
.detail-section h4 {
margin-bottom: 18px;
color: var(--secondary);
font-weight: 600;
display: flex;
align-items: center;
}
.detail-section h4 i {
margin-right: 8px;
color: var(--primary);
font-size: 0.9rem;
}
.detail-item {
display: flex;
margin-bottom: 12px;
padding: 10px 0;
}
.detail-label {
width: 180px;
font-weight: 600;
color: var(--dark);
}
.detail-value {
flex: 1;
}
.json-view {
background-color: #f8fafc;
padding: 18px;
border-radius: 8px;
font-family: 'Courier New', monospace;
white-space: pre-wrap;
max-height: 300px;
overflow-y: auto;
border: 1px solid #e2e8f0;
font-size: 0.9rem;
}