/* ========================
   CSS VARIABLES
======================== */
:root {
  --color-primary: #2563eb;
  --color-primary-hover: #1d4ed8;
  --color-border: #e5e7eb;
  --color-bg: #ffffff;
  --color-muted: #6b7280;
  --color-text: #111827;
  --radius-sm: 6px;
  --radius-md: 8px;
  --transition: 150ms ease;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.06);
}

/* ========================
   GLOBAL
======================== */
html {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--color-text);
  background-color: #f9fafb;
}

body {
  margin: 0;
}

/* ========================
   HEADINGS
======================== */
h1, h2, h3, h4, h5 {
  font-weight: 600;
  margin: 0.75rem;
  font-family: ui-sans-serif;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.3rem; }

/* ========================
   BUTTONS
======================== */
button,
[type=button],
[type=submit],
[type=reset] {
  appearance: none;
  background-color: var(--color-primary);
  border: none;
  border-radius: var(--radius-sm);
  color: #fff;
  cursor: pointer;
  font-size: 14px;
  font-weight: 400;
  padding: 6px 15px;
  transition: background-color var(--transition), transform var(--transition);
  width: fit-content;
}

button:hover,
[type=button]:hover,
[type=submit]:hover {
  background-color: var(--color-primary-hover);
  transform: translateY(-1px);
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* ========================
   FORM ELEMENTS
======================== */
label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  margin-bottom: 0.25rem;
  color: var(--color-muted);
}

input,
select,
textarea {
  width: 100%;
  padding: 0.55rem 0.65rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background-color: var(--color-bg);
  font-size: 12px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
  outline: none;
}

input:disabled,
textarea:disabled {
  background-color: #f3f4f6;
  cursor: not-allowed;
}

/* ========================
   CHECKBOX & RADIO
======================== */
[type=checkbox],
[type=radio] {
  margin-right: 0.4rem;
}

/* ========================
   TABLES (Invoice friendly)
======================== */
table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

thead {
  background-color: #f3f4f6;
}

th,
td {
  padding: 5px;
  font-size: 12px;
}

th {
  text-align: left;
  font-weight: 600;
  color: #374151;
}

tr:not(:last-child) {
  border-bottom: 1px solid var(--color-border);
}

/* ========================
   LINKS
======================== */
a {
  color: var(--color-primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ========================
   UTILITY
======================== */
.card {
  background: #fff;
  border-radius: var(--radius-md);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.form-group {
  margin-bottom: 1rem;
}
