@import 'tailwindcss';

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

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

@theme {
    --font-sans: 'Inter', ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji',
        'Segoe UI Symbol', 'Noto Color Emoji';

    /* Corpo-Edu premium brand palette (indigo/violet primary, matching the reference dashboard) */
    --color-brand-50: #eef2ff;
    --color-brand-100: #e0e7ff;
    --color-brand-200: #c7d2fe;
    --color-brand-300: #a5b4fc;
    --color-brand-400: #818cf8;
    --color-brand-500: #6366f1;
    --color-brand-600: #4f46e5;
    --color-brand-700: #4338ca;
    --color-brand-800: #3730a3;
    --color-brand-900: #312e81;

    --color-surface: #f7f8fb;
    --color-surface-dark: #0f1117;

    --shadow-card: 0 1px 2px 0 rgb(15 23 42 / 0.04), 0 1px 3px 0 rgb(15 23 42 / 0.06);
    --shadow-card-hover: 0 4px 12px 0 rgb(15 23 42 / 0.08);
}

@layer base {
    html {
        -webkit-font-smoothing: antialiased;
    }

    body {
        @apply bg-surface text-slate-900 dark:bg-surface-dark dark:text-slate-100;
    }

    [x-cloak] {
        display: none !important;
    }
}

@layer components {
    .card {
        @apply rounded-2xl border border-slate-200/70 bg-white p-6 shadow-[var(--shadow-card)] transition-shadow dark:border-slate-800 dark:bg-slate-900;
    }

    .card-hover {
        @apply hover:shadow-[var(--shadow-card-hover)];
    }

    .btn,
    .btn-primary,
    .btn-secondary {
        @apply inline-flex items-center justify-center gap-2 rounded-xl px-4 py-2.5 text-sm font-semibold transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 disabled:shadow-none;
    }

    .btn-primary {
        @apply bg-brand-600 text-white shadow-sm hover:bg-brand-700 focus-visible:ring-brand-500 disabled:bg-slate-300 disabled:text-slate-500 disabled:hover:bg-slate-300 dark:disabled:bg-slate-700 dark:disabled:text-slate-400 dark:disabled:hover:bg-slate-700;
    }

    .btn-secondary {
        @apply bg-white text-slate-700 ring-1 ring-inset ring-slate-200 hover:bg-slate-50 dark:bg-slate-800 dark:text-slate-200 dark:ring-slate-700 dark:hover:bg-slate-700;
    }

    .btn-pill {
        @apply rounded-full px-4 py-2 text-sm font-medium ring-1 ring-inset ring-slate-300 transition-colors dark:ring-slate-700;
    }

    .btn-pill-active {
        @apply bg-brand-600 text-white ring-0;
    }

    .sidebar-link {
        @apply flex items-center gap-3 rounded-xl px-3 py-2.5 text-sm font-medium text-slate-600 transition-colors hover:bg-slate-100 dark:text-slate-300 dark:hover:bg-slate-800;
    }

    .sidebar-link-active {
        @apply bg-brand-600 text-white shadow-sm hover:bg-brand-600 dark:hover:bg-brand-600;
    }

    .input {
        @apply block w-full rounded-xl border-0 bg-white px-3.5 py-2.5 text-sm text-slate-900 ring-1 ring-inset ring-slate-200 placeholder:text-slate-400 focus:ring-2 focus:ring-inset focus:ring-brand-500 dark:bg-slate-900 dark:text-slate-100 dark:ring-slate-700;
    }

    select.input {
        appearance: none;
        -webkit-appearance: none;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%2394a3b8'%3E%3Cpath fill-rule='evenodd' d='M5.23 7.21a.75.75 0 011.06.02L10 11.168l3.71-3.938a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z' clip-rule='evenodd'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right 0.75rem center;
        background-size: 1.15rem;
        padding-right: 2.5rem;
    }

    .label {
        @apply mb-1.5 block text-sm font-medium text-slate-700 dark:text-slate-300;
    }
}
