/* =========================================
   1. SHADCN / VERCEL THEME VARIABLES
   ========================================= */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    /* Base Colors (Slate Scale) */
    --background: #ffffff;
    --foreground: #020817;
    /* Dark Slate for Text */

    --card: #ffffff;
    --card-foreground: #020817;

    --popover: #ffffff;
    --popover-foreground: #020817;

    /* Primary Action (Solid Black) */
    --primary: #0f172a;
    --primary-foreground: #f8fafc;

    /* Secondary Action (Light Slate) */
    --secondary: #f1f5f9;
    --secondary-foreground: #0f172a;

    /* Muted Text / Elements */
    --muted: #f1f5f9;
    --muted-foreground: #64748b;

    /* Accents */
    --accent: #f1f5f9;
    --accent-foreground: #0f172a;

    /* States */
    --destructive: #ef4444;
    --destructive-foreground: #f8fafc;
    --success: #10b981;
    --warning: #f59e0b;

    /* Borders & Inputs */
    --border: #e2e8f0;
    --input: #e2e8f0;
    --ring: #94a3b8;

    --radius: 0.5rem;
    /* 8px - The classic shadcn radius */
    --font-sans: 'Inter', sans-serif;

    --nav-width: 250px;

    /* Subtle Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
}

body {
    margin: 0;
    font-family: var(--font-sans);
    background-color: var(--background);
    color: var(--foreground);
    display: flex;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    /* Crisp text */
}

h1,
h2,
h3,
h4 {
    margin: 0 0 0.5rem 0;
    font-weight: 600;
    letter-spacing: -0.025em;
    /* Tight tracking for modern look */
    color: var(--foreground);
}

h1 {
    font-size: 1.875rem;
    line-height: 2.25rem;
}

h2 {
    font-size: 1.5rem;
    line-height: 2rem;
}

p {
    line-height: 1.75;
    color: var(--muted-foreground);
    margin-bottom: 1.5rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.2s;
}

/* =========================================
   2. SIDEBAR (Minimalist)
   ========================================= */
#app-sidebar {
    width: var(--nav-width);
    background: var(--background);
    border-right: 1px solid var(--border);
    position: fixed;
    height: 100vh;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    z-index: 50;
    box-sizing: border-box;
}

.main-content-wrapper {
    margin-left: var(--nav-width);
    width: calc(100% - var(--nav-width));
    padding: 2.5rem;
    box-sizing: border-box;
    background: #f8fafc;
    /* Very subtle background for main area */
    min-height: 100vh;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
}

.sidebar-brand {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--foreground);
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius);
    color: var(--muted-foreground);
    font-weight: 500;
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
    cursor: pointer;
    background: transparent;
    border: none;
    width: 100%;
    text-align: left;
    transition: all 0.2s;
}

.sidebar-link:hover {
    background-color: var(--secondary);
    color: var(--foreground);
}

.sidebar-link.active {
    background-color: var(--secondary);
    color: var(--foreground);
    font-weight: 600;
}

.sidebar-section-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--muted-foreground);
    margin: 1.5rem 0 0.5rem 0.75rem;
}

/* =========================================
   3. CARDS & CONTAINERS
   ========================================= */
.card,
.pro-card,
.kpi-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.5rem;
    transition: box-shadow 0.2s;
}

.card:hover,
.pro-card:hover {
    box-shadow: var(--shadow-md);
}

/* =========================================
   4. UI ELEMENTS (Inputs & Buttons)
   ========================================= */
/* Inputs - The Shadcn Look */
input,
select,
textarea {
    display: flex;
    width: 100%;
    border-radius: var(--radius);
    border: 1px solid var(--input);
    background-color: transparent;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    line-height: 1.25rem;
    color: var(--foreground);
    transition: border-color 0.2s;
    box-sizing: border-box;
    margin-bottom: 1rem;
    font-family: inherit;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--ring);
    box-shadow: 0 0 0 1px var(--ring);
    /* Subtle focus ring */
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: background-color 0.2s;
    border: 1px solid transparent;
    gap: 0.5rem;
    text-decoration: none;
}

/* Primary = Black Background, White Text */
.btn-primary,
.success-btn {
    background-color: var(--primary);
    color: var(--primary-foreground);
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover,
.success-btn:hover {
    background-color: rgba(15, 23, 42, 0.9);
}

/* Secondary = Light Gray Background, Dark Text */
.btn-secondary,
.secondary {
    background-color: var(--secondary);
    color: var(--secondary-foreground);
    border: 1px solid transparent;
    /* No border usually for secondary */
}

.btn-secondary:hover,
.secondary:hover {
    background-color: #e2e8f0;
    /* Slightly darker gray */
}

/* Destructive */
.btn-danger {
    background-color: var(--destructive);
    color: var(--destructive-foreground);
}

/* Small Button Variant */
.btn-sm {
    height: 2rem;
    padding: 0 0.75rem;
    font-size: 0.75rem;
}

/* =========================================
   5. UTILITIES & SKELETONS
   ========================================= */
.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.text-center {
    text-align: center;
}

.hidden {
    display: none !important;
}

/* Tag Badge */
.tag-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 9999px;
    /* Pill */
    border: 1px solid transparent;
    padding: 0.125rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 600;
    transition: colors 0.2s;
}

/* Skeleton Animation (Subtle Pulse) */
.skeleton {
    background: var(--muted);
    border-radius: var(--radius);
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: .5;
    }
}

.skeleton-text {
    height: 1rem;
    margin-bottom: 0.5rem;
    width: 80%;
}

.skeleton-title {
    height: 1.5rem;
    margin-bottom: 1rem;
    width: 60%;
}

.skeleton-img {
    width: 100%;
    height: 150px;
    border-radius: var(--radius);
}