@import url("https://cdnjs.cloudflare.com/ajax/libs/meyer-reset/2.0/reset.min.css");
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

* { box-sizing: border-box; font-family: 'Poppins', sans-serif; }

body {
    margin: 0; padding: 0;
    background-color: #050b14;
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(73, 21, 148, 0.4), transparent 50%),
        radial-gradient(circle at 85% 30%, rgba(25, 175, 235, 0.3), transparent 50%),
        radial-gradient(circle at 50% 80%, rgba(147, 51, 234, 0.3), transparent 50%),
        linear-gradient(135deg, #050b14 0%, #0a1128 50%, #1a0b2e 100%);
    background-attachment: fixed;
    color: #ffffff; min-height: 100vh;
    display: flex; flex-direction: column; align-items: center; padding: 50px 20px;
}

.container {
    width: 100%; max-width: 900px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px; padding: 40px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

.header-action { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; }
.header-action h2 { font-size: 26px; font-weight: 600; color: #32b5ff; margin: 0; }

.btn {
    padding: 10px 20px; border-radius: 8px; border: none;
    font-size: 14px; font-weight: 500; cursor: pointer; text-decoration: none;
    transition: all 0.3s ease; display: inline-flex; align-items: center; gap: 8px;
}
.btn-add { background: linear-gradient(90deg, #32b5ff, #c480ff); color: #fff; box-shadow: 0 4px 15px rgba(50, 181, 255, 0.3); }
.btn-add:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(50, 181, 255, 0.5); }
.btn-back { background: transparent; border: 1px solid #d1d1d1; color: #d1d1d1; margin-bottom: 20px; display: inline-block; }
.btn-back:hover { background: rgba(255,255,255,0.1); color: #fff; border-color: #fff; }

table { width: 100%; border-collapse: collapse; margin-top: 10px; }
th, td { padding: 15px; text-align: left; border-bottom: 1px solid rgba(255, 255, 255, 0.05); }
th { font-weight: 600; color: #d1d1d1; text-transform: uppercase; font-size: 13px; letter-spacing: 1px; }
tr:hover { background: rgba(255, 255, 255, 0.03); }

.td-image img { width: 50px; height: 50px; object-fit: contain; border-radius: 8px; }
.td-name { font-weight: 500; font-size: 16px; }

.action-btns { display: flex; gap: 10px; }
.btn-edit { background: rgba(50, 181, 255, 0.2); color: #32b5ff; border: 1px solid #32b5ff; padding: 6px 12px; }
.btn-edit:hover { background: #32b5ff; color: #050b14; }
.btn-delete { background: rgba(255, 77, 77, 0.2); color: #ff4d4d; border: 1px solid #ff4d4d; padding: 6px 12px; }
.btn-delete:hover { background: #ff4d4d; color: #fff; }

.alert-success {
    background: rgba(39, 174, 96, 0.2); border: 1px solid #27ae60; color: #2ecc71;
    padding: 15px; border-radius: 10px; margin-bottom: 20px; width: 100%; max-width: 900px;
    backdrop-filter: blur(10px); text-align: center; font-weight: 500;
}

/* Tambahan Style spesifik Form */
.form-container {
    width: 100%; max-width: 500px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px; padding: 40px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}
.form-container h2 { margin: 0 0 25px 0; font-size: 24px; font-weight: 600; color: #32b5ff; text-align: center; }
.form-group { margin-bottom: 25px; }
label { display: block; margin-bottom: 10px; color: #d1d1d1; font-size: 14px; font-weight: 500; }
input[type="text"] {
    width: 100%; padding: 12px 15px;
    background: rgba(0, 0, 0, 0.4); border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px; color: #fff; font-size: 15px; outline: none; transition: all 0.3s;
}
input[type="text"]:focus { border-color: #32b5ff; box-shadow: 0 0 8px rgba(50, 181, 255, 0.3); }
.file-upload-wrapper {
    position: relative; width: 100%; height: 120px;
    border: 2px dashed rgba(50, 181, 255, 0.5);
    border-radius: 8px; background: rgba(0, 0, 0, 0.2);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    cursor: pointer; transition: all 0.3s ease; overflow: hidden;
}
.file-upload-wrapper:hover { border-color: #32b5ff; background: rgba(50, 181, 255, 0.1); }
.file-upload-wrapper input[type="file"] { position: absolute; width: 100%; height: 100%; opacity: 0; cursor: pointer; z-index: 2; }
.upload-text { color: #d1d1d1; font-size: 14px; text-align: center; pointer-events: none; }
.upload-text span { color: #32b5ff; font-weight: 600; }
#imagePreview { display: none; max-height: 80px; max-width: 80px; object-fit: contain; z-index: 1; border-radius: 4px; margin-bottom: 10px; }
.btn-group { display: flex; gap: 15px; margin-top: 30px; }
.btn-submit { background: linear-gradient(90deg, #32b5ff, #c480ff); color: #fff; box-shadow: 0 4px 15px rgba(50, 181, 255, 0.3); flex: 1; text-align: center; }
.btn-submit:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(50, 181, 255, 0.5); }
.btn-cancel { flex: 1; text-align: center; background: transparent; border: 1px solid #d1d1d1; color: #d1d1d1; }
.btn-cancel:hover { background: rgba(255,255,255,0.1); color: #fff; border-color: #fff; }
.error-text { color: #ff4d4d; font-size: 12px; margin-top: 5px; display: block; }
/* =========================================
    CUSTOM MODAL POPUP STYLES
========================================= */
.modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(5, 11, 20, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex; justify-content: center; align-items: center;
    z-index: 9999;
    opacity: 0; pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-box {
    background: rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 35px 30px;
    width: 90%; max-width: 420px;
    text-align: center;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.5);
    transform: scale(0.8);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-overlay.active .modal-box {
    transform: scale(1);
}

.modal-icon {
    font-size: 40px;
    margin-bottom: 15px;
    animation: pulse 2s infinite;
}

.modal-box h3 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #ffffff;
}

.modal-box p {
    font-size: 14px;
    color: #d1d1d1;
    line-height: 1.5;
    margin-bottom: 30px;
}

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

.btn-modal-cancel {
    flex: 1; padding: 12px; border-radius: 8px;
    background: transparent; border: 1px solid rgba(255, 255, 255, 0.2);
    color: #d1d1d1; font-size: 14px; font-weight: 500; cursor: pointer;
    transition: all 0.2s;
}
.btn-modal-cancel:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border-color: #ffffff;
}

.btn-modal-confirm {
    flex: 1; padding: 12px; border-radius: 8px;
    background: rgba(255, 77, 77, 0.2);
    border: 1px solid #ff4d4d;
    color: #ff4d4d; font-size: 14px; font-weight: 500; cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 77, 77, 0.1);
    transition: all 0.2s;
}
.btn-modal-confirm:hover {
    background: #ff4d4d;
    color: #ffffff;
    box-shadow: 0 6px 20px rgba(255, 77, 77, 0.4);
    transform: translateY(-1px);
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}