/* ========================================
   GLOBAL STYLES
======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Warna Utama - Navy & Orange */
    --primary-navy: #1a3a52;
    --primary-orange: #ff6600;
    --secondary-navy: #2c5f7f;
    --light-orange: #ff8533;
    
    /* Warna Netral */
    --white: #ffffff;
    --light-gray: #f5f7fa;
    --gray: #95a5a6;
    --dark-gray: #34495e;
    --text-dark: #2c3e50;
    
    /* Status */
    --success: #27ae60;
    --danger: #e74c3c;
    --warning: #f39c12;
    --info: #3498db;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--light-gray);
    color: var(--text-dark);
    line-height: 1.6;
}

/* ========================================
   LAYOUT
======================================== */
.layout {
    display: flex;
    min-height: 100vh;
}

/* ========================================
   HAMBURGER MENU
======================================== */
.hamburger {
    display: none;
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1001;
    background: white;
    border: none;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    flex-direction: column;
    gap: 5px;
    width: 45px;
    height: 45px;
    justify-content: center;
    align-items: center;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: #1a3a52;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translateY(8px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translateY(-8px);
}

/* ========================================
   OVERLAY
======================================== */
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.overlay.active {
    display: block;
    opacity: 1;
}

/* ========================================
   SIDEBAR
======================================== */
.sidebar {
    width: 280px;
    background: linear-gradient(180deg, var(--primary-navy) 0%, var(--secondary-navy) 100%);
    color: white;
    padding: 30px 0;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    transition: transform 0.3s ease;
    z-index: 999;
}

.sidebar-title {
    padding: 0 25px;
    margin-bottom: 30px;
    font-size: 1.3rem;
    font-weight: 700;
    text-align: center;
}

.sidebar nav {
    display: flex;
    flex-direction: column;
}

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 15px 25px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s;
    gap: 12px;
    font-weight: 500;
}

.sidebar-link .icon {
    font-size: 1.3rem;
}

.sidebar-link:hover,
.sidebar-link.active {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding-left: 35px;
}

.sidebar-link.logout {
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.sidebar-link.logout:hover {
    background: rgba(231,76,60,0.2);
    border-left-color: var(--danger);
}

/* ========================================
   MAIN CONTENT
======================================== */
.content {
    flex: 1;
    margin-left: 280px;
    padding: 30px;
    transition: margin-left 0.3s ease;
}

/* ========================================
   HEADER SECTION
======================================== */
.header-section {
    margin-bottom: 30px;
}

.welcome-text h2 {
    color: #2c3e50;
    font-size: 2rem;
    margin-bottom: 5px;
}

.current-date {
    color: #7f8c8d;
    font-size: 1rem;
}

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

.page-header h3 {
    color: #2c3e50;
    font-size: 1.8rem;
}

.page-header .subtitle {
    color: #7f8c8d;
    font-size: 0.95rem;
    margin-top: 5px;
}

.header-actions {
    display: flex;
    gap: 10px;
}

/* ========================================
   SUMMARY GRID
======================================== */
.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.summary-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.summary-icon {
    font-size: 3rem;
    opacity: 0.8;
}

.summary-content h6 {
    color: #7f8c8d;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.summary-content h3 {
    color: #2c3e50;
    font-size: 2rem;
    font-weight: 700;
}

.clock-card #clock {
    color: #1a3a52;
}

/* ========================================
   CARD
======================================== */
.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 30px;
}

.card-header {
    padding: 20px 25px;
    border-bottom: 2px solid #f0f0f0;
}

.card-header h5 {
    color: #2c3e50;
    font-size: 1.2rem;
    font-weight: 700;
}

.card-body {
    padding: 25px;
}

/* ========================================
   SEARCH & FILTER
======================================== */
.search-container,
.filter-container {
    margin-bottom: 30px;
}

.search-form,
.filter-form {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.search-input-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.search-input,
.filter-input {
    flex: 1;
    min-width: 250px;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.3s;
}

.search-input:focus,
.filter-input:focus {
    outline: none;
    border-color: #1a3a52;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.filter-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    align-items: end;
}

.filter-item label {
    display: block;
    margin-bottom: 8px;
    color: #2c3e50;
    font-weight: 600;
    font-size: 0.9rem;
}

.filter-buttons {
    display: flex;
    gap: 10px;
}

/* ========================================
   BUTTONS
======================================== */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
}

