/*
Theme Name: Yutori Nursing Home Theme
Theme URI: https://example.com/yutori-theme
Author: Antigravity
Author URI: https://example.com
Description: Custom WordPress theme for Yutori Nurse Care Nursing Home Referral Center. Rebuilt from React prototype.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: yutori-theme
*/

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;700&family=Outfit:wght@400;500;600;700&display=swap');

:root {
  /* Color System */
  --primary: #4A7C59;          /* Trustworthy earth green */
  --primary-hover: #3b6347;
  --primary-light: #F0F5F2;
  
  --accent: #FF7A59;           /* Salmon orange from flyer */
  --accent-hover: #e56d4f;
  --accent-light: #FFF0EC;
  
  --bg-base: #FAF8F5;          /* Warm beige background */
  --bg-card: #FFFFFF;          /* Pure white card background */
  
  --text-main: #2B2B2B;        /* High readability charcoal */
  --text-muted: #6E6E6E;       /* Soft grey for secondary details */
  --border-color: #E6E1DA;     /* Soft border */
  
  --success: #28a745;
  --info: #007bff;
  --warning: #ffc107;
  
  /* Font Stack */
  --font-sans: 'Outfit', 'Noto Sans JP', sans-serif;
  
  /* Layout */
  --max-width: 1200px;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-base);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

/* Header & Navigation */
.app-header {
  background-color: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}

.header-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-section {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-icon {
  background-color: var(--accent);
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.2rem;
}

.logo-text h1 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary);
}

.logo-text p {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.nav-menu {
  display: flex;
  gap: 0.5rem;
  background: var(--primary-light);
  padding: 0.25rem;
  border-radius: 30px;
}

.nav-btn {
  padding: 0.5rem 1.25rem;
  border: none;
  background: none;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 0.9rem;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  color: var(--primary);
}

.nav-btn.active {
  background-color: var(--primary);
  color: white;
  box-shadow: 0 4px 10px rgba(74, 124, 89, 0.2);
}

.nav-btn:hover:not(.active) {
  background-color: rgba(74, 124, 89, 0.1);
}

/* Common Layout Container */
.main-content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 2rem 4rem;
}

/* Home LP Styling */
.hero-section {
  background-color: var(--bg-card);
  border-radius: 24px;
  padding: 3rem;
  display: flex;
  gap: 3rem;
  align-items: center;
  box-shadow: 0 10px 30px rgba(0,0,0,0.02);
  margin-bottom: 3rem;
  text-align: left;
}

@media (max-width: 900px) {
  .hero-section {
    flex-direction: column;
    padding: 2rem;
  }
}

.hero-content {
  flex: 1.2;
}

.hero-badge-container {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.badge-orange {
  background-color: var(--accent-light);
  color: var(--accent);
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.85rem;
  border: 1px solid rgba(255, 122, 89, 0.2);
}

.badge-green {
  background-color: var(--primary-light);
  color: var(--primary);
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.85rem;
  border: 1px solid rgba(74, 124, 89, 0.2);
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.3;
  margin-bottom: 1.5rem;
}

.hero-title span {
  color: var(--accent);
  position: relative;
  display: inline-block;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.hero-cta-group {
  display: flex;
  gap: 1rem;
}

.btn-primary {
  background-color: var(--accent);
  color: white;
  padding: 0.8rem 2rem;
  border-radius: 30px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(255, 122, 89, 0.3);
}

.btn-primary:hover {
  background-color: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 122, 89, 0.4);
}

.btn-secondary {
  background-color: white;
  color: var(--primary);
  padding: 0.8rem 2rem;
  border-radius: 30px;
  font-weight: 700;
  border: 2px solid var(--primary);
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  background-color: var(--primary-light);
  transform: translateY(-2px);
}

.hero-image {
  flex: 0.8;
  width: 100%;
  max-width: 500px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 15px 35px rgba(0,0,0,0.06);
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Features Section */
.section-title {
  text-align: center;
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 2.5rem;
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 50px;
  height: 4px;
  background-color: var(--accent);
  margin: 0.5rem auto 0;
  border-radius: 2px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 4rem;
}

.feature-card {
  background-color: var(--bg-card);
  padding: 2.5rem 2rem;
  border-radius: 20px;
  border: 1px solid var(--border-color);
  box-shadow: 0 5px 15px rgba(0,0,0,0.01);
  transition: all 0.3s ease;
  text-align: left;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.04);
  border-color: var(--accent);
}

.feature-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  background-color: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}

