/* ファーストエイト業務アプリ - TakeBack Old Gucci Style */
:root {
  --primary: #1C2541;
  --accent: #006B3F;
  --gold: #C5A258;
  --red: #CE2029;
  --bg: #F8F5EE;
  --card: #ffffff;
  --text: #1C2541;
  --sub: #5a6272;
  --border: #dde0e6;
  --shadow: rgba(28,37,65,0.08);
  --success: #006B3F;
  --warn: #C5A258;
  --danger: #CE2029;
}

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

body {
  font-family: 'Noto Sans JP', sans-serif;
  background: var(--bg);
  color: var(--text);
  max-width: 768px;
  margin: 0 auto;
  min-height: 100dvh;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
  font-size: 15px;
}

/* Screen management */
.screen { display: none; min-height: 100dvh; }
.screen.active { display: block; }

/* ====== LOGIN ====== */
.login-container {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; min-height: 100dvh; padding: 40px 24px;
  background: var(--bg);
}
.login-logo { text-align: center; margin-bottom: 48px; }
.login-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 80px; height: 80px; border-radius: 20px;
  background: var(--primary); color: var(--gold);
  font-size: 28px; font-weight: 700; margin-bottom: 16px;
}
.login-logo h1 { color: var(--text); font-size: 24px; font-weight: 700; letter-spacing: 2px; }
.login-sub { color: var(--sub); font-size: 13px; margin-top: 4px; }
.login-form { width: 100%; max-width: 320px; }
.login-form .form-group { margin-bottom: 20px; }
.login-form label { color: var(--sub); font-size: 13px; margin-bottom: 6px; display: block; }
.login-form select {
  width: 100%; padding: 14px 16px; border-radius: 12px; border: none;
  font-size: 16px; background: rgba(255,255,255,0.95); color: var(--text);
  font-family: inherit;
}
.login-note { color: var(--sub); font-size: 11px; margin-top: 24px; text-align: center; }

