/* OZE SCHEDULE HUB - Custom Styles */

:root {
  --oze-blue: #00BFFF;
  --oze-cyan: #00E5FF;
  --oze-dark: #0A0E1A;
  --oze-darker: #060910;
  --oze-card: #0F1629;
  --oze-border: #1E2D4A;
  --oze-text: #B0C4DE;
  --oze-red: #FF4655;
  --oze-green: #2ECC71;
  --oze-purple: #9B59B6;
  --oze-orange: #CF7336;
}

* { box-sizing: border-box; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--oze-dark);
  color: #E0E8F0;
  min-height: 100vh;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--oze-darker); }
::-webkit-scrollbar-thumb { background: var(--oze-border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--oze-blue); }

/* Animations */
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideIn { from { opacity: 0; transform: translateX(-20px); } to { opacity: 1; transform: translateX(0); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
@keyframes shimmer { 0% { background-position: -1000px 0; } 100% { background-position: 1000px 0; } }
@keyframes glow { 0%, 100% { box-shadow: 0 0 5px rgba(0,191,255,0.3); } 50% { box-shadow: 0 0 20px rgba(0,191,255,0.6), 0 0 40px rgba(0,191,255,0.3); } }

.fade-in { animation: fadeIn 0.3s ease-out; }
.slide-in { animation: slideIn 0.3s ease-out; }

/* Cards */
.card {
  background: var(--oze-card);
  border: 1px solid var(--oze-border);
  border-radius: 12px;
  transition: all 0.2s ease;
}
.card:hover { border-color: rgba(0,191,255,0.3); box-shadow: 0 4px 20px rgba(0,191,255,0.1); }
.card-glow { animation: glow 2s ease-in-out infinite; }

/* Buttons */
.btn-primary {
  background: linear-gradient(135deg, var(--oze-blue), #0080FF);
  color: white;
  border: none;
  padding: 0.5rem 1.25rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 15px rgba(0,191,255,0.4); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-secondary {
  background: transparent;
  color: var(--oze-blue);
  border: 1px solid var(--oze-blue);
  padding: 0.5rem 1.25rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.btn-secondary:hover { background: rgba(0,191,255,0.1); }

.btn-danger {
  background: linear-gradient(135deg, #FF4655, #CC2233);
  color: white;
  border: none;
  padding: 0.5rem 1.25rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.btn-danger:hover { transform: translateY(-1px); box-shadow: 0 4px 15px rgba(255,70,85,0.4); }

.btn-success {
  background: linear-gradient(135deg, #2ECC71, #27AE60);
  color: white;
  border: none;
  padding: 0.5rem 1.25rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.btn-success:hover { transform: translateY(-1px); box-shadow: 0 4px 15px rgba(46,204,113,0.4); }

.btn-ghost {
  background: transparent;
  color: var(--oze-text);
  border: 1px solid var(--oze-border);
  padding: 0.4rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.btn-ghost:hover { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.2); color: white; }

.btn-sm { padding: 0.3rem 0.75rem; font-size: 0.85rem; }
.btn-lg { padding: 0.75rem 1.75rem; font-size: 1.05rem; }

/* Form elements */
.form-input {
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--oze-border);
  border-radius: 8px;
  padding: 0.6rem 0.9rem;
  color: white;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  outline: none;
}
.form-input:focus { border-color: var(--oze-blue); box-shadow: 0 0 0 3px rgba(0,191,255,0.15); }
.form-input::placeholder { color: rgba(176,196,222,0.5); }

.form-select {
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--oze-border);
  border-radius: 8px;
  padding: 0.6rem 0.9rem;
  color: white;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  outline: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2300BFFF' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 2.5rem;
}
.form-select:focus { border-color: var(--oze-blue); box-shadow: 0 0 0 3px rgba(0,191,255,0.15); }
.form-select option { background: var(--oze-card); color: white; }

.form-textarea {
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--oze-border);
  border-radius: 8px;
  padding: 0.6rem 0.9rem;
  color: white;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  outline: none;
  resize: vertical;
  min-height: 80px;
}
.form-textarea:focus { border-color: var(--oze-blue); box-shadow: 0 0 0 3px rgba(0,191,255,0.15); }
.form-textarea::placeholder { color: rgba(176,196,222,0.5); }

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--oze-text);
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Header */
#main-header {
  background: rgba(6,9,16,0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--oze-border);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: 64px;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}
.header-logo {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--oze-blue), #0060D0);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1.1rem;
  color: white;
}
.header-logo-img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 8px;
  flex-shrink: 0;
  filter: drop-shadow(0 0 6px rgba(0, 191, 255, 0.4));
  transition: filter 0.2s ease;
}
.header-logo-img:hover {
  filter: drop-shadow(0 0 10px rgba(0, 191, 255, 0.7));
}
/* Full-width horizontal logo for header */
.header-logo-full {
  height: 36px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 0 6px rgba(0, 191, 255, 0.35));
  transition: filter 0.2s ease;
}
.header-logo-full:hover {
  filter: drop-shadow(0 0 12px rgba(0, 191, 255, 0.65));
}
@media (max-width: 480px) {
  .header-logo-full {
    height: 28px;
    max-width: 120px;
  }
  /* ヘッダーのはみ出し防止 */
  #main-header > div {
    padding: 0 0.5rem !important;
    gap: 0.5rem !important;
  }
  #main-header .header-brand {
    gap: 0.4rem;
    min-width: 0;
  }
  #main-header .header-brand > * {
    min-width: 0;
  }
  .provided-badge {
    display: none;
  }
  /* ヘッダー右側のアイコン間隔を縮める */
  #main-header > div > div:last-child {
    gap: 0.3rem !important;
  }
}
.header-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: white;
  letter-spacing: 0.05em;
}
.header-subtitle {
  font-size: 0.65rem;
  color: var(--oze-blue);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.provided-badge {
  background: rgba(0,191,255,0.1);
  border: 1px solid rgba(0,191,255,0.3);
  color: var(--oze-blue);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

/* Sidebar */
#sidebar {
  position: fixed;
  top: 64px;
  left: 0;
  bottom: 0;
  width: 240px;
  background: rgba(6,9,16,0.9);
  border-right: 1px solid var(--oze-border);
  overflow-y: auto;
  transition: transform 0.3s ease;
  z-index: 50;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  color: var(--oze-text);
  text-decoration: none;
  border-radius: 8px;
  margin: 0.15rem 0.5rem;
  cursor: pointer;
  transition: all 0.15s ease;
  font-size: 0.9rem;
  font-weight: 500;
  border: none;
  background: none;
  width: calc(100% - 1rem);
  text-align: left;
}
.nav-item:hover { background: rgba(0,191,255,0.08); color: white; }
.nav-item.active { background: rgba(0,191,255,0.15); color: var(--oze-blue); }
.nav-item .nav-icon { width: 20px; text-align: center; flex-shrink: 0; }

.nav-section-title {
  font-size: 0.68rem;
  font-weight: 700;
  color: rgba(176,196,222,0.5);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 0.75rem 1rem 0.3rem;
}

/* Main content */
#main-content {
  margin-left: 240px;
  margin-top: 64px;
  min-height: calc(100vh - 64px);
  padding: 1.5rem;
}

