/* Global Styles */
:root {
    --primary-color: #4361ee;
    --primary-dark: #3730a3;
    --secondary-color: #06d6a0;
    --danger-color: #ef476f;
    --warning-color: #ffd166;
    --dark-color: #1e293b;
    --light-color: #f8fafc;
    --gray-color: #64748b;
    --border-radius: 12px;
    --box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: var(--dark-color);
}

/* Login Page Styles */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    gap: 40px;
    flex-wrap: wrap;
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    width: 100%;
    max-width: 420px;
    animation: slideIn 0.5s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header .logo {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    font-size: 36px;
    color: white;
}

.login-header h1 {
    font-size: 28px;
    color: var(--dark-color);
    margin-bottom: 5px;
}

.login-header p {
    color: var(--gray-color);
    font-size: 14px;
}

.login-form .form-group {
    margin-bottom: 20px;
}

.login-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--dark-color);
    font-size: 14px;
}

.input-group {
    position: relative;
}

.input-group i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-color);
    font-size: 16px;
}

.input-group input,
.input-group select {
    width: 100%;
    padding: 14px 14px 14px 45px;
    border: 2px solid #e2e8f0;
    border-radius: var(--border-radius);
    font-size: 14px;
    font-family: inherit;
    transition: var(--transition);
    background: #f8fafc;
}

.input-group input:focus,
.input-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    background: white;
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

.btn-login {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    margin-top: 10px;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(67, 97, 238, 0.3);
}

.message {
    margin-top: 15px;
    text-align: center;
}

.message .success {
    background: #dcfce7;
    color: #166534;
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
}

.message .error {
    background: #fee2e2;
    color: #991b1b;
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
}

.message .loading {
    background: #dbeafe;
    color: #1e40af;
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
}

.login-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.login-footer p {
    color: var(--gray-color);
    font-size: 13px;
}

.login-info {
    background: white;
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    max-width: 320px;
}

.login-info h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: var(--dark-color);
}

.login-info h3 i {
    color: var(--primary-color);
    margin-right: 8px;
}

.info-item {
    padding: 10px;
    background: #f8fafc;
    border-radius: 8px;
    margin-bottom: 10px;
    font-size: 13px;
    color: var(--gray-color);
}

.info-item strong {
    color: var(--dark-color);
}

/* Dashboard Layout */
.dashboard-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styles */
.sidebar {
    width: 280px;
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    color: white;
    position: fixed;
    height: 100vh;
    padding: 0;
    overflow-y: auto;
}

.sidebar-header {
    padding: 25px 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
}

