/* ==========================================================================
   Features Pages Specific Styles
   (Shared by features-nurse, features-head-nurse, features-admin)
   ========================================================================== */

/* ===== Hero (Features pages) ===== */
.hero {
  padding: 140px 0 80px;
  background: linear-gradient(160deg, #FAFBFC 0%, #EEF2F7 40%, #E8F0FE 100%);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -200px;
  right: -200px;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(78, 205, 196, 0.08) 0%, transparent 70%);
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -100px;
  left: -100px;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(26, 59, 107, 0.05) 0%, transparent 70%);
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(78, 205, 196, 0.12);
  color: var(--primary);
  font-size: 14px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 50px;
  margin-bottom: 24px;
}
.hero-badge i { color: var(--accent); }
.hero h1 {
  font-size: 48px;
  font-weight: 900;
  line-height: 1.25;
  color: var(--primary-dark);
  margin-bottom: 20px;
}
.hero h1 span {
  background: linear-gradient(135deg, var(--cta), #FF8F6B);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-subtitle {
  font-size: 18px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 36px;
  max-width: 500px;
}
.hero-actions { display: flex; gap: 16px; align-items: center; }
.hero-stats {
  display: flex;
  gap: 40px;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}
.hero-stat-number {
  font-size: 32px;
  font-weight: 800;
  color: var(--primary);
  font-family: 'Inter', sans-serif;
}
.hero-stat-label {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 4px;
}
.hero-visual {
  position: relative;
}
.hero-mockup {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  border: 1px solid var(--border);
}

/* Two-column hero (nurse, head-nurse) */
.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  position: relative;
  z-index: 1;
}

/* Centered hero (admin) */
.hero-inner.hero-centered {
  display: block;
  text-align: center;
  max-width: 760px;
  margin: 0 auto;
}
.hero-inner.hero-centered .hero-subtitle {
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}
.hero-inner.hero-centered .hero-actions {
  justify-content: center;
}

