/* Reset dan Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

/* Login Popup Styles */
.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 1;
    visibility: visible;
    transition: all 0.3s ease;
}

.login-overlay.hidden {
    opacity: 0;
    visibility: hidden;
}

.login-popup {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 400px;
    text-align: center;
    transform: scale(1);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
}

.login-overlay.hidden .login-popup {
    transform: scale(0.8);
}

.login-popup h2 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 28px;
    font-weight: bold;
    background: linear-gradient(45deg, #3498db, #2980b9);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-popup p {
    color: #7f8c8d;
    margin-bottom: 30px;
    font-size: 16px;
    line-height: 1.5;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    position: relative;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #34495e;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.form-group input {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e8e8e8;
    border-radius: 25px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
}

.form-group input:focus {
    outline: none;
    border-color: #3498db;
    background: rgba(255, 255, 255, 0.95);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

.form-group input::placeholder {
    color: #bdc3c7;
    font-style: italic;
}

.password-toggle {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #7f8c8d;
    font-size: 18px;
    padding: 0;
    margin: 0;
    width: auto;
    height: auto;
    box-shadow: none;
}

.password-toggle:hover {
    color: #3498db;
    transform: translateY(-50%) scale(1.1);
}

.login-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 20px 0;
    flex-wrap: wrap;
    gap: 10px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #7f8c8d;
    font-size: 14px;
}

.remember-me input[type="checkbox"] {
    width: auto;
    margin: 0;
    accent-color: #3498db;
}

.forgot-password {
    color: #3498db;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.forgot-password:hover {
    color: #2980b9;
    text-decoration: underline;
}

.login-btn {
    background: linear-gradient(45deg, #3498db, #2980b9);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 10px;
}

.login-btn:hover {
    background: linear-gradient(45deg, #2980b9, #3498db);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.5);
}

.login-btn:active {
    transform: translateY(-1px);
}

.close-popup {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 24px;
    color: #bdc3c7;
    cursor: pointer;
    width: auto;
    height: auto;
    padding: 5px;
    border-radius: 50%;
    box-shadow: none;
    transition: all 0.3s ease;
}

.close-popup:hover {
    color: #e74c3c;
    background: rgba(231, 76, 60, 0.1);
    transform: rotate(90deg);
}

.social-login {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e8e8e8;
}

.social-login p {
    color: #7f8c8d;
    margin-bottom: 15px;
    font-size: 14px;
}

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

.social-btn {
    padding: 12px 20px;
    border: 2px solid #e8e8e8;
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    color: #7f8c8d;
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    justify-content: center;
    box-shadow: none;
}

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

.social-btn.google {
    border-color: #db4437;
    color: #db4437;
}

.social-btn.google:hover {
    background: #db4437;
    color: white;
}

.social-btn.facebook {
    border-color: #4267B2;
    color: #4267B2;
}

.social-btn.facebook:hover {
    background: #4267B2;
    color: white;
}

/* Main Content Hidden by Default */
.main-content {
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s ease;
}

.main-content.visible {
    opacity: 1;
    visibility: visible;
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
    margin-right: 10px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Header Navigation */
header {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    margin-bottom: 30px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.37);
}

.navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.navigation a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 10px 20px;
    border-radius: 25px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.navigation a:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.btnLogin-popup {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btnLogin-popup:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* Search Input */
#searchInput {
    width: 100%;
    max-width: 400px;
    padding: 15px 25px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    margin: 0 auto 30px auto;
    display: block;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.37);
    transition: all 0.3s ease;
}

#searchInput:focus {
    outline: none;
    transform: scale(1.02);
    box-shadow: 0 12px 40px rgba(31, 38, 135, 0.5);
}

#searchInput::placeholder {
    color: #666;
}

/* Table Container */
.table-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    overflow-x: auto;
    margin: 0 auto;
    max-width: 1200px;
}

/* Table Styles */
table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Caption Styling */
caption {
    padding: 20px;
    font-size: 24px;
    font-weight: bold;
    color: #2c3e50;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    background: linear-gradient(45deg, #3498db, #2980b9);
    color: white;
    margin: 0;
    text-align: center;
}