.btn-primary {
    background: linear-gradient(135deg, #1a3a52 0%, #2c5f7f 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

.btn-success {
    background: #27ae60;
    color: white;
}

.btn-success:hover {
    background: #229954;
}

.btn-info {
    background: #3498db;
    color: white;
}

.btn-info:hover {
    background: #2980b9;
}

.btn-warning {
    background: #f39c12;
    color: white;
}

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

.btn-danger {
    background: #e74c3c;
    color: white;
}

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

.btn-search {
    background: #1a3a52;
    color: white;
}

.btn-search:hover {
    background: #5568d3;
}

.btn-reset {
    background: #e74c3c;
    color: white;
}

.btn-reset:hover {
    background: #c0392b;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.85rem;
}

/* ========================================
   TABLE
======================================== */
.table-responsive {
    overflow-x: auto;
}

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

.table thead {
    background: #f8f9fa;
}

.table th {
    padding: 15px;
    text-align: left;
    color: #2c3e50;
    font-weight: 700;
    border-bottom: 2px solid #e0e0e0;
    white-space: nowrap;
}

.table td {
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}

.table tbody tr:hover {
    background: #f8f9fa;
}

.table tbody tr:last-child td {
    border-bottom: none;
}

.text-center {
    text-align: center;
}

/* ========================================
   EMPLOYEE INFO
======================================== */
.employee-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.employee-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1a3a52 0%, #2c5f7f 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

/* ========================================
   BADGES
======================================== */
.badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.badge-success {
    background: #d4edda;
    color: #155724;
}

.badge-warning {
    background: #fff3cd;
    color: #856404;
}

.badge-danger {
    background: #f8d7da;
    color: #721c24;
}

.badge-info {
    background: #d1ecf1;
    color: #0c5460;
}

.date-badge {
    display: inline-block;
    padding: 6px 12px;
    background: #e3f2fd;
    color: #1976d2;
    border-radius: 6px;
    font-size: 0.9rem;
}

.time-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
}

.time-in {
    background: #e8f5e9;
    color: #2e7d32;
}

.time-out {
    background: #fff3e0;
    color: #e65100;
}

/* ========================================
   ACTION BUTTONS
======================================== */
.action-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* ========================================
   ATTENDANCE IMAGE
======================================== */
.attendance-img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s;
}

.attendance-img:hover {
    transform: scale(1.5);
}

/* ========================================
   EMPTY STATE
======================================== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-icon {
    font-size: 5rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h4 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.empty-state p {
    color: #7f8c8d;
    margin-bottom: 20px;
}

/* ========================================
   DETAIL ITEM
======================================== */
.detail-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #1a3a52;
}

.detail-item label {
    display: block;
    color: #7f8c8d;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.detail-item .value {
    color: #2c3e50;
    font-size: 1.1rem;
    font-weight: 600;
}

/* ========================================
   RESPONSIVE DESIGN
======================================== */
@media (max-width: 992px) {
    .hamburger {
        display: flex;
    }
    
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .content {
        margin-left: 0;
        padding: 80px 20px 20px;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .header-actions {
        width: 100%;
        flex-direction: column;
    }
    
    .header-actions .btn {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .summary-grid {
        grid-template-columns: 1fr;
    }
    
    .table thead {
        display: none;
    }
    
    .table,
    .table tbody,
    .table tr,
    .table td {
        display: block;
        width: 100%;
    }
    
    .table tr {
        margin-bottom: 20px;
        border: 1px solid #e0e0e0;
        border-radius: 8px;
        padding: 15px;
        background: white;
    }
    
    .table td {
        text-align: right;
        padding: 10px 0;
        border-bottom: 1px solid #f0f0f0;
        position: relative;
        padding-left: 50%;
    }
    
    .table td:last-child {
        border-bottom: none;
    }
    
    .table td:before {
        content: attr(data-label);
        position: absolute;
        left: 0;
        width: 45%;
        padding-right: 10px;
        font-weight: 700;
        text-align: left;
        color: #2c3e50;
    }
    
    .action-buttons {
        justify-content: flex-end;
    }
    
    .filter-group {
        grid-template-columns: 1fr;
    }
    
    .search-input-group {
        flex-direction: column;
    }
    
    .search-input {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .welcome-text h2 {
        font-size: 1.5rem;
    }
    
    .page-header h3 {
        font-size: 1.4rem;
    }
    
    .summary-card {
        padding: 20px;
    }
    
    .summary-icon {
        font-size: 2.5rem;
    }
    
    .summary-content h3 {
        font-size: 1.5rem;
    }
}

/* ========================================
   PRINT STYLES
======================================== */
@media print {
    .hamburger,
    .sidebar,
    .overlay,
    .header-actions,
    .action-buttons,
    .search-container,
    .filter-container {
        display: none !important;
    }
    
    .content {
        margin-left: 0;
        padding: 20px;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .table {
        font-size: 12px;
    }
}

/* Tambahkan setelah .btn-secondary */

.btn-success {
    background: #27ae60;
    color: white;
}

.btn-success:hover {
    background: #229954;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(39, 174, 96, 0.4);
}