.sidebar-header i {
    font-size: 32px;
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.sidebar-header h2 {
    font-size: 20px;
    font-weight: 600;
}

.user-info {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.user-avatar {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
}

.user-details h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 3px;
}

.user-details p {
    font-size: 12px;
    opacity: 0.7;
}

.nav-menu {
    list-style: none;
    padding: 20px 0;
}

.nav-menu li {
    margin-bottom: 5px;
}

.nav-menu li a {
    display: flex;
    align-items: center;
    padding: 14px 25px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.nav-menu li a i {
    margin-right: 12px;
    width: 20px;
    text-align: center;
}

.nav-menu li a:hover,
.nav-menu li.active a {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-left-color: var(--secondary-color);
}

/* Main Content */
.main-content {
    margin-left: 280px;
    flex: 1;
    padding: 30px;
    background: #f1f5f9;
    min-height: 100vh;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    background: white;
    padding: 20px 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.header h1 {
    font-size: 24px;
    color: var(--dark-color);
    display: flex;
    align-items: center;
    gap: 12px;
}

.header h1 i {
    color: var(--primary-color);
}

.date-info {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--gray-color);
    font-size: 14px;
}

/* Stats Cards */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
}

.stat-info h3 {
    font-size: 28px;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 5px;
}

.stat-info p {
    font-size: 14px;
    color: var(--gray-color);
}

/* Content Sections */
.content-section {
    background: white;
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 30px;
}

.section-header {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.section-header h2 {
    font-size: 20px;
    color: var(--dark-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-header h2 i {
    color: var(--primary-color);
}

.section-header p {
    margin-top: 8px;
    color: var(--gray-color);
    font-size: 14px;
}

/* Table Styles */
.table-container {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
}

.data-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
}

.data-table td {
    padding: 15px;
    border-bottom: 1px solid #e2e8f0;
    font-size: 14px;
}

.data-table tbody tr {
    transition: var(--transition);
}

.data-table tbody tr:hover {
    background: #f8fafc;
}

.status-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.status-badge.hadir {
    background: #dcfce7;
    color: #166534;
}

.status-badge.tidak-hadir {
    background: #fee2e2;
    color: #991b1b;
}

.status-badge.izin {
    background: #dbeafe;
    color: #1e40af;
}

.status-badge.sakit {
    background: #fef3c7;
    color: #92400e;
}

.status-badge.active {
    background: #dcfce7;
    color: #166534;
}

.btn-action {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    margin-right: 5px;
}

.btn-view {
    background: #dbeafe;
    color: #1e40af;
}

.btn-view:hover {
    background: #bfdbfe;
}

.btn-edit {
    background: #fef3c7;
    color: #92400e;
}

.btn-edit:hover {
    background: #fde68a;
}

.btn-delete {
    background: #fee2e2;
    color: #991b1b;
}

.btn-delete:hover {
    background: #fecaca;
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 20px;
    background: #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
}

.progress {
    height: 100%;
    background: var(--secondary-color);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    color: white;
    min-width: 40px;
}

/* Schedule Grid */
.schedule-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.schedule-card {
    background: #f8fafc;
    border-radius: var(--border-radius);
    padding: 20px;
    border: 2px solid #e2e8f0;
    transition: var(--transition);
}

.schedule-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 10px 15px -3px rgba(67, 97, 238, 0.1);
}

.schedule-time {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
    font-weight: 600;
    color: var(--primary-color);
}

.schedule-info h3 {
    font-size: 18px;
    color: var(--dark-color);
    margin-bottom: 8px;
}

.schedule-info p {
    color: var(--gray-color);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.schedule-action {
    margin-top: 15px;
}

.btn-absen {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, var(--secondary-color), #059669);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.btn-absen:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(6, 214, 160, 0.3);
}

.btn-absen.done {
    background: #dcfce7;
    color: #166534;
    cursor: not-allowed;
}

/* Welcome Card */
.welcome-card {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 30px;
    border-radius: var(--border-radius);
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.welcome-content h2 {
    font-size: 24px;
    margin-bottom: 10px;
}

.welcome-content p {
    opacity: 0.9;
    font-size: 14px;
}

.welcome-icon {
    font-size: 60px;
    opacity: 0.3;
}

/* Form Container */
.form-container {
    max-width: 600px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--dark-color);
    font-size: 14px;
}

.form-group select,
.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: var(--transition);
    background: #f8fafc;
}

.form-group select:focus,
.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background: white;
}

.form-group small {
    color: var(--gray-color);
    font-size: 12px;
    margin-top: 5px;
    display: block;
}

.btn-submit {
    padding: 14px 30px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(67, 97, 238, 0.3);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: white;
    margin: 5% auto;
    padding: 0;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 500px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: slideDown 0.3s;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 18px;
    color: var(--dark-color);
}

.close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close:hover {
    color: var(--dark-color);
}

.modal-body {
    padding: 25px;
}

.modal-body p {
    margin-bottom: 15px;
    color: var(--gray-color);
}

.modal-info {
    background: #f8fafc;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.modal-info strong {
    color: var(--dark-color);
    font-size: 16px;
}

.modal-footer {
    padding: 20px 25px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.btn-cancel {
    padding: 10px 20px;
    background: #e2e8f0;
    color: var(--dark-color);
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.btn-cancel:hover {
    background: #cbd5e1;
}

.btn-confirm {
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--secondary-color), #059669);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.btn-confirm:hover {
    box-shadow: 0 10px 15px -3px rgba(6, 214, 160, 0.3);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray-color);
}

.empty-state i {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.3;
}

.empty-state p {
    font-size: 16px;
}

/* Text Danger */
.text-danger {
    color: #ef476f;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 1024px) {
    .sidebar {
        width: 80px;
    }
    
    .sidebar-header h2,
    .user-details,
    .nav-menu li a span {
        display: none;
    }
    
    .nav-menu li a {
        justify-content: center;
        padding: 15px;
    }
    
    .nav-menu li a i {
        margin-right: 0;
    }
    
    .main-content {
        margin-left: 80px;
    }
}

@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .stats-container {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .schedule-grid {
        grid-template-columns: 1fr;
    }
    
    .welcome-card {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .login-info {
        display: none;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