caption:first-of-type {
    font-size: 28px;
    border-radius: 15px 15px 0 0;
}

caption:last-of-type {
    font-size: 20px;
    background: linear-gradient(45deg, #2980b9, #3498db);
}

/* Header Styles */
thead {
    background: linear-gradient(45deg, #34495e, #2c3e50);
}

th {
    padding: 20px 15px;
    text-align: center;
    font-weight: bold;
    color: white;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
}

th:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: #3498db;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

th:hover:after {
    width: 80%;
}

/* Body Styles */
tbody tr {
    transition: all 0.3s ease;
    border-bottom: 1px solid #e8e8e8;
}

tbody tr:nth-child(even) {
    background-color: #f8f9fa;
}

tbody tr:hover {
    background: linear-gradient(45deg, rgba(52, 152, 219, 0.1), rgba(155, 89, 182, 0.1));
    transform: scale(1.01);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

td {
    padding: 15px;
    text-align: center;
    vertical-align: middle;
    font-size: 14px;
    border-right: 1px solid #e8e8e8;
}

td:last-child {
    border-right: none;
}

/* Number Column */
td:first-child {
    font-weight: bold;
    background: linear-gradient(45deg, #ecf0f1, #bdc3c7);
    color: #2c3e50;
    width: 60px;
}

/* Name Column */
td:nth-child(2) {
    font-weight: 600;
    color: #2c3e50;
    text-align: left;
    max-width: 200px;
}

/* Button Styles */
button:not(.close-popup):not(.password-toggle):not(.btnLogin-popup):not(.login-btn):not(.social-btn) {
    background: linear-gradient(45deg, #3498db, #2980b9);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
    font-size: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(52, 152, 219, 0.3);
}

button:not(.close-popup):not(.password-toggle):not(.btnLogin-popup):not(.login-btn):not(.social-btn):hover {
    background: linear-gradient(45deg, #2980b9, #3498db);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.4);
}

button:not(.close-popup):not(.password-toggle):not(.btnLogin-popup):not(.login-btn):not(.social-btn):active {
    transform: translateY(0);
}

/* Empty Cells Styling */
td:empty {
    background-color: #ecf0f1;
    position: relative;
}

td:empty:before {
    content: '-';
    color: #bdc3c7;
    font-style: italic;
}

/* Animation for table load */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.main-content.visible .table-container {
    animation: smoothZoomIn 1.2s cubic-bezier(0.4, 0.0, 0.2, 1);
    will-change: opacity, transform;
}
@keyframes smoothZoomIn {
    0% {
        opacity: 0;
        transform: scale(0.97);
    }
    70% {
        opacity: 1;
        transform: scale(1.02);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

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

/* Success message */
.success-message {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(45deg, #27ae60, #2ecc71);
    color: white;
    padding: 15px 25px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(39, 174, 96, 0.3);
    z-index: 1001;
    transform: translateX(400px);
    transition: all 0.3s ease;
}

.success-message.show {
    transform: translateX(0);
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .navigation {
        flex-direction: column;
        text-align: center;
    }
    
    .navigation a {
        margin: 5px;
    }
    
    .table-container {
        padding: 15px;
        border-radius: 10px;
    }
    
    table {
        font-size: 12px;
    }
    
    th, td {
        padding: 10px 5px;
    }
    
    caption {
        font-size: 18px;
        padding: 15px;
    }
    
    caption:first-of-type {
        font-size: 22px;
    }
    
    .login-popup {
        padding: 30px 25px;
        margin: 20px;
    }
    
    .login-popup h2 {
        font-size: 24px;
    }
    
    .social-buttons {
        flex-direction: column;
    }
    
    .login-options {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
}

/* Scrollbar Styling */
.table-container::-webkit-scrollbar {
    height: 8px;
    width: 8px;
}

.table-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.table-container::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, #3498db, #2980b9);
    border-radius: 10px;
}

.table-container::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, #2980b9, #3498db);
}