/* Division tabs */
.division-tabs {
  display: flex;
  gap: 0.3rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scrollbar-width: none;
}
.division-tabs::-webkit-scrollbar { display: none; }

.division-tab {
  flex-shrink: 0;
  padding: 0.5rem 1.25rem;
  border-radius: 8px;
  border: 1px solid var(--oze-border);
  background: transparent;
  color: var(--oze-text);
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}
.division-tab:hover { background: rgba(255,255,255,0.05); }
.division-tab.active { color: white; border-color: transparent; }

/* Event cards */
.event-card {
  background: var(--oze-card);
  border: 1px solid var(--oze-border);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.2s ease;
  position: relative;
  cursor: pointer;
}
.event-card:hover { transform: translateY(-2px); border-color: rgba(0,191,255,0.3); box-shadow: 0 8px 25px rgba(0,0,0,0.3); }
.event-card.pinned::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #FFD700, #FFA500);
}
.event-card.important::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--oze-red), #FF6B6B);
}

.event-banner {
  width: 100%;
  height: 140px;
  object-fit: cover;
}

/* RSVP Buttons */
.rsvp-btn {
  padding: 0.5rem 1rem;
  border-radius: 8px;
  border: 2px solid transparent;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.85rem;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
/* 未選択・有効なボタン */
.rsvp-attend { background: rgba(46,204,113,0.1); border-color: rgba(46,204,113,0.4); color: #2ECC71; }
.rsvp-attend:not(:disabled):hover { background: #2ECC71; color: white; border-color: #2ECC71; }
.rsvp-decline { background: rgba(255,70,85,0.1); border-color: rgba(255,70,85,0.4); color: var(--oze-red); }
.rsvp-decline:not(:disabled):hover { background: var(--oze-red); color: white; border-color: var(--oze-red); }
.rsvp-maybe { background: rgba(255,165,0,0.1); border-color: rgba(255,165,0,0.4); color: #FFA500; }
.rsvp-maybe:not(:disabled):hover { background: #FFA500; color: white; border-color: #FFA500; }
/* 選択済み（disabled）ボタン：色を強調、カーソルをデフォルトに */
.rsvp-attend.selected { background: #2ECC71; color: white; border-color: #2ECC71; box-shadow: 0 0 0 3px rgba(46,204,113,0.35); cursor: default; opacity: 1; }
.rsvp-decline.selected { background: var(--oze-red); color: white; border-color: var(--oze-red); box-shadow: 0 0 0 3px rgba(255,70,85,0.35); cursor: default; opacity: 1; }
.rsvp-maybe.selected { background: #FFA500; color: white; border-color: #FFA500; box-shadow: 0 0 0 3px rgba(255,165,0,0.35); cursor: default; opacity: 1; }
/* disabled属性のデフォルトスタイルを上書き（selected classで見た目を制御済み） */
.rsvp-btn:disabled { opacity: 1; pointer-events: none; }

/* Status badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.badge-active { background: rgba(46,204,113,0.15); color: #2ECC71; border: 1px solid rgba(46,204,113,0.3); }
.badge-pending { background: rgba(255,165,0,0.15); color: #FFA500; border: 1px solid rgba(255,165,0,0.3); }
.badge-inactive { background: rgba(176,196,222,0.1); color: var(--oze-text); border: 1px solid rgba(176,196,222,0.2); }
.badge-admin { background: rgba(0,191,255,0.15); color: var(--oze-blue); border: 1px solid rgba(0,191,255,0.3); }
.badge-member { background: rgba(155,89,182,0.15); color: #9B59B6; border: 1px solid rgba(155,89,182,0.3); }
.badge-cancelled { background: rgba(255,70,85,0.15); color: var(--oze-red); border: 1px solid rgba(255,70,85,0.3); }
.badge-scrim { background: rgba(0,191,255,0.15); color: var(--oze-blue); }
.badge-tournament { background: rgba(255,215,0,0.15); color: #FFD700; }
.badge-meeting { background: rgba(46,204,113,0.15); color: #2ECC71; }
.badge-practice { background: rgba(155,89,182,0.15); color: #9B59B6; }
.badge-team_event { background: rgba(255,165,0,0.15); color: #FFA500; }
.badge-other { background: rgba(149,165,166,0.15); color: #95A5A6; }

/* Calendar */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: var(--oze-border);
  border-radius: 8px;
  overflow: hidden;
}
.calendar-day {
  background: var(--oze-card);
  min-height: 80px;
  padding: 0.4rem;
  cursor: pointer;
  transition: background 0.15s;
  overflow: hidden; /* タイトルが長くてもセルから溢れないよう */
  min-width: 0;
}
.calendar-day:hover { background: rgba(0,191,255,0.07); }
.calendar-day.today { background: rgba(0,191,255,0.12); border: 1px solid rgba(0,191,255,0.4); }
.calendar-day.other-month { opacity: 0.35; }
.calendar-day.sunday { background: rgba(255,107,107,0.08); }
.calendar-day.sunday:hover { background: rgba(255,107,107,0.14); }
.calendar-day.saturday { background: rgba(79,195,247,0.08); }
.calendar-day.saturday:hover { background: rgba(79,195,247,0.14); }
.calendar-day.holiday { background: rgba(255,107,107,0.08); }
.calendar-day.holiday:hover { background: rgba(255,107,107,0.14); }
.calendar-holiday-label {
  font-size: 0.55rem;
  color: #FF6B6B;
  line-height: 1.1;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.calendar-day-header {
  font-size: 0.75rem;
  font-weight: 600;
  text-align: center;
  padding: 0.5rem;
  background: rgba(0,0,0,0.3);
  color: var(--oze-text);
}
.calendar-event-dot {
  font-size: 0.65rem;
  padding: 0.1rem 0.3rem;
  border-radius: 3px;
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  max-width: 100%;
  display: block;
  box-sizing: border-box;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.modal-container {
  background: var(--oze-card);
  border: 1px solid var(--oze-border);
  border-radius: 16px;
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  animation: fadeIn 0.2s ease-out;
}
.modal-lg { max-width: 800px; }
.modal-sm { max-width: 400px; }
.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--oze-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  background: var(--oze-card);
  z-index: 1;
}
.modal-body { padding: 1.5rem; }
.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--oze-border);
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}

/* Toast notifications */
#toast-container {
  position: fixed;
  top: 80px;
  right: 1rem;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.toast {
  background: var(--oze-card);
  border: 1px solid var(--oze-border);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  min-width: 280px;
  max-width: 380px;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  box-shadow: 0 8px 25px rgba(0,0,0,0.3);
  animation: slideIn 0.3s ease-out;
}
.toast.success { border-left: 3px solid #2ECC71; }
.toast.error { border-left: 3px solid var(--oze-red); }
.toast.info { border-left: 3px solid var(--oze-blue); }
.toast.warning { border-left: 3px solid #FFA500; }

/* Tables */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  padding: 0.65rem 1rem;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--oze-text);
  border-bottom: 1px solid var(--oze-border);
}
.data-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(30,45,74,0.5);
  font-size: 0.9rem;
}
.data-table tr:hover td { background: rgba(0,191,255,0.03); }
.data-table tr:last-child td { border-bottom: none; }

/* Division page header */
.division-header {
  background: linear-gradient(135deg, rgba(0,0,0,0.5), rgba(0,0,0,0.2));
  border: 1px solid var(--oze-border);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  position: relative;
  overflow: hidden;
}
.division-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0,191,255,0.05), transparent);
  pointer-events: none;
}

/* Loading */
.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(0,191,255,0.1);
  border-top-color: var(--oze-blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Skeleton loader */
.skeleton {
  background: linear-gradient(90deg, rgba(30,45,74,0.8) 25%, rgba(30,45,74,0.4) 50%, rgba(30,45,74,0.8) 75%);
  background-size: 1000px 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 6px;
}

/* Footer */
#app-footer {
  margin-left: 240px;
  background: rgba(6,9,16,0.95);
  border-top: 1px solid var(--oze-border);
  padding: 1rem 1.5rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--oze-text);
}

