@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=DM+Serif+Display&display=swap');

/* 
   COMMON FORM STYLES - MODERN
   Ported from React project's base.css, components.css, and responsive.css
*/

:root {
  --primary: #2563eb;
  --primary-dark: #1e40af;
  --primary-light: #3b82f6;
  --secondary: #10b981;
  --text-primary: #0f172a;
  --text-secondary: #64748b;
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --border: #e2e8f0;
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --radius: 12px;
  --btn-radius: var(--radius);
  --btn-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
  --btn-shadow-hover: 0 4px 12px rgba(37, 99, 235, 0.3);
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  --transition: all 0.2s ease;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
  padding: 24px;
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

.container {
  max-width: 700px;
  margin: 0 auto;
  background: var(--bg-primary);
  padding: 40px;
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.header {
  text-align: center;
  margin-bottom: 32px;
}

.header h1 {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
}

/* ========================= BACK BUTTON ========================= */
.back-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  background: #64748b;
  color: white;
  text-decoration: none;
  border-radius: 8px;
  margin-bottom: 24px;
  font-weight: 600;
  font-size: 14px;
  line-height: 1;
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.back-button:hover {
  background: #475569;
  transform: translateY(-1px);
}

/* ========================= PATIENT INFO BADGE ========================= */
.patient-info {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  padding: 20px 24px;
  border-radius: 12px;
  margin-bottom: 24px;
  text-align: center;
  color: white;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.2);
}

.patient-info p {
  font-size: 15px;
  font-weight: 500;
  opacity: 0.95;
}

/* ========================= FORM STYLES ========================= */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 14px;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  background: white;
  color: var(--text-primary);
  transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

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

.form-group input[readonly] {
  background: var(--bg-secondary);
  color: var(--text-secondary);
  cursor: not-allowed;
}

.unit-label {
  color: var(--text-secondary);
  font-size: 12px;
  margin-left: 4px;
  font-weight: 500;
}

.section-title {
  color: var(--text-primary);
  font-size: 18px;
  font-weight: 700;
  margin: 28px 0 16px 0;
  padding-bottom: 8px;
  border-bottom: 3px solid var(--primary);
}

.calculated-field {
  background: var(--bg-secondary);
  padding: 10px;
  border-radius: 8px;
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.submit-button {
  background: var(--primary);
  color: white;
  padding: 14px 28px;
  border: none;
  border-radius: var(--btn-radius);
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  width: 100%;
  transition: var(--transition);
  box-shadow: var(--btn-shadow);
  margin-top: 8px;
}

.submit-button:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--btn-shadow-hover);
}

.submit-button:disabled {
  background: #94a3b8;
  cursor: not-allowed;
  transform: none;
}

.required::after {
  content: " *";
  color: var(--danger);
  font-weight: 700;
}

/* ========================= CYCLE GRID ========================= */
.cycle-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.cycle-input {
  text-align: center;
}

.cycle-input label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.cycle-input input {
  width: 100%;
  padding: 8px;
  text-align: center;
}

/* ========================= DEEP BREATHING TABLE ========================= */
.deep-breathing-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-bottom: 20px;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.deep-breathing-table th,
.deep-breathing-table td {
  padding: 10px;
  text-align: center;
  font-size: 13px;
}

.deep-breathing-table th {
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-weight: 600;
  border-bottom: 2px solid var(--border);
}

.deep-breathing-table td {
  border-bottom: 1px solid var(--border);
}

.deep-breathing-table tr:last-child td {
  border-bottom: none;
}

.deep-breathing-table input {
  width: 100%;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 6px;
  text-align: center;
  font-size: 13px;
}

/* ========================= MOBILE RESPONSIVE ========================= */
@media (max-width: 600px) {
  .container {
    padding: 24px;
  }

  .header h1 {
    font-size: 24px;
  }

  .cycle-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .deep-breathing-table {
    font-size: 11px;
  }

  .deep-breathing-table th,
  .deep-breathing-table td {
    padding: 6px 4px;
  }
}