/* notify Phase1 — 通知センター */
:root {
  --bg: #f9fafb;
  --primary: #1a56db;
  --accent: #111827;
  --muted: #6b7280;
  --border: #e5e7eb;
  --unread: #ef4444;
  --high: #f59e0b;
  --urgent: #dc2626;
  --white: #fff;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Segoe UI", "Hiragino Sans", "Yu Gothic UI", sans-serif;
  background: var(--bg);
  color: var(--accent);
  line-height: 1.5;
}
a { color: var(--primary); text-decoration: none; }
.hidden { display: none !important; }

/* login */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.login-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 4px 12px rgba(0,0,0,.06);
}
.login-card h1 { margin: 0 0 .25rem; font-size: 1.75rem; color: var(--primary); }
.login-card .sub { color: var(--muted); margin: 0 0 1.5rem; font-size: .9rem; }
.field { margin-bottom: 1rem; }
.field label { display: block; font-size: .85rem; margin-bottom: .35rem; color: var(--muted); }
.field input {
  width: 100%;
  padding: .65rem .75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
}
.btn {
  display: inline-block;
  padding: .65rem 1.25rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  background: var(--primary);
  color: var(--white);
  width: 100%;
}
.btn:disabled { opacity: .6; cursor: not-allowed; }
.btn-secondary { background: var(--white); color: var(--accent); border: 1px solid var(--border); }
.error-msg { color: var(--urgent); font-size: .875rem; margin-top: .75rem; }
.hint { font-size: .8rem; color: var(--muted); margin-top: 1rem; }

/* app shell */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .75rem 1rem;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}
.app-header h1 { margin: 0; font-size: 1.15rem; color: var(--primary); }
.header-actions { display: flex; align-items: center; gap: .75rem; }
.badge-count {
  background: var(--unread);
  color: var(--white);
  font-size: .75rem;
  padding: .15rem .45rem;
  border-radius: 999px;
  min-width: 1.25rem;
  text-align: center;
}
.icon-btn {
  background: none;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  padding: .25rem;
}

.tabs {
  display: flex;
  background: var(--white);
  border-bottom: 1px solid var(--border);
}
.tabs button {
  flex: 1;
  padding: .75rem;
  border: none;
  background: none;
  cursor: pointer;
  font-size: .9rem;
  color: var(--muted);
  border-bottom: 2px solid transparent;
}
.tabs button.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 600;
}

.notif-list { list-style: none; margin: 0; padding: 0; }
.notif-item {
  display: block;
  padding: 1rem;
  border-bottom: 1px solid var(--border);
  background: var(--white);
  cursor: pointer;
  text-align: left;
  width: 100%;
  border-left: 4px solid transparent;
}
.notif-item.unread { background: #fef2f2; }
.notif-item.unread .notif-title { font-weight: 700; }
.notif-item.priority-high { border-left-color: var(--high); }
.notif-item.priority-urgent { border-left-color: var(--urgent); }
.notif-title { margin: 0 0 .25rem; font-size: 1rem; color: var(--accent); }
.notif-message {
  margin: 0 0 .5rem;
  font-size: .875rem;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.notif-meta { font-size: .75rem; color: var(--muted); }
.empty-state { padding: 3rem 1rem; text-align: center; color: var(--muted); }

.detail-panel {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 20;
}
.detail-panel .panel-inner {
  background: var(--white);
  width: 100%;
  max-width: 640px;
  max-height: 85vh;
  overflow-y: auto;
  border-radius: 16px 16px 0 0;
  padding: 1.25rem;
}
.detail-panel h2 { margin: 0 0 .75rem; font-size: 1.15rem; }
.detail-panel .body { white-space: pre-wrap; margin-bottom: 1rem; }
.panel-actions { display: flex; gap: .5rem; flex-wrap: wrap; }

.settings-wrap { max-width: 640px; margin: 0 auto; padding: 1.5rem 1rem; }
.settings-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 1rem;
}
.settings-card h2 { margin: 0 0 1rem; font-size: 1rem; color: var(--primary); }
.settings-row { margin-bottom: .5rem; font-size: .9rem; }
.settings-row span { color: var(--muted); display: inline-block; min-width: 5rem; }

@media (min-width: 600px) {
  .detail-panel { align-items: center; }
  .detail-panel .panel-inner { border-radius: 12px; }
}
