TKK_E32222685/WEB-playground/assets/css/dashboard.css

659 lines
13 KiB
CSS

* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
min-height: 100vh;
line-height: 1.6;
}
.dashboard-container {
min-height: 100vh;
display: flex;
flex-direction: column;
}
/* Header Styling */
.dashboard-header {
background: linear-gradient(135deg, #6B46C1 0%, #8B5CF6 100%); /* Ungu Primer */
color: white;
padding: 2rem 0;
position: relative;
overflow: hidden;
box-shadow: 0 10px 30px rgba(107, 70, 193, 0.2);
}
.dashboard-header::before {
content: '';
position: absolute;
top: -50%;
left: -50%;
width: 200%;
height: 200%;
background: repeating-linear-gradient(
45deg,
transparent,
transparent 35px,
rgba(255,255,255,0.03) 35px,
rgba(255,255,255,0.03) 70px
);
animation: float 30s linear infinite;
}
@keyframes float {
0% { transform: translate(-50%, -50%) rotate(0deg); }
100% { transform: translate(-50%, -50%) rotate(360deg); }
}
.header-content {
max-width: 1200px;
margin: 0 auto;
padding: 0 2rem;
display: flex;
justify-content: space-between;
align-items: center;
position: relative;
z-index: 2;
flex-wrap: wrap;
gap: 1rem;
}
.header-left h1 {
font-size: 2.5rem;
font-weight: 700;
margin-bottom: 0.5rem;
text-shadow: 0 4px 8px rgba(0,0,0,0.2);
}
.header-left p {
font-size: 1.1rem;
opacity: 0.9;
}
.header-right {
display: flex;
gap: 1rem;
align-items: center;
flex-wrap: wrap;
}
/* --- PERBAIKAN STYLING TOMBOL HEADER UNTUK KONSISTENSI GRADASI --- */
.action-btn-header, .logout-btn {
display: inline-flex;
align-items: center;
gap: 0.5rem;
padding: 12px 20px;
color: white;
text-decoration: none;
border-radius: 8px;
font-weight: 600;
font-size: 0.9rem;
border: none;
transition: all 0.3s ease;
box-shadow: 0 4px 10px rgba(0,0,0,0.15);
cursor: pointer;
}
/* Warna untuk Tambah Pengunjung & Tambah Admin (Hijau Gradasi) */
.add-visitor-btn, .add-admin-btn {
background: linear-gradient(135deg, #10B981 0%, #059669 100%); /* Mirip countdown-timer hijau */
}
.add-visitor-btn:hover, .add-admin-btn:hover {
background: linear-gradient(135deg, #059669 0%, #047857 100%);
transform: translateY(-2px);
box-shadow: 0 8px 18px rgba(16, 185, 129, 0.25);
}
/* Warna untuk Tombol Keluar (Merah Gradasi) */
.logout-btn {
background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%); /* Mirip countdown-timer merah */
}
.logout-btn:hover {
background: linear-gradient(135deg, #DC2626 0%, #B91C1C 100%);
transform: translateY(-2px);
box-shadow: 0 8px 18px rgba(239, 68, 68, 0.35);
}
/* --- AKHIR PERBAIKAN STYLING TOMBOL HEADER --- */
/* Dashboard Content */
.dashboard-content {
flex: 1;
max-width: 1200px;
margin: 0 auto;
padding: 3rem 2rem;
width: 100%;
}
.dashboard-content h2 {
color: #1e293b;
font-size: 2rem;
font-weight: 600;
margin-bottom: 2rem;
position: relative;
padding-bottom: 1rem;
}
.dashboard-content h2::after {
content: '';
position: absolute;
bottom: 0;
left: 0;
width: 60px;
height: 4px;
background: linear-gradient(135deg, #6B46C1 0%, #8B5CF6 100%);
border-radius: 2px;
}
/* RFID Scan Status Area - INI DIKOMENTARI KARENA SUDAH DIHAPUS DARI HTML */
/*
.rfid-scan-status {
background: #fff;
padding: 1.5rem;
border-radius: 12px;
box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
margin-bottom: 2rem;
text-align: center;
font-size: 1.1rem;
color: #374151;
display: flex;
align-items: center;
justify-content: center;
gap: 1rem;
border-left: 5px solid #6B46C1;
animation: fadeIn 0.5s ease-out;
}
.rfid-scan-status .fas {
font-size: 1.5rem;
color: #6B46C1;
}
@keyframes fadeIn {
from { opacity: 0; transform: translateY(-10px); }
to { opacity: 1; transform: translateY(0); }
}
*/
/* Visitors Table Styling */
.visitors-table {
width: 100%;
background: white;
border-radius: 20px;
overflow: hidden;
box-shadow: 0 20px 40px rgba(107, 70, 193, 0.1);
border-collapse: collapse;
margin-top: 1rem;
}
.visitors-table thead {
background: linear-gradient(135deg, #6B46C1 0%, #8B5CF6 100%);
color: white;
}
.visitors-table th {
padding: 1.5rem 1rem;
font-weight: 600;
text-align: left;
font-size: 0.95rem;
letter-spacing: 0.5px;
}
.visitors-table td {
padding: 1.25rem 1rem;
border-bottom: 1px solid #f1f5f9;
color: #374151;
font-size: 0.9rem;
}
.visitors-table tbody tr {
transition: all 0.3s ease;
}
.visitors-table tbody tr:hover {
background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
transform: scale(1.01);
}
.visitors-table tbody tr:last-child td {
border-bottom: none;
}
/* Countdown Timer Styling */
.countdown-timer {
display: inline-block;
padding: 8px 16px;
background: linear-gradient(135deg, #10b981 0%, #059669 100%);
color: white;
border-radius: 20px;
font-weight: 600;
font-size: 0.85rem;
text-align: center;
min-width: 120px;
box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
transition: all 0.3s ease;
}
.countdown-timer.warning-time {
background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
animation: pulse-warning 2s infinite;
}
.countdown-timer.time-over {
background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
animation: pulse-danger 1.5s infinite;
}
@keyframes pulse-warning {
0%, 100% { transform: scale(1); }
50% { transform: scale(1.05); }
}
@keyframes pulse-danger {
0%, 100% { transform: scale(1); }
50% { transform: scale(1.08); }
}
/* Empty State */
.empty-state {
text-align: center;
padding: 4rem 2rem;
background: white;
border-radius: 20px;
box-shadow: 0 20px 40px rgba(107, 70, 193, 0.1);
}
.empty-icon {
font-size: 4rem;
margin-bottom: 1.5rem;
opacity: 0.7;
}
.empty-state h2 {
color: #1e293b;
font-size: 1.8rem;
margin-bottom: 1rem;
font-weight: 600;
}
.empty-state p {
color: #64748b;
font-size: 1.1rem;
max-width: 400px;
margin: 0 auto;
}
/* Error Message */
.error-message-inline {
background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
color: #dc2626;
padding: 1.5rem;
border-radius: 12px;
border-left: 4px solid #dc2626;
font-weight: 500;
box-shadow: 0 4px 12px rgba(220, 38, 38, 0.1);
}
/* Loading State */
#activeVisitorsList p {
text-align: center;
padding: 3rem;
color: #64748b;
font-size: 1.1rem;
background: white;
border-radius: 20px;
box-shadow: 0 20px 40px rgba(107, 70, 193, 0.1);
}
/* Responsive Design */
@media (max-width: 1024px) {
.header-content {
flex-direction: column;
text-align: center;
gap: 2rem;
}
.header-left h1 {
font-size: 2rem;
}
.dashboard-content {
padding: 2rem 1rem;
}
.visitors-table {
font-size: 0.85rem;
}
.visitors-table th,
.visitors-table td {
padding: 1rem 0.75rem;
}
}
@media (max-width: 768px) {
.header-right {
flex-direction: column;
width: 100%;
}
.action-btn-header,
.logout-btn {
width: 100%;
justify-content: center;
padding: 15px 20px;
}
.dashboard-content h2 {
font-size: 1.5rem;
}
.visitors-table {
display: block;
overflow-x: auto;
white-space: nowrap;
}
.countdown-timer {
min-width: 100px;
font-size: 0.8rem;
padding: 6px 12px;
}
.empty-state {
padding: 2rem 1rem;
}
.empty-icon {
font-size: 3rem;
}
.empty-state h2 {
font-size: 1.5rem;
}
}
@media (max-width: 480px) {
.dashboard-content {
padding: 1.5rem 0.75rem;
}
.visitors-table th,
.visitors-table td {
padding: 0.75rem 0.5rem;
font-size: 0.8rem;
}
.header-left h1 {
font-size: 1.5rem;
}
.header-left p {
font-size: 1rem;
}
}
/* Additional Animations */
.visitors-table {
animation: slideUp 0.6s ease-out;
}
@keyframes slideUp {
from {
opacity: 0;
transform: translateY(30px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.dashboard-content h2 {
animation: fadeInLeft 0.8s ease-out;
}
@keyframes fadeInLeft {
from {
opacity: 0;
transform: translateX(-30px);
}
to {
opacity: 1;
transform: translateX(0);
}
}
/* Scrollbar Styling */
::-webkit-scrollbar {
width: 8px;
}
::-webkit-scrollbar-track {
background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
background: linear-gradient(135deg, #6B46C1 0%, #8B5CF6 100%);
border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
background: linear-gradient(135deg, #553c9a 0%, #7c3aed 100%);
}
/* --- MODAL STYLING (POPUP) --- */
.modal {
display: none;
position: fixed;
z-index: 1000;
left: 0;
top: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.6);
backdrop-filter: blur(8px);
align-items: center;
justify-content: center;
opacity: 0;
visibility: hidden;
transition: opacity 0.4s ease, visibility 0.4s ease;
}
.modal.show {
opacity: 1;
visibility: visible;
display: flex;
}
.modal-content {
background: white;
padding: 2rem;
border-radius: 12px;
max-width: 500px;
width: 90%;
max-height: 80vh;
overflow-y: auto;
position: relative;
animation: modalSlideIn 0.3s ease-out;
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
border-top: 5px solid #6B46C1;
}
@keyframes modalSlideIn {
from {
opacity: 0;
transform: translateY(-30px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.close-button {
color: #888;
position: absolute;
top: 15px;
right: 25px;
font-size: 32px;
font-weight: normal;
cursor: pointer;
transition: color 0.3s ease;
}
.close-button:hover,
.close-button:focus {
color: #333;
text-decoration: none;
}
.modal-header {
text-align: center;
margin-bottom: 1.5rem;
}
.modal-header h3 {
color: #1f2937;
margin-bottom: 0.5rem;
font-size: 1.3rem;
}
.modal-header p {
color: #6b7280;
font-size: 0.95rem;
}
/* Styling for modal body content in dashboard */
#modalTitle {
color: #1f2937;
font-size: 1.8rem;
font-weight: 700;
margin-bottom: 1rem;
text-align: center;
}
#modalMessage {
font-size: 1.15rem;
line-height: 1.6;
color: #374151;
margin-bottom: 0.8rem;
}
#modalGelangCode {
font-size: 1.15rem;
line-height: 1.6;
color: #374151;
margin-bottom: 0.8rem;
}
#modalUserData {
background: #f9fafb;
padding: 1rem;
border-radius: 8px;
margin-top: 1.5rem;
border-left: 4px solid #6B46C1;
text-align: left;
}
#modalUserData p {
margin: 0.5rem 0;
font-size: 0.95rem;
color: #475569;
}
#modalUserData strong {
color: #374151;
}
/* Modal Actions (buttons) */
.modal-actions {
display: flex;
gap: 1rem;
justify-content: center;
margin-top: 2rem;
}
.modal-action-btn, .modal-cancel-btn {
padding: 0.75rem 1.5rem;
border: none;
border-radius: 8px;
font-weight: 500;
cursor: pointer;
transition: all 0.3s ease;
font-size: 0.95rem;
flex-grow: 1;
max-width: 200px;
box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.modal-action-btn { /* Default primary button in modal */
background: linear-gradient(135deg, #6B46C1 0%, #8B5CF6 100%);
color: white;
}
.modal-action-btn:hover {
background: linear-gradient(135deg, #553c9a 0%, #7c3aed 100%);
transform: translateY(-2px);
box-shadow: 0 6px 15px rgba(107, 70, 193, 0.25);
}
.modal-action-btn.logout-btn { /* Untuk tombol "Akhiri Sesi" di dashboard modal */
background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
color: white;
}
.modal-action-btn.logout-btn:hover {
background: linear-gradient(135deg, #DC2626 0%, #B91C1C 100%);
transform: translateY(-2px);
box-shadow: 0 6px 15px rgba(239, 68, 68, 0.25);
}
.modal-cancel-btn {
background: #F3F4F6;
color: #374151;
border: 1px solid #D1D5DB;
}
.modal-cancel-btn:hover {
background: #E5E7EB;
transform: translateY(-2px);
box-shadow: 0 6px 15px rgba(160, 174, 192, 0.25);
}
/* Text colors within modals (consistent with existing) */
.text-green-500 { color: #10B981; font-weight: bold; }
.text-red-500 { color: #EF4444; font-weight: bold; }
.text-blue-500 { color: #4299E1; font-weight: bold; text-decoration: underline; }
/* Responsive adjustments for modals */
@media (max-width: 600px) {
.modal-content {
padding: 1.5rem;
border-radius: 10px;
}
.modal-actions {
flex-direction: column;
gap: 0.8rem;
}
.modal-action-btn, .modal-cancel-btn {
max-width: 100%;
}
#modalTitle {
font-size: 1.5rem;
}
#modalMessage, #modalGelangCode, #modalUserData p {
font-size: 1rem;
}
}