/* Common styles for lab forms */
:root {
  --primary: #4a90d9;
  --primary-dark: #3a7bc8;
  --bg: #1a1a2e;
  --bg-card: #16213e;
  --bg-input: #0f3460;
  --text: #eaeaea;
  --text-muted: #a0a0a0;
  --border: #3a3a5c;
  --accent: #e94560;
  --success: #4ecca3;
  --radius: 12px;
  --shadow: 0 4px 20px rgba(0,0,0,0.3);
}

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

html {
  font-size: 16px;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: linear-gradient(135deg, var(--bg) 0%, #0f0f23 100%);
  color: var(--text);
  min-height: 100vh;
  padding: 1rem;
  line-height: 1.6;
}

.container {
  max-width: 600px;
  margin: 0 auto;
  padding: 1.5rem;
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

h1, h2, h3 {
  color: var(--primary);
  margin-bottom: 1rem;
  font-weight: 600;
}

h1 { font-size: 1.75rem; }
h2 { font-size: 1.4rem; }
h3 { 
  font-size: 1.1rem; 
  margin-top: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

/* Form groups */
.form-group {
  margin-bottom: 1rem;
}

label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 500;
  color: var(--text);
}

label b {
  font-weight: 600;
}

/* Inputs */
input[type="text"],
input[type="number"],
input[type="date"],
input[type="file"],
select,
textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  font-size: 1rem;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(74, 144, 217, 0.2);
}

input::placeholder,
textarea::placeholder {
  color: var(--text-muted);
}

textarea {
  resize: vertical;
  min-height: 80px;
}

/* Checkbox & Radio */
.checkbox-group,
.radio-group {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin: 0.6rem 0;
  padding: 0.6rem;
  background: rgba(255,255,255,0.03);
  border-radius: 8px;
}

input[type="checkbox"],
input[type="radio"] {
  width: 1.3rem;
  height: 1.3rem;
  margin-top: 0.15rem;
  accent-color: var(--primary);
  cursor: pointer;
  flex-shrink: 0;
}

.checkbox-group label,
.radio-group label {
  margin: 0;
  cursor: pointer;
  font-weight: normal;
}

/* Select */
select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23eaeaea' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

/* Buttons */
button,
input[type="submit"] {
  display: inline-block;
  padding: 0.9rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  color: white;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  margin-top: 0.5rem;
  margin-right: 0.5rem;
}

button:hover,
input[type="submit"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(74, 144, 217, 0.4);
}

button:active,
input[type="submit"]:active {
  transform: translateY(0);
}

.btn-secondary {
  background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
}

.btn-accent {
  background: linear-gradient(135deg, var(--accent) 0%, #c73e54 100%);
}

.btn-success {
  background: linear-gradient(135deg, var(--success) 0%, #3db892 100%);
}

/* File input styling */
input[type="file"] {
  padding: 0.6rem;
}

input[type="file"]::file-selector-button {
  padding: 0.5rem 1rem;
  margin-right: 1rem;
  background: var(--primary);
  border: none;
  border-radius: 6px;
  color: white;
  cursor: pointer;
  font-weight: 500;
}

/* Image preview */
.img-preview {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 1rem 0;
  box-shadow: var(--shadow);
}

/* Links */
a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--accent);
}

/* Navigation links list */
.nav-list {
  list-style: none;
}

.nav-list li {
  margin: 0.8rem 0;
}

.nav-list a {
  display: block;
  padding: 1rem 1.2rem;
  background: var(--bg-input);
  border-radius: 8px;
  border-left: 4px solid var(--primary);
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
}

.nav-list a:hover {
  background: rgba(74, 144, 217, 0.15);
  border-left-color: var(--accent);
  transform: translateX(4px);
}

/* Inline form elements */
.inline-group {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.inline-group input,
.inline-group select {
  width: auto;
  flex: 1;
  min-width: 100px;
}

/* Info labels (dynamic text) */
.info-label {
  display: inline-block;
  padding: 0.4rem 0.8rem;
  background: var(--bg-input);
  border-radius: 6px;
  margin: 0.3rem 0;
  font-family: monospace;
}

/* Responsive */
@media (max-width: 480px) {
  body {
    padding: 0.5rem;
  }
  
  .container {
    padding: 1rem;
    border-radius: 8px;
  }
  
  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.25rem; }
  
  button,
  input[type="submit"] {
    width: 100%;
    margin-right: 0;
    margin-bottom: 0.5rem;
  }
  
  .inline-group {
    flex-direction: column;
  }
  
  .inline-group input,
  .inline-group select {
    width: 100%;
  }
}

/* Utilities */
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.hidden { display: none; }
