* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #333;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Header dengan Glassmorphism - DIHAPUS */
header {
    display: none;
}

/* Main */
main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 0;
}

/* Slider dengan efek glassmorphism */
.slider-container {
    position: fixed;
    top: 0; 
    left: 0;
    width: 100%; 
    height: 100%;
    z-index: -1;
}

.slider-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.slider-container .slide {
    position: absolute;
    top: 0; 
    left: 0;
    width: 100%; 
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease;
    background-size: cover;
    background-position: center;
}

.slider-container .slide.active { 
    opacity: 1; 
}

/* Login Form dengan Glassmorphism */
.login-container {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    width: 90%; 
    max-width: 400px;
    position: relative;
    z-index: 10;
}

.login-header { 
    text-align: center; 
    margin-bottom: 20px; 
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(14, 14, 14, 0.5);
}

.login-header h2 { 
    color: #ffffff; 
    font-weight: 600;
    margin-bottom: 10px;
}

.login-header p {
    color: #f4f5f7;
    opacity: 0.9;
}

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

.form-group label { 
    display: block; 
    margin-bottom: 8px; 
    color: #ffffff;
    font-weight: 500;
}

.form-group input {
    width: 100%; 
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 10px;
    color: #0d1b2a;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.5);
}

.form-group input::placeholder {
    color: rgba(13, 27, 42, 0.55);
    font-weight: 400;
}

.password-toggle {
    color: #0d1b2a;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.password-toggle:hover {
    opacity: 1;
}

.btn {
    width: 100%; 
    padding: 14px;
    background: rgba(52, 152, 219, 0.8);
    backdrop-filter: blur(5px);
    color: white; 
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    font-size: 1rem; 
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.btn:hover { 
    background: rgba(41, 128, 185, 0.9);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.message { 
    margin-top: 15px; 
    padding: 12px; 
    display: none; 
    text-align: center; 
    border-radius: 10px; 
    backdrop-filter: blur(5px);
    font-weight: 500;
}

.message.error { 
    background: rgba(231, 76, 60, 0.2); 
    color: #c0392b; 
    border: 1px solid rgba(231, 76, 60, 0.3);
}

.message.success { 
    background: rgba(46, 204, 113, 0.2); 
    color: #27ae60; 
    border: 1px solid rgba(46, 204, 113, 0.3);
}

/* WebGIS Page */
#webgis-page { 
    display: none; 
    width: 100%; 
    height: 100vh;
    flex-direction: column; 
    background: rgba(255, 255, 255, 0.05);
}

.webgis-header {
    background: rgba(44, 62, 80, 0.9);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    color: #2c3e50e6;
/*  color: #ecf0f1; */

    padding: 10px 20px;
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    flex-wrap: wrap;
    position: relative;
    min-height: 60px;
}

.user-info {
    display: flex;
    align-items: center;
    margin-right: 20px;
    flex: 1;
    min-width: 200px;
    color: #ecf0f1;
}

.expiry-info {
    display: none;
}

.user-info i {
    margin-right: 8px;
    color: #3498db;
}

.user-info strong {
    color: #f1c40f;
}

/* Menu Bar - Desktop */
.menu-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #ecf0f1;
    padding: 8px 12px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1.2rem;
    order: -1;
    margin-right: auto;
    transition: all 0.3s ease;
}

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

.menu-btn {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #ecf0f1;
    padding: 8px 15px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    white-space: nowrap;
    font-weight: 500;
}

.menu-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Dialog Overlay */
.dialog-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.dialog-overlay.active {
    display: flex;
}

#loginErrorOverlay {
    z-index: 3000;
}

.dialog-box-error {
    border: 1px solid rgba(231, 76, 60, 0.4);
    background: rgba(231, 76, 60, 0.15);
}

.dialog-box-error .dialog-header {
    border-bottom: 1px solid rgba(231, 76, 60, 0.3);
}

.dialog-box-error h2 {
    color: #e74c3c;
}

.dialog-box-user {
    max-width: 900px;
    width: 95%;
}

.dialog-box-small {
    max-width: 420px;
    padding: 18px;
}

.password-field {
    position: relative;
}

.password-field input {
    padding-right: 42px;
}

.password-field .password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #0d1b2a;
    cursor: pointer;
    font-size: 1rem;
    padding: 4px;
    opacity: 0.8;
}

.password-field .password-toggle:hover {
    opacity: 1;
}

.um-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.um-header h3 {
    margin: 0;
    color: #fff;
    font-size: 1rem;
}

.table-wrap {
    overflow-x: auto;
    margin: 0 -10px;
    padding: 0 10px;
}

.user-table {
    width: 100%;
    border-collapse: collapse;
    color: #fff;
    font-size: 0.85rem;
    min-width: 520px;
}

