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

:root {
  --bg-gradient: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  --panel-bg: rgba(255, 255, 255, 0.85);
  --panel-border: rgba(0, 60, 136, 0.08);
  --panel-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.04), 0 4px 12px -2px rgba(0, 0, 0, 0.02);
  --text-primary: #000000; /* コーポレートカラー：黒 */
  --text-secondary: #334155;
  --text-muted: #64748b;
  --accent-cyan: #003c88; /* コーポレートカラー：青 (RGB: 0, 60, 136) */
  --accent-glow: rgba(0, 60, 136, 0.12);
  --accent-gold: #D0A900;
  --accent-gold-light: #FFF9E6;
  --accent-gold-glow: rgba(208, 169, 0, 0.15);
  --accent-amber: #b45309;
  --accent-emerald: #059669;
  --accent-rose: #be123c;
  --font-family: 'Inter', 'Noto Sans JP', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --border-radius-lg: 16px;
  --border-radius-md: 10px;
  --border-radius-sm: 6px;
}

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

body {
  font-family: var(--font-family);
  background: var(--bg-gradient);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  padding-top: 70px; /* height of fixed header */
  line-height: 1.6;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: rgba(0, 60, 136, 0.03);
}
::-webkit-scrollbar-thumb {
  background: rgba(0, 60, 136, 0.15);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-cyan);
}

/* Glassmorphism Panel Utility */
.glass-panel {
  background: var(--panel-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--panel-border);
  box-shadow: var(--panel-shadow);
  border-radius: var(--border-radius-lg);
  padding: 24px;
  transition: var(--transition-smooth);
}

/* Header */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 70px;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--panel-border);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 60, 136, 0.06);
  padding: 8px;
  border-radius: var(--border-radius-md);
  border: 1px solid rgba(0, 60, 136, 0.15);
}

h1.company-title {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  background: linear-gradient(to right, #000000, #003c88);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

h1.company-title span {
  font-size: 0.85rem;
  font-weight: 400;
  display: block;
  color: var(--text-secondary);
  -webkit-text-fill-color: var(--text-secondary);
}

/* Safety Slogan Banner */
.slogan-ticker {
  flex: 1;
  max-width: 500px;
  margin: 0 30px;
  background: rgba(251, 191, 36, 0.08);
  border: 1px solid rgba(251, 191, 36, 0.2);
  padding: 6px 16px;
  border-radius: 30px;
  font-size: 0.85rem;
  color: var(--accent-amber);
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  white-space: nowrap;
}

.slogan-ticker i {
  flex-shrink: 0;
  animation: pulse 2s infinite;
}

.slogan-text {
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* Admin Toggle Switch */
.admin-toggle-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  font-weight: 500;
}

.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 26px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.06);
  transition: .4s;
  border-radius: 34px;
  border: 1px solid var(--panel-border);
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

input:checked + .slider {
  background-color: var(--accent-cyan);
  box-shadow: 0 0 10px rgba(0, 60, 136, 0.3);
}

input:checked + .slider:before {
  transform: translateX(24px);
}

/* Main Container */
main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px 20px 60px 20px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 30px;
}

@media (min-width: 1200px) {
  main {
    /* minmax(0, ...) で中身の要素（テーブル等）による右側へのはみ出しを完全に防止 */
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  }
}

.main-column, .side-column {
  min-width: 0; /* はみ出し防止用セーフティ */
}

.main-column {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.side-column {
  align-self: start;
}

/* Search and Section Headers */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.section-title {
  font-size: 1.3rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 30px;
  height: 3px;
  background: var(--accent-gold);
  border-radius: 2px;
}

.section-title i {
  color: var(--accent-cyan);
}

/* Filters & Search */
.controls-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
  align-items: center;
  justify-content: space-between;
}

.filter-group {
  display: flex;
  gap: 8px;
}

.filter-btn {
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid var(--panel-border);
  color: var(--text-secondary);
  padding: 8px 16px;
  border-radius: 30px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  transition: var(--transition-smooth);
}

.filter-btn:hover {
  background: rgba(0, 0, 0, 0.08);
  color: var(--text-primary);
}

.filter-btn.active {
  background: var(--accent-cyan);
  border-color: var(--accent-cyan);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0, 60, 136, 0.25);
}

.search-input-wrapper {
  position: relative;
  max-width: 350px;
  width: 100%;
}

.search-input-wrapper i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
  pointer-events: none;
}

.search-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--panel-border);
  border-radius: 30px;
  padding: 10px 16px 10px 42px;
  color: var(--text-primary);
  font-size: 0.9rem;
  transition: var(--transition-smooth);
}

.search-input:focus {
  outline: none;
  border-color: var(--accent-cyan);
  background: #ffffff;
  box-shadow: 0 0 12px var(--accent-glow);
}

