/* CareInten PWA - Inter Font, Safe Framing v2 */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --green: #4aa879;
  --green-dark: #2d8a5e;
  --green-darker: #1a5a3a;
  --green-light: #e8f5ee;
  --red: #ef4444;
  --red-light: #fef2f2;
  --orange: #f97316;
  --yellow: #eab308;
  --amber-50: #fffbeb;
  --amber-100: #fef3c7;
  --amber-600: #d97706;
  --amber-800: #92400e;
  --blue: #3b82f6;
  --blue-light: #eff6ff;
  --purple: #a855f7;
  --gray-50: #fafafa;
  --gray-100: #f5f5f5;
  --gray-200: #e5e5e5;
  --gray-300: #d4d4d4;
  --gray-400: #a3a3a3;
  --gray-500: #737373;
  --gray-600: #525252;
  --gray-700: #404040;
  --gray-800: #262626;
  --gray-900: #1a1a1a;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 1px 3px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
  --radius: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--gray-100);
  color: var(--gray-800);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* CareInten Brand Elements */
.ci-icon {
  width: 72px;
  height: 72px;
  background: var(--green);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 700;
  color: white;
  margin-bottom: 16px;
}

.care { font-weight: 700; color: var(--green); }
.inten { font-weight: 300; color: var(--gray-900); }

.lock-title {
  font-size: 32px;
  margin-bottom: 8px;
}

.lock-subtitle {
  font-size: 14px;
  color: var(--gray-500);
  letter-spacing: 1px;
}

/* Lock Screen */
.lock-screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
}

.lock-screen-compact {
  justify-content: flex-start;
  padding-top: 60px;
}

/* Buttons */
.btn {
  padding: 14px 24px;
  font-size: 16px;
  font-weight: 600;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

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

.btn-secondary {
  background: var(--gray-200);
  color: var(--gray-700);
}
.btn-secondary:hover { background: var(--gray-300); }

.btn-danger {
  background: var(--red);
  color: white;
}
.btn-danger:hover { background: #dc2626; }

.btn-block { width: 100%; }

.btn-small {
  padding: 8px 14px;
  font-size: 13px;
}

/* Inputs */
.input {
  width: 100%;
  padding: 14px 16px;
  font-size: 16px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  background: white;
  transition: border-color 0.2s;
  font-family: inherit;
}
.input:focus {
  outline: none;
  border-color: var(--green);
}
.textarea {
  min-height: 100px;
  resize: vertical;
}

/* Journey Cards */
.journey-list {
  width: 100%;
  max-width: 400px;
  margin-top: 32px;
}

.journey-card {
  background: white;
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: box-shadow 0.2s;
  text-align: left;
  border: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  gap: 12px;
}
.journey-card:hover { box-shadow: var(--shadow-md); }

.journey-icon { font-size: 28px; }
.journey-info { flex: 1; }
.journey-arrow { color: var(--gray-400); font-size: 18px; }

.journey-card-name {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 2px;
}

.journey-card-meta {
  font-size: 12px;
  color: var(--gray-500);
}

.workspace-heading {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-600);
  margin-top: 32px;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.lock-journey-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 20px;
  font-weight: 600;
  margin-top: 24px;
  margin-bottom: 8px;
}

.lock-icon { font-size: 24px; }

/* Header */
.header {
  background: white;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--gray-200);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-icon { font-size: 20px; }

.header-title {
  font-size: 18px;
  font-weight: 600;
}

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

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  border: none;
  background: var(--gray-100);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}
.icon-btn:hover { background: var(--gray-200); }

/* Tabs */
.tabs {
  display: flex;
  padding: 16px 20px;
  gap: 8px;
  background: white;
  border-bottom: 1px solid var(--gray-200);
}

.tab {
  flex: 1;
  padding: 12px;
  border: none;
  background: var(--gray-100);
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}
.tab.active {
  background: var(--green);
  color: white;
}

/* Content Area */
.content {
  padding: 16px 20px;
  padding-bottom: 100px;
}

/* Progress Card */
.progress-card {
  background: white;
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 20px;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.progress-label {
  font-size: 13px;
  color: var(--gray-500);
}

.progress-value {
  font-size: 13px;
  font-weight: 600;
}

.progress-track {
  height: 8px;
  background: var(--gray-200);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--green);
  border-radius: var(--radius-full);
  transition: width 0.3s;
}