/* Responsive */
/* Event card grid */
.event-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
  min-width: 0;
}

/* Dashboard main grid: legacy (kept for reference) */
.dashboard-main-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 1.5rem;
}

/* Dashboard top row: Stats(2x2) + Notifications + Recent Updates を横3列 */
.dashboard-top-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
  align-items: start;
}
/* Stats は 2x2 サブグリッド */
.dashboard-stats-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
/* 通知・最近の更新カード */
.dashboard-side-card {
  height: 100%;
  box-sizing: border-box;
}

/* Event detail: 2-col on desktop, 1-col on mobile */
.event-detail-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 1.5rem;
  align-items: start;
}
.event-detail-main { min-width: 0; }
.event-detail-side { display: flex; flex-direction: column; gap: 1rem; }

@media (max-width: 768px) {
  #sidebar { transform: translateX(-100%); width: 260px; }
  #sidebar.open { transform: translateX(0); box-shadow: 0 0 40px rgba(0,0,0,0.5); }
  #main-content { margin-left: 0; padding: 0.75rem; }
  #app-footer { margin-left: 0; }
  .modal-container { margin: 0; border-radius: 16px 16px 0 0; position: fixed; bottom: 0; left: 0; right: 0; max-height: 90vh; overflow-y: auto; }
  .calendar-day { min-height: 50px; }

  /* Dashboard responsive fixes */
  .dashboard-main-grid {
    grid-template-columns: 1fr;
  }
  /* ダッシュボードtop rowをスマホで縦積み */
  .dashboard-top-row {
    grid-template-columns: 1fr;
  }
  .dashboard-stats-block {
    grid-template-columns: 1fr 1fr;
  }

  /* Event detail responsive: stack side panel below main */
  .event-detail-grid {
    grid-template-columns: 1fr;
  }
  .event-detail-side {
    order: 2; /* コメントの下に表示 */
  }
  .event-detail-main {
    order: 1;
  }
  .page-title { font-size: 1.2rem; }
  .stat-value { font-size: 1.5rem; }
  .stat-card { padding: 0.9rem; }

  /* Event card full width on mobile */
  .event-card { width: 100%; }

  /* イベントカードグリッドをモバイルで1列に */
  .event-card-grid {
    grid-template-columns: 1fr !important;
  }

  /* ダッシュボード右カラム内のカードを全幅に */
  .notif-item {
    min-width: 0;
    box-sizing: border-box;
  }

  /* ダッシュボードの近日イベント・通知・最近の更新カードの横幅制御 */
  #main-content .card {
    min-width: 0;
    box-sizing: border-box;
    overflow: hidden;
  }
  #main-content .card > * {
    min-width: 0;
  }

  /* Page header wrap on mobile */
  .page-header > div { flex-wrap: wrap; gap: 0.75rem; }
}

