/* ========== RESET & BASE ========== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    padding: 20px;
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    padding: 30px;
}

/* ========== TYPOGRAPHY ========== */
h1 {
    color: #333;
    text-align: center;
    margin-bottom: 10px;
    font-size: 2.5em;
}

.subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
    font-style: italic;
    border-bottom: 2px solid #667eea;
    padding-bottom: 15px;
}

/* ========== INFO PANEL ========== */
.info-panel {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 15px;
}

.info-item {
    text-align: center;
    padding: 10px 20px;
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
    min-width: 150px;
}

.info-label {
    font-size: 0.9em;
    opacity: 0.9;
    display: block;
}

.info-value {
    font-size: 1.5em;
    font-weight: bold;
    display: block;
}

.text-danger {
    color: #ff4444;
}

/* ========== TAB NAVIGATION ========== */
.tab-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    padding: 10px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    align-items: center;
}

.tab-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    background: #f0f0f0;
    color: #666;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.tab-btn:hover {
    background: #e0e0e0;
}

.tab-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.tab-btn.add-divisi {
    background: #43e97b;
    color: white;
    margin-left: auto;
}

.tab-btn.add-divisi:hover {
    background: #38d96b;
}

/* ========== FORM STYLING ========== */
.input-form {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    color: #555;
    margin-bottom: 5px;
    font-size: 0.9em;
}

.form-group input, 
.form-group select,
.form-group textarea {
    padding: 12px;
    border: 2px solid #e1e1e1;
    border-radius: 8px;
    font-size: 14px;
    background: white;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #667eea;
    outline: none;
}

.form-group input:disabled,
.form-group select:disabled {
    background: #e9ecef;
    cursor: not-allowed;
}

/* ========== BUTTONS ========== */
.btn-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 20px;
    justify-content: center;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.btn-success {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    color: white;
}

.btn-warning {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.btn-secondary {
    background: linear-gradient(135deg, #757F9A 0%, #D7DDE8 100%);
    color: white;
}

/* ========== SEARCH AND FILTER ========== */
.search-section {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    align-items: center;
    background: white;
    padding: 15px;
    border-radius: 10px;
}

.search-box {
    flex: 1;
    min-width: 250px;
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 12px 40px 12px 15px;
    border: 2px solid #e1e1e1;
    border-radius: 25px;
}

.search-box span {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
}

.filter-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 20px;
    border: 2px solid #e1e1e1;
    border-radius: 25px;
    background: white;
    cursor: pointer;
    font-weight: 600;
    color: #666;
}

.filter-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
}

/* ========== TABLE STYLING ========== */
.table-container {
    overflow-x: auto;
    margin-top: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    background: white;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
    padding: 15px;
    text-align: left;
    position: sticky;
    top: 0;
}

td {
    padding: 12px 15px;
    border-bottom: 1px solid #e1e1e1;
    color: #444;
}

tr:hover {
    background: #f5f5f5;
}

.action-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    color: white;
}

.btn-delete {
    background: #dc3545;
}

.btn-delete:hover {
    background: #c82333;
}

/* ========== STATUS BADGES ========== */
.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
}

.status-masuk {
    background: #d4edda;
    color: #155724;
}

.status-keluar {
    background: #f8d7da;
    color: #721c24;
}

/* ========== PAGINATION ========== */
.pagination-container {
    background: #f8f9fa;
    padding: 15px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.pagination-controls {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.pagination-btn {
    padding: 8px 14px;
    border: 2px solid #e1e1e1;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    font-weight: 600;
    color: #666;
}

.pagination-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ========== DIVISI STATS ========== */
.divisi-stats {
    margin-top: 30px;
    padding: 20px;
    background: white;
    border-radius: 10px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.stat-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    cursor: pointer;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.stat-card.warning {
    border-left: 4px solid #ffc107;
}

.stat-card.danger {
    border-left: 4px solid #dc3545;
}

/* ========== 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;
    padding: 30px;
    border-radius: 15px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-lg .modal-content {
    max-width: 90%;
    width: 1200px;
}

.modal h2 {
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #667eea;
}

.modal-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

/* ========== ADMIN PANEL ========== */
.admin-section {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}

.admin-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e1e1e1;
    padding-bottom: 10px;
}

.admin-tab {
    padding: 10px 20px;
    border: none;
    background: none;
    cursor: pointer;
    font-weight: 600;
    color: #666;
}

.admin-tab.active {
    color: #667eea;
    border-bottom: 3px solid #667eea;
}

.user-table {
    width: 100%;
    border-collapse: collapse;
}

.user-table th {
    background: #f8f9fa;
    padding: 12px;
    text-align: left;
}

/* ========== DELETION FILTER ========== */
.deletion-filter {
    margin: 20px 0;
    padding: 15px;
    background: #fff3cd;
    border-radius: 8px;
}

.deletion-item {
    background: white;
    padding: 10px;
    margin-bottom: 5px;
    border-radius: 4px;
    border-left: 3px solid #dc3545;
}

/* ========== NOTIFICATION ========== */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    z-index: 10000;
    animation: slideIn 0.3s ease;
}

.notification.success {
    background: #43e97b;
}

.notification.warning {
    background: #fa709a;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ========== FOOTER ========== */
.footer-info {
    margin-top: 30px;
    text-align: center;
    color: #666;
    font-size: 0.9em;
    padding-top: 20px;
    border-top: 1px solid #e1e1e1;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    h1 {
        font-size: 1.8em;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .btn-group {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
    
    .filter-buttons {
        justify-content: center;
    }
    
    .filter-btn {
        flex: 1;
        min-width: auto;
    }
    
    .tab-container {
        flex-direction: column;
    }
    
    .tab-btn.add-divisi {
        margin-left: 0;
    }
}