/* SDK Monitor Dashboard - Experimental CSS (Navy Theme) */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500&display=swap');

/* ===== FONT DEFINITIONS ===== */
@font-face {
    font-family: Inter;
    font-weight: 900;
    font-style: normal;
    src: local(Inter), url('Inter-Black.otf') format('opentype');
}

/* ===== CSS RESET ===== */
* {
    box-sizing: border-box;
}

*,
::before,
::after {
    box-sizing: inherit;
    margin: 0;
    padding: 0;
}

html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    text-size-adjust: 100%;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: rgb(24, 29, 39);
    background-color: rgb(248, 249, 252);
}

/* Remove default list styles */
ul, ol {
    list-style: none;
}

/* Remove default link styles */
a {
    color: inherit;
    text-decoration: none;
}

/* Remove default button styles */
button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

/* ===== TYPOGRAPHY OPTIMIZATION ===== */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    line-height: 1.2;
    margin: 0;
}

h1 {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

h2 {
    font-size: 1.5rem;
    font-weight: 700;
}

h3 {
    font-size: 1.25rem;
    font-weight: 600;
}

p {
    margin: 0;
    font-size: 0.9375rem;
    line-height: 1.6;
}

/* ===== SCROLLBAR ENHANCEMENT ===== */
:root {
    --navy-dark: #01297A;
    --navy-medium: #0A3A8A;
    --navy-light: #1A5FBD;
    --accent-purple: #6C5CE7;
    --accent-teal: #00B894;
    --accent-coral: #FF7675;
    --scrollbar-width: 8px;
}

/* ===== CUSTOM SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
    background-color: transparent;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--navy-light), var(--accent-purple));
    border-radius: 6px;
    border: 2px solid transparent;
    background-clip: padding-box;
    transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--navy-medium), var(--navy-light));
    background-clip: padding-box;
}

/* Firefox scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--navy-light) transparent;
}

.custom-scroll {
    overflow-y: auto;
    overflow-x: hidden;
}

/* ===== ANIMATIONS ===== */
@keyframes pulse-blink {
    0%, 100% {
        opacity: 1;
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
    }
    50% {
        opacity: 0.5;
        box-shadow: 0 0 0 6px rgba(34, 197, 94, 0);
    }
}

@keyframes glow-pulse {
    0%, 100% {
        text-shadow: 0 0 5px rgba(55, 138, 221, 0.3);
    }
    50% {
        text-shadow: 0 0 15px rgba(55, 138, 221, 0.6);
    }
}

@keyframes slide-in-up {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* ===== PULSE INDICATOR ===== */
.pulse-indicator {
    animation: pulse-blink 2.5s infinite;
}

/* ===== HERO CARD - Navy Gradient ===== */
.hero-card {
    position: relative;
    background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy-medium) 100%);
    box-shadow: 
        0 10px 30px rgba(12, 24, 68, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    animation: slide-in-up 0.6s ease-out;
}

.hero-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(55, 138, 221, 0.1) 0%, transparent 50%);
    pointer-events: none;
    border-radius: 0.75rem;
}

.hero-card:hover {
    box-shadow: 
        0 15px 40px rgba(12, 24, 68, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ===== KPI MINI CARDS ===== */
.kpi-mini-card {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, rgba(55, 138, 221, 0.1) 0%, rgba(127, 119, 221, 0.05) 100%);
}

.kpi-mini-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(255, 255, 255, 0.1) 50%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.kpi-mini-card:hover {
    border-color: rgba(55, 138, 221, 0.6);
    background: linear-gradient(135deg, rgba(55, 138, 221, 0.15) 0%, rgba(127, 119, 221, 0.1) 100%);
    transform: translateY(-2px);
}

.kpi-mini-card:hover::before {
    opacity: 1;
}

/* ===== CHART CONTAINERS ===== */
.chart-container {
    position: relative;
    width: 100%;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 0.5rem;
    padding: 0.5rem;
    border: 1px solid rgba(55, 138, 221, 0.1);
    transition: all 0.3s ease;
}

.chart-container:hover {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(55, 138, 221, 0.3);
    box-shadow: 0 4px 12px rgba(55, 138, 221, 0.1);
}

canvas {
    max-height: 100%;
}

/* ===== TAB STYLING ===== */
.tab-btn {
    position: relative;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.tab-btn.active {
    background: linear-gradient(135deg, rgba(12, 34, 105, 0.08) 0%, rgba(55, 138, 221, 0.08) 100%);
    color: var(--navy-medium);
    box-shadow: 0 2px 8px rgba(55, 138, 221, 0.15);
}

.tab-btn:not(.active):hover {
    background: rgba(0, 0, 0, 0.02);
}

.tab-content {
    animation: slide-in-up 0.4s ease-out;
}

.tab-content.hidden {
    display: none;
}

/* ===== CARD ENHANCEMENTS ===== */
.bg-white {
    background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
    transition: all 0.3s ease;
}

.bg-white:hover {
    box-shadow: 
        0 10px 30px rgba(55, 138, 221, 0.1),
        0 0 1px rgba(55, 138, 221, 0.2);
    border-color: rgba(55, 138, 221, 0.2);
}

/* ===== TABLE ENHANCEMENTS ===== */
table {
    font-family: 'Inter', sans-serif;
    border-collapse: collapse;
}

table tbody tr {
    border-bottom: 1px solid rgba(1, 41, 122, 0.08);
    transition: all 0.2s ease;
    font-size: 0.9375rem;
}

table tbody tr:hover {
    background: linear-gradient(90deg, rgba(26, 95, 189, 0.03) 0%, rgba(108, 92, 231, 0.03) 100%);
    border-bottom-color: rgba(1, 41, 122, 0.15);
}

table th {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, rgba(1, 41, 122, 0.03) 0%, rgba(26, 95, 189, 0.03) 100%);
    font-weight: 700;
    font-size: 0.8125rem;
    color: var(--navy-medium);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.75rem 0.5rem;
}

/* Tinh chỉnh riêng header của bảng SDK clients để chữ gọn hơn */
#sdkTable thead th {
    font-size: 0.6875rem;
    letter-spacing: 0.06em;
}