/* Overlay for mobile sidebar */
#sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 49;
}
@media (max-width: 768px) {
  #sidebar-overlay.show { display: block; }
}

/* Page header */
.page-header {
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--oze-border);
  padding-bottom: 1rem;
}
.page-title { font-size: 1.5rem; font-weight: 800; color: white; }
.page-subtitle { font-size: 0.85rem; color: var(--oze-text); margin-top: 0.25rem; }

/* Stats cards */
.stat-card {
  background: var(--oze-card);
  border: 1px solid var(--oze-border);
  border-radius: 12px;
  padding: 1.25rem;
  position: relative;
  overflow: hidden;
}
.stat-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--oze-blue), transparent);
}
.stat-value { font-size: 2rem; font-weight: 800; color: white; }
.stat-label { font-size: 0.8rem; color: var(--oze-text); margin-top: 0.25rem; text-transform: uppercase; letter-spacing: 0.08em; }

/* Notification dot */
.notif-dot {
  width: 8px;
  height: 8px;
  background: var(--oze-red);
  border-radius: 50%;
  position: absolute;
  top: 4px;
  right: 4px;
  border: 2px solid var(--oze-darker);
}

/* Search bar */
.search-bar {
  position: relative;
  display: flex;
  align-items: center;
}
.search-bar i {
  position: absolute;
  left: 12px;
  color: var(--oze-text);
  pointer-events: none;
}
.search-bar input {
  padding-left: 2.5rem;
}