/* Dashboard: Active Sites Grid */
.sites-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

@media (min-width: 500px) {
  .sites-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* 写真エリア非表示 */
.site-image-wrapper {
  display: none !important;
}

.site-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  border-radius: var(--border-radius-lg);
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  box-shadow: var(--panel-shadow);
  transition: var(--transition-smooth);
}

.site-card:hover {
  transform: translateY(-5px);
  border-color: rgba(0, 60, 136, 0.3);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.06), 0 0 15px rgba(0, 60, 136, 0.05);
}

.site-image-wrapper {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
  background-color: #f1f5f9;
}

.site-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.site-card:hover .site-image {
  transform: scale(1.05);
}

.site-status-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 30px;
  font-size: 0.72rem;
  font-weight: 700;
  margin-bottom: 8px;
  box-shadow: none;
}

.status-基礎工事 { background: rgba(251, 191, 36, 0.25); color: #b45309; border: 1px solid rgba(251, 191, 36, 0.4); }
.status-上棟工事 { background: rgba(147, 51, 234, 0.15); color: #7c3aed; border: 1px solid rgba(147, 51, 234, 0.3); }
.status-内装工事 { background: rgba(59, 130, 246, 0.15); color: #2563eb; border: 1px solid rgba(59, 130, 246, 0.3); }
.status-竣工間近 { background: rgba(16, 185, 129, 0.15); color: #059669; border: 1px solid rgba(16, 185, 129, 0.3); }
.status-着工準備 { background: rgba(107, 114, 128, 0.15); color: #4b5563; border: 1px solid rgba(107, 114, 128, 0.3); }

.site-safety-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #059669;
  padding: 6px 12px;
  border-radius: 30px;
  font-size: 0.75rem;
  font-weight: 600;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  gap: 4px;
}

.site-card-body {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.site-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text-primary);
  line-height: 1.4;
}

.site-address {
  font-size: 0.8rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
}

.site-meta-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-bottom: 16px;
  font-size: 0.8rem;
  background: rgba(0, 60, 136, 0.02);
  padding: 10px 12px;
  border-radius: var(--border-radius-md);
  border: 1px solid rgba(0, 60, 136, 0.04);
}

.site-meta-item span {
  display: block;
  color: var(--text-secondary);
  font-size: 0.7rem;
  margin-bottom: 2px;
}

.site-meta-item strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* Progress Bar */
.site-progress-wrapper {
  margin-bottom: 20px;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.progress-label {
  color: var(--text-secondary);
}

.progress-percent {
  color: var(--accent-cyan);
}

.progress-bar-bg {
  width: 100%;
  height: 8px;
  background: rgba(0, 0, 0, 0.06);
  border-radius: 10px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: var(--accent-gold);
  border-radius: 10px;
  transition: width 1s ease-out;
  box-shadow: 0 0 8px rgba(208, 169, 0, 0.25);
}

/* Site Latest Update Bubble */
.site-update-bubble {
  background: rgba(0, 60, 136, 0.03);
  border-left: 3px solid var(--accent-cyan);
  padding: 10px 14px;
  border-radius: 0 var(--border-radius-md) var(--border-radius-md) 0;
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--text-primary);
  margin-top: auto; /* Push to bottom of card body */
}

/* Side Column: Tools Directory & FAQ */
.side-column {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

/* Quick Links Directory */
.links-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.link-category-block {
  margin-bottom: 12px;
}

.link-category-title {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-cyan);
  margin-bottom: 10px;
  padding-left: 10px;
  border-left: 3px solid var(--accent-gold);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* リンク集の一覧を幅均等の3列構成へ変更 */
.links-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

/* レスポンシブ対応：画面幅が狭いときは列数を自動調整 */
@media (max-width: 992px) {
  .links-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 576px) {
  .links-list {
    grid-template-columns: minmax(0, 1fr);
  }
}

.link-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border-radius: var(--border-radius-md);
  background: rgba(0, 60, 136, 0.04);
  border: 1px solid rgba(0, 60, 136, 0.18);
  text-decoration: none;
  color: inherit;
  transition: var(--transition-smooth);
}

.link-card:hover {
  background: rgba(0, 60, 136, 0.09);
  border-color: rgba(0, 60, 136, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 60, 136, 0.08);
}

.link-icon-box {
  width: 36px; /* 3列化に合わせてややコンパクトに */
  height: 36px;
  border-radius: var(--border-radius-sm);
  background: rgba(0, 60, 136, 0.03);
  border: 1px solid rgba(0, 60, 136, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  flex-shrink: 0;
  transition: var(--transition-smooth);
}

.link-card:hover .link-icon-box {
  background: rgba(0, 60, 136, 0.08);
  border-color: rgba(0, 60, 136, 0.25);
  color: var(--accent-cyan);
}

.link-content {
  flex-grow: 1;
  min-width: 0; /* テキスト溢れ防止 */
}

.link-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 3px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.link-title i.external-arrow {
  font-size: 0.75rem;
  opacity: 0;
  transform: translate(-3px, 3px);
  transition: var(--transition-smooth);
  color: var(--accent-cyan);
  flex-shrink: 0;
}

.link-card:hover .link-title i.external-arrow {
  opacity: 1;
  transform: translate(0, 0);
}

.link-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* FAQ Accordion Section */
.faq-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  border-radius: var(--border-radius-md);
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(0, 60, 136, 0.05);
  overflow: hidden;
  transition: var(--transition-smooth);
}

.faq-item:hover {
  border-color: rgba(0, 60, 136, 0.1);
  background: rgba(255, 255, 255, 0.75);
}

.faq-question-bar {
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  gap: 12px;
}

.faq-question {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  gap: 10px;
}

.faq-question span.faq-q-badge {
  color: var(--accent-gold);
  font-weight: 700;
}

.faq-chevron {
  color: var(--text-secondary);
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.faq-item.active .faq-chevron {
  transform: rotate(180deg);
  color: var(--accent-cyan);
}

.faq-item.active {
  border-color: rgba(0, 60, 136, 0.2);
  background: rgba(0, 60, 136, 0.01);
}

.faq-answer-pane {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0, 1, 0, 1);
}

.faq-item.active .faq-answer-pane {
  max-height: 1000px;
  transition: max-height 0.3s cubic-bezier(1, 0, 1, 0);
}

.faq-answer-content {
  padding: 10px 16px 12px 16px;
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
  border-top: 1px solid rgba(0, 60, 136, 0.04);
}

.dx-answer-content {
  padding: 10px 16px 12px 16px;
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.7;
  border-top: 1px solid rgba(0, 60, 136, 0.04);
}

.faq-category-tag {
  display: inline-block;
  font-size: 0.65rem;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(0, 60, 136, 0.06);
  color: var(--accent-cyan);
  border: 1px solid rgba(0, 60, 136, 0.15);
  margin-bottom: 8px;
}

.faq-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.faq-tag {
  font-size: 0.65rem;
  color: var(--text-muted);
}

/* Announcements Box */
.announcements-box {
  margin-bottom: 24px;
}

.announcements-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: 375px;
  overflow-y: auto;
  padding-right: 6px;
}

.announcement-item {
  position: relative;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(0, 60, 136, 0.06);
}

.announcement-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.announcement-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
}