/* ===== Phone Calendar Mockup (Nurse page) ===== */
.phone-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-bottom: 12px;
}
.phone-cal-day-name {
  text-align: center;
  font-size: 10px;
  color: var(--text-light);
  font-weight: 600;
  padding: 4px 0;
}
.phone-cal-day {
  text-align: center;
  padding: 4px 2px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 500;
  position: relative;
}
.phone-cal-day .shift-dot {
  display: block;
  width: 16px;
  height: 4px;
  border-radius: 2px;
  margin: 2px auto 0;
}
.phone-cal-day.today-cell {
  background: var(--primary);
  color: var(--white);
  border-radius: 8px;
  font-weight: 700;
}
.dot-a { background: #DBEAFE; }
.dot-e { background: #FEF3C7; }
.dot-n { background: #EDE9FE; }
.dot-off { background: #F3F4F6; }
.phone-cal-day.today-cell .dot-a { background: rgba(255,255,255,0.5); }

/* ===== Leave Calendar Mockup (Nurse page) ===== */
.leave-cal-day {
  text-align: center;
  padding: 6px 2px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  background: var(--white);
  position: relative;
}
.leave-cal-day .leave-count {
  font-size: 9px;
  color: var(--text-light);
  display: block;
  margin-top: 1px;
}
.leave-cal-day.available { border: 1px solid #D1FAE5; }
.leave-cal-day.limited { border: 1px solid #FEF3C7; }
.leave-cal-day.full-day { background: #FEE2E2; color: #DC2626; border: 1px solid #FECACA; }
.leave-cal-day.selected { background: var(--accent); color: var(--white); }
.leave-cal-day.selected .leave-count { color: rgba(255,255,255,0.8); }

/* ===== Record Table Mockup (Nurse page) ===== */
.record-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 6px;
}
.record-table th {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-light);
  text-align: left;
  padding: 8px 10px;
}
.record-table td {
  font-size: 12px;
  padding: 10px;
  background: var(--white);
  color: var(--text);
}
.record-table tr td:first-child { border-radius: 8px 0 0 8px; }
.record-table tr td:last-child { border-radius: 0 8px 8px 0; }

/* Status badges */
.status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 50px;
  font-size: 11px;
  font-weight: 600;
}
.status-approved { background: #D1FAE5; color: #059669; }
.status-pending { background: #FEF3C7; color: #D97706; }
.status-rejected { background: #FEE2E2; color: #DC2626; }

/* Weight bar */
.weight-bar {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
}
.weight-bar-track {
  width: 60px;
  height: 6px;
  background: #E5E7EB;
  border-radius: 3px;
  overflow: hidden;
}
.weight-bar-fill {
  height: 100%;
  border-radius: 3px;
  background: var(--accent);
}

/* ===== Notification Mockup (Nurse page) ===== */
.notif-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  background: var(--white);
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  transition: transform 0.2s;
}
.notif-item:hover { transform: translateX(4px); }
.notif-item.unread { border-left: 3px solid var(--accent); }
.notif-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.notif-icon.green { background: #D1FAE5; color: #059669; }
.notif-icon.blue { background: #DBEAFE; color: var(--primary); }
.notif-icon.orange { background: #FEF3C7; color: #D97706; }
.notif-icon.purple { background: #EDE9FE; color: #7C3AED; }
.notif-content { flex: 1; }
.notif-title { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 2px; }
.notif-desc { font-size: 12px; color: var(--text-secondary); line-height: 1.5; }
.notif-time { font-size: 11px; color: var(--text-light); margin-top: 4px; }
.notif-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 16px;
  border-bottom: 2px solid var(--border);
}
.notif-tab {
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-light);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
}
.notif-tab.active {
  color: var(--primary);
  border-bottom-color: var(--accent);
}

/* ===== CTA Links (Feature pages bottom) ===== */
.cta-links {
  display: flex;
  gap: 24px;
  justify-content: center;
  margin-bottom: 32px;
}
.cta-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 600;
  color: var(--accent-light);
  transition: color 0.2s;
}
.cta-link:hover { color: var(--white); }

/* ===== Feature Link Cards (Head-nurse CTA) ===== */
.feature-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 48px;
}
.feature-link-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  text-align: center;
  border: 1px solid var(--border);
  transition: all 0.3s;
}
.feature-link-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
}
.feature-link-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}
.feature-link-card h4 {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 6px;
}
.feature-link-card p {
  font-size: 14px;
  color: var(--text-secondary);
}
.cta-section.alt-bg {
  background: var(--bg);
}

/* ===== Head-nurse: Auto-scheduling controls ===== */
.ctrl-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
}
.ctrl-play { background: #D1FAE5; color: #059669; }
.ctrl-pause { background: #FEF3C7; color: #D97706; }
.ctrl-restart { background: #DBEAFE; color: var(--primary); }

/* Head-nurse: Person stat rows */
.person-stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid #F3F4F6;
  font-size: 11px;
}
.person-stat-row:last-child { border-bottom: none; }
.person-stat-name {
  font-weight: 600;
  color: var(--text);
}
.person-stat-values {
  display: flex;
  gap: 12px;
}
.person-stat-val {
  color: var(--text-light);
}

/* Head-nurse: Activity feed */
.activity-feed {
  background: var(--white);
  border-radius: 10px;
  padding: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.activity-feed-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}
.activity-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  font-size: 10px;
}
.activity-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.activity-text {
  flex: 1;
  color: var(--text-secondary);
}
.activity-time {
  color: var(--text-light);
  font-size: 10px;
  white-space: nowrap;
}

/* Head-nurse: Weight cards */
.weight-card {
  background: var(--white);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 6px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.weight-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}
.weight-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}
.weight-rank {
  font-size: 10px;
  color: var(--text-light);
  font-weight: 400;
}
.weight-card .weight-bar {
  width: 100%;
  height: 4px;
  background: #E5E7EB;
  border-radius: 2px;
  overflow: hidden;
  display: block;
}
.weight-card .weight-bar-fill {
  height: 100%;
  border-radius: 2px;
}

/* Head-nurse: Toggle rows */
.toggle-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #F3F4F6;
}
.toggle-row:last-child { border-bottom: none; }
.toggle-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}
.rule-preview {
  font-size: 10px;
  color: var(--text-light);
  line-height: 1.5;
}

/* Head-nurse: Shift chip */
.shift-chip {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 4px;
  vertical-align: middle;
}

/* Head-nurse: Editor toolbar & body */
.editor-toolbar {
  display: flex;
  gap: 4px;
  padding: 6px 8px;
  background: #F3F4F6;
  border-radius: 6px 6px 0 0;
  border: 1px solid var(--border);
  border-bottom: none;
}
.toolbar-btn {
  width: 28px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
}
.toolbar-btn:hover { background: var(--white); }
.editor-body {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 0 0 6px 6px;
  font-size: 12px;
  color: var(--text);
  line-height: 1.7;
  min-height: 60px;
}