/* Avatar */
.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--oze-blue), #0060D0);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
  color: white;
}
.avatar-lg { width: 56px; height: 56px; font-size: 1.2rem; }
.avatar-sm { width: 28px; height: 28px; font-size: 0.75rem; }

/* Dropdown */
.dropdown {
  position: relative;
}
.dropdown-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  background: var(--oze-card);
  border: 1px solid var(--oze-border);
  border-radius: 10px;
  min-width: 180px;
  z-index: 200;
  overflow: hidden;
  animation: fadeIn 0.15s ease-out;
  box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}
.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 1rem;
  color: var(--oze-text);
  cursor: pointer;
  transition: all 0.15s;
  font-size: 0.9rem;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}
.dropdown-item:hover { background: rgba(0,191,255,0.08); color: white; }
.dropdown-item.danger { color: var(--oze-red); }
.dropdown-item.danger:hover { background: rgba(255,70,85,0.1); }
.dropdown-divider { height: 1px; background: var(--oze-border); margin: 0.3rem 0; }

/* Progress bar */
.progress-bar {
  height: 6px;
  background: rgba(30,45,74,0.8);
  border-radius: 9999px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  border-radius: 9999px;
  background: linear-gradient(90deg, var(--oze-blue), #0060D0);
  transition: width 0.5s ease;
}

/* Tabs */
.tab-group {
  display: flex;
  border-bottom: 1px solid var(--oze-border);
  gap: 0;
  overflow-x: auto;
}
.tab-item {
  padding: 0.65rem 1.25rem;
  color: var(--oze-text);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  transition: all 0.15s;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  margin-bottom: -1px;
}
.tab-item:hover { color: white; }
.tab-item.active { color: var(--oze-blue); border-bottom-color: var(--oze-blue); }

/* Login page */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(0,120,220,0.18) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 20% 80%, rgba(0,60,140,0.12) 0%, transparent 55%),
    radial-gradient(ellipse 60% 40% at 80% 90%, rgba(0,30,80,0.10) 0%, transparent 55%),
    var(--oze-darker);
  position: relative;
  overflow: hidden;
}
/* subtle hex grid overlay */
.login-page::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,191,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,191,255,0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}
.login-card {
  background: var(--oze-card);
  border: 1px solid var(--oze-border);
  border-radius: 16px;
  padding: 2.5rem;
  width: 100%;
  max-width: 420px;
  animation: fadeIn 0.4s ease-out;
  position: relative;
  z-index: 1;
  box-shadow: 0 0 40px rgba(0,100,200,0.08), 0 8px 32px rgba(0,0,0,0.4);
}
.login-brand-area {
  position: relative;
  z-index: 1;
}

