/* ============================================
   DASHBOARD ADMIN STYLES
   ============================================ */

:root {
    --bg-primary: #1e3c72;
    --bg-secondary: #2a5298;
    --bg-card: rgba(255, 255, 255, 0.95);
    --text-primary: #1e3c72;
    --text-secondary: #555;
    --accent-green: #00d26a;
    --accent-red: #ff4757;
    --accent-blue: #3498db;
    --border-color: #e0e0e0;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

body {
    font-family: var(--font-family);
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    min-height: 100vh;
    padding: 20px;
    color: var(--text-primary);
}

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

/* Header */
header {
    text-align: center;
    color: white;
    margin-bottom: 30px;
}

header h1 {
    font-size: 2rem;
    margin-bottom: 5px;
}

.subtitle {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 5px;
}

.timestamp {
    font-size: 0.85rem;
    opacity: 0.7;
}

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

.summary-card {
    background: white;
    border-radius: 16px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s;
}

.summary-card:hover {
    transform: translateY(-5px);
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.card-value {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 5px;
}

.card-label {
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 500;
}

.summary-card.masuk .card-value {
    color: var(--accent-green);
}

.summary-card.pulang .card-value {
    color: var(--accent-red);
}

.summary-card.belum .card-value {
    color: #ffa502;
}

/* Card */
.card {
    background: white;
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.card h3 {
    margin-bottom: 20px;
    color: var(--bg-primary);
    font-size: 1.2rem;
    font-weight: 600;
}

/* Filter Section */
.filter-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.filter-row label {
    min-width: 80px;
    font-weight: 500;
    color: var(--text-secondary);
}

input[type="date"],
input[type="text"],
select {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
}

input:focus,
select:focus {
    outline: none;
    border-color: var(--bg-primary);
    box-shadow: 0 0 0 3px rgba(30, 60, 114, 0.1);
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, var(--bg-primary), var(--bg-secondary));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(30, 60, 114, 0.3);
}

.btn-secondary {
    background: #f0f0f0;
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: #e0e0e0;
}

.btn-export {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 100%;
}

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

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* Table */
.table-wrapper {
    overflow-x: auto;
}

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

thead {
    background: var(--bg-primary);
    color: white;
}

th,
td {
    padding: 14px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    font-weight: 600;
    font-size: 0.9rem;
}

td {
    font-size: 0.95rem;
}

tbody tr {
    transition: background 0.2s;
}

tbody tr:hover {
    background: #f8f9fa;
}

.loading-row {
    text-align: center;
    color: var(--text-secondary);
    padding: 20px;
}

.empty-row {
    text-align: center;
    color: var(--text-secondary);
    padding: 40px;
}

/* Photo Link */
.photo-link {
    color: var(--accent-blue);
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
}

.photo-link:hover {
    text-decoration: underline;
}

/* Pending Approval */
.approval-item {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 15px;
    border-left: 4px solid #ffa502;
}

.approval-item:last-child {
    margin-bottom: 0;
}

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

.approval-name {
    font-weight: 600;
    color: var(--bg-primary);
}

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

.btn-approve {
    padding: 8px 16px;
    background: var(--accent-green);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
}

.btn-approve:hover {
    background: #00b359;
}

.btn-reject {
    padding: 8px 16px;
    background: var(--accent-red);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
}

.btn-reject:hover {
    background: #e04050;
}

.approval-detail {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Hint */
.hint {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 15px;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
}

.modal-content-large {
    background: white;
    border-radius: 16px;
    max-width: 600px;
    max-height: 90vh;
    overflow: hidden;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    margin: 0;
    font-size: 1.2rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
}

.modal-close:hover {
    background: #f0f0f0;
}

.modal-body {
    padding: 20px;
    text-align: center;
}

.modal-body img {
    max-width: 100%;
    max-height: 70vh;
    border-radius: 8px;
}

/* Refresh indicator */
.refresh-indicator {
    text-align: center;
    color: white;
    opacity: 0.8;
    margin-top: 20px;
    font-size: 0.9rem;
}

#countdown {
    font-weight: 700;
    font-size: 1.1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .filter-row {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-row label {
        min-width: auto;
    }

    .summary-section {
        grid-template-columns: 1fr;
    }

    th,
    td {
        padding: 10px;
        font-size: 0.85rem;
    }
}

/* ============================================
   IZIN FILTER TABS
   ============================================ */

.izin-filter-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filter-tab {
    padding: 8px 16px;
    border: 2px solid var(--border-color);
    border-radius: 20px;
    background: #f8f9fa;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    font-family: inherit;
    transition: all 0.3s;
}

.filter-tab:hover {
    background: #e9ecef;
    border-color: var(--bg-primary);
}

.filter-tab.active {
    background: linear-gradient(135deg, var(--bg-primary), var(--bg-secondary));
    color: white;
    border-color: var(--bg-primary);
}

/* Status badges */
.izin-status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-approved {
    background: #d4edda;
    color: #155724;
}

.status-rejected {
    background: #f8d7da;
    color: #721c24;
}

/* Border colors for izin items */
.status-pending-border {
    border-left-color: #ffc107;
}

.status-approved-border {
    border-left-color: var(--accent-green);
}

.status-rejected-border {
    border-left-color: var(--accent-red);
}

/* Export buttons */
.export-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-export-server {
    background: linear-gradient(135deg, #2c3e50, #3498db);
    color: white;
    flex: 1;
    min-width: 180px;
}

.btn-export-server:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

.btn-export {
    flex: 1;
    min-width: 180px;
}