/* Head-nurse: Ticket items */
.ticket-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid #F3F4F6;
  font-size: 12px;
}
.ticket-item:last-child { border-bottom: none; }
.ticket-priority {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.priority-high { background: #DC2626; }
.priority-medium { background: #D97706; }
.priority-low { background: #9CA3AF; }
.ticket-title {
  flex: 1;
  color: var(--text);
  font-weight: 500;
}
.ticket-status {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  white-space: nowrap;
}

/* ===== Admin: Additional tag colors ===== */
.tag-red { background: #FEE2E2; color: #DC2626; }
.tag-teal { background: #CCFBF1; color: #0D9488; }

/* Admin: Mock table */
.mock-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.mock-table th {
  text-align: left;
  padding: 8px 10px;
  font-weight: 600;
  color: var(--text-secondary);
  border-bottom: 2px solid var(--border);
  font-size: 11px;
  white-space: nowrap;
}
.mock-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #F3F4F6;
  color: var(--text);
  font-size: 12px;
}
.mock-table tr:last-child td { border-bottom: none; }

/* Admin: Color swatch */
.color-swatch {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 4px;
  vertical-align: middle;
}

/* Admin: Toggle switch */
.toggle-switch {
  display: inline-block;
  width: 32px;
  height: 18px;
  border-radius: 9px;
  position: relative;
  vertical-align: middle;
  flex-shrink: 0;
}
.toggle-switch.on { background: var(--accent); }
.toggle-switch.off { background: #D1D5DB; }
.toggle-switch::after {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--white);
  top: 2px;
  transition: left 0.2s;
}
.toggle-switch.on::after { left: 16px; }
.toggle-switch.off::after { left: 2px; }

/* Admin: Mock badge */
.mock-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}

/* Admin: Rule hierarchy */
.rule-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.rule-item {
  background: var(--white);
  border-radius: 8px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.rule-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.rule-level {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: auto;
  white-space: nowrap;
}

/* Admin: Unit cards */
.unit-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.unit-card {
  background: var(--white);
  border-radius: 10px;
  padding: 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.unit-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.unit-card-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary-dark);
}
.unit-card-count {
  font-size: 11px;
  color: var(--text-light);
}
.unit-bar {
  display: flex;
  gap: 2px;
  height: 6px;
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 6px;
}
.unit-bar-seg {
  border-radius: 3px;
}
.unit-card-legend {
  display: flex;
  gap: 8px;
  font-size: 10px;
  color: var(--text-light);
}
.unit-card-legend span {
  display: flex;
  align-items: center;
  gap: 3px;
}
.legend-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

/* Admin: Permission table */
.perm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.perm-table th {
  text-align: center;
  padding: 8px 10px;
  font-weight: 600;
  color: var(--text-secondary);
  border-bottom: 2px solid var(--border);
  font-size: 11px;
}
.perm-table th:first-child { text-align: left; }
.perm-table td {
  text-align: center;
  padding: 8px 10px;
  border-bottom: 1px solid #F3F4F6;
  font-size: 12px;
}
.perm-table td:first-child { text-align: left; font-weight: 500; color: var(--text); }
.perm-table tr:last-child td { border-bottom: none; }
.perm-check { color: #059669; font-weight: 700; }
.perm-dash { color: #D1D5DB; }

/* Admin: Holiday calendar */
.cal-day.holiday {
  background: #FEE2E2;
  color: #DC2626;
}
.cal-day.makeup {
  background: #FEF3C7;
  color: #D97706;
}

/* Admin: Template editor */
.tpl-editor {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.tpl-sidebar {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border);
  margin-bottom: 4px;
}
.tpl-tab {
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-light);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
}
.tpl-tab.active {
  color: var(--primary);
  border-bottom-color: var(--accent);
}
.tpl-card {
  background: var(--white);
  border-radius: 10px;
  padding: 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.tpl-card-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary-dark);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}
.tpl-field {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.7;
  padding: 10px 12px;
  background: #F8FAFC;
  border-radius: 6px;
  border: 1px solid var(--border);
  margin-bottom: 8px;
}
.tpl-var {
  background: #EEF2FF;
  color: var(--primary);
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 11px;
}

/* Admin: .btn-outline-white */
.btn-outline-white {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255,255,255,0.4);
}
.btn-outline-white:hover {
  background: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.7);
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .hero h1 { font-size: 38px; }
  .hero-inner { gap: 40px; }
}

@media (max-width: 768px) {
  .hero { padding: 120px 0 60px; }
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-subtitle { margin: 0 auto 36px; }
  .hero-actions { justify-content: center; }
  .hero-visual { max-width: 320px; margin: 0 auto; }
  .feature-links { grid-template-columns: 1fr; max-width: 400px; margin: 0 auto 48px; }
  .cta-links { flex-direction: column; align-items: center; gap: 12px; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 30px; }
  .phone-mockup { width: 240px; }
  .unit-grid { grid-template-columns: 1fr; }
}