.announcement-date {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-cyan);
}

.announcement-badge {
  font-size: 0.65rem;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--accent-gold-glow);
  color: var(--accent-gold);
  border: 1px solid rgba(208, 169, 0, 0.3);
}

.announcement-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.announcement-title:hover {
  color: var(--accent-cyan);
}

.announcement-content {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-top: 4px;
  line-height: 1.6;
  display: none;
}

.announcement-item.active .announcement-content {
  display: block;
}

/* Admin / CRUD controls */
.admin-only {
  display: none !important;
}

body.admin-mode .admin-only {
  display: flex !important;
}

body.admin-mode .admin-only-inline {
  display: inline-block !important;
}

.admin-card-actions {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 10;
  display: flex;
  gap: 8px;
}

.admin-btn {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #475569;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-smooth);
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.admin-btn:hover {
  background: var(--accent-cyan);
  color: #fff;
  border-color: var(--accent-cyan);
  box-shadow: 0 0 10px rgba(0, 60, 136, 0.3);
}

.admin-btn.btn-delete:hover {
  background: var(--accent-rose);
  color: #fff;
  border-color: var(--accent-rose);
  box-shadow: 0 0 10px rgba(190, 18, 60, 0.3);
}

.add-item-btn-container {
  display: flex;
  justify-content: center;
  margin-top: 16px;
}

.btn-add-item {
  background: rgba(0, 60, 136, 0.05);
  border: 1px dashed rgba(0, 60, 136, 0.3);
  color: var(--accent-cyan);
  width: 100%;
  padding: 12px;
  border-radius: var(--border-radius-md);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition-smooth);
}

