/* ============================================
   Clinic Staff Portal - Common Styles
   カジュアル・親しみやすいデザイン
   ============================================ */

/* CSS Variables */
:root {
  /* Colors - 親しみやすいパステル系 */
  --primary: #FF6B6B;       /* コーラルピンク */
  --primary-light: #FFE5E5;
  --secondary: #4ECDC4;     /* ティール */
  --secondary-light: #E0F7F5;
  --accent: #FFE66D;        /* イエロー */
  --accent-light: #FFF9E0;
  
  --kumatori: #9B59B6;      /* パープル - クマ取り */
  --kumatori-light: #F3E5F5;
  --lipo: #3498DB;          /* ブルー - 脂肪吸引 */
  --lipo-light: #E3F2FD;
  --aga: #27AE60;           /* グリーン - AGA */
  --aga-light: #E8F5E9;
  
  --text: #2C3E50;
  --text-light: #7F8C8D;
  --bg: #FAFAFA;
  --white: #FFFFFF;
  --border: #E0E0E0;
  
  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  
  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
  
  /* Transitions */
  --transition: all 0.3s ease;
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Hiragino Kaku Gothic ProN', 'Noto Sans JP', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ============================================
   Layout
   ============================================ */

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.container-narrow {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

/* ============================================
   Header
   ============================================ */

.header {
  background: var(--white);
  padding: var(--space-md) 0;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.logo-icon {
  font-size: 1.8rem;
}

.nav {
  display: flex;
  gap: var(--space-md);
}

.nav-link {
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-full);
  transition: var(--transition);
  font-weight: 500;
}

.nav-link:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.nav-link.active {
  background: var(--primary);
  color: var(--white);
}

/* ============================================
   Hero Section
   ============================================ */

.hero {
  padding: var(--space-xl) 0;
  text-align: center;
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--secondary-light) 100%);
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: var(--space-sm);
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-light);
  margin-bottom: var(--space-lg);
}

.hero-emoji {
  font-size: 4rem;
  margin-bottom: var(--space-md);
}

/* ============================================
   Cards
   ============================================ */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-lg);
  padding: var(--space-xl) 0;
}

.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  cursor: pointer;
  border: 2px solid transparent;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.card--kumatori:hover { border-color: var(--kumatori); }
.card--lipo:hover { border-color: var(--lipo); }
.card--aga:hover { border-color: var(--aga); }

.card-icon {
  font-size: 3rem;
  margin-bottom: var(--space-md);
}

.card-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: var(--space-xs);
}

.card-desc {
  color: var(--text-light);
  font-size: 0.95rem;
}

.card-badge {
  display: inline-block;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.card-badge--kumatori { background: var(--kumatori-light); color: var(--kumatori); }
.card-badge--lipo { background: var(--lipo-light); color: var(--lipo); }
.card-badge--aga { background: var(--aga-light); color: var(--aga); }

/* ============================================
   Section
   ============================================ */

.section {
  padding: var(--space-xl) 0;
}

.section-title {
  font-size: 1.8rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: var(--space-lg);
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: var(--primary);
  margin: var(--space-sm) auto 0;
  border-radius: var(--radius-full);
}

/* ============================================
   Flow Steps (施術フロー)
   ============================================ */

.flow {
  padding: var(--space-xl) 0;
}

.flow-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: var(--space-lg);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.flow-steps {
  position: relative;
}

.flow-step {
  display: flex;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
  position: relative;
}

.flow-step:last-child {
  margin-bottom: 0;
}

.flow-step-number {
  flex-shrink: 0;
  width: 50px;
  height: 50px;
  background: var(--primary);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.2rem;
  position: relative;
  z-index: 2;
}

.flow-step-number--kumatori { background: var(--kumatori); }
.flow-step-number--lipo { background: var(--lipo); }
.flow-step-number--aga { background: var(--aga); }

.flow-step:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 25px;
  top: 50px;
  width: 2px;
  height: calc(100% + var(--space-lg) - 50px);
  background: var(--border);
  z-index: 1;
}

.flow-step-content {
  flex: 1;
  background: var(--white);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  box-shadow: var(--shadow-sm);
}

.flow-step-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: var(--space-xs);
}

.flow-step-time {
  display: inline-block;
  background: var(--accent-light);
  color: var(--text);
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  margin-bottom: var(--space-xs);
}

.flow-step-desc {
  color: var(--text-light);
  font-size: 0.95rem;
  margin-bottom: var(--space-sm);
}

