/* ============================================
   LinuxVPS — Design System
   Colors: Trust Blue (#2563EB) + Professional
   Typography: Fira Sans + Fira Code
   ============================================ */

:root {
    --primary: #2563EB;
    --primary-hover: #1d4ed8;
    --on-primary: #ffffff;
    --secondary: #3B82F6;
    --accent: #EA580C;
    --background: #F8FAFC;
    --foreground: #1E293B;
    --card: #ffffff;
    --card-foreground: #1E293B;
    --muted: #E9EFF8;
    --muted-foreground: #64748B;
    --border: #E2E8F0;
    --destructive: #DC2626;
    --ring: #2563EB;
}

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

html, body {
    height: 100%;
}

body {
    font-family: 'Fira Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--background);
    color: var(--foreground);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* ---- Utility classes ---- */

.bg-background { background-color: var(--background); }
.bg-white { background-color: #ffffff; }
.bg-muted { background-color: var(--muted); }
.bg-primary { background-color: var(--primary); }
.bg-primary\/5 { background-color: rgba(37, 99, 235, 0.05); }

.text-foreground { color: var(--foreground); }
.text-muted-foreground { color: var(--muted-foreground); }
.text-primary { color: var(--primary); }
.text-white { color: #ffffff; }
.text-red-400 { color: #f87171; }
.text-red-500 { color: #ef4444; }
.text-red-600 { color: #dc2626; }
.text-red-700 { color: #b91c1c; }
.text-amber-500 { color: #f59e0b; }
.text-amber-600 { color: #d97706; }
.text-amber-800 { color: #92400e; }
.text-emerald-500 { color: #10b981; }
.text-emerald-600 { color: #059669; }
.text-emerald-700 { color: #047857; }

.font-sans { font-family: 'Fira Sans', sans-serif; }
.font-mono { font-family: 'Fira Code', monospace; }
.font-light { font-weight: 300; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.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-center { text-align: center; }
.text-right { text-align: right; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.whitespace-pre-wrap { white-space: pre-wrap; }
.underline { text-decoration: underline; }

/* Layout */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-1 { flex: 1 1 0%; }
.flex-shrink-0 { flex-shrink: 0; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.space-y-1 > * + * { margin-top: 0.25rem; }
.space-y-2 > * + * { margin-top: 0.5rem; }
.space-y-3 > * + * { margin-top: 0.75rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }

.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.col-span-2 { grid-column: span 2 / span 2; }

@media (min-width: 768px) {
    .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.min-w-0 { min-width: 0; }
.min-h-\[80vh\] { min-height: 80vh; }

.w-2 { width: 0.5rem; }
.w-3 { width: 0.75rem; }
.w-4 { width: 1rem; }
.w-5 { width: 1.25rem; }
.w-8 { width: 2rem; }
.w-14 { width: 3.5rem; }
.w-16 { width: 4rem; }
.w-60 { width: 15rem; }
.w-64 { width: 16rem; }
.w-full { width: 100%; }
.w-1\/3 { width: 33.333%; }
.w-1\/2 { width: 50%; }
.w-2\/5 { width: 40%; }

.h-2 { height: 0.5rem; }
.h-2\.5 { height: 0.625rem; }
.h-3 { height: 0.75rem; }
.h-4 { height: 1rem; }
.h-5 { height: 1.25rem; }
.h-8 { height: 2rem; }
.h-14 { height: 3.5rem; }
.h-16 { height: 4rem; }
.h-20 { height: 5rem; }
.h-full { height: 100%; }

.max-w-sm { max-width: 24rem; }
.max-w-lg { max-width: 32rem; }
.max-w-3xl { max-width: 48rem; }

/* Spacing */
.p-2 { padding: 0.5rem; }
.p-4 { padding: 1rem; }
.p-5 { padding: 1.25rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.px-1\.5 { padding-left: 0.375rem; padding-right: 0.375rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.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-0\.5 { padding-top: 0.125rem; padding-bottom: 0.125rem; }
.py-1\.5 { padding-top: 0.375rem; padding-bottom: 0.375rem; }
.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; }
.py-20 { padding-top: 5rem; padding-bottom: 5rem; }
.pt-2 { padding-top: 0.5rem; }
.pt-3 { padding-top: 0.75rem; }
.mt-0\.5 { margin-top: 0.125rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.ml-1 { margin-left: 0.25rem; }
.ml-2 { margin-left: 0.5rem; }
.mx-auto { margin-left: auto; margin-right: auto; }

/* Borders */
.border { border: 1px solid var(--border); }
.border-b { border-bottom: 1px solid var(--border); }
.border-t { border-top: 1px solid var(--border); }
.border-r { border-right: 1px solid var(--border); }
.border-border { border-color: var(--border); }
.border-red-200 { border-color: #fecaca; }
.border-emerald-200 { border-color: #a7f3d0; }
.rounded { border-radius: 0.25rem; }
.rounded-md { border-radius: 0.375rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-2xl { border-radius: 1rem; }
.rounded-full { border-radius: 9999px; }

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

/* Positioning */
.relative { position: relative; }
.absolute { position: absolute; }
.right-0 { right: 0; }
.z-50 { z-index: 50; }

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

/* Effects */
.shadow-lg { box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1); }
.opacity-0 { opacity: 0; }
.transition-all { transition: all 0.2s ease; }
.transition-colors { transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease; }
.transition-opacity { transition: opacity 0.15s ease; }
.transition-transform { transition: transform 0.2s ease; }
.duration-200 { transition-duration: 200ms; }
.duration-500 { transition-duration: 500ms; }
.rotate-180 { transform: rotate(180deg); }
.cursor-pointer { cursor: pointer; }
.resize-none { resize: none; }

/* Group hover */
.group:hover .group-hover\:opacity-100 { opacity: 1; }

/* Hover states */
.hover\:bg-muted:hover { background-color: var(--muted); }
.hover\:underline:hover { text-decoration: underline; }
.hover\:text-foreground:hover { color: var(--foreground); }
.hover\:text-primary:hover { color: var(--primary); }
.hover\:text-red-700:hover { color: #b91c1c; }
.hover\:text-red-800:hover { color: #991b1b; }
.hover\:text-amber-800:hover { color: #92400e; }

/* Focus */
.focus\:outline-none:focus { outline: none; }

/* Background colors (specific) */
.bg-red-50 { background-color: #fef2f2; }
.bg-emerald-50 { background-color: #ecfdf5; }
.bg-emerald-100 { background-color: #d1fae5; }
.bg-gray-100 { background-color: #f3f4f6; }
.bg-gray-300 { background-color: #d1d5db; }
.text-gray-600 { color: #4b5563; }

/* Divide */
.divide-y > * + * { border-top: 1px solid var(--border); }
.divide-border > * + * { border-color: var(--border); }

/* Animations */
.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* File input */
.file\:mr-3::file-selector-button { margin-right: 0.75rem; }
.file\:py-1\.5::file-selector-button { padding-top: 0.375rem; padding-bottom: 0.375rem; }
.file\:px-3::file-selector-button { padding-left: 0.75rem; padding-right: 0.75rem; }
.file\:rounded-md::file-selector-button { border-radius: 0.375rem; }
.file\:border::file-selector-button { border: 1px solid var(--border); }
.file\:text-sm::file-selector-button { font-size: 0.875rem; }
.file\:bg-white::file-selector-button { background-color: white; }
.file\:text-foreground::file-selector-button { color: var(--foreground); }
.hover\:file\:bg-muted:hover::file-selector-button { background-color: var(--muted); }

/* ---- Components ---- */

.card {
    background-color: var(--card);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    background-color: var(--primary);
    color: var(--on-primary);
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    transition: background-color 0.15s ease;
    text-decoration: none;
}
.btn-primary:hover {
    background-color: var(--primary-hover);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    background-color: var(--card);
    color: var(--foreground);
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 0.5rem;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: background-color 0.15s ease;
    text-decoration: none;
}
.btn-secondary:hover {
    background-color: var(--muted);
}

.input {
    display: block;
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--foreground);
    background-color: var(--card);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    font-family: inherit;
}
.input:focus {
    outline: none;
    border-color: var(--ring);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

select.input {
    appearance: auto;
}

textarea.input {
    resize: vertical;
}

.label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--foreground);
    margin-bottom: 0.25rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--muted-foreground);
    border-radius: 0.5rem;
    transition: background-color 0.15s ease, color 0.15s ease;
    text-decoration: none;
    border: none;
    background: none;
    cursor: pointer;
    width: 100%;
}
.sidebar-link:hover {
    background-color: var(--muted);
    color: var(--foreground);
}
.sidebar-link.active {
    background-color: rgba(37, 99, 235, 0.08);
    color: var(--primary);
}

/* Command palette button */
.cmd-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.375rem 0.5rem;
    border-radius: 0.375rem;
    border: none;
    background: none;
    cursor: pointer;
    text-align: left;
    transition: background-color 0.1s ease;
}
.cmd-btn:hover {
    background-color: var(--muted);
}
.cmd-btn:active {
    background-color: rgba(37, 99, 235, 0.1);
}

.text-\[10px\] { font-size: 10px; line-height: 1.4; }
.tracking-wider { letter-spacing: 0.05em; }
.uppercase { text-transform: uppercase; }
.translate-x-0 { transform: translateX(0); }
.translate-x-4 { transform: translateX(1rem); }
.flex-shrink-0 { flex-shrink: 0; }
.sticky { position: sticky; }
.top-0 { top: 0; }
.bottom-0 { bottom: 0; }
.z-10 { z-index: 10; }

/* Specific background for terminal/editor */
.bg-\[#1e1e2e\] { background-color: #1e1e2e; }
.text-\[#cdd6f4\] { color: #cdd6f4; }
