/* ── App layout ─────────────────────────────────────────────── */

.app {
  display: flex;
  min-height: 100vh;
  max-width: 1400px;
  margin: 0 auto;
}

/* ── Sidebar ─────────────────────────────────────────────────── */

.sidebar {
  width: 248px;
  flex-shrink: 0;
  padding: 24px 16px;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  border-right: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 8px 20px;
}

.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--grad);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 16px;
  flex-shrink: 0;
}

.brand-name {
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.02em;
}

.nav-group-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #8a93a0;
  padding: 14px 12px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  color: #3a434f;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
}

.nav-item:hover {
  background: rgba(0, 58, 244, 0.06);
  color: var(--blue);
}

.nav-item.active {
  background: var(--grad);
  color: #fff;
  box-shadow: var(--shadow-nav);
}

.nav-item .ico {
  width: 18px;
  text-align: center;
  font-size: 16px;
  flex-shrink: 0;
}

.nav-divider {
  height: 1px;
  background: var(--glass-border);
  margin: 12px 8px;
}

/* ── Main area ───────────────────────────────────────────────── */

.main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* ── Topbar ──────────────────────────────────────────────────── */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 32px;
  border-bottom: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.search {
  flex: 1;
  max-width: 420px;
  position: relative;
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #9aa3b0;
  font-size: 16px;
  pointer-events: none;
}

.search input {
  width: 100%;
  padding: 10px 16px 10px 40px;
  border-radius: 14px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.8);
  font-size: 14px;
  color: var(--charcoal);
  outline: none;
  transition: border-color 0.2s;
}

.search input:focus {
  border-color: rgba(0, 58, 244, 0.3);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.role-switch {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  font-weight: 600;
  color: #3a434f;
  cursor: pointer;
  transition: background 0.2s;
}

.role-switch:hover {
  background: rgba(255, 255, 255, 0.9);
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #5a6470;
  cursor: pointer;
  position: relative;
  font-size: 18px;
  transition: background 0.2s;
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.9);
}

.icon-btn .notif-dot {
  position: absolute;
  top: 9px;
  right: 9px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cherry);
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--grad);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  flex-shrink: 0;
}

/* ── Notification wrap & panel ───────────────────────────────────── */

.notif-wrap {
  position: relative;
}

.notif-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 360px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid rgba(0, 58, 244, 0.10);
  border-radius: 18px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
  z-index: 9000;
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  overflow: hidden;
}

.notif-panel--open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

.notif-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px 12px;
  border-bottom: 1px solid rgba(0, 58, 244, 0.07);
}

.notif-panel-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--charcoal);
  letter-spacing: -0.01em;
}

.notif-mark-read {
  font-size: 11px;
  font-weight: 600;
  color: var(--blue);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.notif-mark-read:hover { text-decoration: underline; }

.notif-list {
  max-height: 340px;
  overflow-y: auto;
}

.notif-item {
  display: flex;
  gap: 12px;
  padding: 13px 18px;
  border-bottom: 1px solid rgba(0, 58, 244, 0.05);
  cursor: pointer;
  transition: background 0.15s;
}

.notif-item:last-child { border-bottom: none; }

.notif-item:hover { background: rgba(0, 58, 244, 0.03); }

.notif-item--unread { background: rgba(0, 58, 244, 0.04); }

.notif-item--unread .notif-item-title { font-weight: 700; }

.notif-item-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: rgba(0, 58, 244, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--blue);
  flex-shrink: 0;
  margin-top: 1px;
}

.notif-item-body { flex: 1; min-width: 0; }

.notif-item-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--charcoal);
  margin-bottom: 2px;
}

.notif-item-desc {
  font-size: 12px;
  color: #5a6474;
  line-height: 1.4;
  margin-bottom: 4px;
}

.notif-item-time {
  font-size: 11px;
  color: #9aa3b0;
}

/* ── Page content area ───────────────────────────────────────── */

.content {
  padding: 28px 32px 100px;
  flex: 1;
}

/* ── Section header ──────────────────────────────────────────── */

.sec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 30px 0 16px;
}

.sec-head h2 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.sec-head .sec-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--blue);
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  text-decoration: none;
}

/* ── AI FAB ──────────────────────────────────────────────────── */

.ai-fab {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 60px;
  height: 60px;
  border-radius: 20px;
  background: var(--grad);
  box-shadow: 0 8px 28px rgba(80, 50, 200, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 26px;
  cursor: pointer;
  z-index: 50;
  transition: transform 0.3s, box-shadow 0.3s;
  border: none;
}

.ai-fab:hover {
  transform: scale(1.06) translateY(-2px);
  box-shadow: 0 12px 36px rgba(80, 50, 200, 0.55);
}

/* ── Responsive ──────────────────────────────────────────────── */

@media (max-width: 1100px) {
  .sidebar {
    width: 200px;
  }
}
