:root {
  --bg: #f5f8ff;
  --surface: #ffffff;
  --text: #17406d;
  --muted: #6b7a90;
  --primary: #1976d2;
  --primary-dark: #125299;
  --accent: #667eea;
  --border: #e0e0e0;
  --radius-lg: 18px;
  --radius-md: 12px;
  --shadow-soft: 0 2px 16px rgba(25,118,210,0.08);
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
    sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: var(--bg);
  color: var(--text);
}

input, select, textarea {
  font-family: inherit;
  color: var(--text);
}

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

a:hover {
  color: var(--primary-dark);
}

code {
  font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
    monospace;
}

/* Responsive Table Utilities */
.responsive-table {
  width: 100%;
  border-collapse: collapse;
}

.responsive-table thead {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.responsive-table th,
.responsive-table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.responsive-table th {
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.responsive-table tbody tr {
  transition: background 0.2s;
}

.responsive-table tbody tr:hover {
  background: rgba(102, 126, 234, 0.05);
}

/* Mobile card layout for tables */
@media (max-width: 768px) {
  .responsive-table {
    border: 0;
  }

  .responsive-table thead {
    display: none;
  }

  .responsive-table tbody {
    display: block;
  }

  .responsive-table tr {
    display: block;
    margin-bottom: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
  }

  .responsive-table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
  }

  .responsive-table td:last-child {
    border-bottom: 0;
  }

  .responsive-table td::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--muted);
    margin-right: 12px;
    flex-shrink: 0;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }

  .responsive-table td > * {
    flex-shrink: 0;
  }
}

/* Button utilities */
.btn-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

@media (max-width: 480px) {
  .btn-group {
    flex-direction: column;
    width: 100%;
  }

  .btn-group button {
    width: 100%;
    justify-content: center;
  }
}

/* Touch target optimization */
@media (hover: none) and (pointer: coarse) {
  button,
  a,
  input[type="checkbox"],
  input[type="radio"],
  select {
    min-height: 44px;
    min-width: 44px;
  }

  .responsive-table td button {
    padding: 10px 16px;
    font-size: 14px;
  }
}
