@layer reset, tokens, base, components, utilities;

@layer tokens {
  :root {
    color-scheme: light dark;

    --bg-app: light-dark(#f8fafc, #0f172a);
    --bg-card: light-dark(#ffffff, #1e293b);
    --bg-card-hover: light-dark(#f1f5f9, #334155);
    --text-main: light-dark(#0f172a, #f8fafc);
    --text-muted: light-dark(#64748b, #94a3b8);
    --border-subtle: light-dark(#e2e8f0, #334155);
    --bg-hover: light-dark(#f1f5f9, #334155);
    --accent-subtle: light-dark(rgba(13, 148, 136, 0.1), rgba(13, 148, 136, 0.2));

    --accent-primary: #0d9488;
    --accent-primary-hover: #0f766e;
    --accent-danger: #e11d48;
    --accent-warning: #d97706;
    --accent-success: #059669;

    --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-full: 9999px;

    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  }

  html[data-theme="light"] {
    color-scheme: light;
    --bg-app: #f8fafc;
    --bg-card: #ffffff;
    --bg-card-hover: #f1f5f9;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border-subtle: #e2e8f0;
    --bg-hover: #f1f5f9;
    --accent-subtle: rgba(13, 148, 136, 0.1);
  }

  html[data-theme="dark"] {
    color-scheme: dark;
    --bg-app: #0f172a;
    --bg-card: #1e293b;
    --bg-card-hover: #334155;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border-subtle: #334155;
    --bg-hover: #334155;
    --accent-subtle: rgba(13, 148, 136, 0.25);
  }
}

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

@layer base {
  body {
    font-family: var(--font-sans);
    background-color: var(--bg-app);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
  }
}