.user-table thead th {
    padding: 8px 8px;
    text-align: left;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.user-table tbody td {
    padding: 8px 8px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    vertical-align: middle;
}

.user-table .text-center {
    text-align: center;
}

/* Dialog Box dengan Glassmorphism */
.dialog-box {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 500px;
    padding: 30px;
    position: relative;
    animation: dialogAppear 0.3s ease-out;
    color: #ffffff;
}

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

.dialog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.dialog-header h2 {
    color: #ffffff;
    font-weight: 600;
    margin: 0;
}

.dialog-close {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #2c3e50;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.dialog-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.dialog-content {
    line-height: 1.6;
    margin-bottom: 25px;
}

.dialog-content p {
    margin-bottom: 15px;
    color: #ffffff;
}

.dialog-content strong {
    color: #ffffff;
}

.dialog-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.dialog-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.dialog-btn-primary {
    background: rgba(52, 152, 219, 0.8);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.dialog-btn-primary:hover {
    background: rgba(41, 128, 185, 0.9);
    transform: translateY(-2px);
}

.dialog-box-small {
    max-width: 420px;
    padding: 18px;
}

.dialog-box-user {
    max-width: 900px;
    width: 95%;
}

.dialog-box-user .dialog-content {
    padding: 0 5px;
}

.um-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.um-header h3 {
    margin: 0;
    color: #fff;
    font-size: 1rem;
}

.table-wrap {
    overflow-x: auto;
    margin: 0 -5px;
    padding: 0 5px;
}

.user-table {
    width: 100%;
    border-collapse: collapse;
    color: #fff;
    font-size: 0.85rem;
    min-width: 520px;
}

.user-table thead th {
    padding: 8px 8px;
    text-align: left;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.user-table tbody td {
    padding: 8px 8px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    vertical-align: middle;
}

.user-table .text-center {
    text-align: center;
}

.background-table {
    width: 100%;
    border-collapse: collapse;
    color: #fff;
    font-size: 0.85rem;
}

.background-table thead th {
    padding: 8px 8px;
    text-align: left;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.background-table tbody td {
    padding: 8px 8px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    vertical-align: middle;
}

.background-table tbody tr[draggable="true"] {
    cursor: grab;
    transition: background 0.2s ease, opacity 0.2s ease;
}

.background-table tbody tr[draggable="true"]:hover {
    background: rgba(255,255,255,0.05);
}

.background-table tbody tr[draggable="true"]:active {
    cursor: grabbing;
}

.background-table tbody tr[draggable="true"].dragging {
    opacity: 0.5;
    background: rgba(52, 152, 219, 0.1);
}

.background-table tbody tr[draggable="true"] .drag-handle {
    cursor: grab;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.background-table tbody tr[draggable="true"]:hover .drag-handle {
    opacity: 1;
}

.action-buttons {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
}

.btn-icon {
    padding: 5px 8px;
    font-size: 0.75rem;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.1);
    color: #ecf0f1;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-icon:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-1px);
}

.btn-icon.btn-edit {
    background: rgba(52, 152, 219, 0.6);
    border-color: rgba(52, 152, 219, 0.8);
}

.btn-icon.btn-delete {
    background: rgba(231, 76, 60, 0.6);
    border-color: rgba(231, 76, 60, 0.8);
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.85rem;
    border-radius: 8px;
}

.form-select {
    width: 100%;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 10px;
    color: #0d1b2a;
    font-size: 0.95rem;
    font-weight: 500;
}

.password-field {
    position: relative;
}

.password-field input {
    padding-right: 42px;
}

.password-field .password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #0d1b2a;
    cursor: pointer;
    font-size: 1rem;
    padding: 4px;
    opacity: 0.8;
}

.password-field .password-toggle:hover {
    opacity: 1;
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 999;
}

/* Mobile Menu Content */
.mobile-menu-content {
    position: fixed;
    top: 0;
    left: -100%;
    width: 80%;
    max-width: 300px;
    height: 100%;
    background: rgba(44, 62, 80, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    transition: left 0.3s ease;
    z-index: 1000;
    padding: 20px;
    overflow-y: auto;
}

.mobile-menu-content.active {
    left: 0;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    color: #ecf0f1;
}

.mobile-menu-close {
    background: none;
    border: none;
    color: #ecf0f1;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
    border-radius: 5px;
    transition: background 0.3s;
}

.mobile-menu-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.mobile-menu-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mobile-menu-btn-item {
    width: 100%;
    text-align: left;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #ecf0f1;
    padding: 12px 15px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.mobile-menu-btn-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(5px);
}

.logout-btn {
    background: rgba(231, 76, 60, 0.7);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white; 
    padding: 8px 15px;
    border-radius: 10px; 
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    font-weight: 500;
    transition: all 0.3s ease;
}

.logout-btn:hover { 
    background: rgba(192, 57, 43, 0.8);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.map-frame { 
    width: 100%; 
    flex: 1; 
    border: none; 
    background: rgba(255, 255, 255, 0.05);
    height: calc(100vh - 60px);
}

/* Footer marquee dengan Glassmorphism */
.footer-marquee {
    background: rgba(44, 62, 80, 0.9);
    backdrop-filter: blur(10px);
    color: #ecf0f1;
    overflow: hidden; 
    white-space: nowrap;
    padding: 8px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    position: absolute;
    bottom: 0;
    width: 100%;
    z-index: 100;
}

.footer-marquee .marquee {
    display: inline-block;
    padding-left: 100%;
    animation: marquee 60s linear infinite;
}

.footer-marquee:hover .marquee { 
    animation-play-state: paused; 
}

.footer-marquee p { 
    display: inline; 
    padding: 0 2rem; 
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

/* Desktop User Management */
@media (min-width: 769px) {
    .dialog-box-user {
        max-width: 860px;
        padding: 22px 24px;
    }

    .dialog-box-user .dialog-header {
        margin-bottom: 14px;
        padding-bottom: 10px;
    }

    .dialog-box-user .dialog-header h2 {
        font-size: 1.25rem;
    }

    .dialog-box-user .dialog-content {
        margin-bottom: 14px;
    }

    .dialog-box-user .dialog-footer {
        padding-top: 10px;
    }

    .user-table {
        min-width: 640px;
        font-size: 0.88rem;
    }

    .user-table thead th {
        padding: 7px 10px;
        font-size: 0.78rem;
    }

    .user-table tbody td {
        padding: 7px 10px;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .webgis-header {
        padding: 8px 15px;
        gap: 10px;
    }
    
    .user-info {
        min-width: auto;
        margin-right: 10px;
        font-size: 0.9rem;
        order: 2;
        flex: 1;
        justify-content: center;
    }
    
    .menu-bar {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
        order: 1;
        margin-right: 10px;
    }
    
    .logout-btn {
        padding: 6px 12px;
        font-size: 0.9rem;
        order: 3;
        margin-left: auto;
    }
    
    /* Adjust header layout untuk mobile */
    .webgis-header {
        justify-content: space-between;
    }
    
    .login-container {
        padding: 25px;
    }
    
    .map-frame {
        height: calc(100vh - 50px);
    }
    
    .dialog-box {
        padding: 25px;
        margin: 20px;
    }
    
    /* User Management Mobile */
    #userManagementBox {
        max-width: 95% !important;
        padding: 18px;
    }
    
    #userManagementContent table {
        font-size: 0.85rem;
    }
    
    #userManagementContent th,
    #userManagementContent td {
        padding: 7px 6px;
    }
    
    #userManagementContent .btn-icon {
        padding: 4px 7px;
        font-size: 0.72rem;
    }
    
    #userFormBox {
        max-width: 95% !important;
    }
    
    .dialog-box-user .form-group {
        margin-bottom: 12px;
    }
    
    .dialog-box-user input,
    .dialog-box-user select {
        padding: 9px 11px;
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .user-info {
        font-size: 0.8rem;
    }
    
    .user-info span {
        display: flex;
        flex-direction: column;
        gap: 2px;
    }
    
    .webgis-header {
        padding: 6px 10px;
        min-height: 50px;
    }
    
    .mobile-menu-content {
        width: 85%;
    }
    
    .mobile-menu-btn {
        padding: 6px 10px;
        font-size: 1rem;
    }
    
    .logout-btn {
        padding: 5px 10px;
        font-size: 0.8rem;
    }
    
    .login-container {
        padding: 20px;
    }
    
    .map-frame {
        height: calc(100vh - 45px);
    }
    
    .dialog-box {
        padding: 20px;
        margin: 15px;
    }
    
    .dialog-header h2 {
        font-size: 1.3rem;
    }
    
    /* User Management 480px */
    #userManagementBox {
        max-width: 98% !important;
        padding: 15px;
    }
    
    #userManagementContent > div:first-child {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    
    #userManagementContent #add-user-btn {
        width: 100%;
        justify-content: center;
    }
    
    #userManagementContent table {
        font-size: 0.8rem;
    }
    
    #userManagementContent th,
    #userManagementContent td {
        padding: 6px 3px;
    }
    
    #userManagementContent .menu-btn {
        padding: 4px 6px;
        font-size: 0.7rem;
    }
    
    #user-form-container input,
    #user-form-container select {
        padding: 8px 10px;
        font-size: 0.9rem;
    }
    
    #user-form-container button {
        padding: 8px 12px;
        font-size: 0.85rem;
    }
}