/* Global Disclaimer Banner */
.global-disclaimer {
  background: var(--amber-50);
  border-left: 3px solid var(--amber-600);
  padding: 12px 16px;
  margin-bottom: 16px;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 12px;
  color: var(--amber-800);
  line-height: 1.5;
}

.global-disclaimer strong {
  display: block;
  margin-bottom: 4px;
  font-weight: 600;
}

/* User Context Bar (from MAQ) */
.user-context-bar {
  display: flex;
  gap: 16px;
  padding: 12px 16px;
  background: var(--green-light);
  border-radius: var(--radius);
  margin-bottom: 12px;
  font-size: 13px;
  color: var(--green-dark);
}

.context-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Config Warnings (from MAQ) */
.config-warnings {
  margin-bottom: 16px;
}

.config-warning {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--amber-50);
  border: 1px solid var(--amber-100);
  border-left: 3px solid var(--amber-600);
  padding: 12px 14px;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin-bottom: 8px;
  font-size: 13px;
  color: var(--amber-800);
  line-height: 1.5;
}

.warning-icon {
  flex-shrink: 0;
  font-size: 16px;
}

/* Phase */
.phase {
  background: white;
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
}

.phase-header {
  padding: 16px;
  display: flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

.phase-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-right: 12px;
  flex-shrink: 0;
}

.phase-info { flex: 1; }

.phase-name {
  font-size: 16px;
  font-weight: 600;
}

.phase-subtitle {
  font-size: 12px;
  color: var(--gray-500);
}

.phase-count {
  font-size: 13px;
  color: var(--gray-500);
  margin-right: 8px;
}

.phase-arrow {
  color: var(--gray-400);
  transition: transform 0.2s;
  font-size: 12px;
}
.phase.open .phase-arrow { transform: rotate(90deg); }

.phase-actions {
  display: flex;
  gap: 4px;
  margin-right: 8px;
}

.phase-content {
  display: none;
  padding: 0 16px 16px;
}
.phase.open .phase-content { display: block; }

/* Task Cards (Clean Layout) */
.task-card {
  background: #fafafa;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 10px;
  cursor: pointer;
}

.task-card:hover {
  border-color: #d4d4d4;
}

.task-card.done {
  opacity: 0.5;
}

.task-card.emphasize {
  border-left: 3px solid #d97706;
}

.task-row {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 12px;
}

.task-checkbox {
  width: 22px;
  height: 22px;
  min-width: 22px;
  border: 2px solid #d4d4d4;
  border-radius: 6px;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: white;
  cursor: pointer;
  flex-shrink: 0;
  margin-top: 1px;
}

.task-checkbox:hover {
  border-color: #4aa879;
}

.task-checkbox.checked {
  background: #4aa879;
  border-color: #4aa879;
}

.task-body {
  flex: 1;
  min-width: 0;
}

.task-title {
  font-size: 15px;
  font-weight: 500;
  color: #1a1a1a;
  line-height: 1.4;
  margin-bottom: 2px;
}

.task-card.done .task-title {
  text-decoration: line-through;
  color: #737373;
}

.task-details {
  font-size: 13px;
  color: #525252;
  line-height: 1.45;
}

.task-btns {
  display: flex;
  flex-direction: row;
  gap: 6px;
  flex-shrink: 0;
}

.task-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: #f0f0f0;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.task-btn:hover {
  background: #e5e5e5;
}

.task-btn.copied {
  background: #e8f5ee;
}

.task-warning {
  margin-top: 10px;
  padding: 10px 12px;
  background: #fffbeb;
  border-left: 3px solid #d97706;
  border-radius: 0 8px 8px 0;
  font-size: 12px;
  color: #92400e;
  line-height: 1.4;
}

.task-script {
  margin-top: 10px;
  padding: 10px 12px;
  background: #eff6ff;
  border-left: 3px solid #3b82f6;
  border-radius: 0 8px 8px 0;
  font-size: 13px;
  color: #1e40af;
  line-height: 1.4;
}

.script-label {
  font-weight: 600;
}

/* Prompt Disclaimer */
.prompt-disclaimer {
  margin-top: 12px;
  padding: 10px 12px;
  background: var(--amber-50);
  border-left: 3px solid var(--amber-600);
  border-radius: 0 8px 8px 0;
  font-size: 12px;
  color: var(--amber-800);
  line-height: 1.4;
}