/* Misc */
.text-gradient {
  background: linear-gradient(135deg, var(--oze-blue), var(--oze-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.border-gradient {
  border: 1px solid;
  border-image: linear-gradient(135deg, var(--oze-blue), transparent) 1;
}
.glow-blue { text-shadow: 0 0 20px rgba(0,191,255,0.5); }
.divider { height: 1px; background: var(--oze-border); margin: 1rem 0; }
.hidden { display: none !important; }

/* Rich text area */
.rich-text { line-height: 1.7; color: var(--oze-text); }
.rich-text p { margin-bottom: 0.75rem; }

/* Image upload */
.image-upload-area {
  border: 2px dashed var(--oze-border);
  border-radius: 10px;
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--oze-text);
}
.image-upload-area:hover { border-color: var(--oze-blue); background: rgba(0,191,255,0.05); }

/* Candidate date item */
.candidate-item {
  background: rgba(0,191,255,0.05);
  border: 1px solid rgba(0,191,255,0.2);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

/* Unread notification */
.notif-item { padding: 0.85rem 1rem; border-bottom: 1px solid rgba(30,45,74,0.5); cursor: pointer; transition: background 0.15s; }
.notif-item:hover { background: rgba(0,191,255,0.04); }
.notif-item.unread { background: rgba(0,191,255,0.06); border-left: 3px solid var(--oze-blue); }

/* Color dot */
.color-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }

/* Pinned/Important star */
.pin-star { color: #FFD700; }
.important-star { color: var(--oze-red); }
