:root {
  --primary: #2563eb;
  --border: #e5e7eb;
  --muted: #6b7280;
}

.hidden { display: none !important; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

header {
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  position: sticky;
  top: 0;
  z-index: 20;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  height: 96px;
}

.logo-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.logo-box {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: #f3f4f6;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 20px;
  color: #4b5563;
  letter-spacing: 0.01em;
}

.logo-text-main {
  font-size: 22px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.logo-text-sub {
  font-size: 13px;
  color: #6b7280;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.header-nav {
  display: inline-flex;
  gap: 36px;
  font-size: 16px;
  justify-self: center;
}

.header-nav button {
  border: none;
  background: none;
  cursor: pointer;
  color: #4b5563;
  font-weight: 500;
  letter-spacing: -0.01em;
  padding: 6px 0;
  transition: color 0.15s ease, transform 0.15s ease;
}

.header-nav button:hover {
  color: #111827;
  transform: translateY(-1px);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
}

.icon-btn {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.icon-btn:hover { background: #f3f4f6; border-color: #d1d5db; }
.icon-btn svg { width: 20px; height: 20px; color: #4b5563; }

.icon-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #fff;
}

.icon-badge.muted { display: none; }

.profile-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #ffffff;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.profile-btn:hover { background: #f3f4f6; border-color: #d1d5db; }
.profile-btn svg { width: 20px; height: 20px; color: #4b5563; }

.profile-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.08);
  width: 220px;
  padding: 8px 0;
  z-index: 30;
  display: none;
}

.profile-menu.open {
  display: block !important;
}

.profile-menu-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background 0.15s ease;
  font-size: 15px;
  color: #1f2937;
  text-align: left;
}

.profile-menu-item:hover { background: #f3f4f6; }
.profile-menu-item svg { width: 18px; height: 18px; color: #4b5563; }

.admin-mode-btn {
  border: 1.5px solid #315aa3;
  color: #315aa3;
  background: #ffffff;
  padding: 8px 12px;
  border-radius: 6px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  line-height: 1;
  font-size: 14px;
}

.admin-mode-btn:hover {
  background: #f7f9fc;
}

.admin-mode-btn:focus {
  outline: 2px solid #d7e2ff;
  outline-offset: 2px;
}

.admin-mode-icon svg {
  width: 18px;
  height: 18px;
  color: #315aa3;
}

.profile-name {
  font-size: 15px;
  color: #111827;
  font-weight: 600;
}

.login-btn {
  min-width: 96px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: -0.01em;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.12s ease, box-shadow 0.12s ease;
}

.btn:active {
  transform: translateY(1px);
  box-shadow: none;
}

.btn-outline {
  background: #ffffff;
  color: #4b5563;
  border-color: #e5e7eb;
}

.btn-outline:hover {
  background: #f3f4f6;
  color: #111827;
}

/* Notification popover */
.notif-popover {
  position: fixed;
  top: 0;
  left: 0;
  width: 340px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.12);
  z-index: 200;
}

.notif-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 8px;
}

.notif-title { font-weight: 800; color: #111827; }

.notif-readall {
  border: none;
  background: transparent;
  color: #2563eb;
  font-weight: 700;
  cursor: pointer;
}

.notif-list {
  max-height: 420px;
  overflow-y: auto;
  padding: 8px 8px 12px;
}

.notif-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  padding: 12px;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  margin-bottom: 8px;
  transition: background 0.12s ease, color 0.12s ease;
}

.notif-item:hover {
  background: #4cb8a9;
  color: #0f172a;
  border-color: transparent;
}

.notif-item:hover .notif-desc,
.notif-item:hover .notif-meta,
.notif-item:hover .notif-meta svg {
  color: #0f172a;
  stroke: #0f172a;
}

.notif-item:hover .notif-title-text,
.notif-item.unread:hover .notif-title-text {
  color: #ffffff;
}

.notif-item:last-child { margin-bottom: 0; }
.notif-item.unread { background: #eef2ff; border-color: transparent; }
.notif-item.unread:hover { background: #4cb8a9; }

.notif-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #111827;
}

.notif-icon.gray { background: #e5e7eb; }
.notif-icon.yellow { background: #fef3c7; color: #92400e; }
.notif-icon.pink { background: #ffe4e6; color: #be123c; }

.notif-body { display: flex; flex-direction: column; gap: 4px; }
.notif-title-text { font-weight: 800; color: #0f172a; }
.notif-desc { font-size: 0.95rem; color: #4b5563; line-height: 1.4; }

.notif-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #6b7280;
  font-size: 0.9rem;
}

.notif-meta svg { width: 14px; height: 14px; stroke: currentColor; }

.notif-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #1d4ed8;
  margin-top: 6px;
}

.notif-item:not(.unread) .notif-dot { display: none; }

.notif-list::-webkit-scrollbar { width: 8px; }
.notif-list::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 999px;
}
