609 lines
11 KiB
CSS
609 lines
11 KiB
CSS
/* Dashboard.module.css - Cleaned Version */
|
|
|
|
/* Modern Color Palette */
|
|
:root {
|
|
--primary-blue: #3b82f6;
|
|
--secondary-blue: #60a5fa;
|
|
--dark-blue: #1e40af;
|
|
--neutral-50: #fafafa;
|
|
--neutral-100: #f5f5f5;
|
|
--neutral-200: #e5e5e5;
|
|
--neutral-300: #d4d4d4;
|
|
--neutral-500: #737373;
|
|
--neutral-700: #404040;
|
|
--neutral-800: #262626;
|
|
--neutral-900: #171717;
|
|
--white: #ffffff;
|
|
--success-green: #43a0a7;
|
|
--warning-amber: #f59e0b;
|
|
--error-red: #ef4444;
|
|
--text-primary: #0f172a;
|
|
--text-secondary: #64748b;
|
|
--text-light: #ffffff;
|
|
--border-light: #e2e8f0;
|
|
--shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
|
|
--shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
|
|
--shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1),
|
|
0 4px 6px -4px rgb(0 0 0 / 0.1);
|
|
}
|
|
|
|
/* Base Styles & Reset */
|
|
* {
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
body {
|
|
margin: 0;
|
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
|
|
"Helvetica Neue", Arial, sans-serif;
|
|
line-height: 1.5;
|
|
color: var(--text-primary);
|
|
background-color: var(--neutral-50);
|
|
-webkit-font-smoothing: antialiased;
|
|
-moz-osx-font-smoothing: grayscale;
|
|
}
|
|
|
|
.dashboardContainer {
|
|
background-color: var(--neutral-50);
|
|
min-height: 100vh;
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
|
|
/* --- Header --- */
|
|
.dashboardHeader {
|
|
background-color: var(--white);
|
|
color: var(--text-primary);
|
|
padding: 1rem 1.5rem;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
box-shadow: var(--shadow-sm);
|
|
border-bottom: 3px solid #43a0a7;
|
|
position: sticky;
|
|
top: 0;
|
|
z-index: 50;
|
|
backdrop-filter: blur(8px);
|
|
}
|
|
|
|
.logoAndTitle {
|
|
display: flex;
|
|
align-items: center;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.logoAndTitle img {
|
|
width: 2.5rem;
|
|
height: 2.5rem;
|
|
border-radius: 0.75rem;
|
|
margin-right: 0.75rem;
|
|
object-fit: cover;
|
|
}
|
|
|
|
.dashboardHeader .h1 {
|
|
margin: 2px;
|
|
font-size: 1.5rem;
|
|
font-weight: 700;
|
|
color: #43a0a7;
|
|
letter-spacing: -0.025em;
|
|
}
|
|
|
|
.data {
|
|
margin: 0;
|
|
font-size: 1.5rem;
|
|
font-weight: 700;
|
|
color: #154666;
|
|
letter-spacing: -0.025em;
|
|
}
|
|
|
|
/* Dropdown Menu */
|
|
.dropdownContainer {
|
|
position: relative;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 0.75rem;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.userDisplayName {
|
|
color: var(--text-secondary);
|
|
font-weight: 500;
|
|
font-size: 0.875rem;
|
|
}
|
|
|
|
.dropdownToggle {
|
|
background-color: var(--neutral-100);
|
|
color: var(--text-primary);
|
|
border: 1px solid var(--border-light);
|
|
padding: 0.5rem;
|
|
border-radius: 0.5rem;
|
|
cursor: pointer;
|
|
font-size: 1rem;
|
|
transition: all 0.2s ease;
|
|
min-width: 2.5rem;
|
|
height: 2.5rem;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
.dropdownToggle:hover {
|
|
background-color: var(--neutral-200);
|
|
border-color: var(--neutral-300);
|
|
}
|
|
|
|
.dropdownMenu {
|
|
position: absolute;
|
|
top: calc(100% + 0.5rem);
|
|
right: 0;
|
|
background-color: var(--white);
|
|
border-radius: 0.75rem;
|
|
box-shadow: var(--shadow-lg);
|
|
border: 1px solid var(--border-light);
|
|
z-index: 10;
|
|
display: flex;
|
|
flex-direction: column;
|
|
min-width: 10rem;
|
|
overflow: hidden;
|
|
padding: 0.5rem;
|
|
}
|
|
|
|
.dropdownItem {
|
|
background: none;
|
|
border: none;
|
|
padding: 0.75rem 1rem;
|
|
text-align: left;
|
|
cursor: pointer;
|
|
color: var(--text-primary);
|
|
transition: background-color 0.2s ease;
|
|
font-size: 0.875rem;
|
|
font-weight: 500;
|
|
border-radius: 0.5rem;
|
|
margin-bottom: 0.125rem;
|
|
}
|
|
|
|
.dropdownItem:hover {
|
|
background-color: var(--neutral-100);
|
|
}
|
|
|
|
.dropdownItem:last-child {
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
/* --- Main Content --- */
|
|
.mainContent {
|
|
flex-grow: 1;
|
|
padding: 2rem 1.5rem;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 2rem;
|
|
max-width: 1400px;
|
|
margin: 0 auto;
|
|
width: 100%;
|
|
}
|
|
|
|
/* Summary Cards Container */
|
|
.summaryCardsContainer {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
|
|
gap: 1.5rem;
|
|
}
|
|
|
|
.summaryCard {
|
|
background-color: var(--white);
|
|
padding: 1.5rem;
|
|
border-radius: 1rem;
|
|
border: 1px solid var(--border-light);
|
|
box-shadow: var(--shadow-sm);
|
|
transition: all 0.2s ease;
|
|
}
|
|
|
|
.summaryCard:hover {
|
|
box-shadow: var(--shadow-md);
|
|
transform: translateY(-1px);
|
|
}
|
|
|
|
.summaryCard h3 {
|
|
margin: 0 0 0.5rem 0;
|
|
font-size: 0.875rem;
|
|
color: var(--text-secondary);
|
|
font-weight: 500;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.05em;
|
|
}
|
|
|
|
.summaryCard p {
|
|
font-size: 2rem;
|
|
font-weight: 700;
|
|
color: #43a0a7;
|
|
margin: 0;
|
|
line-height: 1;
|
|
}
|
|
|
|
/* Dashboard Grid for Form and Chart */
|
|
.dashboardGrid {
|
|
display: grid;
|
|
grid-template-columns: 1fr;
|
|
gap: 2rem;
|
|
flex-grow: 1;
|
|
}
|
|
|
|
.formSection,
|
|
.chartSection {
|
|
background-color: var(--white);
|
|
padding: 2rem;
|
|
border-radius: 1rem;
|
|
border: 1px solid var(--border-light);
|
|
box-shadow: var(--shadow-sm);
|
|
}
|
|
|
|
.formSection h2,
|
|
.chartSection h2 {
|
|
color: var(--text-primary);
|
|
margin: 0 0 1.5rem 0;
|
|
font-size: 1.25rem;
|
|
font-weight: 600;
|
|
letter-spacing: -0.025em;
|
|
}
|
|
|
|
.form label {
|
|
text-align: left;
|
|
display: block;
|
|
margin-bottom: 1rem;
|
|
color: var(--text-primary);
|
|
font-weight: 500;
|
|
font-size: 0.875rem;
|
|
}
|
|
|
|
.form input[type="text"],
|
|
.form input[type="password"],
|
|
.form select {
|
|
width: 100%;
|
|
padding: 0.75rem 1rem;
|
|
margin-top: 0.375rem;
|
|
border: 1px solid var(--border-light);
|
|
border-radius: 0.5rem;
|
|
font-size: 0.875rem;
|
|
transition: all 0.2s ease;
|
|
background-color: var(--white);
|
|
color: var(--text-primary);
|
|
}
|
|
|
|
.form input[type="text"]:focus,
|
|
.form input[type="password"]:focus,
|
|
.form select:focus {
|
|
border-color: var(--primary-blue);
|
|
box-shadow: 0 0 0 3px rgb(59 130 246 / 0.1);
|
|
outline: none;
|
|
}
|
|
|
|
.submitButton {
|
|
background-color: #43a0a7;
|
|
color: var(--text-light);
|
|
border: none;
|
|
padding: 0.75rem 1.5rem;
|
|
border-radius: 0.5rem;
|
|
cursor: pointer;
|
|
font-size: 0.875rem;
|
|
font-weight: 600;
|
|
margin-top: 1rem;
|
|
width: 100%;
|
|
transition: all 0.2s ease;
|
|
letter-spacing: 0.025em;
|
|
}
|
|
|
|
.submitButton:hover {
|
|
background-color: #357734;
|
|
transform: translateY(-1px);
|
|
box-shadow: var(--shadow-md);
|
|
}
|
|
|
|
.submitButton:active {
|
|
transform: translateY(0);
|
|
}
|
|
|
|
/* Messages */
|
|
.success {
|
|
background-color: rgb(67 160 167 / 0.1);
|
|
color: var(--success-green);
|
|
border: 1px solid rgb(67 160 167 / 0.2);
|
|
padding: 0.75rem 1rem;
|
|
border-radius: 0.5rem;
|
|
margin-top: 1rem;
|
|
font-size: 0.875rem;
|
|
font-weight: 500;
|
|
}
|
|
|
|
.error {
|
|
background-color: rgb(239 68 68 / 0.1);
|
|
color: var(--error-red);
|
|
border: 1px solid rgb(239 68 68 / 0.2);
|
|
padding: 0.75rem 1rem;
|
|
border-radius: 0.5rem;
|
|
margin-top: 1rem;
|
|
font-size: 0.875rem;
|
|
font-weight: 500;
|
|
}
|
|
|
|
.warning {
|
|
background-color: rgb(67 160 167 / 0.1);
|
|
color: #43a0a7;
|
|
border: 1px solid rgb(67 160 167 / 0.2);
|
|
padding: 1rem;
|
|
border-radius: 0.5rem;
|
|
margin-top: 1rem;
|
|
font-weight: 500;
|
|
font-size: 0.875rem;
|
|
}
|
|
|
|
/* Footer */
|
|
.footer {
|
|
background-color: var(--white);
|
|
color: var(--text-secondary);
|
|
text-align: center;
|
|
padding: 1rem;
|
|
margin-top: auto;
|
|
font-size: 0.75rem;
|
|
border-top: 1px solid var(--border-light);
|
|
}
|
|
|
|
.chartPlaceholder {
|
|
background-color: var(--neutral-50);
|
|
height: 20rem;
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
color: var(--text-secondary);
|
|
font-style: italic;
|
|
border-radius: 0.75rem;
|
|
border: 2px dashed var(--border-light);
|
|
font-size: 0.875rem;
|
|
}
|
|
|
|
/* --- Media Queries for Tablets and Desktops --- */
|
|
|
|
/* Tablet-sized screens and up */
|
|
@media (min-width: 768px) {
|
|
.dashboardHeader {
|
|
padding: 1rem 2rem;
|
|
}
|
|
|
|
.logoAndTitle img {
|
|
width: 3rem;
|
|
height: 3rem;
|
|
}
|
|
|
|
.dashboardHeader .h1 {
|
|
font-size: 1.75rem;
|
|
}
|
|
|
|
.userDisplayName {
|
|
font-size: 0.875rem;
|
|
}
|
|
|
|
.mainContent {
|
|
padding: 2.5rem 2rem;
|
|
gap: 2.5rem;
|
|
}
|
|
|
|
.summaryCardsContainer {
|
|
grid-template-columns: repeat(3, 1fr);
|
|
}
|
|
|
|
.dashboardGrid {
|
|
grid-template-columns: 1fr 2fr;
|
|
gap: 2.5rem;
|
|
}
|
|
|
|
.formSection,
|
|
.chartSection {
|
|
padding: 2.5rem;
|
|
}
|
|
|
|
.formSection h2,
|
|
.chartSection h2 {
|
|
font-size: 1.5rem;
|
|
}
|
|
|
|
.chartPlaceholder {
|
|
height: 25rem;
|
|
}
|
|
}
|
|
|
|
/* Desktop-sized screens and up */
|
|
@media (min-width: 1024px) {
|
|
.dashboardHeader {
|
|
padding: 1.25rem 3rem;
|
|
}
|
|
|
|
.logoAndTitle img {
|
|
width: 3.5rem;
|
|
height: 3.5rem;
|
|
}
|
|
|
|
.dashboardHeader .h1 {
|
|
font-size: 2rem;
|
|
}
|
|
|
|
.mainContent {
|
|
padding: 3rem 2.5rem;
|
|
gap: 3rem;
|
|
}
|
|
|
|
.dashboardGrid {
|
|
gap: 3rem;
|
|
}
|
|
|
|
.formSection,
|
|
.chartSection {
|
|
padding: 3rem;
|
|
}
|
|
|
|
.chartPlaceholder {
|
|
height: 30rem;
|
|
}
|
|
}
|
|
|
|
/* Single column layout when only one section is present */
|
|
@media (min-width: 768px) {
|
|
.dashboardGrid > *:only-child {
|
|
grid-column: 1 / -1;
|
|
}
|
|
}
|
|
|
|
/* CSS untuk styling daftar petugas */
|
|
|
|
.officerListContainer {
|
|
background: #f8f9fa;
|
|
border: 1px solid #dee2e6;
|
|
border-radius: 8px;
|
|
padding: 16px;
|
|
margin-bottom: 20px;
|
|
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
|
}
|
|
|
|
.officerList {
|
|
max-height: 300px;
|
|
overflow-y: auto;
|
|
padding: 0;
|
|
margin: 0;
|
|
list-style: none;
|
|
border-radius: 6px;
|
|
background: white;
|
|
border: 1px solid #e9ecef;
|
|
}
|
|
|
|
.officerItem {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding: 12px 16px;
|
|
border-bottom: 1px solid #e9ecef;
|
|
transition: background-color 0.2s ease;
|
|
}
|
|
|
|
.officerItem:last-child {
|
|
border-bottom: none;
|
|
}
|
|
|
|
.officerItem:hover {
|
|
background-color: #f8f9fa;
|
|
}
|
|
|
|
.officerInfo {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
flex: 1;
|
|
}
|
|
|
|
.officerIcon {
|
|
font-size: 20px;
|
|
width: 24px;
|
|
height: 24px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
.officerDetails {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 2px;
|
|
}
|
|
|
|
.officerName {
|
|
font-weight: 600;
|
|
color: #2c3e50;
|
|
font-size: 14px;
|
|
}
|
|
|
|
.officerRole {
|
|
font-size: 12px;
|
|
color: #6c757d;
|
|
font-style: italic;
|
|
text-transform: capitalize;
|
|
}
|
|
|
|
.deleteButton {
|
|
background: none;
|
|
border: none;
|
|
cursor: pointer;
|
|
font-size: 12px;
|
|
padding: 4px 8px;
|
|
border-radius: 4px;
|
|
transition: background-color 0.2s ease;
|
|
opacity: 0.7;
|
|
}
|
|
|
|
.deleteButton:hover {
|
|
background-color: #fee;
|
|
opacity: 1;
|
|
}
|
|
|
|
.deleteButton:focus {
|
|
outline: 2px solid #dc3545;
|
|
outline-offset: 2px;
|
|
}
|
|
|
|
.emptyState {
|
|
text-align: center;
|
|
padding: 40px 20px;
|
|
color: #6c757d;
|
|
}
|
|
|
|
.emptyState span {
|
|
font-size: 32px;
|
|
display: block;
|
|
margin-bottom: 8px;
|
|
}
|
|
|
|
.emptyState p {
|
|
margin: 0;
|
|
font-size: 14px;
|
|
}
|
|
|
|
.separator {
|
|
border: none;
|
|
border-top: 1px solid #dee2e6;
|
|
margin: 24px 0;
|
|
}
|
|
|
|
/* Custom scrollbar untuk daftar petugas */
|
|
.officerList::-webkit-scrollbar {
|
|
width: 8px;
|
|
}
|
|
|
|
.officerList::-webkit-scrollbar-track {
|
|
background: #f1f1f1;
|
|
border-radius: 4px;
|
|
}
|
|
|
|
.officerList::-webkit-scrollbar-thumb {
|
|
background: #c1c1c1;
|
|
border-radius: 4px;
|
|
}
|
|
|
|
.officerList::-webkit-scrollbar-thumb:hover {
|
|
background: #a8a8a8;
|
|
}
|
|
|
|
/* Responsive design */
|
|
@media (max-width: 768px) {
|
|
.officerItem {
|
|
padding: 10px 12px;
|
|
}
|
|
|
|
.officerInfo {
|
|
gap: 8px;
|
|
}
|
|
|
|
.officerName {
|
|
font-size: 13px;
|
|
}
|
|
|
|
.officerRole {
|
|
font-size: 11px;
|
|
}
|
|
}
|