/* Reset dan Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --biru-muda: #87CEEB;
    --biru-dongker: #1e3a8a;
    --biru-medium: #3b82f6;
    --biru-light: #dbeafe;
    --white: #ffffff;
    --gray-light: #f3f4f6;
    --gray-medium: #9ca3af;
    --gray-dark: #4b5563;
    --success: #10b981;
    --error: #ef4444;
    --warning: #f59e0b;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--biru-light) 0%, var(--biru-muda) 100%);
    min-height: 100vh;
    color: var(--gray-dark);
    line-height: 1.6;
    position: relative;
}

/* Background Logo untuk Login Page */
body.login-page {
    background: linear-gradient(135deg, var(--biru-light) 0%, var(--biru-muda) 100%);
    position: relative;
}

body.login-page::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/logo.png');
    background-repeat: no-repeat;
    background-position: center center;
    background-size: 350px auto;
    opacity: 0.12;
    z-index: 0;
    pointer-events: none;
}

body.login-page::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(219, 234, 254, 0.7) 0%, rgba(135, 206, 235, 0.7) 100%);
    z-index: -1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Login Page Container */
body.login-page .container {
    position: relative;
    z-index: 1;
}

/* Login Page */
.login-box {
    max-width: 400px;
    margin: 100px auto;
    background: var(--white);
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(30, 58, 138, 0.2);
    position: relative;
    z-index: 2;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    color: var(--biru-dongker);
    font-size: 28px;
    margin-bottom: 10px;
}

.login-header p {
    color: var(--gray-medium);
    font-size: 14px;
}

.login-form {
    margin-top: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--gray-dark);
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--biru-medium);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-hint {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: var(--gray-medium);
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--biru-medium) 0%, var(--biru-dongker) 100%);
    color: var(--white);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(30, 58, 138, 0.3);
}

.btn-secondary {
    background: var(--gray-light);
    color: var(--gray-dark);
}

.btn-secondary:hover {
    background: var(--gray-medium);
    color: var(--white);
}

.btn-success {
    background: var(--success);
    color: var(--white);
}

.btn-success:hover {
    background: #059669;
}

.btn-danger {
    background: var(--error);
    color: var(--white);
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-small {
    padding: 8px 16px;
    font-size: 12px;
}

.btn-block {
    width: 100%;
    display: block;
}

/* Header */
.header {
    background: linear-gradient(135deg, var(--biru-dongker) 0%, var(--biru-medium) 100%);
    color: var(--white);
    padding: 20px 0;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h1 {
    font-size: 24px;
    font-weight: 600;
}

.header-user {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-user span {
    font-size: 14px;
}

/* Cards */
.card {
    background: var(--white);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--biru-light);
}

.card-header h2 {
    color: var(--biru-dongker);
    font-size: 20px;
    font-weight: 600;
}

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.table th,
.table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.table th {
    background: var(--biru-light);
    color: var(--biru-dongker);
    font-weight: 600;
    font-size: 14px;
}

.table tr:hover {
    background: var(--gray-light);
}

.table tr:last-child td {
    border-bottom: none;
}

/* Alerts */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border-left: 4px solid var(--success);
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border-left: 4px solid var(--error);
}

.alert-info {
    background: var(--biru-light);
    color: var(--biru-dongker);
    border-left: 4px solid var(--biru-medium);
}

/* Form Styles */
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

/* Badge */
.badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.badge-success {
    background: #d1fae5;
    color: #065f46;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge-info {
    background: var(--biru-light);
    color: var(--biru-dongker);
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(135deg, var(--biru-medium) 0%, var(--biru-dongker) 100%);
    color: var(--white);
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.stat-card h3 {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 10px;
    font-weight: 400;
}

.stat-card .stat-value {
    font-size: 32px;
    font-weight: 700;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--white);
    padding: 30px;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--biru-light);
}

.modal-header h2 {
    color: var(--biru-dongker);
    font-size: 20px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--gray-medium);
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: var(--error);
}

/* Absen Status */
.absen-status {
    text-align: center;
    padding: 40px 20px;
}

.absen-status-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.absen-status h2 {
    color: var(--biru-dongker);
    margin-bottom: 10px;
}

.absen-status p {
    color: var(--gray-medium);
    margin-bottom: 30px;
}

.absen-info {
    background: var(--biru-light);
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.absen-info-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(30, 58, 138, 0.1);
}

.absen-info-item:last-child {
    border-bottom: none;
}

.absen-info-item strong {
    color: var(--biru-dongker);
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Responsive */
@media (max-width: 768px) {
    .login-box {
        margin: 50px auto;
        padding: 30px 20px;
    }
    
    .header-content {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .table {
        font-size: 14px;
    }
    
    .table th,
    .table td {
        padding: 8px 10px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* Loading */
.loading {
    text-align: center;
    padding: 40px;
    color: var(--gray-medium);
}

/* Text Utilities */
.text-center {
    text-align: center;
}

.table-responsive {
    overflow-x: auto;
}