table td {
    padding: 0.75rem 0.5rem;
    font-weight: 500;
}

/* ===== FONT STYLING ===== */
.font-mono {
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.01em;
    font-weight: 500;
}

/* ===== INPUT/SELECT STYLING ===== */
select, input {
    font-family: 'Inter', sans-serif;
    font-size: 0.9375rem;
    font-weight: 500;
    background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
    border: 1px solid rgba(1, 41, 122, 0.2);
    transition: all 0.2s ease;
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
}

select:hover, input:hover {
    border-color: rgba(1, 41, 122, 0.4);
}

select:focus, input:focus {
    outline: none;
    border-color: var(--navy-light);
    box-shadow: 0 0 0 3px rgba(26, 95, 189, 0.1);
}

select option {
    font-family: 'Inter', sans-serif;
    padding: 0.5rem;
    background: white;
    color: var(--navy-medium);
    font-weight: 500;
}

select option:checked {
    background: linear-gradient(135deg, var(--navy-light), var(--accent-purple));
    color: white;
}

/* ===== BADGE STYLING ===== */
.text-xs.font-medium {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    letter-spacing: 0.025em;
}

.px-2.py-0\.5.rounded {
    transition: all 0.2s ease;
}

.px-2.py-0\.5.rounded:hover {
    transform: translateY(-1px);
}

/* ===== BUTTON STYLING ===== */
button {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.9375rem;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

button:active {
    transform: scale(0.98);
}

.bg-blue-600,
.btn-primary {
    background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy-light) 100%) !important;
    color: white !important;
}

.bg-blue-600:hover,
.btn-primary:hover {
    background: linear-gradient(135deg, var(--navy-medium) 0%, var(--navy-dark) 100%) !important;
    box-shadow: 0 8px 20px rgba(1, 41, 122, 0.3);
}

.hover\:bg-blue-700:hover {
    background: var(--navy-dark) !important;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .hero-card {
        box-shadow: 0 5px 15px rgba(12, 24, 68, 0.15);
    }
    
    .chart-container {
        height: 180px !important;
    }
    
    .custom-scroll::-webkit-scrollbar {
        height: 4px;
    }
}

/* ===== EXPERIMENTAL: GLASSMORPHISM EFFECT ===== */
.glass-effect {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(12, 24, 68, 0.1);
}

/* ===== EXPERIMENTAL: NAVY GRADIENT BORDERS ===== */
.gradient-border {
    position: relative;
    background: white;
}

.gradient-border::before {
    content: '';
    position: absolute;
    inset: 0;
    padding: 1px;
    background: linear-gradient(135deg, var(--navy-light), var(--accent-purple));
    border-radius: 0.75rem;
    z-index: -1;
}

/* ===== EXPERIMENTAL: SHADOW LAYERS ===== */
.shadow-navy-sm {
    box-shadow: 0 2px 8px rgba(12, 24, 68, 0.1);
}

.shadow-navy-md {
    box-shadow: 0 8px 24px rgba(12, 24, 68, 0.15);
}

.shadow-navy-lg {
    box-shadow: 
        0 20px 50px rgba(12, 24, 68, 0.2),
        0 0 1px rgba(55, 138, 221, 0.1);
}

/* ===== EXPERIMENTAL: DATA VISUALIZATION ENHANCEMENTS ===== */
.metric-up {
    color: #10b981;
}

.metric-down {
    color: #ef4444;
}

.metric-neutral {
    color: #6b7280;
}

/* Status indicators */
.status-indicator {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.status-indicator.active .dot {
    animation: pulse-blink 2.5s infinite;
}

/* ===== EXPERIMENTAL: GRADIENT TEXT ===== */
.gradient-text {
    background: linear-gradient(135deg, var(--navy-light) 0%, var(--accent-purple) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== EXPERIMENTAL: MICRO-INTERACTIONS ===== */
input:focus::placeholder {
    color: transparent;
}

select option {
    padding: 0.5rem;
    background: white;
    color: var(--navy-medium);
}

select option:checked {
    background: linear-gradient(135deg, var(--navy-light), var(--accent-purple));
}

/* ===== PRINT STYLES ===== */
@media print {
    .custom-scroll {
        overflow: visible;
    }
    
    .tab-btn:not(.active) {
        display: none;
    }
}