/* Prompt Script/Conversation Starter */
.prompt-script {
  margin-top: 12px;
  padding: 10px 12px;
  background: var(--blue-light);
  border-radius: 8px;
  font-size: 12px;
  color: var(--gray-700);
  line-height: 1.5;
}

.prompt-script-label {
  font-weight: 600;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--blue);
  margin-bottom: 4px;
}

/* Prompt Badges */
.prompt-badges {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.badge {
  font-size: 10px;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-weight: 500;
}

.badge-script {
  background: var(--blue-light);
  color: var(--blue);
}

.badge-note {
  background: var(--green-light);
  color: var(--green-dark);
}

.badge-custom {
  background: var(--amber-100);
  color: var(--amber-600);
}

.badge-disclaimer {
  background: var(--amber-50);
  color: var(--amber-800);
}

/* Legacy Task Styles (for compatibility) */
.task {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 10px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  transition: all 0.2s;
}
.task:hover { border-color: var(--gray-300); }

.task-check {
  width: 24px;
  height: 24px;
  border: 2px solid var(--gray-300);
  border-radius: 6px;
  flex-shrink: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: white;
  transition: all 0.2s;
}
.task-check:hover { border-color: var(--green); }
.task-check.done {
  background: var(--green);
  border-color: var(--green);
}

.task-content { flex: 1; min-width: 0; }

.task-title {
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 2px;
}
.task-title.done {
  text-decoration: line-through;
  color: var(--gray-500);
}

.task-details {
  font-size: 13px;
  color: var(--gray-500);
}

.task-badges {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}

.task-actions {
  display: flex;
  gap: 4px;
}

/* Add Task Button */
.add-task-btn {
  width: 100%;
  padding: 12px;
  background: none;
  border: 2px dashed var(--gray-300);
  border-radius: var(--radius);
  color: var(--gray-500);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}
.add-task-btn:hover {
  border-color: var(--green);
  color: var(--green);
}

/* Action Icons */
.action-icon {
  width: 32px;
  height: 32px;
  border: none;
  background: var(--gray-100);
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: all 0.2s;
}
.action-icon:hover { background: var(--gray-200); }
.action-icon.copied { background: var(--green-light); }

.action-icons {
  display: flex;
  gap: 4px;
}

/* Contact Cards */
.contact-card {
  background: white;
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
  border: 1px solid var(--gray-200);
}

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

.contact-type {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--gray-500);
}

.contact-name {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

.contact-detail {
  font-size: 14px;
  color: var(--gray-600);
  margin-bottom: 4px;
}

.contact-main { flex: 1; }

.contact-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--gray-200);
}

.contact-action {
  padding: 8px 12px;
  font-size: 13px;
  background: var(--gray-100);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  color: var(--gray-700);
  font-family: inherit;
}
.contact-action:hover { background: var(--gray-200); }
.contact-action.delete { color: var(--red); }

/* Key Contacts in Info Tab */
.key-contact-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--gray-200);
}
.key-contact-row:last-child { border-bottom: none; }

.key-contact-info { flex: 1; }

.key-contact-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--gray-500);
}

.key-contact-name {
  font-weight: 600;
  color: var(--gray-800);
}

.key-contact-phone {
  font-size: 14px;
  margin-top: 2px;
}

.key-contact-phone a {
  color: var(--blue);
  text-decoration: none;
}

.key-contact-actions {
  display: flex;
  gap: 4px;
}

.delete-icon { opacity: 0.5; }
.delete-icon:hover { opacity: 1; }

.empty-hint {
  color: var(--gray-500);
  font-size: 13px;
  padding: 12px 0;
  font-style: italic;
}

/* Critical Numbers Card */
.critical-card {
  background: var(--red-light);
  border: 2px solid var(--red);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 16px;
}

.critical-card h2 {
  color: var(--red);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.critical-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #fecaca;
}
.critical-row:last-child { border-bottom: none; }

.critical-label { 
  color: var(--gray-600);
  font-size: 14px;
}

.critical-value { 
  font-weight: 600;
  font-size: 14px;
}

.critical-value a { 
  color: var(--blue); 
  text-decoration: none; 
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 200;
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
}
.modal-overlay.open { display: flex; }

