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

:root {
    --bg-primary: #f8fafc;
    --bg-surface: #ffffff;
    --bg-card: #ffffff;
    --border-color: #e2e8f0;
    --border-focus: #2563eb;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --accent-blue: #2563eb;
    --accent-emerald: #059669;
    --accent-rose: #e11d48;
    --accent-amber: #d97706;
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Form Controls Explicit Contrast */
input, select, textarea {
    background-color: #ffffff !important;
    color: #0f172a !important;
    border-color: #cbd5e1 !important;
}
input::placeholder, textarea::placeholder {
    color: #94a3b8 !important;
}

.font-mono-numbers {
    font-family: 'JetBrains Mono', monospace;
    font-variant-numeric: tabular-nums;
}

/* Clean White Card with crisp borders */
.app-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px -1px rgba(0, 0, 0, 0.05);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.app-card:hover {
    border-color: #93c5fd;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    transform: translateY(-1px);
}

/* Touch feedback */
.touch-press {
    transition: transform 0.1s ease, background-color 0.1s ease;
}
.touch-press:active {
    transform: scale(0.97);
}

/* Modal Bottom Sheet */
.modal-backdrop {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.bottom-sheet {
    transform: translateY(100%);
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}
.bottom-sheet.open {
    transform: translateY(0);
}

@media (min-width: 640px) {
    .bottom-sheet {
        transform: scale(0.96);
        opacity: 0;
        transition: transform 0.2s ease, opacity 0.2s ease;
    }
    .bottom-sheet.open {
        transform: scale(1);
        opacity: 1;
    }
}

/* Progress Bars */
.progress-bar-bg {
    background-color: #e2e8f0;
    border-radius: 9999px;
    overflow: hidden;
}

.progress-bar-fill {
    transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.hide-scrollbar::-webkit-scrollbar {
    display: none;
}
.hide-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.safe-bottom {
    padding-bottom: max(1rem, env(safe-area-inset-bottom));
}
