* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #064e3b 0%, #065f46 50%, #047857 100%);
    min-height: 100vh;
    color: #ffffff;
    position: relative;
}

/* Background waste images */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Path is relative to css/ folder, so go up one level */
    background-image: url('../waste.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.3;
    z-index: -1;
    pointer-events: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.date-column.active {
    background: rgba(16, 185, 129, 0.2);
    border-color: #10b981;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.4);
}

.date-column.active h3 {
    color: #10b981;
}

/* Passcode Entry Form */
.passcode-form {
    background: rgba(6, 78, 59, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 40px;
    text-align: center;
    max-width: 800px;
    margin: 100px auto;
    border: 1px solid rgba(16, 185, 129, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.passcode-form h1 {
    margin-bottom: 30px;
    color: #ffffff;
    font-size: 2.5em;
    font-weight: 300;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.form-group {
    margin-bottom: 25px;
}

.form-group input {
    width: 100%;
    padding: 15px 20px;
    border: none;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-size: 16px;
    transition: all 0.3s ease;
}

.form-group input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.form-group input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.5);
    border: 1px solid rgba(16, 185, 129, 0.5);
}

/* Searchable Dropdown Styling */
.searchable-dropdown {
    position: relative;
    width: 100%;
}

#participant-search {
    width: 100%;
    padding: 15px 20px;
    border: none;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-size: 16px;
    transition: all 0.3s ease;
}

#participant-search:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.5);
    border: 1px solid rgba(16, 185, 129, 0.5);
}

#participant-search::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

/* Grid Layout Dropdown */
.dropdown-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(6, 78, 59, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 10px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    
    /* Grid Layout */
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    padding: 15px;
}

.dropdown-item {
    padding: 15px 20px;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 8px;
    text-align: center;
    font-size: 14px;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    word-wrap: break-word;
    line-height: 1.3;
}

.dropdown-item:hover {
    background: rgba(16, 185, 129, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    border-color: #10b981;
}

.dropdown-item.selected {
    background: rgba(16, 185, 129, 0.5);
    color: #ffffff;
    border-color: #10b981;
}

/* Custom Scrollbar for Dropdown */
.dropdown-list::-webkit-scrollbar {
    width: 6px;
}

.dropdown-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.dropdown-list::-webkit-scrollbar-thumb {
    background: rgba(16, 185, 129, 0.5);
    border-radius: 3px;
}

.dropdown-list::-webkit-scrollbar-thumb:hover {
    background: rgba(16, 185, 129, 0.7);
}

/* Button Submit */
.btn-submit {
    background: linear-gradient(45deg, #326f5b, #0ab581);
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: auto;
    min-width: 200px;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.4);
    background: linear-gradient(45deg, #0ab581, #326f5b);
}

/* Logout button (merah marun) */
.btn-logout-alt {
    background: linear-gradient(45deg, #b91c1c, #7f1d1d);
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: auto;
    min-width: 200px;
    box-shadow: 0 4px 10px rgba(248, 113, 113, 0.4);
}

.btn-logout-alt:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(185, 28, 28, 0.45);
    background: linear-gradient(45deg, #dc2626, #7f1d1d);
}

/* Back button (kuning tua) */
.btn-back-alt {
    background: linear-gradient(45deg, #9b5134, #d59b22);
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: auto;
    min-width: 200px;
    box-shadow: 0 4px 10px rgba(234, 179, 8, 0.4);
}

.btn-back-alt:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(213, 155, 34, 0.45);
    background: linear-gradient(45deg, #d59b22, #9b5134);
}

/* Confirmation Modal */
.confirmation-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: rgba(6, 78, 59, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 15px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    animation: slideIn 0.3s ease;
}

.modal-content h3 {
    color: #10b981;
    margin-bottom: 15px;
    font-size: 1.5em;
}

.modal-content p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 20px;
    font-size: 1em;
}

.confirmation-input {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 25px;
}

.phone-prefix {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 8px;
    padding: 12px 15px;
    color: #ffffff;
    font-weight: 600;
    font-size: 16px;
    min-width: 120px;
    max-width: 200px;
    word-wrap: break-word;
    text-align: center;
}

#confirm-digits {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 8px;
    padding: 12px 15px;
    color: #ffffff;
    font-size: 16px;
    width: 80px;
    text-align: center;
    font-weight: 600;
    letter-spacing: 2px;
}

#confirm-digits:focus {
    outline: none;
    border-color: #10b981;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.3);
}

#confirm-digits::placeholder {
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 1px;
}

.modal-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.btn-cancel, .btn-confirm {
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 100px;
}

.btn-cancel {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-cancel:hover {
    background: rgba(255, 255, 255, 0.2);
}

.btn-confirm {
    background: linear-gradient(45deg, #10b981, #059669);
    color: white;
}

.btn-confirm:hover {
    background: linear-gradient(45deg, #059669, #047857);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(16, 185, 129, 0.3);
}

/* Error Modal */
.error-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    animation: fadeIn 0.3s ease;
}

.error-modal-content {
    background: rgba(6, 78, 59, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 15px;
    padding: 30px;
    max-width: 350px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 40px rgba(239, 68, 68, 0.2);
    animation: slideInError 0.3s ease;
}

.error-icon {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
}

.error-modal-content h3 {
    color: #ef4444;
    margin-bottom: 15px;
    font-size: 1.3em;
    font-weight: 600;
}

.error-modal-content p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 25px;
    font-size: 1em;
    line-height: 1.4;
}

.btn-error-ok {
    background: linear-gradient(45deg, #ef4444, #f87171);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 100px;
}

.btn-error-ok:hover {
    background: linear-gradient(45deg, #dc2626, #fca5a5);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(239, 68, 68, 0.3);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { 
        opacity: 0;
        transform: translateY(-30px) scale(0.9);
    }
    to { 
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes slideInError {
    from { 
        opacity: 0;
        transform: translateY(-30px) scale(0.9);
    }
    to { 
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Dashboard */
.dashboard {
    background: rgba(6, 78, 59, 0.7);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 30px;
    border: 1px solid rgba(16, 185, 129, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.dashboard h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #ffffff;
    font-size: 2.5em;
    font-weight: 300;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Messages */
.success-message, .error-message {
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 500;
}

.success-message {
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid rgba(16, 185, 129, 0.5);
    color: #10b981;
}

.error-message {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.5);
    color: #ef4444;
}

/* User Information */
.participant-info {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 40px;
    margin-top: 20px;
}

.participant-info h3 {
    color: #efcd44;
    margin-bottom: 20px;
    text-align: center;
    font-size: 1.3em;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.info-item .label {
    font-weight: 600;
    color: #efcd44;
    min-width: 80px;
}

.info-item .value {
    color: #ffffff;
    text-align: right;
    flex: 1;
}

/* Current Selection */
.current-selection {
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid rgba(16, 185, 129, 0.5);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
    text-align: center;
}

.current-selection h3 {
    margin-bottom: 10px;
    color: #efcd44;
}

.current-selection p {
    margin: 5px 0;
    font-size: 16px;
}

/* Seat Selection */
.seat-selection {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.date-column {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 20px;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.date-column h3 {
    text-align: center;
    margin-bottom: 20px;
    color: #10b981;
    font-size: 1.2em;
}

.seats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(35px, 1fr));
    gap: 6px;
    width: 100%;
}

.seat {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    width: 35px;
    height: 35px;
    font-size: 14px;
    line-height: 35px;
    margin: 0px;
    text-align: center;
    border-radius: 4px;
}

.seat:hover:not(.taken):not(.selected):not(.temp-selected) {
    background: rgba(16, 185, 129, 0.3);
    border-color: #10b981;
    transform: scale(1.05);
}

.seat.taken {
    background: rgba(239, 68, 68, 0.3);
    border-color: #ef4444;
    cursor: not-allowed;
    opacity: 0.7;
}

.seat.selected {
    background: linear-gradient(45deg, #10ff00, #005037);
    border-color: #10b981;
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.5);
}

.seat.temp-selected {
    background: linear-gradient(45deg, #f59e0b, #d97706);
    border-color: #f59e0b;
    transform: scale(1.05);
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
}

/* Logout */
.logout {
    text-align: center;
    margin-top: 30px;
}

.btn-logout {
    background: rgba(239, 205, 68, 0.2);
    color: #efcd44;
    text-decoration: none;
    padding: 12px 30px;
    border-radius: 8px;
    border: 1px solid rgba(239, 205, 68, 0.5);
    transition: all 0.3s ease;
    font-weight: 500;
}

.btn-logout:hover {
    background: rgba(239, 205, 68, 0.3);
    transform: translateY(-2px);
}

.btn-report {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    text-decoration: none;
    padding: 12px 30px;
    border-radius: 8px;
    border: 1px solid rgba(16, 185, 129, 0.5);
    transition: all 0.3s ease;
    font-weight: 500;
}

.btn-report:hover {
    background: rgba(16, 185, 129, 0.3);
    transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .passcode-form {
        margin: 50px auto;
        padding: 30px 20px;
    }
    
    .passcode-form h1 {
        font-size: 2em;
    }
    
    .dashboard h1 {
        font-size: 2em;
    }
    
    .seat-selection {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .seats-grid {
        grid-template-columns: repeat(12, 1fr);
        gap: 2px;
    }
    
    .seat {
        font-size: 10px;
        width: 20px;
        height: 20px;
        line-height: 20px;
    }
    
    /* Grid responsive untuk dropdown */
    .dropdown-list {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 8px;
        padding: 10px;
        max-height: 250px;
    }
    
    .dropdown-item {
        padding: 12px 15px;
        font-size: 13px;
        min-height: 45px;
    }
}

@media (max-width: 480px) {
    .seats-grid {
        grid-template-columns: repeat(12, 1fr);
        gap: 1px;
    }
    
    .seat {
        font-size: 9px;
        width: 18px;
        height: 18px;
        line-height: 18px;
    }
    
    /* Grid responsive untuk dropdown mobile */
    .dropdown-list {
        grid-template-columns: 1fr;
        gap: 6px;
        padding: 8px;
        max-height: 200px;
    }
    
    .dropdown-item {
        padding: 10px 12px;
        font-size: 12px;
        min-height: 40px;
    }
    
    /* Mobile responsive untuk modal */
    .modal-content {
        padding: 20px;
        margin: 20px;
        max-width: 90%;
    }
    
    .confirmation-input {
        flex-direction: column;
        gap: 15px;
    }
    
    .phone-prefix {
        width: 100%;
        max-width: 250px;
        min-width: auto;
    }
    
    #confirm-digits {
        width: 100%;
        max-width: 200px;
    }
    
    .modal-buttons {
        flex-direction: column;
    }
    
    .btn-cancel, .btn-confirm {
        width: 100%;
    }
    
    /* Mobile responsive untuk error modal */
    .error-modal-content {
        padding: 25px 20px;
        margin: 20px;
        max-width: 90%;
    }
    
    .error-icon svg {
        width: 40px;
        height: 40px;
    }
    
    .error-modal-content h3 {
        font-size: 1.2em;
    }
    
    .error-modal-content p {
        font-size: 0.9em;
    }
}

@media (max-width: 360px) {
    .seats-grid {
        grid-template-columns: repeat(12, 1fr);
        gap: 1px;
    }
    
    .seat {
        font-size: 8px;
        width: 16px;
        height: 16px;
        line-height: 16px;
    }
}