/* ====== BUTTONS ====== */
.btn {
  display: block; width: 100%; padding: 14px; border-radius: 12px;
  font-size: 16px; font-weight: 500; border: none; cursor: pointer;
  font-family: inherit; transition: opacity 0.2s;
}
.btn:active { opacity: 0.8; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-gold { background: var(--gold); color: #fff; }
.btn-outline { background: transparent; color: var(--accent); border: 2px solid var(--accent); margin-top: 12px; }
.btn-warn { background: var(--warn); color: #fff; }
.icon-btn {
  background: none; border: none; font-size: 20px; cursor: pointer;
  position: relative; padding: 4px;
}

/* ====== HEADER ====== */
.header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; background: var(--bg); color: var(--text);
  border-bottom: 2px solid var(--gold);
  position: sticky; top: 0; z-index: 100;
}
.header-left { display: flex; align-items: center; gap: 8px; }
.header-logo {
  background: var(--primary); color: var(--gold); width: 32px; height: 32px;
  border-radius: 8px; display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700;
}
.header-title { font-size: 16px; font-weight: 700; letter-spacing: 1px; }
.header-right { display: flex; align-items: center; gap: 8px; }
.notif-icon { font-size: 20px; }
.notif-badge {
  position: absolute; top: -2px; right: -2px;
  background: var(--danger); color: #fff; font-size: 10px;
  width: 18px; height: 18px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
}

/* ====== CONTENT ====== */
.content { padding: 16px; padding-bottom: 100px; }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ====== GREETING ====== */
.greeting { margin-bottom: 20px; }
.greeting h2 { font-size: 20px; font-weight: 700; }
.greeting-date { color: var(--sub); font-size: 13px; margin-top: 4px; }

/* ====== SECTIONS ====== */
.section { margin-bottom: 24px; }
.section-title { font-size: 15px; font-weight: 700; margin-bottom: 12px; color: var(--text); }

/* ====== STAT CARDS ====== */
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat-card {
  background: var(--card); border-radius: 12px; padding: 16px;
  text-align: center; box-shadow: 0 2px 8px var(--shadow);
  border-left: 3px solid var(--gold);
}
.stat-number { font-size: 28px; font-weight: 700; color: var(--gold); }
.stat-label { font-size: 13px; color: var(--sub); margin-top: 4px; }

/* ====== NOTICES ====== */
.notice-list { display: flex; flex-direction: column; gap: 8px; }
.notice-item {
  background: var(--card); border-radius: 10px; padding: 12px 14px;
  display: flex; align-items: center; gap: 10px;
  box-shadow: 0 1px 4px var(--shadow); font-size: 13px;
}
.notice-badge {
  font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 6px;
  white-space: nowrap;
}
.notice-approve { background: #e6f4ec; color: var(--success); }
.notice-danger { background: #fde8e8; color: var(--danger); }
.notice-wait { background: #fef6e0; color: #8a7020; }
.notice-gold { background: #faf3e0; color: #8a6d20; }
.notice-info { background: #e8edf2; color: var(--primary); }

/* ====== CAMERA START BTN ====== */
.camera-start-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 20px; border-radius: 16px;
  background: var(--accent); color: #fff; border: none;
  font-size: 18px; font-weight: 700; cursor: pointer;
  font-family: inherit; transition: opacity 0.2s;
  box-shadow: 0 4px 16px rgba(197,162,88,0.3);
}
.camera-start-btn:active { opacity: 0.85; }
.camera-start-icon { font-size: 24px; }

/* ====== SEARCH ====== */
.search-bar { display: flex; gap: 8px; margin-bottom: 16px; }
.search-input {
  flex: 1; padding: 12px 14px; border-radius: 10px; border: 2px solid var(--border);
  font-size: 15px; font-family: inherit; background: var(--card);
}
.search-input:focus { outline: none; border-color: var(--accent); }
.search-btn {
  padding: 12px 16px; border-radius: 10px; border: none;
  background: var(--primary); color: #fff; font-size: 16px; cursor: pointer;
}

/* ====== STOCK CARDS ====== */
.card-list { display: flex; flex-direction: column; gap: 10px; }
.stock-card {
  background: var(--card); border-radius: 12px; padding: 14px 16px;
  box-shadow: 0 2px 8px var(--shadow);
}
.stock-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.stock-number { font-size: 13px; font-weight: 700; color: var(--gold); font-family: monospace; }
.stock-status {
  font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 6px;
}
.status-shooting { background: #fef6e0; color: #8a7020; }
.status-listing { background: #e6f4ec; color: var(--success); }
.status-listed { background: #e8edf2; color: var(--primary); }
.stock-name { font-size: 15px; font-weight: 500; margin-bottom: 4px; }
.stock-meta { font-size: 12px; color: var(--sub); }

/* ====== STATUS SUMMARY ====== */
.status-summary {
  background: var(--card); border-radius: 12px; overflow: hidden;
  box-shadow: 0 2px 8px var(--shadow);
}
.status-row {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-bottom: 1px solid var(--border);
  cursor: pointer; transition: background 0.2s;
}
.status-row:last-child { border-bottom: none; }
.status-row:active { background: var(--border); }
.status-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.status-name { flex: 1; font-size: 14px; }
.status-count { font-size: 18px; font-weight: 700; color: var(--gold); }
.empty-msg {
  text-align: center; padding: 40px 20px; color: var(--sub); font-size: 14px;
}

/* ====== QUICK ACTIONS ====== */
.quick-actions {
  display: flex; gap: 10px; margin-top: 12px; margin-bottom: 20px;
}
.quick-btn {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 14px 8px; border-radius: 12px; border: 2px solid var(--border);
  background: var(--card); font-size: 12px; font-weight: 500;
  cursor: pointer; font-family: inherit; color: var(--text);
  transition: all 0.2s; box-shadow: 0 1px 4px var(--shadow);
}
.quick-btn:active { background: var(--border); }
.quick-btn span:first-child { font-size: 22px; }

/* ====== NOTIFICATIONS ====== */
.notif-item {
  background: var(--card); border-radius: 10px; padding: 12px 14px;
  margin-bottom: 8px; cursor: pointer; box-shadow: 0 1px 4px var(--shadow);
  border-left: 3px solid var(--danger); transition: background 0.2s;
}
.notif-item:active { background: var(--border); }
.notif-item-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.notif-time { font-size: 11px; color: var(--sub); }
.notif-body { font-size: 13px; color: var(--text); }

/* ====== HELP ====== */
.help-section { margin-bottom: 16px; }
.help-section h4 { font-size: 14px; font-weight: 700; margin-bottom: 4px; color: var(--text); }
.help-section p { font-size: 13px; color: var(--sub); line-height: 1.6; }

/* ====== PRODUCT CARDS (HOME) ====== */
.product-card {
  background: var(--card); border-radius: 14px; overflow: hidden;
  box-shadow: 0 2px 10px var(--shadow); margin-bottom: 12px;
}
.product-img-area {
  height: 150px; background: #e8dcc8;
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.product-emoji { font-size: 48px; }
.product-channel-tag {
  position: absolute; top: 10px; left: 10px;
  background: var(--danger); color: #fff; padding: 3px 10px; border-radius: 6px;
  font-size: 11px; font-weight: 700;
}
.product-channel-tag.tag-green { background: var(--accent); }
.product-channel-tag.tag-gold { background: var(--gold); }
.product-price-tag {
  position: absolute; bottom: 10px; right: 10px;
  background: rgba(28,37,65,0.85); color: var(--gold); padding: 4px 12px; border-radius: 8px;
  font-size: 14px; font-weight: 700;
}
.product-info { padding: 12px 14px; }
.product-number-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.product-number { font-size: 12px; font-weight: 700; color: var(--gold); font-family: monospace; }
.product-status {
  font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 4px;
}
.product-status-red { background: #fde8e8; color: var(--danger); }
.product-status-green { background: #e6f4ec; color: var(--accent); }
.product-status-gold { background: #faf3e0; color: #8a6d20; }
.product-name { font-size: 15px; font-weight: 500; color: var(--text); }
.product-meta { font-size: 12px; color: var(--sub); margin-top: 4px; }

/* ====== CAMERA FLOW ====== */
.camera-step { display: none; }
.camera-step.active { display: block; }

.camera-guide {
  background: var(--card); border-radius: 12px; padding: 20px;
  margin-bottom: 16px; box-shadow: 0 2px 8px var(--shadow);
}
.camera-guide h3 { font-size: 17px; margin-bottom: 8px; }
.camera-guide p { font-size: 14px; color: var(--sub); }

.guide-illustration {
  margin-top: 16px; display: flex; justify-content: center;
}
.guide-box {
  width: 200px; height: 140px; border: 3px dashed var(--border);
  border-radius: 12px; display: flex; align-items: center; justify-content: center;
  gap: 16px; position: relative;
}
.guide-product {
  width: 80px; height: 80px; background: var(--accent); color: #fff;
  border-radius: 8px; display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
}
.guide-reference {
  width: 40px; height: 60px; background: var(--primary); color: #fff;
  border-radius: 6px; display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700;
}

.camera-area {
  border-radius: 16px; overflow: hidden; margin-bottom: 16px;
  background: #1a1a1a; min-height: 280px;
  display: flex; align-items: center; justify-content: center;
}
.camera-placeholder {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  color: rgba(255,255,255,0.6); cursor: pointer; padding: 40px;
}
.camera-icon { font-size: 48px; }
.photo-preview { width: 100%; height: auto; display: block; }

/* ====== BARCODE ====== */
.barcode-area {
  position: relative; border-radius: 16px; overflow: hidden;
  background: #1a1a1a; margin-bottom: 12px;
}
.barcode-video { width: 100%; height: 280px; object-fit: cover; display: block; }
.barcode-overlay {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
}
.barcode-line {
  width: 80%; height: 2px; background: var(--danger);
  box-shadow: 0 0 8px var(--danger);
  animation: scanLine 2s ease-in-out infinite;
}
@keyframes scanLine {
  0%, 100% { transform: translateY(-40px); }
  50% { transform: translateY(40px); }
}

/* ====== AI RESULT ====== */
.ai-result { }
.ai-header {
  display: flex; align-items: center; gap: 8px;
  font-size: 17px; font-weight: 700; margin-bottom: 16px;
}
.ai-icon { font-size: 24px; }
.ai-card {
  background: var(--card); border-radius: 12px; padding: 16px;
  box-shadow: 0 2px 8px var(--shadow); margin-bottom: 16px;
}
.ai-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0; border-bottom: 1px solid var(--border);
}
.ai-row:last-child { border-bottom: none; }
.ai-label { font-size: 13px; color: var(--sub); }
.ai-value { font-size: 15px; font-weight: 500; }
.ai-highlight { color: var(--gold); font-weight: 700; }
.ai-actions { display: flex; gap: 12px; }
.ai-actions .btn { flex: 1; }

/* ====== PHOTO GUIDE ====== */
.photo-guide-list { display: flex; flex-direction: column; gap: 12px; }
.photo-guide-item {
  background: var(--card); border-radius: 12px; padding: 16px;
  box-shadow: 0 2px 8px var(--shadow);
  display: flex; align-items: center; gap: 14px;
}
.photo-guide-num {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 15px; flex-shrink: 0;
}
.photo-guide-num.done { background: var(--success); }
.photo-guide-text { flex: 1; }
.photo-guide-title { font-size: 14px; font-weight: 700; }
.photo-guide-desc { font-size: 12px; color: var(--sub); margin-top: 2px; }
.photo-guide-btn {
  padding: 8px 14px; border-radius: 8px; border: 2px solid var(--accent);
  background: transparent; color: var(--accent); font-size: 13px;
  font-weight: 700; cursor: pointer; font-family: inherit; white-space: nowrap;
}
.photo-guide-btn.done { background: var(--success); color: #fff; border-color: var(--success); }

/* ====== LOCATION ====== */
.location-grid {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px;
}
.location-btn {
  padding: 16px; border-radius: 12px; border: 2px solid var(--border);
  background: var(--card); font-size: 16px; font-weight: 700;
  cursor: pointer; font-family: inherit; transition: all 0.2s;
}
.location-btn:active, .location-btn.selected {
  background: var(--accent); color: #fff; border-color: var(--accent);
}

/* ====== COMPLETE ====== */
.complete-screen { text-align: center; padding: 40px 0; }
.complete-icon { font-size: 64px; margin-bottom: 16px; }
.complete-screen h2 { font-size: 24px; font-weight: 700; margin-bottom: 20px; }
.complete-summary {
  background: var(--card); border-radius: 12px; padding: 20px;
  margin-bottom: 24px; text-align: left; box-shadow: 0 2px 8px var(--shadow);
}
.complete-summary p { padding: 6px 0; font-size: 14px; color: var(--sub); }
.complete-summary strong { color: var(--gold); }

/* ====== CHAT ====== */
.chat-container { display: flex; flex-direction: column; height: calc(100dvh - 140px); }
.chat-messages { flex: 1; overflow-y: auto; padding-bottom: 16px; }
.chat-msg { display: flex; gap: 10px; margin-bottom: 14px; }
.chat-msg.bot { }
.chat-msg.user { flex-direction: row-reverse; }
.chat-avatar { font-size: 28px; flex-shrink: 0; }
.chat-bubble {
  background: var(--card); border-radius: 16px; padding: 12px 16px;
  font-size: 14px; line-height: 1.6; max-width: 80%;
  box-shadow: 0 1px 4px var(--shadow);
}
.chat-msg.user .chat-bubble { background: var(--primary); color: #fff; }
.chat-bubble-wrap { display: flex; flex-direction: column; max-width: 80%; }
.chat-meta {
  display: flex; align-items: center; gap: 6px;
  margin-top: 3px; padding: 0 4px;
}
.chat-msg.user .chat-meta { justify-content: flex-end; }
.chat-time { font-size: 10px; color: var(--sub); }
.chat-delete {
  background: none; border: none; color: var(--sub); font-size: 10px;
  cursor: pointer; padding: 0 2px; opacity: 0.5;
}
.chat-delete:hover { opacity: 1; color: var(--danger); }
.chat-input-area { border-top: 1px solid var(--border); padding-top: 12px; }
.chat-consult-btn {
  width: 100%; padding: 10px; border-radius: 10px; border: 2px solid var(--accent);
  background: transparent; color: var(--accent); font-size: 14px;
  font-weight: 700; cursor: pointer; font-family: inherit; margin-bottom: 10px;
}
.chat-mention-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.chat-mention-select {
  flex: 1; padding: 8px 10px; border-radius: 8px; border: 2px solid var(--border);
  font-size: 13px; font-family: inherit; background: var(--card);
}
.chat-input-row { display: flex; gap: 8px; }
.chat-input {
  flex: 1; padding: 12px 14px; border-radius: 10px; border: 2px solid var(--border);
  font-size: 15px; font-family: inherit; background: var(--card);
}
.chat-input:focus { outline: none; border-color: var(--accent); }
.chat-send-btn {
  padding: 12px 20px; border-radius: 10px; border: none;
  background: var(--accent); color: #fff; font-size: 14px;
  font-weight: 700; cursor: pointer; font-family: inherit;
}

/* ====== MYPAGE ====== */
.mypage-header { text-align: center; position: relative; padding-top: 0; margin-bottom: 16px; }
.mypage-bg {
  width: 100%; height: 120px; background: #dde0e6;
  border-radius: 12px 12px 0 0; position: relative; cursor: pointer;
  background-size: cover; background-position: center;
  overflow: hidden;
}
.mypage-avatar {
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--card); border: 3px solid var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-size: 36px; margin: -36px auto 8px; position: relative;
  cursor: pointer; overflow: hidden;
}
.avatar-img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.avatar-initial {
  font-size: 18px; font-weight: 700; color: #fff;
  width: 100%; height: 100%; display: flex;
  align-items: center; justify-content: center;
  background: var(--gold); border-radius: 50%;
  letter-spacing: -1px;
}
.avatar-area { position: relative; display: inline-block; margin: -36px auto 8px; }
.theme-icon-btn {
  position: absolute; top: 8px; left: 8px; z-index: 2;
  width: 32px; height: 32px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.8); background: rgba(255,255,255,0.9);
  font-size: 16px; cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  display: flex; align-items: center; justify-content: center;
}
.avatar-menu {
  background: var(--card); border-radius: 12px; overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15); margin: 8px auto;
  max-width: 220px;
}
.avatar-menu-item {
  display: block; width: 100%; padding: 12px 16px; border: none;
  background: none; font-size: 14px; text-align: left;
  cursor: pointer; font-family: inherit; color: var(--text);
  border-bottom: 1px solid var(--border);
}
.avatar-menu-item:last-child { border-bottom: none; }
.avatar-menu-item:active { background: var(--border); }
.mypage-header h3 { font-size: 20px; font-weight: 700; }
.mypage-role { font-size: 13px; color: var(--sub); }
/* ====== PROFILE CONTACTS ====== */
.profile-contacts {
  display: flex; gap: 8px; margin-top: 8px; justify-content: center;
  font-size: 12px; color: var(--sub);
}
.profile-contact-side {
  flex: 1; background: var(--card); border-radius: 10px; padding: 10px 12px;
  box-shadow: 0 1px 4px var(--shadow);
}
.profile-contact-label {
  font-size: 10px; font-weight: 700; color: var(--gold); text-transform: uppercase;
  letter-spacing: 1px; margin-bottom: 6px;
}
.profile-contact-item {
  font-size: 11px; color: var(--sub); padding: 0;
}

.theme-select { display: flex; gap: 8px; justify-content: center; margin-top: 10px; }
.theme-btn {
  padding: 6px 16px; border-radius: 20px; border: 2px solid var(--border);
  background: var(--card); font-size: 12px; font-weight: 500;
  cursor: pointer; font-family: inherit; color: var(--sub); transition: all 0.2s;
}
.theme-btn.active { border-color: var(--gold); color: var(--gold); font-weight: 700; }

/* ====== FEMALE THEME ====== */
body[data-theme="female"] {
  --primary: #E8709A;
  --accent: #E8709A;
  --gold: #F0A0C0;
  --red: #FF6B8A;
  --bg: #FFF5F8;
  --card: #ffffff;
  --text: #5A3A4A;
  --sub: #B08898;
  --border: #F4DDE6;
  --shadow: rgba(232,112,154,0.08);
  --success: #6BBF8A;
  --warn: #F0C060;
  --danger: #FF6B8A;
  font-family: 'Zen Maru Gothic', sans-serif;
}

/* ====== CROP ====== */
.crop-container {
  width: 200px; height: 200px; border-radius: 50%; overflow: hidden;
  margin: 0 auto; border: 3px solid var(--gold); position: relative;
  touch-action: none;
}
.crop-container.square { border-radius: 12px; width: 280px; height: 140px; }
.crop-image { position: absolute; pointer-events: none; }
.crop-zoom {
  display: flex; align-items: center; gap: 12px; padding: 0 20px; margin-top: 16px;
}
.crop-zoom input { flex: 1; }
.crop-zoom span:last-child { font-size: 12px; color: var(--sub); min-width: 36px; }

/* ====== ATTENDANCE ====== */
.attendance-card {
  background: var(--card); border-radius: 12px; padding: 16px;
  box-shadow: 0 2px 8px var(--shadow); margin-bottom: 12px;
  border-left: 3px solid var(--gold);
}
.attendance-msg { font-size: 14px; color: var(--sub); }
.attendance-msg.recorded { color: var(--accent); font-weight: 700; }
.attendance-row { display: flex; gap: 12px; margin-bottom: 12px; }

/* ====== CLOCK PICKER ====== */
.time-input {
  width: 100%; padding: 12px 14px; border-radius: 10px; border: 2px solid var(--border);
  font-size: 20px; font-weight: 700; color: var(--gold); text-align: center;
  background: var(--card); cursor: pointer; font-family: inherit;
}
.time-input:active { border-color: var(--gold); }
.clock-display { font-size: 40px; font-weight: 700; color: var(--gold); margin-bottom: 12px; letter-spacing: 2px; }
.clock-face-container { display: flex; justify-content: center; }
.clock-mode-toggle { display: flex; justify-content: center; gap: 8px; margin-top: 12px; }
.clock-mode-btn {
  padding: 8px 24px; border-radius: 8px; border: 2px solid var(--border);
  background: transparent; font-size: 14px; font-weight: 700;
  cursor: pointer; font-family: inherit; color: var(--sub);
}
.clock-mode-btn.active { background: var(--gold); color: #fff; border-color: var(--gold); }

/* ====== ATTENDANCE HISTORY ====== */
.attend-history-card {
  background: var(--card); border-radius: 12px; padding: 16px;
  margin-top: 12px; box-shadow: 0 2px 8px var(--shadow);
}
.attend-month-nav {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px;
}
.attend-month-title { font-size: 16px; font-weight: 700; }
.attend-nav-btn {
  width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--border);
  background: var(--card); font-size: 14px; cursor: pointer; font-family: inherit;
  display: flex; align-items: center; justify-content: center; color: var(--text);
}
.attend-nav-btn:active { background: var(--border); }
.attend-nav-btn.disabled { opacity: 0.3; cursor: default; }
/* Calendar grid */
.attend-cal-grid { }
.attend-cal-header { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; margin-bottom: 4px; }
.attend-cal-dow {
  text-align: center; font-size: 11px; font-weight: 700; color: var(--sub); padding: 4px 0;
}
.attend-cal-dow.sun { color: var(--danger); }
.attend-cal-dow.sat { color: #4a8ab0; }
.attend-cal-body { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.attend-cal-cell {
  aspect-ratio: 1; border-radius: 8px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; font-size: 12px;
  background: var(--bg); position: relative;
}
.attend-cal-cell.empty { background: transparent; }
.attend-cal-cell.future { opacity: 0.3; }
.attend-cal-cell.sun .attend-cal-date { color: var(--danger); }
.attend-cal-cell.sat .attend-cal-date { color: #4a8ab0; }
.attend-cal-cell.off { background: var(--border); opacity: 0.5; }
.attend-cal-cell.worked { background: #e6f4ec; }
.attend-cal-cell.missing { background: #fde8e8; }
.attend-cal-date { font-weight: 700; font-size: 13px; color: var(--text); }
.attend-cal-dot {
  width: 6px; height: 6px; border-radius: 50%; margin-top: 2px;
}
.attend-cal-dot.worked { background: var(--accent); }
.attend-cal-dot.missing { background: var(--danger); }
.attend-cal-hours { font-size: 8px; color: var(--accent); font-weight: 700; margin-top: 1px; }
.attend-summary {
  display: flex; justify-content: space-between;
  margin-top: 12px; padding-top: 12px; border-top: 2px solid var(--gold);
  font-size: 13px; color: var(--sub);
}
.attend-summary strong { color: var(--gold); }

/* ====== BOTTOM NAV ====== */
.bottom-nav {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px;
  display: flex; background: #fff;
  border-top: 1px solid var(--border);
  padding: 6px 0 env(safe-area-inset-bottom, 8px);
  z-index: 200;
}
.nav-item {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  gap: 2px; padding: 8px 0; border: none; background: none;
  cursor: pointer; font-family: inherit; color: var(--sub);
  transition: color 0.2s;
}
.nav-item.active { color: var(--primary); font-weight: 700; }
.nav-item.active::before {
  content: ''; position: absolute; top: -1px; left: 50%; transform: translateX(-50%);
  width: 40px; height: 3px; background: var(--gold); border-radius: 0 0 4px 4px;
}
.nav-item.active .nav-icon {
  background: var(--gold); color: #fff;
  width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}
.nav-item { position: relative; }
.nav-icon { font-size: 22px; transition: all 0.2s; }
.nav-label { font-size: 10px; font-weight: 500; }
.nav-camera .nav-icon {
  background: var(--border); color: var(--sub); width: 44px; height: 44px;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 20px; margin-top: -14px;
  transition: all 0.2s;
}
.nav-camera.active .nav-icon {
  background: var(--gold); color: #fff;
  box-shadow: 0 2px 8px rgba(197,162,88,0.4);
}

/* ====== MODAL ====== */
.modal-overlay {
  display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5); z-index: 300;
  align-items: flex-end; justify-content: center;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--bg); border-radius: 20px 20px 0 0;
  width: 100%; max-width: 480px; max-height: 85vh;
  overflow-y: auto; padding: 20px; padding-bottom: 32px;
  animation: slideUp 0.3s ease;
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.modal-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px;
}
.modal-header h3 { font-size: 18px; font-weight: 700; color: var(--gold); font-family: monospace; }
.modal-close {
  background: none; border: none; font-size: 24px; color: var(--sub);
  cursor: pointer; padding: 4px;
}
.detail-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0; border-bottom: 1px solid var(--border);
}
.detail-label { font-size: 13px; color: var(--sub); }
.detail-value { font-size: 14px; font-weight: 500; color: var(--text); text-align: right; max-width: 60%; }

/* ====== FORM ====== */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 6px; color: var(--sub); }

/* ====== ANIMATIONS ====== */
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.tab-content.active { animation: fadeIn 0.25s ease; }

/* ====== TOAST ====== */
.toast {
  position: fixed; bottom: 100px; left: 50%; transform: translateX(-50%);
  background: var(--primary); color: #fff; padding: 12px 24px;
  border-radius: 12px; font-size: 14px; font-weight: 500;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2); z-index: 999;
  animation: fadeIn 0.3s ease;
}

/* ====== POPUP NOTIFICATION ====== */
.popup-notif {
  position: fixed; top: 0; left: 0; right: 0;
  max-width: 480px; margin: 0 auto;
  background: var(--card); padding: 14px 16px;
  border-bottom: 3px solid var(--gold);
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  z-index: 500;
  display: flex; align-items: center; gap: 12px;
  animation: slideDown 0.3s ease;
  cursor: pointer;
}
@keyframes slideDown { from { transform: translateY(-100%); } to { transform: translateY(0); } }
.popup-notif-icon { font-size: 24px; flex-shrink: 0; }
.popup-notif-body { flex: 1; }
.popup-notif-title { font-size: 12px; font-weight: 700; color: var(--danger); }
.popup-notif-text { font-size: 13px; color: var(--text); margin-top: 2px; }
.popup-notif-time { font-size: 10px; color: var(--sub); }
.popup-notif-close {
  background: none; border: none; font-size: 18px; color: var(--sub);
  cursor: pointer; padding: 4px; flex-shrink: 0;
}

/* 種別選択ボタン */
.category-select {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 16px;
}
.category-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: 14px;
  padding: 16px 18px;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.category-btn:active {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(197,162,88,0.2);
}
.category-icon { font-size: 28px; flex-shrink: 0; }
.category-name { font-size: 16px; font-weight: 700; color: var(--text); display: block; }
.category-desc { font-size: 12px; color: var(--sub); display: block; margin-top: 2px; }

/* 単品/まとめ切替 */
.bundle-btn { padding: 6px 16px; font-size: 13px; border-radius: 20px; }
.bundle-btn.active { background: var(--gold); color: #fff; border-color: var(--gold); }

/* ボトルネック */
.bottleneck-list { display: flex; flex-direction: column; gap: 10px; }
.bottleneck-item {
  display: flex; align-items: center; gap: 12px;
  background: var(--card); border-radius: 12px; padding: 12px 14px;
  box-shadow: 0 1px 4px var(--shadow);
}
.bn-icon { font-size: 22px; flex-shrink: 0; }
.bn-info { flex: 1; min-width: 0; }
.bn-label { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.bn-bar-wrap {
  width: 100%; height: 8px; background: #eee; border-radius: 4px; overflow: hidden;
}
.bn-bar { height: 100%; border-radius: 4px; transition: width 0.5s ease; }
.bn-bar-warn { background: var(--gold); }
.bn-bar-danger { background: var(--danger); }
.bn-bar-gold { background: var(--accent); }
.bn-count { font-size: 16px; font-weight: 700; color: var(--text); flex-shrink: 0; min-width: 50px; text-align: right; }
.bottleneck-item.alert { border-left: 4px solid var(--danger); }

/* チームKPI進捗 */
.kpi-grid { display: flex; flex-direction: column; gap: 8px; }
.kpi-item {
  background: var(--card); border-radius: 10px; padding: 10px 14px;
  box-shadow: 0 1px 2px var(--shadow);
}
.kpi-header { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.kpi-icon { font-size: 16px; }
.kpi-label { font-size: 13px; font-weight: 600; color: var(--text); }
.kpi-progress { display: flex; align-items: center; gap: 10px; }
.kpi-bar-bg {
  flex: 1; height: 8px; background: rgba(0,0,0,0.06); border-radius: 4px; overflow: hidden;
}
.kpi-bar {
  height: 100%; border-radius: 4px; transition: width 0.5s;
  background: var(--accent);
}
.kpi-bar.over { background: var(--gold); }
.kpi-count { font-size: 13px; font-weight: 700; color: var(--text); min-width: 60px; text-align: right; }

/* 検索結果カード */
.search-result-card {
  background: var(--card); border-radius: 12px; padding: 12px 14px;
  margin-bottom: 8px; box-shadow: 0 1px 3px var(--shadow); cursor: pointer;
}
.search-result-card:active { opacity: 0.8; }
.sr-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.sr-number { font-size: 13px; font-weight: 700; color: var(--gold); }
.sr-status {
  font-size: 10px; font-weight: 700; color: #fff; padding: 2px 8px;
  border-radius: 6px;
}
.sr-name { font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.sr-details { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.sr-tag {
  font-size: 11px; color: var(--sub); background: rgba(0,0,0,0.04);
  padding: 2px 8px; border-radius: 6px;
}
.sr-price { font-size: 12px; font-weight: 700; color: var(--text); }
.sr-staff { font-size: 11px; color: var(--sub); }
.sr-source { font-size: 10px; color: var(--sub); opacity: 0.6; }
.sr-action {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12px; color: var(--text); padding-top: 6px;
  border-top: 1px solid var(--border);
}
.sr-links { display: flex; gap: 8px; }
.sr-link {
  font-size: 11px; color: var(--gold); text-decoration: none; font-weight: 600;
}

/* 実績メモ */
.stat-note { font-size: 11px; color: var(--sub); text-align: center; margin-top: 8px; }

/* お知らせ空 */
.empty-notice { font-size: 13px; color: var(--sub); text-align: center; padding: 12px; }

/* 折りたたみ */
.collapsible { cursor: pointer; display: flex; align-items: center; }
.collapse-arrow { margin-left: auto; font-size: 12px; color: var(--sub); transition: transform 0.2s; }
.collapse-arrow.open { transform: rotate(180deg); }
.collapse-count { font-size: 12px; font-weight: 400; color: var(--sub); margin-left: 8px; }
.collapsible-body { overflow: hidden; }

/* 出勤メンバーリスト */
.member-timeline { display: flex; flex-wrap: wrap; gap: 6px; }
.member-list-item {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; background: var(--card); border-radius: 16px;
  font-size: 12px; box-shadow: 0 1px 2px var(--shadow);
}
.member-list-name { font-weight: 600; color: var(--text); }
.cleaning-mark { font-size: 11px; }
.member-list-time { color: var(--sub); }
.member-company {
  font-size: 9px; color: var(--sub); background: rgba(0,0,0,0.05);
  padding: 0 4px; border-radius: 3px;
}
.member-list-break { font-size: 9px; color: var(--sub); }

/* 権限設定 */
.perm-checklist { display: flex; flex-direction: column; gap: 0; }
.perm-row {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; cursor: pointer;
  background: var(--card); border-radius: 10px; margin-bottom: 6px;
  box-shadow: 0 1px 3px var(--shadow);
}
.perm-row:active { opacity: 0.8; }
.perm-cb {
  width: 22px; height: 22px; accent-color: var(--gold); flex-shrink: 0;
}
.perm-name {
  font-size: 15px; color: var(--text); font-weight: 500; flex: 1;
}
.perm-role {
  font-size: 12px; color: var(--sub); font-weight: 500;
}

/* 機能ガイド */
.guide-card {
  background: var(--card); border-radius: 12px; padding: 16px;
  margin-bottom: 8px; box-shadow: 0 1px 3px var(--shadow);
}
.guide-card-header {
  display: flex; align-items: center; gap: 10px;
  font-size: 15px; font-weight: 700; color: var(--text);
  margin-bottom: 10px;
}
.guide-card-header .guide-icon { font-size: 22px; }
.guide-steps { padding-left: 4px; }
.guide-step {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 13px; color: var(--text); margin-bottom: 8px; line-height: 1.6;
}
.guide-step-num {
  background: var(--gold); color: #fff;
  width: 20px; height: 20px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; flex-shrink: 0; margin-top: 2px;
}
.guide-note {
  font-size: 12px; color: var(--danger); margin-top: 6px; padding-left: 30px;
}

/* 更新履歴 */
.changelog-entry {
  margin-bottom: 16px; background: var(--card); border-radius: 12px;
  padding: 14px 16px; box-shadow: 0 1px 3px var(--shadow);
}
.changelog-date {
  font-size: 13px; font-weight: 700; color: var(--text);
  margin-bottom: 10px; padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.changelog-item {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 13px; color: var(--text); margin-bottom: 8px; line-height: 1.5;
}
.changelog-badge {
  display: inline-block; padding: 3px 8px; border-radius: 6px;
  font-size: 10px; font-weight: 700; flex-shrink: 0; margin-top: 1px;
  letter-spacing: 0.5px;
}
.changelog-badge-new { background: #34C759; color: #fff; }
.changelog-badge-change { background: #007AFF; color: #fff; }
.changelog-badge-fix { background: #FF9500; color: #fff; }
.changelog-badge-init { background: #8E8E93; color: #fff; }

/* ホーム通知: 更新通知 */
.notice-badge.notice-update { background: #007AFF; }

/* メンション モーダル式 */
/* Google Chat リンク */
.gchat-links { display: flex; flex-direction: column; gap: 6px; }
.gchat-link {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; background: var(--card); border-radius: 12px;
  text-decoration: none; color: var(--text);
  box-shadow: 0 1px 3px var(--shadow); transition: opacity 0.15s;
}
.gchat-link:active { opacity: 0.7; }
.gchat-disabled { opacity: 0.4; pointer-events: none; }
.gchat-icon { font-size: 24px; flex-shrink: 0; }
.gchat-info { flex: 1; display: flex; flex-direction: column; }
.gchat-name { font-size: 14px; font-weight: 600; color: var(--text); }
.gchat-desc { font-size: 11px; color: var(--sub); margin-top: 2px; }
.gchat-arrow { font-size: 20px; color: var(--sub); flex-shrink: 0; }

/* AI相談チャット */
.ai-chat-container {
  display: flex; flex-direction: column;
  height: calc(100dvh - 380px); min-height: 200px;
}
.ai-chat-messages {
  flex: 1; overflow-y: auto; padding: 0 0 8px 0;
}
.ai-chat-suggestions {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding: 8px 0;
}
.suggestion-chip {
  padding: 6px 14px; border-radius: 18px;
  border: 1px solid var(--border); background: var(--card);
  color: var(--text); font-size: 12px; cursor: pointer;
  font-family: inherit; transition: all 0.15s;
}
.suggestion-chip:active {
  background: var(--gold); color: #0B1426; border-color: var(--gold);
}
.ai-chat-input-area {
  border-top: 1px solid var(--border); padding-top: 10px;
}

/* 休み希望 */
.leave-type-btns { display: flex; gap: 8px; }
.leave-type-btn {
  flex: 1; padding: 10px; border-radius: 10px;
  border: 2px solid var(--border); background: var(--card);
  color: var(--text); font-size: 14px; font-weight: 600;
  cursor: pointer; font-family: inherit; transition: all 0.15s;
}
.leave-type-btn.active {
  border-color: var(--gold); background: var(--gold); color: #0B1426;
}
.leave-type-btn:active { opacity: 0.7; }
/* 休み希望カレンダー */
.leave-cal-header {
  display: flex; align-items: center; justify-content: center;
  gap: 16px; margin-bottom: 8px;
}
.leave-cal-nav {
  background: none; border: none; font-size: 22px; color: var(--gold);
  cursor: pointer; padding: 4px 10px; font-weight: 700;
}
.leave-cal-title { font-size: 15px; font-weight: 700; color: var(--text); min-width: 120px; text-align: center; }
.leave-cal-grid {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px;
}
.leave-cal-dow {
  text-align: center; font-size: 11px; color: var(--sub); font-weight: 600;
  padding: 4px 0;
}
.leave-cal-dow:first-child { color: #FF3B30; }
.leave-cal-dow:last-child { color: #007AFF; }
.leave-cal-day {
  text-align: center; padding: 8px 0; border-radius: 8px;
  font-size: 13px; color: var(--text); cursor: pointer;
  background: var(--card); border: 2px solid transparent;
  transition: all 0.12s;
}
.leave-cal-day:active { opacity: 0.7; }
.leave-cal-day.selected {
  background: var(--gold); color: #0B1426; font-weight: 700;
  border-color: var(--gold);
}
.leave-cal-day.today { border-color: var(--accent); }
.leave-cal-day.past { opacity: 0.3; pointer-events: none; }
.leave-cal-day.empty { background: transparent; pointer-events: none; }
.leave-selected-dates {
  margin-top: 8px; font-size: 12px; color: var(--sub); min-height: 20px;
}
.leave-selected-dates .leave-date-tag {
  display: inline-block; background: var(--gold); color: #0B1426;
  padding: 2px 8px; border-radius: 8px; font-size: 11px;
  font-weight: 600; margin: 2px 2px;
}

/* 休み連絡 要約（折りたたみ時） */
.leave-summary {
  margin-top: 8px;
}
.leave-summary-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; background: var(--card); border-radius: 8px;
  margin-bottom: 4px; box-shadow: 0 1px 2px var(--shadow);
  font-size: 13px; color: var(--text);
}
.leave-summary-empty {
  font-size: 12px; color: var(--sub); padding: 4px 0;
}
/* 複数写真グリッド */
.photo-tip { font-size: 13px; color: var(--sub); line-height: 1.6; }
.photo-tip strong { color: var(--text); }
.photo-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  margin: 12px 0;
}
.photo-slot {
  aspect-ratio: 1; border-radius: 12px; border: 2px dashed var(--border);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  cursor: pointer; position: relative; overflow: hidden;
  background: var(--card); transition: border-color 0.15s;
}
.photo-slot:active { border-color: var(--gold); }
.photo-slot-label {
  font-size: 20px; font-weight: 700; color: var(--border);
}
.photo-slot-hint {
  font-size: 10px; color: var(--sub); margin-top: 2px; text-align: center;
}
.photo-slot.has-photo {
  border-style: solid; border-color: var(--gold);
}
.photo-slot.has-photo .photo-slot-label,
.photo-slot.has-photo .photo-slot-hint { display: none; }
.photo-slot-img {
  width: 100%; height: 100%; object-fit: cover; position: absolute;
  top: 0; left: 0; border-radius: 10px;
}
.photo-slot-remove {
  position: absolute; top: 4px; right: 4px;
  background: rgba(0,0,0,0.6); color: #fff; border: none;
  width: 22px; height: 22px; border-radius: 50%;
  font-size: 12px; cursor: pointer; z-index: 2;
}
/* 追加写真推奨メッセージ */
.needs-more-photos {
  background: rgba(255,149,0,0.1); border: 1px solid #FF9500;
  border-radius: 10px; padding: 12px; margin: 12px 0;
  font-size: 13px; color: var(--text); line-height: 1.6;
}

/* 一時保存（下書き） */
.draft-item {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; background: var(--card); border-radius: 10px;
  margin-bottom: 6px; box-shadow: 0 1px 3px var(--shadow);
  border-left: 3px solid #FF9500;
}
.draft-info { flex: 1; cursor: pointer; }
.draft-info:active { opacity: 0.7; }
.draft-name { font-size: 14px; font-weight: 600; color: var(--text); }
.draft-meta { font-size: 11px; color: var(--sub); margin-top: 2px; }
.draft-delete {
  background: none; border: none; color: var(--sub); font-size: 16px;
  cursor: pointer; padding: 4px 8px;
}

/* 今日の当番 */
.duty-cards {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.duty-card {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--card); border-radius: 16px;
  padding: 5px 12px; box-shadow: 0 1px 2px var(--shadow);
  border: 1.5px solid transparent; font-size: 12px;
}
.duty-card.duty-mine {
  border-color: var(--gold); background: rgba(197,162,88,0.08);
}
.duty-icon { font-size: 14px; }
.duty-label { color: var(--sub); font-size: 11px; }
.duty-name { font-weight: 700; color: var(--text); }
.duty-wide { }
.duty-wide .duty-name { font-size: 12px; }
.duty-absent { opacity: 0.5; border-color: var(--danger); }
.duty-absent .duty-name { color: var(--danger); font-size: 11px; }

/* 状態確認 */
.check-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px; background: var(--card); border-radius: 10px;
  margin-bottom: 8px; box-shadow: 0 1px 3px var(--shadow);
}
.check-question { font-size: 14px; color: var(--text); flex: 1; }
.check-buttons { display: flex; gap: 6px; flex-shrink: 0; }
.check-btn {
  padding: 6px 16px; border-radius: 8px; border: 2px solid var(--border);
  background: var(--card); color: var(--text); font-size: 13px;
  font-weight: 600; cursor: pointer; font-family: inherit;
}
.check-btn.active {
  border-color: var(--gold); background: var(--gold); color: #0B1426;
}

/* ステップ戻るボタン */
.step-back-btn {
  font-size: 13px; margin-bottom: 12px; color: var(--sub);
  border-color: var(--border); padding: 6px 14px;
}

/* AI判定中アニメーション */
.analyzing-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.7); z-index: 300;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.analyzing-spinner {
  width: 48px; height: 48px; border: 4px solid rgba(255,255,255,0.2);
  border-top-color: var(--gold); border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.analyzing-text {
  color: #fff; font-size: 16px; font-weight: 600; margin-top: 16px;
}
.analyzing-dots::after {
  content: ''; animation: dots 1.5s steps(4) infinite;
}
@keyframes dots {
  0% { content: ''; }
  25% { content: '.'; }
  50% { content: '..'; }
  75% { content: '...'; }
}
.analyzing-sub {
  color: rgba(255,255,255,0.5); font-size: 12px; margin-top: 8px;
}

.photo-count-msg {
  font-size: 12px; color: var(--sub); text-align: center; margin: 8px 0;
}

.leave-reason-chips { display: flex; gap: 6px; margin-bottom: 6px; }

/* 管理者：休み管理 */
.leave-admin-header { margin-bottom: 10px; }
.leave-admin-controls { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.leave-view-toggle {
  display: flex; border-radius: 8px; overflow: hidden;
  border: 1px solid var(--border);
}
.leave-toggle-btn {
  padding: 6px 14px; font-size: 12px; font-weight: 600;
  background: var(--card); color: var(--sub); border: none;
  cursor: pointer; font-family: inherit;
}
.leave-toggle-btn.active {
  background: var(--gold); color: #0B1426;
}
/* 申告リスト */
.leave-my-item {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px; background: var(--card); border-radius: 10px;
  margin-bottom: 6px; box-shadow: 0 1px 3px var(--shadow);
}
.leave-status {
  padding: 2px 8px; border-radius: 6px; font-size: 10px; font-weight: 700;
}
.leave-status-pending { background: #FF9500; color: #fff; }
.leave-status-approved { background: #34C759; color: #fff; }
/* 管理者カレンダー */
.leave-admin-cal {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px;
}
.leave-admin-cal-day {
  min-height: 48px; padding: 4px; background: var(--card);
  border-radius: 6px; font-size: 11px; position: relative;
}
.leave-admin-cal-day .day-num {
  font-weight: 700; color: var(--text); font-size: 12px;
}
.leave-admin-cal-dot {
  display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  margin: 1px;
}
.leave-admin-cal-dot.dot-欠勤 { background: #FF3B30; }
.leave-admin-cal-dot.dot-遅刻 { background: #FF9500; }
.leave-admin-cal-dot.dot-早退 { background: #007AFF; }
/* 管理者承認ボタン */
.leave-approve-btn {
  padding: 4px 10px; border-radius: 6px; border: none;
  background: #34C759; color: #fff; font-size: 11px;
  font-weight: 600; cursor: pointer; font-family: inherit;
}

.leave-history-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; background: var(--card); border-radius: 10px;
  margin-bottom: 6px; box-shadow: 0 1px 3px var(--shadow);
}
.leave-badge {
  padding: 3px 10px; border-radius: 6px; font-size: 11px;
  font-weight: 700; flex-shrink: 0;
}
.leave-badge-欠勤 { background: #FF3B30; color: #fff; }
.leave-badge-遅刻 { background: #FF9500; color: #fff; }
.leave-badge-早退 { background: #007AFF; color: #fff; }
.leave-detail { flex: 1; font-size: 13px; color: var(--text); }
.leave-date { font-size: 11px; color: var(--sub); }

.chat-mention-bar {
  display: flex; align-items: center; gap: 8px; margin-bottom: 8px;
}
.mention-open-btn {
  padding: 8px 16px; border-radius: 20px; border: 1px solid var(--gold);
  background: transparent; color: var(--gold); font-size: 13px;
  font-weight: 700; cursor: pointer; font-family: inherit; flex-shrink: 0;
}
.mention-open-btn:active { background: var(--gold); color: #0B1426; }
.mention-selected {
  font-size: 13px; color: var(--sub); overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap;
}
.mention-selected .mention-tag {
  display: inline-block; background: var(--gold); color: #0B1426;
  padding: 2px 8px; border-radius: 10px; font-size: 11px;
  font-weight: 700; margin-right: 4px;
}
.mention-modal { max-width: 340px; }
.mention-row {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; cursor: pointer; border-bottom: 1px solid #1a2035;
}
.mention-row:active { background: #2A3553; }
.mention-cb {
  width: 20px; height: 20px; accent-color: var(--gold); flex-shrink: 0;
}
.mention-avatar { font-size: 22px; flex-shrink: 0; }
.mention-name { font-size: 14px; color: var(--text); flex: 1; }
.mention-role { font-size: 11px; color: var(--sub); }
.mention-divider {
  height: 1px; background: #2A3553; margin: 4px 16px;
}

/* ====== 1枚目大きく ====== */
.photo-slot-main { grid-column: 1 / -1; aspect-ratio: 4/3; }

/* ====== 採寸入力 ====== */
.size-input-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.size-input-item label { font-size: 11px; color: var(--sub); display: block; margin-bottom: 2px; }
.size-input-item input { text-align: center; }

/* ====== AI編集可能フィールド ====== */
.ai-editable { cursor: pointer; border-bottom: 1px dashed var(--gold); }
.ai-editable:after { content: ' ✏️'; font-size: 10px; }

/* ====== ステータスタブ ====== */
.status-tabs {
  display: flex; gap: 4px; overflow-x: auto; padding: 8px 0; -webkit-overflow-scrolling: touch;
}
.status-tab {
  flex-shrink: 0; padding: 6px 12px; border-radius: 20px; font-size: 12px; font-weight: 600;
  background: var(--card); color: var(--sub); border: 1px solid rgba(255,255,255,0.08);
  cursor: pointer; white-space: nowrap;
}
.status-tab.active { background: var(--gold); color: #000; border-color: var(--gold); }
.status-tab span { font-weight: 700; }
.today-stats {
  padding: 8px 0; font-size: 13px; color: var(--sub);
}
.today-stats strong { color: var(--gold); }

/* ====== 出品ワーク画面 ====== */
.listing-work-card {
  background: var(--card); border-radius: 12px; padding: 16px; margin-bottom: 8px;
  border-left: 4px solid var(--gold); position: relative;
}
.listing-work-card.locked {
  border-left-color: var(--danger); opacity: 0.6;
}
.listing-lock-badge {
  position: absolute; top: 8px; right: 8px; background: var(--danger);
  color: #fff; font-size: 10px; padding: 2px 8px; border-radius: 10px;
}
.listing-priority {
  display: inline-block; padding: 2px 8px; border-radius: 10px;
  font-size: 11px; font-weight: 700; margin-right: 8px;
}
.priority-high { background: rgba(206,32,41,0.2); color: #CE2029; }
.priority-mid { background: rgba(197,162,88,0.2); color: #C5A258; }
.priority-low { background: rgba(0,107,63,0.2); color: #4CD964; }
.listing-mgmt { font-size: 13px; color: var(--sub); font-weight: 600; }
.listing-name { font-size: 15px; color: var(--text); font-weight: 600; margin-top: 4px; }
.listing-meta { font-size: 12px; color: var(--sub); margin-top: 4px; }
.listing-days { font-size: 11px; color: var(--danger); margin-top: 2px; }
.listing-actions { display: flex; gap: 8px; margin-top: 10px; }

/* 出品詳細モーダル */
.listing-detail-section { margin-top: 12px; }
.listing-copy-row {
  display: flex; align-items: center; background: rgba(255,255,255,0.03);
  border-radius: 8px; padding: 8px 12px; margin-bottom: 6px; gap: 8px;
}
.listing-copy-label { font-size: 11px; color: var(--sub); width: 60px; flex-shrink: 0; }
.listing-copy-value { font-size: 13px; color: var(--text); flex: 1; word-break: break-all; }
.listing-copy-btn {
  flex-shrink: 0; background: var(--gold); color: #000; border: none;
  border-radius: 6px; padding: 4px 10px; font-size: 11px; font-weight: 700; cursor: pointer;
}
.stopwatch { font-size: 24px; font-weight: 700; color: var(--gold); text-align: center; margin: 12px 0; }

/* ====== 保管場所グリッド（小） ====== */
.location-grid-small { grid-template-columns: repeat(5, 1fr); gap: 6px; }
.location-grid-small .location-btn { font-size: 12px; padding: 8px 4px; }
.loc-base.selected, .loc-detail.selected {
  background: var(--gold); color: #000; border-color: var(--gold);
}

/* ====== 管理番号バナー ====== */
.mgmt-num-banner {
  background: linear-gradient(135deg, rgba(197,162,88,0.2), rgba(197,162,88,0.05));
  border: 1px solid var(--gold); border-radius: 10px;
  padding: 8px 16px; margin-bottom: 12px; text-align: center;
  font-size: 16px; font-weight: 700; color: var(--gold);
}

/* ====== PIN入力 ====== */
.pin-input-row {
  display: flex; gap: 12px; justify-content: center; margin-top: 8px;
}
.pin-box {
  width: 48px; height: 56px; text-align: center; font-size: 24px; font-weight: 700;
  background: var(--card); border: 2px solid rgba(197,162,88,0.3); border-radius: 10px;
  color: var(--text); outline: none;
}
.pin-box:focus { border-color: var(--gold); }

/* ====== 写真追加 ====== */
.photo-add-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 8px;
}
.photo-add-slot {
  aspect-ratio: 1; border: 2px dashed rgba(197,162,88,0.4); border-radius: 10px;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  position: relative; overflow: hidden; background: rgba(255,255,255,0.03);
}
.photo-add-slot:active { background: rgba(197,162,88,0.1); }
.photo-add-plus { font-size: 24px; color: var(--gold); }
.photo-add-img {
  width: 100%; height: 100%; object-fit: cover; position: absolute;
  top: 0; left: 0; border-radius: 8px;
}

/* ====== お知らせ既読 ====== */
.notice-item { cursor: pointer; position: relative; }
.notice-read { opacity: 0.5; }
.notice-unread-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--danger);
  flex-shrink: 0; margin-left: 8px;
}

/* ====== ヘッダーアバター ====== */
.header-avatar-btn { position: relative; padding: 0; width: 32px; height: 32px; }
.header-avatar-img {
  width: 32px; height: 32px; border-radius: 50%; object-fit: cover;
  border: 2px solid var(--gold);
}
.header-avatar-btn .header-avatar-img + #headerAvatarFallback { display: none; }

/* ====== 取引ナビ ====== */
.torihiki-upload-area {
  background: var(--card); border: 2px dashed var(--gold); border-radius: 16px;
  padding: 40px 20px; text-align: center; cursor: pointer;
  transition: background 0.2s;
}
.torihiki-upload-area:active {
  background: rgba(197, 162, 88, 0.1);
}
.torihiki-upload-icon { font-size: 48px; margin-bottom: 12px; }
.torihiki-upload-text { font-size: 16px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.torihiki-upload-sub { font-size: 12px; color: var(--sub); }
.torihiki-result-card {
  background: var(--card); border-radius: 12px; padding: 16px; margin-top: 16px;
}
.torihiki-result-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,0.06);
}
.torihiki-result-row:last-child { border-bottom: none; }
.torihiki-result-label { font-size: 13px; color: var(--sub); }
.torihiki-result-value { font-size: 14px; color: var(--text); font-weight: 500; }
.torihiki-status-badge {
  display: inline-block; padding: 4px 12px; border-radius: 20px;
  font-size: 13px; font-weight: 600;
}
.torihiki-btn-group {
  display: flex; gap: 8px; margin-top: 16px;
}

@media (min-width: 769px) {
  body { max-width: 1024px; }
  .photo-grid { grid-template-columns: repeat(5, 1fr); }
  .location-grid { grid-template-columns: repeat(4, 1fr); }
  .location-grid-small { grid-template-columns: repeat(7, 1fr); }
  .status-tabs { flex-wrap: wrap; }
  .listing-work-card { padding: 20px; }
  .kpi-grid { grid-template-columns: repeat(3, 1fr); }
  .quick-actions { grid-template-columns: repeat(4, 1fr); }
}
