/* ============================================================
   StockBot — Base CSS: Reset, Variables, Typography
   ============================================================ */

:root {
  --color-primary: #1B7F4A;
  --color-primary-dark: #15613A;
  --color-danger: #E53E3E;
  --color-warning: #DD6B20;
  --color-warning-light: #FFF5E6;
  --color-success: #38A169;
  --color-info: #3182CE;
  --color-bg: #F7F8FA;
  --color-surface: #FFFFFF;
  --color-text: #1A202C;
  --color-text-muted: #718096;
  --color-muted: #718096;
  --color-border: #E2E8F0;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans Thai", sans-serif;
  --transition: 0.2s ease;
}

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-family);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
}

a {
  color: var(--color-primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.3;
}

h1 { font-size: 1.75rem; }
h2 { font-size: 1.375rem; }
h3 { font-size: 1.125rem; }

button, .btn {
  cursor: pointer;
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-family);
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  transition: background var(--transition);
}

.btn-primary {
  background: var(--color-primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--color-primary-dark);
}

.btn-danger {
  background: var(--color-danger);
  color: #fff;
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--color-border);
  color: var(--color-text);
}

.btn-outline:hover {
  background: var(--color-bg);
}

input, select, textarea {
  font-family: var(--font-family);
  font-size: 0.875rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  outline: none;
  transition: border var(--transition);
}

input:focus, select:focus, textarea:focus {
  border-color: var(--color-primary);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  text-align: left;
  padding: 0.625rem 0.75rem;
  border-bottom: 1px solid var(--color-border);
}

th {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.text-muted { color: var(--color-muted); }
.text-danger { color: var(--color-danger); }
.text-success { color: var(--color-success); }
.text-warning { color: var(--color-warning); }
