/* =========================================================================
   style.css — City of Koronadal Traffic Enforcement Portal
   ========================================================================= */

/* ---- Base ---- */
body {
    font-family: 'Inter', sans-serif;
    background-color: #f8fafc;
    background-image:
        radial-gradient(circle at 25% 0, rgba(30, 45, 125, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 75% 100%, rgba(30, 45, 125, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(252, 211, 77, 0.02) 0%, transparent 60%);
}

/* ---- Smooth transitions ---- */
input, button, a, .badge, tr, .card, .stat-box {
    transition: all 0.2s ease;
}

/* =========================================================================
   ANIMATIONS
   ========================================================================= */
@keyframes fadeSlideUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(79, 106, 245, 0.15); }
    50%      { box-shadow: 0 0 0 12px rgba(79, 106, 245, 0); }
}
@keyframes shimmer {
    0%   { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
@keyframes badgePop {
    0%   { transform: scale(0.8); opacity: 0; }
    70%  { transform: scale(1.05); }
    100% { transform: scale(1); opacity: 1; }
}

.anim-fade-in      { animation: fadeIn 0.4s ease both; }
.anim-slide-up     { animation: fadeSlideUp 0.5s ease both; }
.anim-badge-pop    { animation: badgePop 0.35s ease both; }
.anim-delay-1      { animation-delay: 0.1s; }
.anim-delay-2      { animation-delay: 0.2s; }
.anim-delay-3      { animation-delay: 0.3s; }
.anim-delay-4      { animation-delay: 0.4s; }

/* =========================================================================
   FLAG BAR
   ========================================================================= */
.flag-bar {
    height: 4px;
    background: linear-gradient(90deg, #0038a8 0%, #0038a8 50%, #ce1126 50%, #ce1126 100%);
    position: relative;
    z-index: 10;
}

/* =========================================================================
   HEADER
   ========================================================================= */
.header-gradient {
    background: linear-gradient(135deg, #1e2d7d 0%, #0e1540 100%);
    position: relative;
    overflow: hidden;
}
/* Decorative radial glow in header */
.header-gradient::after {
    content: '';
    position: absolute;
    top: -60%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(252, 211, 77, 0.06) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

/* ---- Logo hover ---- */
.city-seal-ring {
    transition: transform 0.3s ease, filter 0.3s ease;
}
.city-seal-ring:hover {
    transform: scale(1.06) rotate(3deg);
    filter: brightness(1.1);
}

/* ---- Sticky header with glass morphism ---- */
header.sticky {
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

/* =========================================================================
   SEARCH HERO
   ========================================================================= */
.search-hero {
    position: relative;
}
.search-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 50% 0, rgba(30, 45, 125, 0.04) 0%, transparent 70%),
        radial-gradient(ellipse at 50% 100%, rgba(252, 211, 77, 0.03) 0%, transparent 70%);
    pointer-events: none;
}

/* ---- Search ring ---- */
.search-ring:focus-within {
    box-shadow: 0 0 0 3px rgba(79, 106, 245, 0.2), 0 4px 20px rgba(30, 45, 125, 0.08);
    border-color: #4f6af5;
    transform: translateY(-1px);
}

/* =========================================================================
   RESULT CARDS — decorative top accent bar
   ========================================================================= */
.card-accent-top {
    position: relative;
    border-top: 3px solid transparent;
    background-clip: padding-box;
}
.card-accent-top::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, #1e2d7d, #4f6af5, #fcd34d);
    border-radius: 12px 12px 0 0;
}

/* ---- Card decorative corner brackets ---- */
.card-corners {
    position: relative;
}
.card-corners::before,
.card-corners::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border-color: rgba(79, 106, 245, 0.15);
    border-style: solid;
    pointer-events: none;
    transition: border-color 0.3s ease;
}
.card-corners::before {
    top: 8px; left: 8px;
    border-width: 2px 0 0 2px;
    border-radius: 4px 0 0 0;
}
.card-corners::after {
    bottom: 8px; right: 8px;
    border-width: 0 2px 2px 0;
    border-radius: 0 0 4px 0;
}
.card-corners:hover::before,
.card-corners:hover::after {
    border-color: rgba(79, 106, 245, 0.35);
}

/* ---- Card shadow lift ---- */
.card-shadow {
    box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.03);
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.card-shadow:hover {
    box-shadow: 0 10px 30px rgba(30, 45, 125, 0.08), 0 4px 10px rgba(30, 45, 125, 0.04);
    transform: translateY(-2px);
}

/* =========================================================================
   DATA TABLE
   ========================================================================= */
.overflow-x-auto::-webkit-scrollbar {
    height: 6px;
}
.overflow-x-auto::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}
.overflow-x-auto::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}
.overflow-x-auto::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* ---- Modern table ---- */
table.border-separate tbody tr {
    transition: all 0.15s ease;
    cursor: default;
}
table.border-separate tbody tr:hover td {
    background-color: #f8fafc;
}
table.border-separate tbody tr td:first-child {
    border-left: 1px solid transparent;
    transition: border-color 0.15s ease;
}
table.border-separate tbody tr:hover td:first-child {
    border-left-color: #4f6af5;
}

/* ---- Badge modern refinements ---- */
.badge {
    padding: 3px 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* =========================================================================
   STATUS BADGES
   ========================================================================= */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 10px;
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: 999px;
    white-space: nowrap;
}
.badge::before {
    content: '';
    width: 5px;
    height: 5px;
    border-radius: 50%;
    flex-shrink: 0;
}
.badge-pending {
    background: #fef2f2;
    color: #991b1b;
}
.badge-pending::before {
    background: #dc2626;
    animation: pulseGlow 2s infinite;
}
.badge-paid {
    background: #ecfdf5;
    color: #065f46;
}
.badge-paid::before {
    background: #059669;
}
.badge-active {
    background: #ecfdf5;
    color: #065f46;
}
.badge-active::before {
    background: #059669;
}
.badge-suspended {
    background: #fef2f2;
    color: #991b1b;
}
.badge-suspended::before {
    background: #dc2626;
}
.badge-expired {
    background: #fff7ed;
    color: #9a3412;
}
.badge-expired::before {
    background: #ea580c;
}
.badge-cancelled {
    background: #f0f0f0;
    color: #6b7280;
}
.badge-cancelled::before {
    background: #9ca3af;
}

/* =========================================================================
   EMPTY STATE ILLUSTRATION
   ========================================================================= */
.empty-state-shield {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.empty-state-shield::after {
    content: '';
    position: absolute;
    width: 70px;
    height: 70px;
    background: radial-gradient(circle, rgba(79, 106, 245, 0.06) 0%, transparent 70%);
    border-radius: 50%;
    z-index: -1;
}

/* =========================================================================
   SECTION DIVIDER
   ========================================================================= */
.section-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}
.section-divider::before,
.section-divider::after {
    content: '';
    flex: 1;
    height: 1px;
}
.section-divider::before {
    background: linear-gradient(90deg, transparent, #e2e8f0);
}
.section-divider::after {
    background: linear-gradient(90deg, #e2e8f0, transparent);
}

/* =========================================================================
   FOOTER
   ========================================================================= */
.footer-brand-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    animation: pulseGlow 3s infinite;
}
