/* sidebar.css — right-hand panel (New Lesson + My Lessons + search + profile).
 * WXG language: white, flat, square; amber primary action; list rows separated
 * by hairlines with a soft shadow on hover (like the WXG documents table). */

/* Full-height column: brand on top, modules in the middle, profile pinned bottom */
.sidebar-inner { display: flex; flex-direction: column; min-height: 100%; padding: 22px 20px; }

/* Brand / logo at the top of the sidebar */
.sb-brand {
  display: flex; align-items: center; justify-content: flex-start;
  padding: 2px 0 20px; margin-bottom: 20px;
  border-bottom: 1px solid var(--divider, #E9E9E9);
}
.sb-logo { width: 120px; max-width: 70%; height: auto; display: block; }

/* ── Modules ── */
.sb-modules { display: flex; flex-direction: column; gap: 24px; flex: 1 1 auto; min-height: 0; }
.sb-module { border: 0; border-radius: 0; background: transparent; }

/* Module 1 — "New form" primary action (amber, square) */
.sb-module-action {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: start;
  min-height: 56px; padding: 10px 16px; cursor: pointer;
  background: var(--wxg-amber, #FCAF17); color: var(--text, #202020);
  border: 2px solid var(--wxg-amber, #FCAF17); border-radius: 0; box-shadow: none;
  transition: background .15s, border-color .15s;
}
.sb-module-action:hover { background: var(--wxg-amber-dark, #F5AE00); border-color: var(--wxg-amber-dark, #F5AE00); }
.sb-module-icon { display: inline-flex; line-height: 1; }
.sb-module-icon .ico { width: 20px; height: 20px; }
.sb-module-text { display: flex; flex-direction: column; }
.sb-module-action .sb-module-title { font-size: 1rem; font-weight: 600; }
.sb-module-sub { font-size: 0.8rem; opacity: 0.8; }

/* Module 2 — "My forms" list */
.sb-module-list { display: flex; flex-direction: column; padding: 0; min-height: 0; }
.sb-module-head {
  display: flex; align-items: center; gap: 8px; margin-bottom: 8px; padding-bottom: 0; border: 0;
}
.sb-module-head .sb-module-title { font-size: 1.25rem; font-weight: 300; color: var(--text, #202020); }
.sb-module-head .sb-module-title::after {
  content: ""; display: inline-block; width: 5px; height: 5px; margin-inline-start: 3px;
  background: var(--wxg-amber, #FCAF17);
}
.sb-module-head .sb-module-icon { color: var(--wxg-graphite, #4D4D4D); }

/* search — underline field with a magnifier (WXG search) */
.sidebar .sb-search {
  width: 100%; padding: 8px 0 8px 26px; margin-bottom: 6px;
  border: 0; border-bottom: 1px solid var(--border, #D9D9D9); border-radius: 0;
  font-size: 0.95rem; background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23202020' stroke-width='1.6'%3E%3Ccircle cx='9.5' cy='6.5' r='5'/%3E%3Cpath d='M6 10l-5 5'/%3E%3C/svg%3E") no-repeat left 2px center;
  transition: border-color .15s, box-shadow .15s;
}
.sidebar .sb-search:focus { outline: none; border-bottom-color: var(--wxg-amber, #FCAF17); box-shadow: 0 1px 0 0 var(--wxg-amber, #FCAF17); }

.sb-lessons { display: flex; flex-direction: column; gap: 0; }
.sb-empty { color: var(--text-muted, #808080); font-size: 0.9rem; padding: 14px 2px; }
.sb-lesson {
  background: var(--paper, #fff); border: 0; border-bottom: 1px solid var(--divider, #E9E9E9); border-radius: 0;
  padding: 12px 4px; transition: box-shadow 0.15s;
}
.sb-lesson:hover { box-shadow: var(--shadow-2, 0 2px 10px rgba(0,0,0,0.08)); position: relative; }
.sb-lesson-title { font-size: 0.95rem; font-weight: 400; color: var(--text, #202020); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-lesson-meta { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.sb-lesson-date { font-size: 0.78rem; color: var(--text-muted, #808080); }
/* keyword chip — square pastel tag */
.sb-chip { font-size: 0.75rem; background: var(--wxg-tag-blue, #B0C2E5); color: var(--text, #202020); border-radius: 0; padding: 2px 10px; }

/* ── Profile (bottom) ── */
.sb-profile {
  margin-top: auto; padding-top: 18px;
  border-top: 1px solid var(--divider, #E9E9E9);
  display: flex; flex-direction: column; gap: 10px;
}
.sb-profile-user { display: flex; align-items: center; gap: 10px; }
.sb-avatar {
  width: 34px; height: 34px; flex: none; border-radius: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--wxg-graphite, #4D4D4D); color: #fff;
}
.sb-profile-name { font-size: 0.95rem; font-weight: 400; color: var(--text, #202020); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-admin {
  display: flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none;
  color: var(--text, #202020); background: var(--paper, #fff); font-size: 0.95rem;
  min-height: 42px; padding: 8px 12px; border: 2px solid var(--border-strong, #CDCDCD); border-radius: 0;
  transition: border-color .15s;
}
.sb-admin:hover { border-color: var(--wxg-graphite, #4D4D4D); }
.sb-logout {
  align-self: flex-start;
  background: transparent; color: var(--text, #202020); border: 0; border-radius: 0; padding: 4px 0;
  cursor: pointer; font-size: 0.9rem; text-decoration: underline; text-underline-offset: 3px;
}
.sb-logout:hover { text-decoration-color: var(--wxg-amber, #FCAF17); }
