/* Reset & Base */
* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; }
body { background-color: #f3f4f6; color: #1f2937; line-height: 1.6; }
a { text-decoration: none; color: #2563eb; }

/* Container */
.container { max-width: 1100px; margin: 0 auto; padding: 20px; }

/* Container Full Width (khusus dashboard) - 5% jarak kiri kanan */
.container-full {
    width: 90%;
    max-width: 100%;
    margin: 0 auto;
    padding: 20px 0;
}

/* Card */
.card { background: #fff; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); padding: 20px; margin-bottom: 20px; }

/* Form */
.form-group { margin-bottom: 15px; }
.form-group label { display: block; margin-bottom: 5px; font-weight: 600; font-size: 14px; }
.form-control { width: 100%; padding: 10px; border: 1px solid #d1d5db; border-radius: 6px; font-size: 14px; }
.form-control:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,0.1); }

/* Button */
.btn { display: inline-block; padding: 10px 16px; border-radius: 6px; border: none; cursor: pointer; font-size: 14px; font-weight: 600; text-align: center; transition: 0.2s; }
.btn-primary { background: #2563eb; color: #fff; }
.btn-primary:hover { background: #1d4ed8; }
.btn-danger { background: #dc2626; color: #fff; }
.btn-danger:hover { background: #b91c1c; }
.btn-secondary { background: #e5e7eb; color: #374151; }
.btn-secondary:hover { background: #d1d5db; }
.btn-block { width: 100%; }

/* NAVBAR */
.navbar {
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    padding: 12px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}
.navbar-brand {
    font-weight: 700;
    font-size: 16px;
    color: #2563eb;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 1;
    min-width: 0;
}
.navbar-brand span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Avatar */
.navbar-avatar-wrapper { position: relative; }
.navbar-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #2563eb;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    user-select: none;
    transition: 0.2s;
}
.navbar-avatar:hover { background: #1d4ed8; transform: scale(1.05); }

/* Dropdown */
.navbar-dropdown {
    display: none;
    position: absolute;
    top: 48px;
    right: 0;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    min-width: 220px;
    padding: 10px 0;
    z-index: 200;
}
.navbar-dropdown.active { display: block; }
.navbar-dropdown-info {
    padding: 10px 15px;
    border-bottom: 1px solid #f3f4f6;
}
.navbar-dropdown-info .name {
    font-weight: 600;
    font-size: 14px;
    color: #1f2937;
}
.navbar-dropdown-info .role {
    font-size: 12px;
    color: #6b7280;
}
.navbar-dropdown a {
    display: block;
    padding: 10px 15px;
    font-size: 14px;
    color: #374151;
    transition: 0.15s;
}
.navbar-dropdown a:hover { background: #f3f4f6; color: #dc2626; }

/* Table Responsive */
.table-responsive { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 12px; text-align: left; border-bottom: 1px solid #e5e7eb; }
th { background: #f9fafb; font-weight: 600; color: #4b5563; }

/* Badge Status */
.badge { padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; display: inline-block; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-info { background: #dbeafe; color: #1e40af; }
.badge-success { background: #d1fae5; color: #065f46; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-primary { background: #ede9fe; color: #5b21b6; }

/* Login Page */
.login-wrapper { display: flex; justify-content: center; align-items: center; min-height: 100vh; padding: 20px; }
.login-box { width: 100%; max-width: 400px; }

/* Notifikasi Dot Merah */
.notif-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #dc2626;
    border-radius: 50%;
    margin-left: 6px;
    vertical-align: middle;
    animation: pulse 1.5s infinite;
}
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(220,38,38,0.7); }
    70% { box-shadow: 0 0 0 8px rgba(220,38,38,0); }
    100% { box-shadow: 0 0 0 0 rgba(220,38,38,0); }
}

/* Filter Section */
.filter-section {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr auto;
    gap: 12px;
    align-items: end;
}
.filter-section .form-group { margin-bottom: 0; }

/* SweetAlert Custom */
.swal2-popup {
    font-family: 'Segoe UI', sans-serif !important;
    border-radius: 10px !important;
}
.swal2-title {
    font-size: 18px !important;
    color: #1f2937 !important;
}
.swal2-html-container {
    font-size: 14px !important;
}

/* RESPONSIVE - MOBILE */
@media (max-width: 768px) {
    .container-full { width: 90%; padding: 15px 0; }
    
    .navbar { padding: 10px 5%; }
    .navbar-brand { font-size: 14px; }
    .navbar-brand span { max-width: 200px; }
    
    th, td { font-size: 13px; padding: 8px; }
    
    .filter-section {
        grid-template-columns: 1fr;
    }
    
    .table-mobile thead { display: none; }
    .table-mobile tr { 
        display: block; 
        margin-bottom: 15px; 
        border: 1px solid #e5e7eb; 
        border-radius: 8px; 
        padding: 10px; 
        background: #fff; 
    }
    .table-mobile td { 
        display: flex; 
        justify-content: space-between; 
        border: none; 
        padding: 6px 0;
        text-align: right;
    }
    .table-mobile td::before { 
        content: attr(data-label); 
        font-weight: 600; 
        color: #6b7280;
        text-align: left;
        padding-right: 10px;
        flex-shrink: 0;
    }
}