/* JproJasa i Pro - Custom Styles */

/* Smooth transitions */
* { -webkit-tap-highlight-color: transparent; }
[x-cloak] { display: none !important; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #c7d2fe; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #818cf8; }

/* Sidebar */
.sidebar-link {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 16px; border-radius: 10px;
    font-size: 14px; font-weight: 500;
    color: #64748b; transition: all .2s;
}
.sidebar-link:hover { background: #eef2ff; color: #4338ca; }
.sidebar-link.active { background: #4338ca; color: #fff; box-shadow: 0 4px 12px rgba(67,56,202,.3); }
.sidebar-link.active svg { color: #fff; }

/* Cards */
.stat-card {
    background: #fff; border-radius: 16px; padding: 24px;
    border: 1px solid #e2e8f0;
    transition: all .2s;
}
.stat-card:hover { border-color: #c7d2fe; box-shadow: 0 4px 20px rgba(67,56,202,.08); }

/* Table */
.data-table { width: 100%; border-collapse: separate; border-spacing: 0; }
.data-table thead th {
    background: #f8fafc; padding: 12px 16px;
    font-size: 12px; font-weight: 600;
    color: #64748b; text-transform: uppercase; letter-spacing: .5px;
    text-align: left; border-bottom: 2px solid #e2e8f0;
}
.data-table tbody td {
    padding: 14px 16px; border-bottom: 1px solid #f1f5f9;
    font-size: 14px; color: #334155;
}
.data-table tbody tr { transition: background .15s; }
.data-table tbody tr:hover { background: #fafafe; }

/* Badges */
.badge {
    display: inline-flex; align-items: center;
    padding: 4px 12px; border-radius: 20px;
    font-size: 12px; font-weight: 600; white-space: nowrap;
}
.badge-blue { background: #dbeafe; color: #1e40af; }
.badge-green { background: #dcfce7; color: #166534; }
.badge-yellow { background: #fef3c7; color: #92400e; }
.badge-red { background: #fee2e2; color: #991b1b; }
.badge-purple { background: #ede9fe; color: #5b21b6; }
.badge-gray { background: #f1f5f9; color: #475569; }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 10px 20px; border-radius: 10px; font-size: 14px; font-weight: 600;
    transition: all .2s; cursor: pointer; border: none;
}
.btn-primary { background: #4338ca; color: #fff; }
.btn-primary:hover { background: #3730a3; box-shadow: 0 4px 12px rgba(67,56,202,.3); }
.btn-secondary { background: #f1f5f9; color: #475569; }
.btn-secondary:hover { background: #e2e8f0; }
.btn-danger { background: #fee2e2; color: #991b1b; }
.btn-danger:hover { background: #fecaca; }
.btn-success { background: #dcfce7; color: #166534; }
.btn-success:hover { background: #bbf7d0; }
.btn-sm { padding: 6px 14px; font-size: 13px; border-radius: 8px; }

/* Form */
.form-input {
    width: 100%; padding: 10px 14px;
    border: 1.5px solid #e2e8f0; border-radius: 10px;
    font-size: 14px; color: #1e293b; background: #fff;
    transition: border-color .2s, box-shadow .2s;
}
.form-input:focus {
    outline: none; border-color: #818cf8;
    box-shadow: 0 0 0 3px rgba(129,140,248,.2);
}
.form-label {
    display: block; margin-bottom: 6px;
    font-size: 13px; font-weight: 600; color: #475569;
}
select.form-input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 40px; }
textarea.form-input { resize: vertical; min-height: 80px; }

/* Modal */
.modal-overlay {
    position: fixed; inset: 0; background: rgba(15,23,42,.5);
    display: flex; align-items: center; justify-content: center;
    z-index: 50; padding: 16px;
    backdrop-filter: blur(4px);
}
.modal-content {
    background: #fff; border-radius: 20px; padding: 32px;
    max-width: 560px; width: 100%;
    max-height: 90vh; overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,.15);
}

/* Sync indicator */
.sync-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.sync-dot.online { background: #22c55e; box-shadow: 0 0 6px rgba(34,197,94,.5); }
.sync-dot.offline { background: #f59e0b; }
.sync-dot.syncing { background: #818cf8; animation: pulse .8s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .4; } }

/* Mobile responsive */
@media (max-width: 768px) {
    .stat-card { padding: 16px; }
    .modal-content { padding: 20px; border-radius: 16px; }
    .data-table { font-size: 13px; }
    .data-table thead th, .data-table tbody td { padding: 10px 12px; }
}

/* Toast notification */
.toast {
    position: fixed; bottom: 24px; right: 24px; z-index: 100;
    padding: 14px 24px; border-radius: 12px;
    font-size: 14px; font-weight: 500;
    box-shadow: 0 8px 30px rgba(0,0,0,.12);
    transform: translateY(0); opacity: 1;
    transition: all .3s;
}
.toast.hide { transform: translateY(20px); opacity: 0; }
.toast-success { background: #166534; color: #fff; }
.toast-error { background: #991b1b; color: #fff; }
.toast-info { background: #1e40af; color: #fff; }
.toast-warning { background: #92400e; color: #fff; }

/* PWA install banner */
.install-banner {
    position: fixed; bottom: 0; left: 0; right: 0;
    background: linear-gradient(135deg, #4338ca, #6366f1);
    color: #fff; padding: 16px 24px;
    display: flex; align-items: center; justify-content: space-between;
    z-index: 100; box-shadow: 0 -4px 20px rgba(0,0,0,.15);
}
