/* ====================================================
   IT Financial — Shared CSS (Global Design System)
   ==================================================== */

/* --- CSS Variables (Design Tokens) --- */
:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --primary-50: #eef2ff;
    --violet: #7c3aed;
    --violet-dark: #6d28d9;
    --slate-50: #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-300: #cbd5e1;
    --slate-400: #94a3b8;
    --slate-500: #64748b;
    --slate-600: #475569;
    --slate-700: #334155;
    --slate-800: #1e293b;
    --slate-900: #0f172a;
    --emerald: #10b981;
    --rose: #f43f5e;
    --amber: #f59e0b;
    --glass-bg: rgba(255, 255, 255, 0.72);
    --glass-border: rgba(255, 255, 255, 0.85);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.06);
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- Base Styles --- */
* { box-sizing: border-box; }

body {
    font-family: 'Sarabun', sans-serif;
    background-color: #f1f5f9;
    color: var(--slate-700);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.font-poppins { font-family: 'Poppins', sans-serif; }

/* --- Animated Blob Background --- */
.blob {
    position: fixed;
    filter: blur(90px);
    opacity: 0.45;
    z-index: -1;
    animation: float 20s infinite ease-in-out;
    pointer-events: none;
    will-change: transform;
    border-radius: 50%;
}
.blob-1 { top: -10%; left: -10%; width: 600px; height: 600px; background: #c4b5fd; }
.blob-2 { bottom: -10%; right: -10%; width: 500px; height: 500px; background: #93c5fd; animation-delay: 5s; }
.blob-3 { top: 50%; left: 50%; width: 400px; height: 400px; background: #a5b4fc; animation-delay: 10s; transform: translate(-50%, -50%); }

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -20px) scale(1.05); }
    66% { transform: translate(-20px, 20px) scale(0.95); }
}

/* --- Glassmorphism --- */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

.glass-strong {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.92);
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.08);
}

/* --- Animations --- */
.animate-up {
    animation: fadeInUp 0.6s var(--transition-smooth) forwards;
    opacity: 0;
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-scale {
    animation: scaleIn 0.4s var(--transition-smooth) forwards;
    opacity: 0;
}
@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.92); }
    to { opacity: 1; transform: scale(1); }
}

.delay-100 { animation-delay: 100ms; }
.delay-200 { animation-delay: 200ms; }
.delay-300 { animation-delay: 300ms; }
.delay-400 { animation-delay: 400ms; }

/* --- Custom Scrollbar --- */
.custom-scrollbar::-webkit-scrollbar { width: 4px; }
.custom-scrollbar::-webkit-scrollbar-track { background: transparent; }
.custom-scrollbar::-webkit-scrollbar-thumb { background: var(--slate-300); border-radius: 4px; }
.custom-scrollbar::-webkit-scrollbar-thumb:hover { background: var(--slate-400); }

/* --- Navbar Glass --- */
.navbar-glass {
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.28);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    transition: all 0.5s ease;
}
.navbar-glass:hover {
    background: rgba(255, 255, 255, 0.55);
}

/* --- Toggle Password Button --- */
.password-wrapper { position: relative; }
.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--slate-400);
    cursor: pointer;
    padding: 4px;
    transition: color var(--transition-fast);
    z-index: 5;
    font-size: 14px;
    line-height: 1;
}
.toggle-password:hover { color: var(--primary); }

/* --- Bottom Navigation (Mobile) --- */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 50;
    padding: 8px 16px calc(8px + env(safe-area-inset-bottom));
    pointer-events: none;
}

.bottom-nav-inner {
    max-width: 420px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.85);
    border-radius: 1.5rem;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(255, 255, 255, 0.3);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 6px 8px;
    pointer-events: auto;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 6px 12px;
    border-radius: 14px;
    color: var(--slate-400);
    text-decoration: none;
    transition: all 0.25s ease;
    font-size: 10px;
    font-weight: 600;
    position: relative;
    min-width: 56px;
}
.bottom-nav-item i { font-size: 18px; transition: transform 0.2s ease; }
.bottom-nav-item:hover { color: var(--primary); background: rgba(99, 102, 241, 0.06); }
.bottom-nav-item:hover i { transform: translateY(-1px); }
.bottom-nav-item.active {
    color: var(--primary);
    background: var(--primary-50);
}
.bottom-nav-item.active::after {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 3px;
    background: var(--primary);
    border-radius: 0 0 3px 3px;
}

@media (min-width: 768px) {
    .bottom-nav { display: none; }
}

/* --- Tab Button --- */
.tab-btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Card Hover Effect --- */
.card-hover {
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
}

/* --- Print Styles --- */
@media print {
    .blob, .bottom-nav, .navbar-glass, nav { display: none !important; }
    body { background: white !important; }
    .glass { background: white !important; backdrop-filter: none !important; border: 1px solid #e2e8f0 !important; box-shadow: none !important; }
}