.btn-add-item:hover {
  background: rgba(0, 60, 136, 0.1);
  border-style: solid;
  border-color: var(--accent-cyan);
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-container {
  width: 90%;
  max-width: 600px;
  background: #ffffff;
  border: 1px solid var(--panel-border);
  border-radius: var(--border-radius-lg);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  transform: translateY(20px);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.active .modal-container {
  transform: translateY(0);
}

.modal-header {
  padding: 20px 24px;
  background: #f8fafc;
  border-bottom: 1px solid var(--panel-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-title i {
  color: var(--accent-cyan);
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.2rem;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.modal-close:hover {
  color: var(--text-primary);
}

.modal-body {
  padding: 24px;
  max-height: 70vh;
  overflow-y: auto;
}

/* Forms styling */
.form-group {
  margin-bottom: 18px;
}

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

@media (min-width: 576px) {
  .form-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

input[type="text"],
input[type="number"],
input[type="date"],
input[type="url"],
input[type="password"],
select,
textarea {
  width: 100%;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: var(--border-radius-md);
  padding: 10px 14px;
  color: var(--text-primary);
  font-size: 0.9rem;
  transition: var(--transition-smooth);
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent-cyan);
  background: #ffffff;
  box-shadow: 0 0 10px var(--accent-glow);
}

/* Image Upload Widget */
.upload-widget {
  border: 2px dashed var(--panel-border);
  padding: 20px;
  border-radius: var(--border-radius-md);
  text-align: center;
  cursor: pointer;
  transition: var(--transition-smooth);
  background: rgba(255, 255, 255, 0.01);
}

.upload-widget:hover {
  border-color: var(--accent-cyan);
  background: rgba(0, 60, 136, 0.02);
}

.upload-widget i {
  font-size: 1.8rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.upload-widget p {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.upload-preview {
  margin-top: 12px;
  max-height: 150px;
  border-radius: var(--border-radius-md);
  overflow: hidden;
  display: none;
}

.upload-preview img {
  width: 100%;
  height: 150px;
  object-fit: cover;
}

.modal-footer {
  padding: 18px 24px;
  background: #f8fafc;
  border-top: 1px solid var(--panel-border);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.btn {
  padding: 10px 20px;
  border-radius: var(--border-radius-md);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
  border: 1px solid transparent;
}

.btn-secondary {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: var(--text-secondary);
}

.btn-secondary:hover {
  background: #e2e8f0;
  color: var(--text-primary);
}

.btn-primary {
  background: var(--accent-cyan);
  color: #ffffff;
}

.btn-primary:hover {
  background: #00295c;
  box-shadow: 0 4px 15px rgba(0, 60, 136, 0.3);
}

/* Animations */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.6;
    transform: scale(0.95);
  }
}

/* Custom Notification Toast */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #ffffff;
  border: 1px solid var(--accent-cyan);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08), 0 0 15px var(--accent-glow);
  padding: 14px 20px;
  border-radius: var(--border-radius-md);
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-primary);
  z-index: 9999;
  transform: translateY(100px);
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
  font-size: 0.85rem;
  font-weight: 500;
}

.toast.active {
  transform: translateY(0);
  opacity: 1;
}

.toast-icon {
  color: var(--accent-cyan);
  display: flex;
}

.toast-success {
  border-color: var(--accent-emerald);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15), 0 0 15px rgba(16, 185, 129, 0.15);
}

.toast-success .toast-icon {
  color: var(--accent-emerald);
}

/* Helper styles */
.text-center { text-align: center; }
.mt-4 { margin-top: 16px; }
.mb-2 { margin-bottom: 8px; }
.mr-2 { margin-right: 8px; }

.drop-active {
  border-color: var(--accent-cyan) !important;
  background: rgba(0, 60, 136, 0.02) !important;
}

/* FAQ Attachment Download Button styling */
.faq-attachment-wrapper {
  margin-top: 14px;
}

.faq-attachment-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(0, 60, 136, 0.03);
  border: 1px solid rgba(0, 60, 136, 0.08);
  border-radius: var(--border-radius-md);
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 600;
  transition: var(--transition-smooth);
  cursor: pointer;
}

.faq-attachment-btn:hover {
  background: rgba(0, 60, 136, 0.08);
  border-color: rgba(0, 60, 136, 0.3);
  color: var(--accent-cyan);
  box-shadow: 0 4px 12px rgba(0, 60, 136, 0.1);
  transform: translateY(-1px);
}

.faq-attachment-btn i {
  color: inherit;
}

/* Spinner for loader icon */
.spin {
  animation: spin 1.2s linear infinite;
  display: inline-block;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Custom Slogan edit and Sheets sync styling */
body.admin-mode #btn-edit-slogan {
  display: inline-flex !important;
}

body.admin-mode #sheet-sync-controls {
  display: flex !important;
}

#btn-edit-slogan {
  transition: var(--transition-smooth);
}

#btn-edit-slogan:hover {
  color: var(--accent-cyan) !important;
  transform: scale(1.15);
}

.btn-sync-sheets:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.35) !important;
}

.btn-sync-sheets:active, .btn-sync-config:active {
  transform: translateY(0);
}

.btn-sync-config:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(75, 85, 99, 0.35) !important;
}