* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    min-height: 100vh;
}

/* Login Page */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-container {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 450px;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.login-container h1 {
    color: #333;
    text-align: center;
    margin-bottom: 10px;
    font-size: 28px;
}

.login-container h2 {
    color: #6a11cb;
    text-align: center;
    margin-bottom: 30px;
    font-size: 22px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 600;
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 15px;
    border: 2px solid #e1e1e1;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s;
    background: #f9f9f9;
}

.form-group input:focus {
    outline: none;
    border-color: #6a11cb;
    background: white;
    box-shadow: 0 0 0 3px rgba(106, 17, 203, 0.1);
}

.btn-login {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    margin-top: 10px;
}

.btn-login:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(106, 17, 203, 0.3);
}

.btn-login:active {
    transform: translateY(0);
}

.error-message {
    background: #fee;
    color: #c33;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 25px;
    border-left: 4px solid #c33;
    font-size: 14px;
}

.demo-credentials {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9ff;
    border-radius: 10px;
    font-size: 14px;
    border: 1px solid #e1e1e1;
}

.demo-credentials h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 16px;
}

.demo-credentials p {
    margin: 8px 0;
    color: #555;
}

.demo-credentials code {
    background: #e1e1e1;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
}

/* Dashboard */
.dashboard {
    padding: 20px;
    background: #f5f7fa;
    min-height: 100vh;
}

.header {
    background: white;
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.header h1 {
    color: #333;
    font-size: 28px;
    margin-bottom: 5px;
}

.header p {
    color: #666;
    font-size: 16px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-role {
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
}

.btn-logout {
    background: #ff4757;
    color: white;
    padding: 10px 25px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.3s;
}

.btn-logout:hover {
    background: #ff3742;
}

/* Content Cards */
.content-grid {
    display: grid;
    gap: 30px;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.flex-container {
    display: flex;
    flex-direction: column; /* jadi 1 kolom vertikal */
}

.card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    margin-bottom: 30px;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.12);
}

.card h2 {
    color: #333;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 3px solid #6a11cb;
    font-size: 22px;
}

/* Table Styles */
.table-container {
    overflow-x: auto;
    margin: 20px 0;
    border-radius: 10px;
    border: 1px solid #e1e1e1;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

thead {
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    color: white;
}

th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
}

td {
    padding: 15px;
    border-bottom: 1px solid #e1e1e1;
    color: #555;
}

tbody tr {
    transition: background 0.3s;
}

tbody tr:hover {
    background: #f8f9ff;
}

/* Status Badges */
.status-badge {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
    min-width: 100px;
    text-align: center;
}

.status-hadir {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-izin {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.status-tidak_hadir {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Form Elements */
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.form-group select {
    width: 100%;
    padding: 15px;
    border: 2px solid #e1e1e1;
    border-radius: 10px;
    font-size: 16px;
    background: #f9f9f9;
    cursor: pointer;
}

.form-group select:focus {
    outline: none;
    border-color: #6a11cb;
    background: white;
}

.btn-submit {
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    color: white;
    padding: 15px 35px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.btn-submit:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(106, 17, 203, 0.3);
}

/* Task List */
.task-list {
    display: grid;
    gap: 20px;
}

.task-item {
    background: #f8f9ff;
    padding: 25px;
    border-radius: 10px;
    border-left: 5px solid #6a11cb;
    transition: transform 0.3s;
}

.task-item:hover {
    transform: translateX(5px);
}

.task-item h3 {
    color: #333;
    margin-bottom: 10px;
    font-size: 18px;
}

.task-item p {
    color: #666;
    margin-bottom: 15px;
    line-height: 1.6;
}

.task-meta {
    display: flex;
    gap: 20px;
    color: #777;
    font-size: 14px;
}

.deadline {
    color: #ff6b6b;
    font-weight: 600;
}

/* Alert Messages */
.alert {
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    animation: slideIn 0.5s ease;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* XSS Warning Box */
.xss-warning {
    background: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 10px;
    padding: 20px;
    margin-top: 20px;
}

.xss-warning h3 {
    color: #856404;
    margin-bottom: 10px;
}

.xss-warning code {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 5px;
    display: block;
    margin: 10px 0;
    font-family: monospace;
    font-size: 14px;
    overflow-x: auto;
}

/* Responsive */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .user-info {
        width: 100%;
        justify-content: space-between;
    }
    
    .login-container {
        padding: 25px;
    }
    
    .card {
        padding: 20px;
    }
}

/* Tambahkan di akhir file */

/* Tombol Aksi */
.btn-action {
    background: #4CAF50;
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    display: inline-block;
}

.btn-action:hover {
    background: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 5px 10px rgba(0,0,0,0.1);
}

/* XSS Warning Box */
.xss-warning {
    background: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 10px;
    padding: 20px;
    margin-top: 20px;
    animation: fadeIn 0.5s ease;
}

.xss-warning h3 {
    color: #856404;
    margin-bottom: 10px;
}

.xss-warning code {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 5px;
    display: block;
    margin: 10px 0;
    font-family: monospace;
    font-size: 14px;
    overflow-x: auto;
    border: 1px solid #e1e1e1;
}

/* Form Select Styling */
select {
    padding: 12px;
    border: 2px solid #e1e1e1;
    border-radius: 8px;
    font-size: 16px;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s;
}

select:focus {
    outline: none;
    border-color: #6a11cb;
    box-shadow: 0 0 0 3px rgba(106, 17, 203, 0.1);
}

/* Progress Bar */
.progress-bar {
    height: 20px;
    background: #e1e1e1;
    border-radius: 10px;
    overflow: hidden;
    margin: 10px 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    border-radius: 10px;
    transition: width 0.5s ease;
}

/* Responsive Tables */
@media (max-width: 768px) {
    .table-container {
        font-size: 14px;
    }
    
    .absensi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .kehadiran-summary {
        grid-template-columns: 1fr;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Quick Action Buttons */
.quick-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.quick-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.quick-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 10px rgba(0,0,0,0.2);
}

/* Tambahkan di akhir file style.css */

/* Form dengan dua tombol */
.form-row-buttons {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.btn-refresh {
    background: #4CAF50;
    color: white;
    padding: 15px 25px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.btn-refresh:hover {
    background: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* XSS Demo Box */
.xss-demo {
    background: #e9f7fe;
    border: 1px solid #2196F3;
    border-radius: 10px;
    padding: 15px;
    margin: 15px 0;
}

.xss-demo h3 {
    color: #1976D2;
    margin-bottom: 10px;
}

.xss-demo code {
    background: white;
    padding: 8px;
    border-radius: 4px;
    display: block;
    margin: 5px 0;
    font-family: monospace;
    font-size: 14px;
    word-break: break-all;
}

/* Responsive untuk tombol */
@media (max-width: 768px) {
    .form-row-buttons {
        flex-direction: column;
    }
    
    .btn-submit, .btn-refresh {
        width: 100%;
    }
}