/* CSS untuk halaman login dan dashboard dengan warna pastel */

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #fdfdfe 0%, #f8f9ff 100%);
    color: #5a5a72;
}

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

/* Navbar styling */
.navbar {
    background: linear-gradient(135deg, #a7c5eb 0%, #c6d1e8 100%);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #5a5a72;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 2px 15px rgba(135, 190, 245, 0.2);
    margin-bottom: 20px;
}

.navbar-title {
    margin: 0;
    font-size: 1.5em;
    font-weight: 600;
    color: #5a5a72;
}

.nav-links {
    display: flex;
    gap: 15px;
}

.nav-btn {
    background: rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.5);
    padding: 8px 15px;
    border-radius: 20px;
    color: #5a5a72;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.9em;
    transition: all 0.3s ease;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

.logout-btn {
    background: rgba(255, 179, 179, 0.4);
}

.logout-btn:hover {
    background: rgba(255, 179, 179, 0.6);
}

.disabled-btn {
    background: rgba(200, 200, 200, 0.3) !important;
    cursor: not-allowed !important;
    opacity: 0.6;
    pointer-events: none;
}

.disabled-btn:hover {
    background: rgba(200, 200, 200, 0.3) !important;
    transform: none !important;
}

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

.pulse-once {
    animation: pulse 1.5s ease-in-out;
}

/* Login form styling */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
}

.login-form {
    background: linear-gradient(to bottom right, #ffffff, #f8f9ff);
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(135, 190, 245, 0.15);
    width: 100%;
    max-width: 450px;
    border: 1px solid #e6e9f9;
}

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

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

.form-group input {
    width: 100%;
    padding: 14px;
    border: 1px solid #e0e6ef;
    border-radius: 8px;
    box-sizing: border-box;
    background: #f8fafd;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #a7c5eb;
    box-shadow: 0 0 0 3px rgba(167, 197, 235, 0.2);
}

.btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #a7c5eb 0%, #7ba6dd 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(167, 197, 235, 0.4);
}

.error-message {
    color: #ff6b6b;
    text-align: center;
    margin-top: 15px;
    background: rgba(255, 107, 107, 0.1);
    padding: 10px;
    border-radius: 5px;
}

/* Dashboard layout */
.dashboard-container {
    display: flex;
    gap: 20px;
}

.sidebar {
    flex: 0 0 250px;
    background: linear-gradient(to bottom, #ffffff, #f8f9ff);
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(135, 190, 245, 0.1);
    height: fit-content;
    border: 1px solid #e6e9f9;
}

.sidebar-menu {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.sidebar-menu li {
    margin-bottom: 12px;
}

.sidebar-menu a {
    display: block;
    padding: 12px 15px;
    text-decoration: none;
    color: #7b8793;
    border-radius: 8px;
    transition: all 0.2s;
    font-weight: 500;
}

.sidebar-menu a:hover, .sidebar-menu a.active {
    background: rgba(167, 197, 235, 0.15);
    color: #5a7bc4;
    transform: translateX(5px);
}

.main-content {
    flex: 1;
    background: linear-gradient(to bottom, #ffffff, #f8f9ff);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(135, 190, 245, 0.1);
    border: 1px solid #e6e9f9;
}

.content-header {
    margin-top: 0;
    color: #5a5a72;
    border-bottom: 1px solid #eef2f7;
    padding-bottom: 15px;
    font-size: 1.5em;
    font-weight: 600;
}

/* Table styling */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(135, 190, 245, 0.1);
}

.data-table th, .data-table td {
    padding: 14px;
    text-align: left;
    border-bottom: 1px solid #eef2f7;
}

.data-table th {
    background: linear-gradient(135deg, #f0f4ff 0%, #e6ebff 100%);
    color: #5a5a72;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85em;
    letter-spacing: 0.5px;
}

.data-table tr:hover {
    background-color: #f8fafd;
}

.action-buttons {
    display: flex;
    gap: 8px;
}

.action-btn {
    padding: 7px 12px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.85em;
    transition: all 0.2s;
    font-weight: 500;
}

.edit-btn {
    background: linear-gradient(135deg, #a7c5eb 0%, #7ba6dd 100%);
    color: white;
}

.delete-btn {
    background: linear-gradient(135deg, #ffb3b3 0%, #ff8c8c 100%);
    color: white;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(0,0,0,0.1);
}

/* Form styling */
.form-container {
    background: linear-gradient(to bottom right, #ffffff, #f8f9ff);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(135, 190, 245, 0.1);
    max-width: 700px;
    border: 1px solid #e6e9f9;
}

.form-row {
    display: flex;
    gap: 25px;
    margin-bottom: 20px;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

/* QR Scanner styling */
.qr-scanner-container {
    text-align: center;
    padding: 20px;
}

.qr-scanner-box {
    margin: 30px auto;
    padding: 30px;
    border: 2px dashed #a7c5eb;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f4ff 100%);
    box-shadow: 0 5px 15px rgba(135, 190, 245, 0.1);
}

.qr-result {
    margin-top: 30px;
    padding: 20px;
    border-radius: 10px;
    display: none;
    text-align: center;
}

.success {
    background: linear-gradient(135deg, #d4f0d8 0%, #c1e8c7 100%);
    color: #2a7d3e;
    border: 1px solid #b5e0bb;
}

.error {
    background: linear-gradient(135deg, #fddfdf 0%, #fcc5c5 100%);
    color: #c53030;
    border: 1px solid #f5bfbf;
}

/* Card styling for dashboard items */
.dashboard-card {
    background: linear-gradient(to bottom right, #ffffff, #f8f9ff);
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(135, 190, 245, 0.15);
    text-align: center;
    border: 1px solid #e6e9f9;
    transition: transform 0.3s;
}

.dashboard-card:hover {
    transform: translateY(-5px);
}

.dashboard-card h3 {
    margin-top: 0;
    color: #7b8793;
    font-size: 1.1em;
}

.dashboard-card p {
    font-size: 2.2em;
    margin: 10px 0;
    color: #5a7bc4;
    font-weight: 700;
}

/* Responsive design */
@media (max-width: 768px) {
    .dashboard-container {
        flex-direction: column;
    }
    
    .sidebar {
        flex: none;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .navbar {
        flex-direction: column;
        gap: 15px;
    }
    
    .nav-links {
        width: 100%;
        justify-content: center;
    }
    
    .data-table {
        font-size: 0.9em;
    }
    
    .data-table th, .data-table td {
        padding: 8px;
    }
}

@media (max-width: 480px) {
    .login-form, .form-container {
        padding: 25px;
    }
    
    .dashboard-card p {
        font-size: 1.8em;
    }
    
    .qr-scanner-box {
        padding: 20px;
    }
}