/* ─── Layout Shell — SIGNO Brand (default) ───────────────────────────── */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  height: 100%;
}

body {
  min-height: 100%;
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  color: var(--text-body);
  -webkit-font-smoothing: antialiased;
  background: var(--page-bg);
}

/* ── Shell ── */
.shell {
  display: flex;
  min-height: 100vh;
  height: 100vh;
  padding: 0;
  gap: 0;
  overflow: hidden;
}

/* ── Sidebar ── */
.sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 24px 16px;
  background: var(--sidebar-bg);
  border: none;
  border-radius: 0;
  box-shadow: none;
  position: relative;
  top: auto;
  height: 100%;
  max-height: none;
  overflow-y: auto;
  scrollbar-width: none;
  z-index: var(--z-sidebar);
}
.sidebar::-webkit-scrollbar { display: none; }

/* ── Sidebar logo ── */
.sidebar-logo {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 4px 8px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  text-decoration: none;
}
.sidebar-logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

.sidebar-logo-img {
  display: block;
  height: 36px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
  filter: none;
}
.sidebar-logo-app {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
}

/* ── Nav ── */
.sidebar-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.nav-section {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-section-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  color: rgba(255, 255, 255, 0.35);
  padding: 0 12px 6px;
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--sidebar-text);
  text-decoration: none;
  font-size: 15px;
  font-weight: 400;
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
  white-space: nowrap;
}

.nav-item:hover {
  background: var(--sidebar-hover-bg);
  color: var(--sidebar-text-active);
}

.nav-item.active {
  background: var(--sidebar-active-bg);
  color: var(--sidebar-text-active);
  font-weight: 700;
  box-shadow: none;
}
.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--sidebar-accent);
  border-radius: 0 4px 4px 0;
}

.nav-icon {
  font-size: 17px;
  opacity: 0.70;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}
.nav-item.active .nav-icon,
.nav-item:hover .nav-icon {
  opacity: 1;
  color: inherit;
}

.sidebar-footer {
  padding: 16px 12px 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.30);
}

/* ── Main area ── */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
  overflow: hidden;
}

/* ── Topbar ── */
.topbar {
  height: var(--topbar-height);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 14px;
  flex-shrink: 0;
  background: var(--topbar-bg);
  border: none;
  border-bottom: 1px solid var(--topbar-border);
  border-radius: 0;
  box-shadow: none;
}

.topbar-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--signo-blue);
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-search {
  position: relative;
  flex: 1;
  max-width: 340px;
}
.topbar-search input {
  width: 100%;
  height: 36px;
  padding: 0 14px 0 38px;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  background: var(--page-bg);
  font-family: var(--font-family);
  font-size: 14px;
  color: var(--gc-ink);
  outline: none;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}
.topbar-search input:focus {
  background: rgba(255,255,255,0.92);
  border-color: rgba(10,68,121,0.30);
  box-shadow: 0 0 0 3px rgba(10,68,121,0.08);
}
.topbar-search input::placeholder { color: var(--gc-ink-3); }
.topbar-search-icon {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gc-ink-3);
  font-size: 14px;
  pointer-events: none;
}

.topbar-spacer { flex: 1; }

/* Sync + notification chips */
.topbar-chip {
  display: none;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 12px;
  background: rgba(255,255,255,0.60);
  border: 1px solid rgba(255,255,255,0.75);
  font-size: 12px;
  color: var(--gc-ink-2);
  white-space: nowrap;
}
.topbar-chip i { font-size: 13px; }

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar-avatar {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-full);
  background: var(--signo-blue);
  color: var(--text-inverse);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: none;
  transition: opacity var(--transition-fast);
}
.topbar-avatar:hover { opacity: 0.85; }

/* ── Content area ── */
.content {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ── Page header ── */
.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.page-header-left { flex: 1; min-width: 0; }
.page-title {
  font-size: var(--font-size-h2);
  font-weight: 700;
  color: var(--text-body);
  line-height: var(--line-height-tight);
  letter-spacing: 0;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--signo-blue);
  display: inline-block;
}
.page-subtitle {
  font-size: 14px;
  color: var(--gc-ink-2);
  margin-top: 6px;
}

/* ── Toast notifications ── */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: var(--z-toast);
  pointer-events: none;
}
.toast {
  background: var(--gc-ink);
  color: #fff;
  padding: 12px 16px;
  border-radius: 14px;
  font-size: 14px;
  pointer-events: all;
  animation: slideUp 200ms ease;
  max-width: 320px;
  box-shadow: 0 8px 24px rgba(0,0,0,.15);
}
.toast.success { background: var(--gc-sage-deep); }
.toast.error   { background: var(--gc-coral); }
.toast.warning { background: var(--gc-amber); color: var(--gc-ink); }
@keyframes slideUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .shell { padding: 12px; gap: 12px; }
  .sidebar { width: 0; padding: 0; position: fixed; top: 0; left: 0; bottom: 0; border-radius: 0; overflow: hidden; }
  .sidebar.open { width: var(--sidebar-width); padding: 24px 16px; overflow-y: auto; }
  .topbar-chip { display: none; }
}
@media (max-width: 600px) {
  .topbar-search { display: none; }
}