.flow-step-image {
  background: var(--white);
  border-radius: var(--radius-sm);
  padding: var(--space-md);
  text-align: center;
  border: 1px solid var(--border);
  margin-bottom: var(--space-sm);
  display: flex;
  justify-content: center;
  align-items: center;
}

.flow-step-image img {
  max-width: 240px; /* イラストを控えめなサイズに制限 */
  width: 100%;
  height: auto;
  opacity: 0.9;
}

.flow-step-image-icon {
  font-size: 2rem;
  margin-bottom: var(--space-xs);
}

.flow-step-checklist {
  margin-top: var(--space-sm);
  padding-left: var(--space-md);
}

.flow-step-checklist li {
  margin-bottom: var(--space-xs);
  position: relative;
}

.flow-step-checklist li::before {
  content: '☐';
  position: absolute;
  left: -1.5em;
}

/* ============================================
   MTG Confirmation (オペ確認用)
   ============================================ */

.mtg-section {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  margin-bottom: var(--space-lg);
  box-shadow: var(--shadow-sm);
}

.mtg-section-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 2px solid var(--border);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.mtg-checklist {
  list-style: none;
}

.mtg-checklist li {
  padding: var(--space-sm);
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-xs);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  transition: var(--transition);
  cursor: pointer;
}

.mtg-checklist li:hover {
  background: var(--bg);
}

.mtg-checkbox {
  width: 24px;
  height: 24px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: var(--transition);
}

.mtg-checklist li.checked .mtg-checkbox {
  background: var(--secondary);
  border-color: var(--secondary);
  color: var(--white);
}

.mtg-checklist li.checked .mtg-checkbox::after {
  content: '✓';
  font-weight: 700;
}

.mtg-note {
  background: var(--accent-light);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  margin-top: var(--space-md);
  border-left: 4px solid var(--accent);
}

.mtg-note-title {
  font-weight: 700;
  margin-bottom: var(--space-xs);
}

/* ============================================
   Buttons
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 1rem;
  transition: var(--transition);
  cursor: pointer;
  border: none;
}

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

.btn--primary:hover {
  background: #e55a5a;
  transform: translateY(-2px);
}

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

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

.btn--kumatori { background: var(--kumatori); color: var(--white); }
.btn--lipo { background: var(--lipo); color: var(--white); }
.btn--aga { background: var(--aga); color: var(--white); }

/* ============================================
   Footer
   ============================================ */

.footer {
  background: var(--white);
  padding: var(--space-lg) 0;
  text-align: center;
  color: var(--text-light);
  font-size: 0.9rem;
  border-top: 1px solid var(--border);
  margin-top: var(--space-xl);
}

/* ============================================
   Breadcrumb
   ============================================ */

.breadcrumb {
  padding: var(--space-sm) 0;
  font-size: 0.9rem;
  color: var(--text-light);
}

.breadcrumb a {
  color: var(--primary);
}

.breadcrumb a:hover {
  text-decoration: underline;
}

/* ============================================
   Page Header (各ページ用)
   ============================================ */

.page-header {
  padding: var(--space-xl) 0 var(--space-lg);
  text-align: center;
}

.page-header--kumatori { background: var(--kumatori-light); }
.page-header--lipo { background: var(--lipo-light); }
.page-header--aga { background: var(--aga-light); }

.page-header-icon {
  font-size: 3rem;
  margin-bottom: var(--space-sm);
}

.page-header-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: var(--space-xs);
}

.page-header-subtitle {
  color: var(--text-light);
}

/* ============================================
   Tabs
   ============================================ */

.tabs {
  display: flex;
  gap: var(--space-xs);
  margin-bottom: var(--space-lg);
  flex-wrap: wrap;
}

.tab {
  padding: var(--space-sm) var(--space-md);
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition);
  font-weight: 500;
}

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

.tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
}

/* ============================================
   Portal Links
   ============================================ */

.portal-links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

.portal-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-lg);
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  border: 2px solid transparent;
}

.portal-link:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

.portal-link-icon {
  font-size: 2.5rem;
  margin-bottom: var(--space-sm);
}

.portal-link-title {
  font-weight: 700;
  font-size: 1.1rem;
}

.portal-link-desc {
  color: var(--text-light);
  font-size: 0.9rem;
  text-align: center;
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 768px) {
  .hero-title {
    font-size: 1.8rem;
  }
  
  .card-grid {
    grid-template-columns: 1fr;
  }
  
  .flow-step {
    flex-direction: column;
  }
  
  .flow-step:not(:last-child)::before {
    display: none;
  }
  
  .nav {
    display: none;
  }
  
  .portal-links {
    grid-template-columns: 1fr;
  }
}

