:root {
  --primary: #0f766e;
  --primary-dark: #134e4a;
  --bg: #f8fafc;
  --card-bg: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --error: #dc2626;
  --success: #16a34a;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: linear-gradient(135deg, var(--bg) 0%, #e0f2f1 100%);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.login-container {
  width: 100%;
  max-width: 420px;
}

.login-card {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 48px 36px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
  text-align: center;
}

.logo {
  display: inline-flex;
  width: 72px;
  height: 72px;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: white;
  border-radius: 16px;
  margin-bottom: 20px;
}

h1 {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 4px;
}

.subtitle {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 32px;
}

form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

input[type="text"] {
  width: 100%;
  padding: 14px 18px;
  font-size: 17px;
  border: 2px solid var(--border);
  border-radius: 10px;
  outline: none;
  transition: border-color 0.15s ease;
  text-align: center;
  letter-spacing: 0.05em;
  font-family: ui-monospace, "SF Mono", Monaco, "Cascadia Code", "Roboto Mono", monospace;
}

input[type="text"]:focus {
  border-color: var(--primary);
}

button {
  padding: 14px;
  font-size: 16px;
  font-weight: 600;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s ease;
}

button:hover:not(:disabled) {
  background: var(--primary-dark);
}

button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.error-message {
  color: var(--error);
  font-size: 14px;
  min-height: 20px;
  margin-top: -8px;
}

.info-text {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

footer {
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  margin-top: 24px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Studies page */
.studies-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 32px 20px;
}

.studies-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}

.studies-title h1 {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 4px;
}

.studies-title p {
  color: var(--muted);
  font-size: 14px;
}

.btn-logout {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 8px 16px;
  font-size: 14px;
  border-radius: 8px;
  cursor: pointer;
}

.btn-logout:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: transparent;
}

.studies-grid {
  display: grid;
  gap: 16px;
}

.study-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 20px;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.study-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  transform: translateY(-1px);
}

.study-icon {
  width: 48px;
  height: 48px;
  background: #ecfdf5;
  color: var(--primary);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.study-info {
  flex: 1;
}

.study-info h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}

.study-info .meta {
  font-size: 13px;
  color: var(--muted);
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.study-actions {
  display: flex;
  gap: 8px;
}

.btn-primary, .btn-secondary {
  padding: 8px 16px;
  font-size: 14px;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}

.btn-primary {
  background: var(--primary);
  color: white;
  border: none;
}

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

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

.btn-secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--muted);
}
