:root {
  --ss-page: #f5f0eb;
  --ss-paper: #ffffff;
  --ss-rail: #2d2a26;
  --ss-rail-soft: #3e3a36;
  --ss-ink: #1f2937;
  --ss-muted: #6b7280;
  --ss-line: #e5e7eb;
  --ss-warm-line: #d6c5b0;
  --ss-header: #e5dace;
  --ss-box: #f5b948;
  --ss-green: #22c55e;
  --ss-green-dark: #15803d;
  --ss-rail-width: 224px;
  --ss-topbar-height: 64px;
}

body.ss-workspace-page {
  min-width: 320px;
  padding-left: var(--ss-rail-width);
  background: var(--ss-page) !important;
  color: var(--ss-ink);
  box-sizing: border-box;
}

.ss-workspace-rail {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 60;
  width: var(--ss-rail-width);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  color: #f8fafc;
  background: var(--ss-rail);
  border-right: 1px solid rgba(255,255,255,.08);
}

.ss-rail-brand {
  min-height: var(--ss-topbar-height);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}

.ss-rail-brand svg { width: 32px; height: 32px; flex: none; }
.ss-rail-brand-copy { min-width: 0; display: block; }
.ss-rail-brand-name { display: block; font-size: 19px; line-height: 1; font-weight: 900; letter-spacing: -.04em; }
.ss-rail-brand-tag { display: block; margin-top: 5px; color: #c8c1b9; font-size: 8px; font-weight: 800; letter-spacing: .12em; white-space: nowrap; }
.ss-rail-label { margin: 16px 16px 6px; color: #aaa198; font-size: 9px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.ss-rail-nav { display: grid; gap: 2px; padding: 0 9px; }
.ss-rail-link {
  min-height: 36px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 9px;
  border-radius: 8px;
  color: #d9d5d0;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}
.ss-rail-link:hover { color: #fff; background: rgba(255,255,255,.07); }
.ss-rail-link[aria-current="page"] { color: var(--ss-rail); background: #fff; }
.ss-rail-icon { width: 17px; flex: none; display: inline-grid; place-items: center; font-size: 12px; }
.ss-rail-quick { margin: 13px 9px; padding: 12px; border: 1px solid rgba(245,185,72,.28); border-radius: 11px; background: linear-gradient(145deg,rgba(245,185,72,.14),rgba(34,197,94,.08)); }
.ss-rail-quick strong { display: block; color: #fff; font-size: 12px; }
.ss-rail-quick p { margin: 4px 0 9px; color: #c8c1b9; font-size: 9px; line-height: 1.4; }
.ss-rail-quick a { min-height: 32px; display: flex; align-items: center; justify-content: center; border-radius: 7px; background: var(--ss-green); color: #052e16; font-size: 10px; font-weight: 900; text-decoration: none; white-space: nowrap; }
.ss-rail-status { margin-top: auto; padding: 13px 16px 16px; border-top: 1px solid rgba(255,255,255,.1); color: #bfb8b0; font-size: 9px; line-height: 1.45; }
.ss-rail-online { display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: var(--ss-green); box-shadow: 0 0 0 3px rgba(34,197,94,.12); }

.ss-workspace-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  min-height: var(--ss-topbar-height);
  display: flex;
  align-items: center;
  padding: 0 22px;
  background: rgba(229,218,206,.96);
  border-bottom: 1px solid var(--ss-warm-line);
  backdrop-filter: blur(12px);
}
.ss-topbar-inner { width: 100%; max-width: 1536px; margin: 0 auto; display: flex; align-items: center; gap: 10px; }
.ss-mobile-brand { display: none; align-items: center; gap: 7px; color: var(--ss-ink); font-size: 17px; font-weight: 900; text-decoration: none; }
.ss-mobile-brand svg { width: 27px; height: 27px; }
.ss-global-search { position: relative; width: min(430px,45vw); }
.ss-global-search input { width: 100%; height: 36px; padding: 0 12px 0 34px; border: 1px solid rgba(99,86,69,.2); border-radius: 8px; color: var(--ss-ink); background: rgba(255,255,255,.72); outline: none; font-size: 12px; }
.ss-global-search button { position: absolute; z-index: 1; left: 5px; top: 50%; width: 25px; height: 25px; min-height: 0; padding: 0; transform: translateY(-50%); border: 0; border-radius: 6px; color: var(--ss-muted); background: transparent; font-size: 12px; }
.ss-global-search button:hover { color: var(--ss-ink); background: rgba(255,255,255,.72); }
.ss-topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 7px; }
.ss-topbar-link, .ss-user-button { min-height: 34px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid rgba(99,86,69,.18); border-radius: 8px; background: rgba(255,255,255,.72); color: var(--ss-ink); font-size: 10px; font-weight: 800; text-decoration: none; white-space: nowrap; }
.ss-topbar-link { padding: 0 11px; }
.ss-user-button { width: 34px; padding: 0; }
.ss-user-menu { position: absolute; right: 0; top: calc(100% + 7px); width: 220px; overflow: hidden; border: 1px solid var(--ss-line); border-radius: 11px; background: white; box-shadow: 0 14px 34px rgba(45,42,38,.14); }

.ss-mobile-nav { display: none; }

.ss-listing-drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  justify-content: flex-end;
  background: rgba(31, 41, 55, .42);
  backdrop-filter: blur(2px);
}
.ss-listing-drawer-overlay[hidden] { display: none; }
.ss-listing-drawer {
  width: min(560px, 100vw);
  height: 100%;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  background: var(--ss-paper);
  border-left: 1px solid var(--ss-line);
  box-shadow: -18px 0 46px rgba(45, 42, 38, .18);
}
.ss-listing-drawer-header {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--ss-line);
}
.ss-listing-drawer-kicker {
  color: var(--ss-green-dark);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.ss-listing-drawer-title {
  margin-top: 3px;
  color: var(--ss-ink);
  font-size: 16px;
  font-weight: 900;
  line-height: 1.2;
}
.ss-listing-drawer-close {
  width: 36px;
  height: 36px;
  flex: none;
  display: inline-grid;
  place-items: center;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #fff;
  color: #4b5563;
  font-size: 18px;
  font-weight: 700;
}
.ss-listing-drawer-body {
  min-height: 0;
  overflow-y: auto;
  padding: 16px 20px 28px;
}
.ss-listing-drawer-body > * + * { margin-top: 10px; }

body.ss-workspace-page footer { display: none; }
body.ss-workspace-page .max-w-7xl { max-width: 1536px; }
body.ss-workspace-page button,
body.ss-workspace-page a { white-space: nowrap; }

@media (max-width: 860px) {
  body.ss-workspace-page { padding-left: 0; padding-bottom: 64px; }
  .ss-workspace-rail { display: none; }
  .ss-workspace-topbar { min-height: 58px; padding: 0 12px; }
  .ss-mobile-brand { display: flex; }
  .ss-global-search, .ss-topbar-link { display: none; }
  .ss-mobile-nav {
    position: fixed;
    inset: auto 0 0 0;
    z-index: 70;
    min-height: 62px;
    display: grid;
    grid-template-columns: repeat(5,minmax(0,1fr));
    padding: 5px 5px max(5px,env(safe-area-inset-bottom));
    border-top: 1px solid var(--ss-warm-line);
    background: rgba(255,255,255,.97);
    backdrop-filter: blur(12px);
  }
  .ss-mobile-nav a { min-width: 0; display: grid; place-items: center; gap: 2px; border-radius: 8px; color: var(--ss-muted); font-size: 8px; font-weight: 800; text-decoration: none; }
  .ss-mobile-nav a span:first-child { font-size: 15px; line-height: 1; }
  .ss-mobile-nav a[aria-current="page"] { color: var(--ss-green-dark); background: #ecfdf3; }
  body.ss-workspace-page .max-w-7xl { max-width: 100%; }
  .ss-listing-drawer { width: 100vw; border-left: 0; }
  .ss-listing-drawer-header { min-height: 66px; padding: 12px 14px; }
  .ss-listing-drawer-body { padding: 13px 14px 88px; }
}

@media (max-width: 390px) {
  .ss-topbar-actions > :not(.ss-user-wrap) { display: none; }
}
