/* ================================================================
 * Tunas Olympic 2026 — Custom CSS
 * Supplement Tailwind CDN dengan utilitas custom.
 * ================================================================ */

:root {
    --brand-50:  #eff6ff;
    --brand-500: #3b82f6;
    --brand-600: #2563eb;
    --brand-700: #1d4ed8;
}

* { -webkit-tap-highlight-color: transparent; }

html, body { font-family: 'Inter', ui-sans-serif, system-ui, sans-serif; }

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Scrollbar halus */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(100,116,139,0.4); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(100,116,139,0.7); }

/* Form input auto-zoom mobile */
input, select, textarea, button {
    font-size: 0.9rem;
}
input[type="text"], input[type="password"], input[type="email"], input[type="search"], input[type="number"], input[type="date"], select, textarea {
    appearance: none;
}

/* Animations */
@keyframes fade-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fade-in 0.3s ease-out; }

@keyframes slide-up {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}
.slide-up { animation: slide-up 0.4s ease-out; }

/* Print friendly */
@media print {
    .no-print { display: none !important; }
    body { background: white !important; }
    main { padding: 0 !important; }
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .hide-mobile { display: none !important; }
}

/* Focus ring yang konsisten */
input:focus, select:focus, textarea:focus, button:focus {
    outline: none;
}

/* Loading spinner */
.spinner {
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* SweetAlert2 adjustments */
.swal2-popup {
    border-radius: 1rem !important;
    font-family: 'Inter', sans-serif !important;
}

/* table hover effect */
tbody tr { transition: background-color 0.1s; }

/* Selection */
::selection {
    background-color: var(--brand-500);
    color: white;
}