@import 'tailwindcss';

@import 'tw-animate-css';

@source '../views';
@source '../../vendor/laravel/framework/src/Illuminate/Pagination/resources/views/*.blade.php';

@custom-variant dark (&:is(.dark *));

@theme {
    --font-sans:
        'Montserrat', ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji',
        'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
    --font-heading: var(--font-sans);

    --radius-lg: var(--radius);
    --radius-md: calc(var(--radius) - 2px);
    --radius-sm: calc(var(--radius) - 4px);

    --color-background: var(--background);
    --color-foreground: var(--foreground);

    --color-card: var(--card);
    --color-card-foreground: var(--card-foreground);

    --color-popover: var(--popover);
    --color-popover-foreground: var(--popover-foreground);

    --color-primary: var(--primary);
    --color-primary-foreground: var(--primary-foreground);

    --color-secondary: var(--secondary);
    --color-secondary-foreground: var(--secondary-foreground);

    --color-muted: var(--muted);
    --color-muted-foreground: var(--muted-foreground);

    --color-accent: var(--accent);
    --color-accent-foreground: var(--accent-foreground);

    --color-destructive: var(--destructive);
    --color-destructive-foreground: var(--destructive-foreground);

    --color-border: var(--border);
    --color-input: var(--input);
    --color-ring: var(--ring);

    --color-chart-1: var(--chart-1);
    --color-chart-2: var(--chart-2);
    --color-chart-3: var(--chart-3);
    --color-chart-4: var(--chart-4);
    --color-chart-5: var(--chart-5);

    --color-sidebar: var(--sidebar);
    --color-sidebar-foreground: var(--sidebar-foreground);
    --color-sidebar-primary: var(--sidebar-primary);
    --color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
    --color-sidebar-accent: var(--sidebar-accent);
    --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
    --color-sidebar-border: var(--sidebar-border);
    --color-sidebar-ring: var(--sidebar-ring);

    --color-astara-purple: var(--astara-purple);
    --color-astara-orange: var(--astara-orange);
    --color-astara-orange-hover: var(--astara-orange-hover);
    --color-astara-yellow: var(--astara-yellow);
    --color-astara-bg: var(--astara-bg);
}

:root {
    --astara-purple: #1e1932;
    --astara-orange: #ff5a00;
    --astara-orange-hover: #e65100;
    --astara-yellow: #fab42d;
    --astara-bg: #f4f7f9;

    --background: #f4f7f9;
    --foreground: #1e1932;
    --card: #ffffff;
    --card-foreground: #1e1932;
    --popover: #ffffff;
    --popover-foreground: #1e1932;
    --primary: #ff5a00;
    --primary-foreground: #ffffff;
    --secondary: #f1f5f9;
    --secondary-foreground: #1e1932;
    --muted: #f8fafc;
    --muted-foreground: #64748b;
    --accent: #fff3ec;
    --accent-foreground: #1e1932;
    --destructive: #dc2626;
    --border: #eceaf1;
    --input: #e2e8f0;
    --ring: #ff5a00;
    --chart-1: #ff5a00;
    --chart-2: #fab42d;
    --chart-3: #1e1932;
    --chart-4: #64748b;
    --chart-5: #2e7d32;
    --radius: 0.75rem;
    --sidebar: #1e1932;
    --sidebar-foreground: rgba(255, 255, 255, 0.6);
    --sidebar-primary: #ff5a00;
    --sidebar-primary-foreground: #ffffff;
    --sidebar-accent: rgba(255, 255, 255, 0.05);
    --sidebar-accent-foreground: #ffffff;
    --sidebar-border: rgba(255, 255, 255, 0.08);
    --sidebar-ring: #ff5a00;
}

.dark {
    --background: #0f0c1d;
    --foreground: #f4f7f9;
    --card: #1e1932;
    --card-foreground: #f4f7f9;
    --popover: #1e1932;
    --popover-foreground: #f4f7f9;
    --primary: #ff5a00;
    --primary-foreground: #ffffff;
    --secondary: #2a2440;
    --secondary-foreground: #f4f7f9;
    --muted: #2a2440;
    --muted-foreground: #a3a0b8;
    --accent: #2a2440;
    --accent-foreground: #f4f7f9;
    --destructive: #ef4444;
    --border: rgba(255, 255, 255, 0.1);
    --input: rgba(255, 255, 255, 0.15);
    --ring: #ff5a00;
    --sidebar: #14101f;
    --sidebar-foreground: rgba(255, 255, 255, 0.6);
    --sidebar-primary: #ff5a00;
    --sidebar-primary-foreground: #ffffff;
    --sidebar-accent: rgba(255, 255, 255, 0.05);
    --sidebar-accent-foreground: #ffffff;
    --sidebar-border: rgba(255, 255, 255, 0.08);
    --sidebar-ring: #ff5a00;
}

@layer base {
    * {
        @apply border-border;
    }

    body {
        @apply bg-background text-foreground;
    }
}

@utility custom-scroll {
    &::-webkit-scrollbar {
        width: 4px;
        height: 4px;
    }
    &::-webkit-scrollbar-thumb {
        background: rgba(0, 0, 0, 0.1);
        border-radius: 10px;
    }
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.1) transparent;
}

/*
 * AG Grid custom cell renderers: .ag-react-container does not stretch by
 * default, so chips/badges inside `h-full` wrappers render at content height
 * and look misaligned. Force vertical centering on every grid cell.
 */
.ag-theme-quartz .ag-cell {
    line-height: normal;
}

.ag-theme-quartz .ag-cell-wrapper {
    display: flex;
    align-items: center;
    height: 100%;
    min-width: 0;
}

.ag-theme-quartz .ag-react-container {
    display: flex;
    align-items: center;
    height: 100%;
    width: 100%;
    min-width: 0;
}
