/**
 * Custom CSS for Alcali Unfold Theme
 * Includes basic utilities and theme overrides
 * Material Icons and fonts loaded via base template
 */

/* Basic CSS Reset */
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* Root Variables */
:root {
    --color-primary: 37 99 235;
    --color-success: 34 197 94;
    --color-warning: 251 191 36;
    --color-error: 239 68 68;
    --color-info: 59 130 246;
}

/* Dark mode variables */
.dark {
    color-scheme: dark;
}

/* Body Styles */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Material Icons alignment */
.material-icons {
    vertical-align: middle;
    line-height: 1;
}

/* Basic TailwindCSS-like Utilities */

/* Display */
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }
.hidden { display: none; }
.block { display: block; }
.inline-block { display: inline-block; }

/* Flex utilities */
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.flex-1 { flex: 1 1 0%; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.flex-shrink-0 { flex-shrink: 0; }

/* Spacing */
.space-y-2 > * + * { margin-top: 0.5rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }
.space-x-2 > * + * { margin-left: 0.5rem; }
.space-x-4 > * + * { margin-left: 1rem; }

/* Padding */
.p-2 { padding: 0.5rem; }
.p-4 { padding: 1rem; }
.p-5 { padding: 1.25rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-5 { padding-left: 1.25rem; padding-right: 1.25rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }

/* Margin */
.m-2 { margin: 0.5rem; }
.m-4 { margin: 1rem; }
.ml-2 { margin-left: 0.5rem; }
.ml-3 { margin-left: 0.75rem; }
.ml-5 { margin-left: 1.25rem; }
.mr-2 { margin-right: 0.5rem; }
.mr-3 { margin-right: 0.75rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }

/* Width & Height */
.w-full { width: 100%; }
.h-full { height: 100%; }
.min-h-screen { min-height: 100vh; }
.max-w-md { max-width: 28rem; }
.max-w-sm { max-width: 24rem; }

/* Text */
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-base { font-size: 1rem; line-height: 1.5rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
.text-5xl { font-size: 3rem; line-height: 1; }
.text-6xl { font-size: 3.75rem; line-height: 1; }

.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Colors - Light mode */
.text-gray-500 { color: rgb(107 114 128); }
.text-gray-600 { color: rgb(75 85 99); }
.text-gray-700 { color: rgb(55 65 81); }
.text-gray-900 { color: rgb(17 24 39); }
.text-blue-600 { color: rgb(37 99 235); }
.text-green-600 { color: rgb(22 163 74); }
.text-red-600 { color: rgb(220 38 38); }
.text-yellow-500 { color: rgb(234 179 8); }
.text-orange-600 { color: rgb(234 88 12); }

.bg-white { background-color: rgb(255 255 255); }
.bg-gray-50 { background-color: rgb(249 250 251); }
.bg-gray-100 { background-color: rgb(243 244 246); }
.bg-blue-600 { background-color: rgb(37 99 235); }
.bg-green-100 { background-color: rgb(220 252 231); }
.bg-red-50 { background-color: rgb(254 242 242); }

/* Colors - Dark mode */
.dark .dark\:text-white { color: rgb(255 255 255); }
.dark .dark\:text-gray-200 { color: rgb(229 231 235); }
.dark .dark\:text-gray-300 { color: rgb(209 213 219); }
.dark .dark\:text-gray-400 { color: rgb(156 163 175); }
.dark .dark\:text-blue-400 { color: rgb(96 165 250); }
.dark .dark\:text-green-200 { color: rgb(187 247 208); }
.dark .dark\:text-red-200 { color: rgb(254 202 202); }

.dark .dark\:bg-gray-800 { background-color: rgb(31 41 55); }
.dark .dark\:bg-gray-900 { background-color: rgb(17 24 39); }
.dark .dark\:bg-gray-700 { background-color: rgb(55 65 81); }
.dark .dark\:bg-green-900 { background-color: rgb(20 83 45); }
.dark .dark\:bg-red-900 { background-color: rgb(127 29 29); }

/* Borders */
.border { border-width: 1px; }
.border-2 { border-width: 2px; }
.border-t { border-top-width: 1px; }
.border-b { border-bottom-width: 1px; }
.border-gray-200 { border-color: rgb(229 231 235); }
.border-gray-300 { border-color: rgb(209 213 219); }
.dark .dark\:border-gray-600 { border-color: rgb(75 85 99); }
.dark .dark\:border-gray-700 { border-color: rgb(55 65 81); }
.dark .dark\:border-red-700 { border-color: rgb(185 28 28); }

.rounded { border-radius: 0.25rem; }
.rounded-md { border-radius: 0.375rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-full { border-radius: 9999px; }

/* Shadow */
.shadow { box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1); }
.shadow-sm { box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05); }
.shadow-lg { box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1); }

/* Overflow */
.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }

/* Position */
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.top-0 { top: 0; }
.right-0 { right: 0; }
.bottom-0 { bottom: 0; }
.left-0 { left: 0; }

/* Z-index */
.z-50 { z-index: 50; }

/* Transitions */
.transition { transition-property: all; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
.transition-colors { transition-property: color, background-color, border-color; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }

/* Cursor */
.cursor-pointer { cursor: pointer; }
.cursor-not-allowed { cursor: not-allowed; }

/* Opacity */
.opacity-0 { opacity: 0; }
.opacity-50 { opacity: 0.5; }
.opacity-100 { opacity: 1; }

/* Focus */
.focus\:outline-none:focus { outline: 2px solid transparent; outline-offset: 2px; }
.focus\:ring-2:focus { box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.5); }
.focus\:border-blue-500:focus { border-color: rgb(59 130 246); }
.focus\:ring-blue-500:focus { box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3); }

/* Hover */
.hover\:bg-gray-50:hover { background-color: rgb(249 250 251); }
.hover\:bg-gray-100:hover { background-color: rgb(243 244 246); }
.hover\:bg-blue-700:hover { background-color: rgb(29 78 216); }
.hover\:text-gray-700:hover { color: rgb(55 65 81); }
.hover\:text-gray-900:hover { color: rgb(17 24 39); }
.hover\:text-blue-500:hover { color: rgb(59 130 246); }
.dark .dark\:hover\:bg-gray-700:hover { background-color: rgb(55 65 81); }
.dark .dark\:hover\:text-gray-200:hover { color: rgb(229 231 235); }
.dark .dark\:hover\:text-blue-300:hover { color: rgb(147 197 253); }

/* Disabled */
.disabled\:opacity-50:disabled { opacity: 0.5; }
.disabled\:cursor-not-allowed:disabled { cursor: not-allowed; }

/* Grid */
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }

/* Responsive Grid */
@media (min-width: 768px) {
    .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
    .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .lg\:col-span-1 { grid-column: span 1 / span 1; }
    .lg\:col-span-2 { grid-column: span 2 / span 2; }
}

