:root {
    --primary: #4361ee;
    --secondary: #3f37c9;
    --accent: #4895ef;
    --dark: #1b263b;
    --light: #f8f9fa;
    --success: #4cc9f0;
    --warning: #f8961e;
    --danger: #f72585;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f7fa;
    color: #333;
}

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

/* Login Page */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.login-box h1 {
    margin-bottom: 30px;
    color: var(--dark);
}

.login-tabs {
    display: flex;
    margin-bottom: 20px;
}

.login-tab {
    flex: 1;
    padding: 10px;
    cursor: pointer;
    background: #eee;
    border: none;
    transition: all 0.3s;
}

.login-tab.active {
    background: var(--primary);
    color: white;
}

.login-tab:first-child {
    border-radius: 5px 0 0 5px;
}

.login-tab:last-child {
    border-radius: 0 5px 5px 0;
}

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

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

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    transition: border 0.3s;
}

.form-control:focus {
    border-color: var(--primary);
    outline: none;
}

.btn {
    display: inline-block;
    padding: 12px 20px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s;
    width: 100%;
}

.btn:hover {
    background: var(--secondary);
    transform: translateY(-2px);
}

.btn-block {
    display: block;
    width: 100%;
}

/* Dashboard */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    margin-bottom: 30px;
    border-bottom: 1px solid #eee;
}

.header h1 {
    color: var(--dark);
}

.user-info {
    display: flex;
    align-items: center;
}

.user-info img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 10px;
}

.logout-btn {
    background: var(--danger);
    padding: 8px 15px;
    margin-left: 15px;
}

.logout-btn:hover {
    background: #d40c5e;
}

/* Cards */
.card-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

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

.card-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--dark);
}

.card-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.card-icon.blue {
    background: var(--accent);
}

.card-icon.green {
    background: var(--success);
}

.card-icon.orange {
    background: var(--warning);
}

.card-value {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 5px;
}

.card-description {
    color: #666;
    font-size: 14px;
}

/* Tables */
.table-container {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

th {
    background: #f8f9fa;
    font-weight: 600;
    color: var(--dark);
}

tr:hover {
    background: #f8f9fa;
}

/* Buttons */
.btn-sm {
    padding: 8px 12px;
    font-size: 14px;
}

.btn-primary {
    background: var(--primary);
}

.btn-primary:hover {
    background: var(--secondary);
}

.btn-success {
    background: var(--success);
}

.btn-success:hover {
    background: #3aa8d8;
}

.btn-warning {
    background: var(--warning);
}

.btn-warning:hover {
    background: #e07c0e;
}

.btn-danger {
    background: var(--danger);
}

.btn-danger:hover {
    background: #d40c5e;
}

/* Forms */
.form-container {
    background: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    max-width: 600px;
    margin: 0 auto;
}

.form-title {
    margin-bottom: 20px;
    color: var(--dark);
    text-align: center;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    border-radius: 10px;
    padding: 30px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

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

.modal-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--dark);
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
}

/* Responsive */
@media (max-width: 768px) {
    .card-container {
        grid-template-columns: 1fr;
    }
    
    .header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .user-info {
        margin-top: 15px;
    }
}

/* Animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.animated {
    animation: fadeIn 0.5s ease-out;
}

.btn-sm {
    padding: 6px 10px;
    font-size: 13px;
    margin: 2px;
}

.btn-primary {
    background-color: #4361ee;
}

.btn-primary:hover {
    background-color: #3a56d4;
}

.modal {
    /* Pastikan modal tampil di atas konten lain */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
}