.feature-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.8rem;
  color: var(--primary);
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Process Section */
.process-section {
  margin-bottom: 4rem;
}

.process-steps {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  gap: 1rem;
}

@media (max-width: 900px) {
  .process-steps {
    flex-direction: column;
  }
}

.process-card {
  flex: 1;
  background-color: var(--bg-card);
  padding: 2.5rem 1.5rem 2rem;
  border-radius: 20px;
  border: 1px solid var(--border-color);
  text-align: center;
  position: relative;
  box-shadow: 0 5px 15px rgba(0,0,0,0.01);
}

.process-step-num {
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--accent);
  color: white;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: 0 4px 8px rgba(255, 122, 89, 0.3);
}

.process-card h4 {
  font-size: 1.15rem;
  margin: 0.8rem 0;
  color: var(--primary);
}

.process-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* FAQ Section */
.faq-section {
  max-width: 800px;
  margin: 0 auto 4rem;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.faq-item {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  text-align: left;
}

.faq-question {
  width: 100%;
  padding: 1.25rem 1.5rem;
  background: none;
  border: none;
  text-align: left;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--primary);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-answer {
  padding: 0 1.5rem 1.25rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  border-top: 1px solid rgba(0,0,0,0.02);
}

/* Reservation & Forms Section */
.form-section {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 3rem;
  background-color: var(--bg-card);
  padding: 3rem;
  border-radius: 24px;
  border: 1px solid var(--border-color);
  box-shadow: 0 10px 30px rgba(0,0,0,0.02);
  margin-bottom: 2rem;
  text-align: left;
}

@media (max-width: 900px) {
  .form-section {
    grid-template-columns: 1fr;
    padding: 2rem;
  }
}

.form-container h3 {
  font-size: 1.5rem;
  color: var(--primary);
  margin-bottom: 1.5rem;
}

.form-tabs {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 0.5rem;
}

.form-tab-btn {
  background: none;
  border: none;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  cursor: pointer;
  color: var(--text-muted);
  position: relative;
}

.form-tab-btn.active {
  color: var(--accent);
}

.form-tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 100%;
  height: 3px;
  background-color: var(--accent);
  border-radius: 2px;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 600px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
  color: var(--primary);
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  background-color: var(--bg-base);
  transition: all 0.3s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--accent);
  background-color: white;
  box-shadow: 0 0 0 3px rgba(255, 122, 89, 0.15);
}

.info-box {
  background-color: var(--primary-light);
  border-radius: 16px;
  padding: 2rem;
  border: 1px solid rgba(74, 124, 89, 0.1);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.info-box h4 {
  color: var(--primary);
  margin-bottom: 1rem;
  font-size: 1.2rem;
}

.info-box ul {
  list-style-type: none;
}

.info-box li {
  margin-bottom: 0.8rem;
  font-size: 0.95rem;
  padding-left: 1.5rem;
  position: relative;
}

.info-box li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: bold;
}

.tel-link {
  display: block;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--accent);
  margin-top: 1rem;
  text-align: center;
}

/* Calendar Scheduler Grid */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  text-align: center;
}

.calendar-header {
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--primary);
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-color);
}

.calendar-day-btn {
  background-color: var(--bg-base);
  border: 1px solid var(--border-color);
  padding: 0.6rem 0.2rem;
  border-radius: 8px;
  cursor: pointer;
  font-family: var(--font-sans);
  transition: all 0.2s ease;
}

.calendar-day-btn:hover:not(.disabled) {
  background-color: var(--primary-light);
  border-color: var(--primary);
}

.calendar-day-btn.selected {
  background-color: var(--accent);
  color: white;
  border-color: var(--accent);
}

.calendar-day-btn.disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.time-slots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 0.5rem;
  margin-top: 1rem;
}

.time-slot-btn {
  background-color: white;
  border: 1px solid var(--border-color);
  padding: 0.5rem;
  border-radius: 6px;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.time-slot-btn:hover:not(.disabled) {
  background-color: var(--accent-light);
  border-color: var(--accent);
}

.time-slot-btn.selected {
  background-color: var(--accent);
  color: white;
  border-color: var(--accent);
}

.time-slot-btn.disabled {
  background-color: #f5f5f5;
  color: #ccc;
  border-color: #e5e5e5;
  cursor: not-allowed;
}

/* CRM Dashboard (Admin) Styling */
.crm-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 2rem;
  text-align: left;
}