/* Animations */
@keyframes spin {
    to { transform: rotate(360deg); }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* Alpine.js transitions */
[x-cloak] { display: none !important; }

/* Custom components */
.btn {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-weight: 500;
    transition: all 150ms;
    cursor: pointer;
}

.btn-primary {
    background-color: rgb(37 99 235);
    color: white;
}

.btn-primary:hover {
    background-color: rgb(29 78 216);
}

.btn-secondary {
    background-color: rgb(243 244 246);
    color: rgb(55 65 81);
}

.btn-secondary:hover {
    background-color: rgb(229 231 235);
}

/* Form inputs */
input[type="text"],
input[type="password"],
input[type="email"],
select,
textarea {
    appearance: none;
    display: block;
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid rgb(209 213 219);
    border-radius: 0.375rem;
    font-size: 0.875rem;
    line-height: 1.25rem;
}

.dark input[type="text"],
.dark input[type="password"],
.dark input[type="email"],
.dark select,
.dark textarea {
    background-color: rgb(31 41 55);
    border-color: rgb(75 85 99);
    color: white;
}

input[type="checkbox"] {
    appearance: none;
    width: 1rem;
    height: 1rem;
    border: 1px solid rgb(209 213 219);
    border-radius: 0.25rem;
    cursor: pointer;
}

input[type="checkbox"]:checked {
    background-color: rgb(37 99 235);
    border-color: rgb(37 99 235);
}

/* Screen reader only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Unfold theme overrides */
.unfold-admin {
    font-family: 'Inter', sans-serif !important;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgb(243 244 246);
}

.dark ::-webkit-scrollbar-track {
    background: rgb(31 41 55);
}

::-webkit-scrollbar-thumb {
    background: rgb(156 163 175);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgb(107 114 128);
}

/* ================================
   Enhanced Card Styles
   ================================ */
.card {
    background-color: rgb(255 255 255);
    border: 1px solid rgb(229 231 235);
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
    transition: all 0.2s ease-in-out;
}

.card:hover {
    box-shadow: 0 4px 12px 0 rgb(0 0 0 / 0.15);
    transform: translateY(-1px);
}

.dark .card {
    background-color: rgb(31 41 55);
    border-color: rgb(55 65 81);
}

.dark .card:hover {
    box-shadow: 0 4px 12px 0 rgb(0 0 0 / 0.4);
    border-color: rgb(75 85 99);
}

/* Stat cards with subtle glow on hover */
.stat-card {
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, rgb(59 130 246), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stat-card:hover::before {
    opacity: 1;
}

/* ================================
   Enhanced Table Styles
   ================================ */
.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.data-table thead th {
    background-color: rgb(249 250 251);
    padding: 0.75rem 1rem;
    font-weight: 600;
    text-align: left;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgb(107 114 128);
    border-bottom: 1px solid rgb(229 231 235);
    position: sticky;
    top: 0;
    z-index: 10;
}

.dark .data-table thead th {
    background-color: rgb(55 65 81);
    color: rgb(156 163 175);
    border-bottom-color: rgb(75 85 99);
}

.data-table tbody tr {
    transition: background-color 0.15s ease;
}

.data-table tbody tr:hover {
    background-color: rgb(249 250 251);
}

.dark .data-table tbody tr:hover {
    background-color: rgb(55 65 81 / 0.5);
}

.data-table tbody td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgb(243 244 246);
}

.dark .data-table tbody td {
    border-bottom-color: rgb(55 65 81);
}

/* Alternating row colors */
.data-table.striped tbody tr:nth-child(even) {
    background-color: rgb(249 250 251 / 0.5);
}

.dark .data-table.striped tbody tr:nth-child(even) {
    background-color: rgb(55 65 81 / 0.3);
}

/* Selected row style */
.data-table tbody tr.selected {
    background-color: rgb(219 234 254) !important;
}

.dark .data-table tbody tr.selected {
    background-color: rgb(30 58 138 / 0.3) !important;
}

/* Clickable rows */
.data-table tbody tr.clickable {
    cursor: pointer;
}

.data-table tbody tr.clickable:active {
    background-color: rgb(229 231 235);
}

.dark .data-table tbody tr.clickable:active {
    background-color: rgb(75 85 99);
}

/* ================================
   Enhanced Button Styles
   ================================ */
.btn {
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease;
}

.btn:active::after {
    width: 200px;
    height: 200px;
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn:disabled,
.btn.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

/* Button loading state */
.btn.loading {
    color: transparent !important;
    pointer-events: none;
}

.btn.loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 1rem;
    height: 1rem;
    margin-top: -0.5rem;
    margin-left: -0.5rem;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: btn-spin 0.6s linear infinite;
}

.btn-primary.loading::before {
    border-color: rgba(255, 255, 255, 0.3);
    border-right-color: transparent;
}

@keyframes btn-spin {
    to { transform: rotate(360deg); }
}

/* Button icon alignment */
.btn .material-icons {
    font-size: 1.125rem;
    margin-right: 0.375rem;
}

.btn-icon {
    padding: 0.5rem;
    border-radius: 0.375rem;
}

.btn-icon .material-icons {
    margin: 0;
}

/* Danger button */
.btn-danger {
    background-color: rgb(220 38 38);
    color: white;
}

.btn-danger:hover {
    background-color: rgb(185 28 28);
}

/* Success button */
.btn-success {
    background-color: rgb(22 163 74);
    color: white;
}

.btn-success:hover {
    background-color: rgb(21 128 61);
}

/* Ghost/outline button */
.btn-ghost {
    background-color: transparent;
    border: 1px solid rgb(209 213 219);
    color: rgb(55 65 81);
}

.btn-ghost:hover {
    background-color: rgb(249 250 251);
    border-color: rgb(156 163 175);
}

.dark .btn-ghost {
    border-color: rgb(75 85 99);
    color: rgb(209 213 219);
}

.dark .btn-ghost:hover {
    background-color: rgb(55 65 81);
    border-color: rgb(107 114 128);
}

/* ================================
   Enhanced Form Styles
   ================================ */
input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: rgb(59 130 246);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.dark input[type="text"]:focus,
.dark input[type="password"]:focus,
.dark input[type="email"]:focus,
.dark select:focus,
.dark textarea:focus {
    border-color: rgb(96 165 250);
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.2);
}

/* Input with error */
.input-error {
    border-color: rgb(220 38 38) !important;
}

.input-error:focus {
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15) !important;
}

/* Input with success */
.input-success {
    border-color: rgb(22 163 74) !important;
}

.input-success:focus {
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.15) !important;
}

/* Enhanced checkbox */
input[type="checkbox"] {
    transition: all 0.15s ease;
}

input[type="checkbox"]:checked {
    background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e");
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;
}

input[type="checkbox"]:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