.modal {
  background: white;
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h2 { font-size: 18px; }

.modal-close {
  background: none;
  border: none;
  font-size: 28px;
  color: var(--gray-500);
  cursor: pointer;
  line-height: 1;
}

.modal-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

.modal-section {
  margin-bottom: 20px;
}

.modal-section h3 {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.modal-actions .btn { flex: 1; }

/* Script Box in Modal */
.script-box-wrapper {
  position: relative;
}

.script-box {
  background: var(--blue-light);
  padding: 14px;
  border-radius: var(--radius);
  font-size: 14px;
  line-height: 1.6;
  color: var(--gray-700);
  white-space: pre-wrap;
}

.field-actions {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  gap: 4px;
}

/* Copy Row */
.copy-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.copy-content { flex: 1; }

/* Empty State */
.empty-state {
  text-align: center;
  padding: 40px 20px;
}

.empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.empty-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.empty-desc {
  color: var(--gray-500);
  margin-bottom: 20px;
}

/* Setup Screen */
.setup-screen {
  min-height: 100vh;
  padding: 20px;
  padding-bottom: 40px;
}

.setup-header {
  text-align: center;
  margin-bottom: 32px;
  padding-top: 20px;
}

.setup-section {
  margin-bottom: 24px;
}

.setup-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-600);
  margin-bottom: 8px;
}

.template-grid {
  display: grid;
  gap: 12px;
}

.template-card {
  background: white;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 16px;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s;
}
.template-card:hover { border-color: var(--gray-300); }
.template-card.selected {
  border-color: var(--green);
  background: var(--green-light);
}

.template-icon {
  font-size: 24px;
  margin-bottom: 8px;
}

.template-name {
  font-weight: 600;
  margin-bottom: 4px;
}

.template-desc {
  font-size: 13px;
  color: var(--gray-500);
}

.option-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.option-btn {
  padding: 12px;
  border: 2px solid var(--gray-200);
  background: white;
  border-radius: var(--radius);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}
.option-btn:hover { border-color: var(--gray-300); }
.option-btn.selected {
  border-color: var(--green);
  background: var(--green-light);
}

.setup-error {
  color: var(--red);
  font-size: 14px;
  margin-bottom: 12px;
  text-align: center;
}

.hidden { display: none !important; }

/* Bottom Bar */
.bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  border-top: 1px solid var(--gray-200);
  padding: 12px 20px;
  display: flex;
  justify-content: center;
  gap: 8px;
  z-index: 100;
}

.bottom-btn {
  padding: 12px 24px;
  border: none;
  background: var(--gray-100);
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: inherit;
}
.bottom-btn:hover { background: var(--gray-200); }
.bottom-btn.primary {
  background: var(--green);
  color: white;
}
.bottom-btn.primary:hover { background: var(--green-dark); }

/* Help Modal */
.instruction-step {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
}

.step-number {
  width: 32px;
  height: 32px;
  background: var(--green);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  flex-shrink: 0;
}

.step-content h4 {
  font-size: 16px;
  margin-bottom: 4px;
}

.step-content p {
  font-size: 14px;
  color: var(--gray-600);
}

.tip-box {
  background: var(--amber-50);
  border-radius: var(--radius);
  padding: 16px;
  margin-top: 20px;
}

.tip-box p {
  font-size: 14px;
  color: var(--amber-800);
}

/* Install Prompt */
.install-prompt {
  background: var(--green-light);
  border-radius: var(--radius);
  padding: 16px;
  margin-top: 24px;
  text-align: center;
  max-width: 400px;
}

.install-prompt p {
  font-size: 14px;
  margin-bottom: 12px;
}

/* Password Error */
.password-error {
  color: var(--red);
  font-size: 14px;
  margin-top: 8px;
}

/* Welcome Screen */
.welcome-text {
  max-width: 320px;
  margin: 32px 0;
  font-size: 15px;
  color: var(--gray-600);
  line-height: 1.6;
}

/* Import Button */
.import-section {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--gray-200);
  width: 100%;
  max-width: 400px;
}

.import-label {
  font-size: 13px;
  color: var(--gray-500);
  margin-bottom: 8px;
}

/* PWA Standalone Adjustments */
.pwa-standalone .lock-screen { padding-top: 60px; }
.pwa-standalone .header { padding-top: 50px; }
.pwa-standalone .bottom-bar {
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
}

/* Toast */
.toast {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gray-800);
  color: white;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  z-index: 300;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.toast.show { opacity: 1; }

/* Print styles */
@media print {
  .header, .bottom-bar, .modal-overlay, .action-icons, .action-icon, .task-actions, .phase-actions, .field-actions, .task-btns { display: none; }
  body { padding: 0; }
  .phase { break-inside: avoid; }
}
