/* assets/css/style.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f7fa;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Logo */
img[src*="logo"] {
    background: transparent !important;
}

/* Navbar Mobile */
.navbar-brand {
    font-size: 1rem;
}
.navbar-brand small {
    font-size: 0.55rem !important;
}
.navbar-toggler {
    border-color: rgba(255,255,255,0.3);
}
.navbar-toggler-icon {
    filter: invert(1);
}

/* Sidebar Mobile - Toggle */
.sidebar {
    min-height: 100vh;
    background: linear-gradient(180deg, #1a237e, #0d47a1);
    padding: 20px 0;
    transition: all 0.3s;
}
.sidebar .brand {
    color: white;
    text-align: center;
    padding: 15px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 15px;
}
.sidebar .brand img {
    max-height: 40px;
    background: transparent !important;
}
.sidebar .brand h5 {
    font-size: 1.1rem;
    margin-top: 5px;
}
.sidebar .brand small {
    font-size: 0.7rem;
    opacity: 0.8;
}

.sidebar-link {
    color: rgba(255,255,255,0.7) !important;
    padding: 10px 15px;
    border-radius: 8px;
    margin: 2px 8px;
    transition: all 0.3s;
    text-decoration: none;
    display: block;
    font-size: 0.9rem;
}
.sidebar-link:hover {
    color: white !important;
    background: rgba(255,255,255,0.1);
}
.sidebar-link.active {
    color: white !important;
    background: rgba(255,255,255,0.15);
}
.sidebar-link i {
    width: 22px;
    font-size: 0.9rem;
}

/* Cards */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: all 0.3s;
    margin-bottom: 15px;
}
.card:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
.card-header {
    background: transparent;
    border-bottom: 2px solid #f0f0f0;
    padding: 12px 18px;
    font-weight: 600;
    font-size: 0.95rem;
}
.card-body {
    padding: 15px 18px;
}

/* Tables - Mobile Responsive */
.table-responsive {
    border-radius: 10px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.table {
    font-size: 0.85rem;
    margin-bottom: 0;
}
.table th {
    background: #1a237e;
    color: white;
    font-weight: 600;
    padding: 10px 12px;
    white-space: nowrap;
    font-size: 0.8rem;
}
.table td {
    padding: 8px 12px;
    vertical-align: middle;
    font-size: 0.8rem;
}
.table-hover tbody tr:hover {
    background-color: rgba(26,35,126,0.04);
}

/* Forms - Mobile */
.form-control, .form-select {
    border-radius: 8px;
    border: 2px solid #e0e0e0;
    padding: 8px 12px;
    font-size: 0.9rem;
    transition: all 0.3s;
}
.form-control:focus, .form-select:focus {
    border-color: #1a237e;
    box-shadow: 0 0 0 0.15rem rgba(26,35,126,0.15);
}
.form-label {
    font-weight: 600;
    color: #333;
    font-size: 0.85rem;
    margin-bottom: 4px;
}

/* Buttons - Mobile */
.btn {
    border-radius: 8px;
    padding: 8px 16px;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.3s;
}
.btn-sm {
    padding: 4px 10px;
    font-size: 0.75rem;
}
.btn-primary {
    background: linear-gradient(135deg, #1a237e, #0d47a1);
    border: none;
    color: white;
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26,35,126,0.3);
    color: white;
}
.btn-success {
    background: linear-gradient(135deg, #2e7d32, #43a047);
    border: none;
    color: white;
}
.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(46,125,50,0.3);
    color: white;
}
.btn-danger {
    background: linear-gradient(135deg, #c62828, #d32f2f);
    border: none;
    color: white;
}
.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(198,40,40,0.3);
    color: white;
}
.btn-warning {
    background: linear-gradient(135deg, #f57f17, #f9a825);
    border: none;
    color: white;
}
.btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245,127,23,0.3);
    color: white;
}

/* Badges */
.badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 500;
    font-size: 0.7rem;
}