.dark input[type="checkbox"] {
    background-color: rgb(55 65 81);
    border-color: rgb(75 85 99);
}

/* ================================
   Loading Skeleton Animations
   ================================ */
.skeleton {
    background: linear-gradient(90deg,
        rgb(229 231 235) 25%,
        rgb(243 244 246) 50%,
        rgb(229 231 235) 75%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: 0.25rem;
}

.dark .skeleton {
    background: linear-gradient(90deg,
        rgb(55 65 81) 25%,
        rgb(75 85 99) 50%,
        rgb(55 65 81) 75%
    );
    background-size: 200% 100%;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-text {
    height: 1rem;
    margin-bottom: 0.5rem;
}

.skeleton-text.short {
    width: 60%;
}

.skeleton-text.medium {
    width: 80%;
}

.skeleton-title {
    height: 1.5rem;
    margin-bottom: 0.75rem;
    width: 50%;
}

.skeleton-avatar {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 9999px;
}

.skeleton-card {
    height: 120px;
}

/* ================================
   Empty State Styles
   ================================ */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem;
    text-align: center;
}

.empty-state .material-icons {
    font-size: 4rem;
    color: rgb(156 163 175);
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: rgb(55 65 81);
    margin-bottom: 0.5rem;
}

.dark .empty-state-title {
    color: rgb(209 213 219);
}

.empty-state-description {
    font-size: 0.875rem;
    color: rgb(107 114 128);
    max-width: 20rem;
    margin-bottom: 1.5rem;
}

.dark .empty-state-description {
    color: rgb(156 163 175);
}

/* ================================
   Status Badge Enhancements
   ================================ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 9999px;
    white-space: nowrap;
}

.badge-success {
    background-color: rgb(220 252 231);
    color: rgb(21 128 61);
}

.dark .badge-success {
    background-color: rgb(20 83 45 / 0.5);
    color: rgb(134 239 172);
}

.badge-error {
    background-color: rgb(254 226 226);
    color: rgb(185 28 28);
}

.dark .badge-error {
    background-color: rgb(127 29 29 / 0.5);
    color: rgb(252 165 165);
}

.badge-warning {
    background-color: rgb(254 243 199);
    color: rgb(161 98 7);
}

.dark .badge-warning {
    background-color: rgb(120 53 15 / 0.5);
    color: rgb(252 211 77);
}

.badge-info {
    background-color: rgb(219 234 254);
    color: rgb(29 78 216);
}

.dark .badge-info {
    background-color: rgb(30 58 138 / 0.5);
    color: rgb(147 197 253);
}

.badge-neutral {
    background-color: rgb(243 244 246);
    color: rgb(75 85 99);
}

.dark .badge-neutral {
    background-color: rgb(55 65 81);
    color: rgb(209 213 219);
}

/* Pulse animation for status indicators */
.status-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 9999px;
    display: inline-block;
    margin-right: 0.375rem;
}

.status-dot.online {
    background-color: rgb(34 197 94);
    animation: pulse-green 2s infinite;
}

.status-dot.offline {
    background-color: rgb(239 68 68);
}

.status-dot.pending {
    background-color: rgb(251 191 36);
    animation: pulse-yellow 2s infinite;
}

@keyframes pulse-green {
    0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4); }
    50% { box-shadow: 0 0 0 4px rgba(34, 197, 94, 0); }
}

@keyframes pulse-yellow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.4); }
    50% { box-shadow: 0 0 0 4px rgba(251, 191, 36, 0); }
}

/* ================================
   Tooltip Styles
   ================================ */
[data-tooltip] {
    position: relative;
}

[data-tooltip]::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.375rem 0.625rem;
    background-color: rgb(17 24 39);
    color: white;
    font-size: 0.75rem;
    border-radius: 0.25rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    z-index: 50;
    margin-bottom: 0.25rem;
}

[data-tooltip]:hover::before {
    opacity: 1;
    visibility: visible;
}

/* ================================
   Pulse Animation for Live Data
   ================================ */
.pulse-ring {
    position: relative;
}

.pulse-ring::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 2px solid currentColor;
    border-radius: inherit;
    animation: pulse-ring 1.5s cubic-bezier(0.4, 0, 0.6, 1) infinite;
    opacity: 0;
}

@keyframes pulse-ring {
    0% { transform: scale(1); opacity: 0.5; }
    100% { transform: scale(1.5); opacity: 0; }
}

/* ================================
   Count-up Animation Utility
   ================================ */
.animate-count {
    animation: count-fade 0.5s ease-out;
}

@keyframes count-fade {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
