/* Shared left-sidebar styling for the Kunis admin SPAs (dispatch + estimate).
 * Loaded by both apps; the markup is rendered by shared/sidebar.js. Relies on
 * the --ink/--line/--accent/... custom properties defined in each app's
 * style.css :root (custom properties resolve regardless of stylesheet order). */

.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 220px; flex-shrink: 0; background: #fff;
  border-right: 1px solid var(--line); display: flex; flex-direction: column;
  padding: 22px 16px;
}
.sidebar-brand { padding: 0 6px 22px; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.sidebar-brand .brand-name {
  display: block; font-size: 18px; font-weight: 600;
  letter-spacing: .02em; color: var(--ink); text-decoration: none;
}
.sidebar-brand .brand-tag { font-size: 11px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .08em; }
.sidebar-nav { display: flex; flex-direction: column; gap: 2px; }
.sidebar-nav .nav-link {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 7px;
  font-size: 14px; color: var(--ink-soft); text-decoration: none;
}
.sidebar-nav .nav-link:hover { background: #f5f1e6; color: var(--ink); }
.sidebar-nav .nav-link.active {
  background: #fff8e8; color: var(--accent-ink); font-weight: 600;
}
.sidebar-nav .nav-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 5px;
  background: #f0ece0; color: var(--accent-ink);
  font-size: 13px; font-weight: 700;
}
.sidebar-nav .nav-link.active .nav-icon { background: var(--accent); color: #fff; }
.sidebar-nav .nav-badge {
  margin-left: auto; font-size: 11px; font-weight: 600;
  background: var(--danger); color: #fff;
  padding: 2px 7px; border-radius: 10px; min-width: 18px; text-align: center;
}
.sidebar-user {
  margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 8px;
  font-size: 13px; color: var(--ink-soft);
}
.sidebar-user .user-email { word-break: break-all; }
.sidebar-user button {
  background: transparent; border: 1px solid var(--line); border-radius: 6px;
  padding: 6px 10px; font-size: 13px; cursor: pointer; color: var(--ink);
  text-align: left;
}
.sidebar-user button:hover { border-color: var(--ink-soft); }
.sidebar-user .settings-link {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 8px; border-radius: 6px;
  font-size: 13px; color: var(--ink-soft); text-decoration: none;
}
.sidebar-user .settings-link:hover { background: #f5f1e6; color: var(--ink); }
.sidebar-user .settings-link.active { background: #fff8e8; color: var(--accent-ink); font-weight: 600; }
.sidebar-user .settings-cog { font-size: 16px; line-height: 1; }
.main-pane { flex: 1; min-width: 0; }

@media (max-width: 720px) {
  .layout { flex-direction: column; }
  .sidebar {
    width: 100%; border-right: 0; border-bottom: 1px solid var(--line);
    padding: 12px 14px;
  }
  .sidebar-brand { padding: 0 2px 12px; margin-bottom: 8px; }
  .sidebar-nav { flex-direction: row; flex-wrap: wrap; }
  .sidebar-nav .nav-link { padding: 7px 10px; }
  .sidebar-user { margin-top: 10px; padding-top: 10px; flex-direction: row; align-items: center; }
}