/* Footer */
.footer {
    background: linear-gradient(135deg, #1a237e, #0d47a1);
    color: white;
    padding: 15px 0;
    margin-top: auto;
    font-size: 0.8rem;
}
.footer h5 {
    font-size: 1rem;
}
.footer h6 {
    font-size: 0.85rem;
}
.footer .text-muted {
    color: rgba(255,255,255,0.6) !important;
}

/* Loading Screen */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s;
}
#loading-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}
::-webkit-scrollbar-thumb {
    background: #1a237e;
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: #0d47a1;
}

/* ===== MOBILE RESPONSIVE ===== */
@media (max-width: 991px) {
    .sidebar {
        min-height: auto;
        padding: 10px 0;
    }
    .sidebar .brand {
        padding: 10px 0;
    }
    .sidebar .brand img {
        max-height: 30px;
    }
    .sidebar-link {
        padding: 8px 12px;
        font-size: 0.8rem;
        margin: 1px 5px;
    }
    .sidebar-link i {
        width: 20px;
        font-size: 0.8rem;
    }
    .main-content {
        padding: 15px !important;
    }
    h2 {
        font-size: 1.3rem;
    }
    h4 {
        font-size: 1.1rem;
    }
    h5 {
        font-size: 0.95rem;
    }
    .card-header h5 {
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    /* Navbar */
    .navbar-brand {
        font-size: 0.9rem;
    }
    .navbar-brand small {
        font-size: 0.5rem !important;
    }
    .navbar-brand img {
        height: 30px !important;
    }
    
    /* Tables jadi card di mobile */
    .table thead {
        display: none;
    }
    .table tbody tr {
        display: block;
        border: 1px solid #e0e0e0;
        border-radius: 8px;
        margin-bottom: 10px;
        padding: 10px;
        background: white;
    }
    .table tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 6px 0;
        border: none;
        border-bottom: 1px solid #f0f0f0;
        font-size: 0.8rem;
    }
    .table tbody td:last-child {
        border-bottom: none;
    }
    .table tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #1a237e;
        font-size: 0.75rem;
    }
    .table tbody td .badge {
        font-size: 0.65rem;
        padding: 3px 8px;
    }
    .table tbody td .btn-sm {
        padding: 3px 8px;
        font-size: 0.7rem;
    }
    
    /* Forms */
    .form-control, .form-select {
        font-size: 0.85rem;
        padding: 8px 10px;
    }
    .row > [class*="col-"] {
        margin-bottom: 8px;
    }
    
    /* Cards */
    .card {
        border-radius: 10px;
    }
    .card-body {
        padding: 12px 15px;
    }
    .card-header {
        padding: 10px 15px;
    }
    
    /* Buttons */
    .btn {
        font-size: 0.8rem;
        padding: 6px 14px;
    }
    .btn-lg {
        font-size: 0.9rem;
        padding: 10px 20px;
    }
    
    /* Dashboard stats */
    .stat-card h2 {
        font-size: 1.5rem;
    }
    .stat-card h6 {
        font-size: 0.75rem;
    }
    
    /* Modal */
    .modal-body {
        padding: 15px;
    }
    .modal-header h5 {
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    h2 {
        font-size: 1.1rem;
    }
    .container-fluid {
        padding: 0 8px;
    }
    .main-content {
        padding: 10px !important;
    }
    .card-body {
        padding: 10px 12px;
    }
    .table tbody td {
        font-size: 0.75rem;
        padding: 4px 0;
    }
    .table tbody td::before {
        font-size: 0.7rem;
    }
    .badge {
        font-size: 0.6rem;
        padding: 2px 8px;
    }
    .btn-sm {
        padding: 2px 6px;
        font-size: 0.65rem;
    }
    .form-control, .form-select {
        font-size: 0.8rem;
        padding: 6px 8px;
    }
    .sidebar-link {
        font-size: 0.75rem;
        padding: 6px 10px;
    }
}

/* Print */
@media print {
    .sidebar, .navbar, .footer, .btn, .no-print {
        display: none !important;
    }
    .main-content {
        padding: 0 !important;
    }
}