@media (max-width: 900px) {
  .crm-layout {
    grid-template-columns: 1fr;
  }
}

.crm-panel {
  background-color: var(--bg-card);
  padding: 2rem;
  border-radius: 20px;
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 15px rgba(0,0,0,0.01);
}

.crm-panel h3 {
  color: var(--primary);
  margin-bottom: 1.5rem;
  border-bottom: 2px solid var(--primary-light);
  padding-bottom: 0.5rem;
}

.customer-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-height: 500px;
  overflow-y: auto;
  padding-right: 0.5rem;
}

.customer-card {
  padding: 1rem;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: all 0.3s ease;
  background-color: var(--bg-base);
}

.customer-card:hover {
  border-color: var(--accent);
}

.customer-card.selected {
  background-color: var(--primary-light);
  border-color: var(--primary);
  box-shadow: 0 4px 10px rgba(74, 124, 89, 0.1);
}

.customer-name {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.customer-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
}

.stage-badge {
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 700;
}

.stage-1 { background-color: #e3f2fd; color: #0d47a1; } /* 新規受付 */
.stage-2 { background-color: #e8f5e9; color: #1b5e20; } /* 本人面談済 */
.stage-3 { background-color: #fff3e0; color: #e65100; } /* 家族面談済 */
.stage-4 { background-color: #ede7f6; color: #4a148c; } /* 見学調整中 */
.stage-5 { background-color: #fce4ec; color: #880e4f; } /* 入居成立 */

.customer-detail {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.detail-row {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.detail-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
}

.detail-value {
  font-size: 1rem;
  font-weight: 500;
  background-color: var(--bg-base);
  padding: 0.75rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.stage-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.stage-select-btn {
  padding: 0.4rem 0.8rem;
  font-size: 0.8rem;
  border: 1px solid var(--border-color);
  background-color: white;
  border-radius: 20px;
  cursor: pointer;
  font-family: var(--font-sans);
  transition: all 0.2s ease;
}

.stage-select-btn.active {
  background-color: var(--primary);
  color: white;
  border-color: var(--primary);
}

.text-area {
  min-height: 100px;
  resize: vertical;
}

.sync-status-box {
  background-color: #e8f5e9;
  border: 1px solid #c8e6c9;
  color: #2e7d32;
  padding: 1rem;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
}

.map-simulation {
  background-color: #eceff1;
  border: 1px solid #cfd8dc;
  border-radius: 12px;
  padding: 1.5rem;
  margin-top: 1rem;
}

.map-sim-header {
  font-weight: 700;
  font-size: 0.85rem;
  color: #37474f;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.map-canvas {
  height: 150px;
  background-color: #cfd8dc;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #546e7a;
  font-weight: 500;
  font-size: 0.9rem;
  position: relative;
  overflow: hidden;
}

/* Code Library Styling */
.code-library-container {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 2rem;
  text-align: left;
}

@media (max-width: 800px) {
  .code-library-container {
    grid-template-columns: 1fr;
  }
}

.code-sidebar {
  background-color: var(--bg-card);
  padding: 1.5rem;
  border-radius: 20px;
  border: 1px solid var(--border-color);
  height: fit-content;
}

.code-menu {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  list-style: none;
}

.code-menu-btn {
  width: 100%;
  padding: 0.75rem 1rem;
  border: none;
  background: none;
  text-align: left;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 0.9rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--text-muted);
}

.code-menu-btn.active {
  background-color: var(--primary-light);
  color: var(--primary);
  font-weight: 700;
}

.code-viewer-panel {
  background-color: var(--bg-card);
  padding: 2rem;
  border-radius: 20px;
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 15px rgba(0,0,0,0.01);
}

.code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
}

.code-title {
  font-weight: 700;
  color: var(--primary);
  font-size: 1.2rem;
}

.copy-btn {
  background-color: var(--primary-light);
  color: var(--primary);
  border: 1px solid var(--primary);
  padding: 0.4rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  transition: all 0.2s ease;
}

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

.code-block-wrapper {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  background-color: #1e1e1e;
  border: 1px solid #333;
}

.code-block {
  margin: 0;
  padding: 1.5rem;
  overflow-x: auto;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.85rem;
  line-height: 1.5;
  color: #d4d4d4;
  text-align: left;
}

.code-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

/* Success notification toast */
.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: var(--primary);
  color: white;
  padding: 1rem 2rem;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  font-weight: 600;
  z-index: 1000;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from { transform: translateY(100px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Simple Step Guide in LP */
.step-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 1.5rem;
  font-weight: bold;
}

@media (max-width: 900px) {
  .step-arrow {
    transform: rotate(90deg);
    margin: 0.5rem 0;
  }
}

/* Weekly Calendar Grid Styles */
.weekly-calendar {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow-x: auto; /* Enable horizontal scroll on iPhone */
  -webkit-overflow-scrolling: touch;
  background-color: white;
  margin-top: 1rem;
}

.weekly-calendar-header {
  display: grid;
  grid-template-columns: 80px repeat(6, 1fr);
  background-color: var(--primary-light);
  border-bottom: 1px solid var(--border-color);
  text-align: center;
  font-weight: bold;
  font-size: 0.8rem;
  min-width: 680px; /* Force minimum width to prevent collapse */
}

.weekly-calendar-header-cell {
  padding: 0.6rem 0.2rem;
  border-right: 1px solid var(--border-color);
  color: var(--primary);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.weekly-calendar-header-cell:last-child {
  border-right: none;
}

.weekly-calendar-body {
  max-height: 350px;
  overflow-y: auto;
  min-width: 680px; /* Force minimum width to prevent collapse */
}

.weekly-calendar-row {
  display: grid;
  grid-template-columns: 80px repeat(6, 1fr);
  border-bottom: 1px solid #f0f0f0;
}

.weekly-calendar-row:last-child {
  border-bottom: none;
}

.weekly-calendar-time-cell {
  background-color: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 0.75rem;
  color: var(--primary);
  border-right: 1px solid var(--border-color);
  padding: 0.5rem 0;
}

.weekly-calendar-slot-cell {
  border-right: 1px solid #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.3rem 0.1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.7rem;
  min-height: 45px;
  text-align: center;
}

.weekly-calendar-slot-cell:last-child {
  border-right: none;
}

.weekly-calendar-slot-cell:hover:not(.occupied) {
  background-color: var(--accent-light);
}

.weekly-calendar-slot-cell.selected {
  background-color: var(--accent);
  color: white;
  font-weight: bold;
}

.weekly-calendar-slot-cell.occupied {
  background-color: #f5f5f5;
  color: var(--text-muted);
  cursor: not-allowed;
  font-size: 0.65rem;
  padding: 0.2rem;
  line-height: 1.2;
}

/* Mobile & iPhone Responsive Adjustments */
@media (max-width: 768px) {
  .header-container {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
    text-align: center;
  }
  
  .logo-section {
    flex-direction: column;
    gap: 0.25rem;
    align-items: center;
  }
  
  .logo-text h1 {
    font-size: 1.1rem;
    text-align: center;
  }
  
  .logo-text p {
    text-align: center;
  }
  
  .nav-menu {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    border-radius: 15px;
    padding: 0.2rem;
  }
  
  .nav-btn {
    padding: 0.4rem 0.6rem;
    font-size: 0.75rem;
    flex: 1;
    text-align: center;
    border-radius: 10px;
    white-space: nowrap;
  }
  
  .main-content {
    padding: 1rem;
  }
  
  .hero-section {
    padding: 1.5rem;
    gap: 1.5rem;
  }
  
  .hero-title {
    font-size: 1.75rem;
    text-align: center;
  }
  
  .hero-subtitle {
    font-size: 0.95rem;
    text-align: center;
  }
  
  .hero-badge-container {
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.4rem;
  }
  
  .hero-cta-group {
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
  }
  
  .hero-cta-group button {
    width: 100%;
  }
  
  .features-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .process-steps {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .step-arrow {
    transform: rotate(90deg);
    margin: 0.25rem 0;
  }
  
  .form-section {
    grid-template-columns: 1fr;
    padding: 1.5rem;
    gap: 2rem;
  }
  
  .calendar-grid {
    gap: 0.25rem;
  }
  
  .calendar-day-btn {
    font-size: 0.7rem;
    padding: 0.4rem 0.05rem;
  }
  
  .time-slots {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .code-library-container {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .code-menu {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.4rem;
  }
  
  .code-menu-btn {
    width: auto;
    flex: 1;
    text-align: center;
    padding: 0.5rem;
    font-size: 0.8rem;
    border-radius: 6px;
  }
}

@media (max-width: 480px) {
  .logo-text h1 {
    font-size: 1rem;
  }
  
  .nav-btn {
    font-size: 0.7rem;
    padding: 0.3rem 0.5rem;
  }
  
  .hero-title {
    font-size: 1.5rem;
  }
}

/* Facility Showcase & CRUD Modal Styling */
.facilities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 1.5rem;
}

.facility-card-lp {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
  transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s ease, border-color 0.3s ease;
  display: flex;
  flex-direction: column;
}

.facility-card-lp:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 30px rgba(74, 124, 89, 0.08);
  border-color: var(--primary);
}

.facility-card-image {
  position: relative;
  overflow: hidden;
  height: 200px;
  background-color: #f0f0f0;
}

.facility-card-image img {
  transition: transform 0.5s ease;
}

.facility-card-lp:hover .facility-card-image img {
  transform: scale(1.05);
}

.facility-status-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.facility-status-badge.available {
  background-color: var(--primary-light);
  color: var(--primary);
  border: 1px solid rgba(74, 124, 89, 0.3);
}

.facility-status-badge.full {
  background-color: #ffebee;
  color: #c62828;
  border: 1px solid rgba(198, 40, 40, 0.2);
}

/* Modal Dialog Overlay styling */
.facility-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1100;
  animation: fadeIn 0.25s ease-out;
}

.facility-modal-content {
  background-color: var(--bg-card);
  width: 90%;
  max-width: 850px;
  max-height: 85vh;
  border-radius: 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: scaleUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.facility-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 2rem;
  background-color: var(--bg-base);
  border-bottom: 1px solid var(--border-color);
}

.facility-modal-header h3 {
  color: var(--primary);
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
}

.facility-modal-close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.facility-modal-close-btn:hover {
  color: var(--accent);
  background-color: rgba(255, 122, 89, 0.05);
}

.facility-modal-body {
  padding: 2rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.facility-modal-top-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2rem;
  align-items: start;
}

.facility-modal-image-wrapper {
  height: 220px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  background-color: #f0f0f0;
}

.facility-modal-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.facility-modal-info-box {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.facility-info-item {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.facility-info-item .info-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
}

.facility-info-item .info-val {
  font-size: 0.95rem;
  color: var(--text-main);
}

.facility-modal-details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.facility-detail-box {
  background-color: var(--primary-light);
  padding: 1.25rem;
  border-radius: 16px;
  border: 1px solid rgba(74, 124, 89, 0.08);
}

.facility-detail-box h4 {
  color: var(--primary);
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid rgba(74, 124, 89, 0.15);
  padding-bottom: 0.25rem;
}

.facility-detail-box p {
  font-size: 0.85rem;
  color: var(--text-main);
  line-height: 1.5;
  margin: 0;
}

.facility-modal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 2rem;
  background-color: var(--bg-base);
  border-top: 1px solid var(--border-color);
  gap: 1.5rem;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleUp {
  from { transform: scale(0.96); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* Responsive Modal Styling */
@media (max-width: 768px) {
  .facility-modal-top-row {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .facility-modal-image-wrapper {
    height: 180px;
  }
  
  .facility-modal-details-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .facility-modal-body {
    padding: 1.5rem;
    gap: 1.5rem;
  }
  
  .facility-modal-footer {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
    padding: 1.5rem;
  }
  
  .facility-modal-footer button {
    width: 100%;
  }
}

/* Dashboard Overview (全体像) Custom Styles */
#yutori-admin-app-root {
  font-family: var(--font-sans);
  color: var(--text-main);
  background-color: var(--bg-base);
  padding: 2rem;
  border-radius: 16px;
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 15px rgba(0,0,0,0.02);
  margin-top: 1rem;
  min-height: 80vh;
}

#yutori-admin-app-root * {
  box-sizing: border-box;
}

.overview-tab-content {
  animation: fadeIn 0.4s ease-out;
}

.overview-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.kpi-card {
  background-color: var(--bg-card);
  border-radius: 16px;
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.kpi-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
}

.kpi-icon {
  font-size: 2rem;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.kpi-info h4 {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 0.2rem;
}

.kpi-value {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
}

.kpi-info p {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.1rem;
}

/* KPI Variant Colors */
.kpi-orange {
  border-left: 5px solid var(--accent);
}
.kpi-orange .kpi-icon {
  background-color: var(--accent-light);
}
.kpi-orange:hover {
  border-color: var(--accent);
}

.kpi-blue {
  border-left: 5px solid var(--info);
}
.kpi-blue .kpi-icon {
  background-color: #e6f0ff;
}
.kpi-blue:hover {
  border-color: var(--info);
}

.kpi-green {
  border-left: 5px solid var(--success);
}
.kpi-green .kpi-icon {
  background-color: #e6f4ea;
}
.kpi-green:hover {
  border-color: var(--success);
}

.kpi-brown {
  border-left: 5px solid var(--primary);
}
.kpi-brown .kpi-icon {
  background-color: var(--primary-light);
}
.kpi-brown:hover {
  border-color: var(--primary);
}

/* Dashboard Main Grid Layout */
.overview-main-grid {
  display: grid;
  grid-template-columns: 2.2fr 1fr;
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 1024px) {
  .overview-main-grid {
    grid-template-columns: 1fr;
  }
}

.overview-panel {
  background-color: var(--bg-card);
  border-radius: 20px;
  padding: 1.5rem;
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
  margin-bottom: 1.5rem;
}

.pipeline-panel {
  overflow-x: auto;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.75rem;
}

.panel-header h3 {
  font-size: 1.1rem;
  color: var(--primary);
  font-weight: 700;
  margin: 0;
}

.panel-subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Kanban Columns */
.pipeline-columns {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  min-width: 720px; /* Ensures columns stay wide enough when scrolling horizontally */
}

.pipeline-column {
  background-color: var(--bg-base);
  border-radius: 12px;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 250px;
  border: 1px dashed rgba(0,0,0,0.05);
}

.pipeline-col-header {
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: white;
}

.count-badge {
  background-color: rgba(255, 255, 255, 0.25);
  border-radius: 12px;
  padding: 0.1rem 0.5rem;
  font-size: 0.75rem;
}

.col-stage-1 { background-color: var(--accent); }
.col-stage-2-3 { background-color: var(--info); }
.col-stage-4 { background-color: #9c27b0; }
.col-stage-5 { background-color: var(--success); }

.pipeline-col-body {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.pipeline-card {
  background-color: var(--bg-card);
  border-radius: 8px;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  box-shadow: 0 2px 4px rgba(0,0,0,0.01);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.pipeline-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.06);
  border-color: var(--primary);
}

.pipeline-card-name {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-main);
}

.pipeline-card-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.pipeline-card-date {
  font-size: 0.7rem;
  color: var(--accent);
  font-weight: 500;
  margin-top: 0.4rem;
}

.pipeline-card-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  background-color: rgba(0, 123, 255, 0.08);
  color: var(--info);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  margin-top: 0.3rem;
}

.pipeline-card-schedule {
  font-size: 0.7rem;
  font-weight: 700;
  color: #9c27b0;
  background-color: rgba(156, 39, 176, 0.08);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  margin-top: 0.4rem;
}

.pipeline-card-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  background-color: rgba(40, 167, 69, 0.08);
  color: var(--success);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  margin-top: 0.3rem;
}

.empty-col-text {
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  padding: 2rem 0;
}

.overview-right-column {
  display: flex;
  flex-direction: column;
}

/* Schedule Timeline on Dashboard */
.overview-schedule-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 320px;
  overflow-y: auto;
}

.overview-schedule-item {
  border-left: 3px solid #9c27b0;
  background-color: var(--bg-base);
  border-radius: 0 8px 8px 0;
  padding: 0.75rem 1rem;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.overview-schedule-item:hover {
  background-color: rgba(156, 39, 176, 0.05);
  transform: translateX(3px);
}

.schedule-time {
  font-size: 0.75rem;
  font-weight: 700;
  color: #9c27b0;
  margin-bottom: 0.25rem;
}

.schedule-name {
  font-size: 0.9rem;
  color: var(--text-main);
}

.schedule-notes {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Facility Summary */
.overview-facility-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.overview-facility-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background-color: var(--bg-card);
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.overview-facility-item:hover {
  transform: translateX(3px);
  border-color: var(--primary);
}

.facility-summary-info strong {
  display: block;
  font-size: 0.85rem;
  color: var(--text-main);
}

.facility-summary-addr {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.empty-panel-text {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  padding: 2rem 0;
}


