/* frontend/src/index.css */

:root {
  /* Brand Colors (Professional Teal & Slate Theme) */
  --primary: #0d9488;       /* Teal 600 */
  --primary-hover: #0f766e; /* Teal 700 */
  --bg-body: #f1f5f9;       /* Slate 100 */
  --bg-card: #ffffff;
  --text-main: #1e293b;     /* Slate 800 */
  --text-muted: #64748b;    /* Slate 500 */
  --border: #e2e8f0;        /* Slate 200 */
  
  /* Functional Colors */
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;

  /* Spacing & Radius */
  --radius: 12px;
  --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);
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* --- Layout --- */
.container {
  width: 100%;
  max-width: 600px; /* Mobile-optimized width */
  margin: 0 auto;
  padding: 20px;
}

h2, h3 {
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 1rem;
  color: var(--text-main);
}

h2 { font-size: 1.5rem; }
h3 { font-size: 1.125rem; }

p { margin-bottom: 1rem; color: var(--text-muted); }

/* --- Components --- */

/* Cards */
.card, .form-section {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  margin-bottom: 1.5rem;
  border: 1px solid var(--border);
}

/* Forms */
label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
  color: var(--text-main);
}

input[type="text"],
input[type="number"],
textarea,
select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem; /* Prevents zoom on mobile */
  transition: border-color 0.15s;
  margin-bottom: 1rem;
}

input:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1);
}

/* Checkboxes - Larger for touch targets */
input[type="checkbox"] {
  width: 1.2rem;
  height: 1.2rem;
  margin-right: 0.5rem;
  vertical-align: middle;
  accent-color: var(--primary);
}

/* Buttons */
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.75rem 1.5rem;
  background-color: var(--primary);
  color: white;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  transition: background-color 0.2s, transform 0.1s;
}

button:active { transform: scale(0.98); }
button:disabled { opacity: 0.7; cursor: not-allowed; }
button:hover:not(:disabled) { background-color: var(--primary-hover); }

/* Secondary Button Style */
button.secondary {
  background-color: white;
  border: 1px solid var(--border);
  color: var(--text-main);
}

/* File Upload */
input[type="file"] {
  background: white;
  padding: 0.5rem;
  border: 1px dashed var(--border);
}

/* Utility */
.text-center { text-align: center; }
.text-red { color: var(--danger); }
.text-green { color: var(--success); }
.mt-4 { margin-top: 1rem; }
.flex-col { display: flex; flexDirection: column; gap: 10px; }

/* --- Data Tables --- */
.table-container {
  overflow-x: auto; /* Allows scroll on small screens */
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.95rem;
}

th {
  background-color: #f8fafc;
  padding: 1rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer; /* Show it's sortable */
  user-select: none;
  border-bottom: 1px solid var(--border);
}

th:hover {
  background-color: #e2e8f0;
  color: var(--text-main);
}

td {
  padding: 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

tr:last-child td { border-bottom: none; }
tr:hover { background-color: #f8fafc; }

/* Badge Styles for Status */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
}