@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

:root {
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  
  /* Premium Art Gallery Palette */
  --bg: #FAF9F6;          /* Plaster white */
  --surface: #FFFFFF;     /* Pure white */
  --surface-soft: #F4F3EE;/* Warm linen */
  --line: #E5E3DD;        /* Soft clay line */
  --line-dark: #C5C3BD;   /* Darker clay line */
  --ink: #141412;         /* Deep charcoal */
  --muted: #7A7872;       /* Warm dust */
  --accent: #9A7B56;      /* Gallery gold/bronze */
  --accent-light: #F6F3EE;
  --accent-hover: #7E6342;
  --danger: #A63C3C;      /* Red wax seal */
  --shadow: 0 2px 8px rgba(20, 20, 18, 0.04), 0 1px 3px rgba(20, 20, 18, 0.02);
  --shadow-hover: 0 16px 40px rgba(20, 20, 18, 0.08), 0 6px 16px rgba(20, 20, 18, 0.04);
  --radius: 6px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.6;
}

body.auth-page {
  min-height: 100vh;
  min-height: 100dvh;
  background: #090907;
  overflow-x: hidden;
}

a {
  color: var(--ink);
}

.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  text-decoration: none;
  width: 100%;
  text-align: center;
}

.brand-kicker {
  display: none;
}

.brand-title {
  font-size: 21px;
  letter-spacing: 0.18em;
  font-weight: 600;
  font-family: var(--font-serif);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  text-transform: uppercase;
  line-height: 1;
  white-space: nowrap;
  transform: scaleY(1.18);
  transform-origin: center;
}

.brand-mark {
  width: 10px;
  height: 10px;
  border: 2px solid var(--accent);
  display: inline-block;
  transform: translateY(1px);
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto 1fr;
  background: var(--bg);
}

.sidebar {
  background: var(--surface);
  color: var(--ink);
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: stretch;
  min-width: 0;
}

.sidebar-head {
  flex: 0 0 254px;
  padding: 18px 28px;
  background: var(--bg);
  border-right: 1px solid var(--line);
  border-bottom: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-action {
  padding: 24px 18px;
  border-bottom: 1px solid var(--line);
}

.sidebar-section-title {
  padding: 18px 22px 6px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.sidebar-tabs {
  min-width: 0;
  flex: 1 1 auto;
  padding: 0 14px;
  display: flex;
  align-items: stretch;
  gap: 16px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}

.sidebar-tabs::-webkit-scrollbar {
  display: none;
}

.sidebar-tab-group,
.sidebar-context {
  flex: 0 0 auto;
  display: flex;
  align-items: stretch;
  gap: 7px;
}

.sidebar-tabs > .sidebar-tab-group:first-child {
  position: relative;
  padding: 0 8px;
  margin: 0 -8px;
}

.sidebar-tabs > .sidebar-tab-group:first-child::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 0;
  height: 8px;
  border-radius: 999px 999px 0 0;
  background: rgba(244, 196, 204, 0.34);
  pointer-events: none;
  z-index: 0;
}

.sidebar-tabs > .sidebar-tab-group:first-child .sidebar-tab-row,
.sidebar-tabs > .sidebar-tab-group:first-child .sidebar-tab {
  position: relative;
  z-index: 1;
}

.sidebar-tabs .sidebar-section-title {
  display: flex;
  align-items: center;
  padding: 0;
  white-space: nowrap;
  font-size: 9px;
  letter-spacing: 0.14em;
}

.sidebar-tab-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 0;
  align-items: stretch;
}

.sidebar-tab {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 14px 10px;
  border: none;
  background: transparent;
  color: var(--muted);
  text-decoration: none;
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.04em;
  white-space: nowrap;
  position: relative;
  transition: color 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.sidebar-tab::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 14px;
  right: 14px;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.sidebar-tab:hover {
  color: var(--ink);
  background: transparent;
}

.sidebar-tab.active {
  color: var(--accent);
  font-weight: 600;
  background: transparent;
}

.sidebar-tab.active::after {
  transform: scaleX(1);
  transform-origin: left;
}

.sidebar-tab.compact {
  min-height: 40px;
  padding: 10px 12px 8px;
  font-size: 11px;
  color: var(--muted);
}

.sidebar-tab.compact::after {
  left: 12px;
  right: 12px;
}

.sidebar-tab.compact.active {
  color: var(--accent);
}

.sidebar-context {
  margin-left: auto;
  padding: 0 0 0 16px;
  border-left: 1px solid var(--line);
}

.sidebar-account {
  margin-left: 0;
  padding-left: 16px;
  border-left: 1px solid var(--line);
}

.sidebar-artist-photo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  align-self: center;
  margin: 0 8px 0 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 2px 8px rgba(20, 20, 18, 0.08);
}

.sidebar-artist-photo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

/* Steps workflow styling */
.sidebar-steps {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 6px 14px;
}

.step-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 12px;
  text-decoration: none;
  border-radius: var(--radius);
  transition: all 0.2s ease;
  position: relative;
}

.step-item:not(.disabled):hover {
  background: var(--surface-soft);
}

.step-item.active {
  background: var(--accent-light);
}

.step-item.disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.step-num-container {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  position: relative;
  flex-shrink: 0;
  margin-top: 2px;
}

.step-item.active .step-num-container {
  background: var(--accent);
  color: var(--surface);
}

.step-indicator {
  position: absolute;
  left: 0;
  top: 10%;
  bottom: 10%;
  width: 3px;
  background: var(--accent);
  border-radius: 99px;
}

.step-details {
  display: flex;
  flex-direction: column;
}

.step-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
}

.step-item.active .step-label {
  color: var(--accent);
  font-weight: 600;
}

.step-subtitle {
  font-size: 10.5px;
  color: var(--muted);
  line-height: 1.3;
}

.nav {
  padding: 4px 14px;
  margin: 0;
  list-style: none;
}

.nav li {
  margin-bottom: 2px;
}

.nav a {
  display: flex;
  align-items: center;
  min-height: 38px;
  color: var(--muted);
  text-decoration: none;
  padding: 8px 12px;
  border-bottom: none;
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--radius);
  transition: all 0.2s ease;
}

.nav a:hover {
  background: var(--surface-soft);
  color: var(--ink);
}

.nav a.active {
  background: var(--accent-light) !important;
  color: var(--accent) !important;
  font-weight: 600;
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding-left: 9px;
}

.sidebar-more {
  flex: 0 0 auto;
  margin: 0;
  padding: 0 14px;
  border-left: 1px solid var(--line);
  border-top: none;
  align-self: stretch;
  display: flex;
  align-items: center;
}

.sidebar-more summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  list-style: none;
  transition: all 0.2s ease;
}

.sidebar-more summary::-webkit-details-marker {
  display: none;
}

.sidebar-more summary::after {
  content: " +";
  color: var(--accent);
}

.sidebar-more[open] summary::after {
  content: " -";
}

.sidebar-more summary:hover {
  background: var(--surface-soft);
  color: var(--ink);
}

.sidebar-more .nav {
  position: absolute;
  right: 12px;
  top: 58px;
  min-width: 190px;
  padding: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  z-index: 30;
}

.sidebar-more .nav a {
  min-height: 30px;
  font-size: 12px;
  padding: 6px 10px;
}

.nav-section {
  padding: 20px 22px 6px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.main-area {
  min-width: 0;
}

.app-header {
  height: 66px;
  background: var(--surface);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
}

.user-chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: var(--bg);
  padding: 6px 14px;
  text-decoration: none;
  font-weight: 500;
  font-size: 12px;
}

.alert-strip {
  background: var(--accent-light);
  color: var(--accent);
  padding: 18px 28px;
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  border-bottom: 1px solid var(--line);
}

.workspace {
  padding: 40px 40px 60px;
}

.workspace-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding-bottom: 22px;
  margin-bottom: 26px;
  border-bottom: 1px solid var(--line);
}

.workspace-header h1 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 500;
  letter-spacing: -0.01em;
}

.workspace-header p {
  margin: 6px 0 0;
  color: var(--muted);
}

.container {
  max-width: 860px;
  margin: 0 auto;
  padding: 48px 24px;
}

.container.wide {
  max-width: 1240px;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-serif);
  line-height: 1.25;
  font-weight: 500;
  color: var(--ink);
}

h1 {
  margin: 0 0 10px;
  font-size: clamp(32px, 5vw, 48px);
  letter-spacing: -0.01em;
}

h2 {
  margin: 0 0 18px;
  font-size: 22px;
}

h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

p {
  color: var(--muted);
}

.page-kicker {
  margin: 0 0 28px;
  max-width: 760px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 300;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 34px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 22px;
}

.topbar p {
  margin: 8px 0 0;
}

.topbar-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.form,
.panel,
.auth-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.form {
  padding: 30px;
}

.auth-card,
.panel {
  padding: 26px;
}

.panel {
  margin: 26px 0;
}

label {
  display: block;
  margin-top: 22px;
  margin-bottom: 8px;
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink);
}

small {
  display: block;
  margin: 4px 0 12px;
  color: var(--muted);
  font-size: 12px;
}

input[type="email"],
input[type="password"],
input[type="text"],
input[type="number"],
input[type="file"],
select,
textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  border-radius: var(--radius);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(154, 123, 86, 0.08), var(--shadow);
}

.row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

button,
.button-link,
.button {
  display: inline-block;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--surface);
  padding: 12px 24px;
  text-decoration: none;
  font: inherit;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: var(--radius);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 6px rgba(154, 123, 86, 0.12);
  text-align: center;
}

button {
  width: 100%;
  margin-top: 24px;
}

button:hover,
.button-link:hover,
.button:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(154, 123, 86, 0.24);
}

button:active,
.button-link:active,
.button:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(154, 123, 86, 0.12);
}

button:disabled,
.button-link:disabled,
.button:disabled {
  background: var(--line);
  border-color: var(--line);
  color: var(--muted);
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.secondary,
.button-link.secondary,
.button.secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
  box-shadow: none;
}

.secondary:hover,
.button-link.secondary:hover,
.button.secondary:hover {
  background: var(--accent-light);
  border-color: var(--accent);
  color: var(--ink);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(20, 20, 18, 0.05);
}

.secondary:active,
.button-link.secondary:active,
.button.secondary:active {
  transform: translateY(0);
}

.notice {
  padding: 14px 18px;
  background: var(--surface);
  border-left: 3px solid var(--accent);
  color: var(--ink);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 13px;
  margin-bottom: 24px;
}

.notice.error {
  color: var(--danger);
  background: #FFF5F5;
  border-left-color: var(--danger);
}

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
  border-bottom: 1px dashed var(--line);
  padding-bottom: 10px;
}

.section-heading p {
  margin: 0;
  color: var(--muted);
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 26px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 20px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.stat-card span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.stat-card strong {
  display: block;
  margin-top: 8px;
  font-family: var(--font-serif);
  font-size: 32px;
  font-weight: 500;
  line-height: 1;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 24px;
}

.item-card {
  background: transparent;
  padding: 0;
  border-radius: var(--radius);
}

.item-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  border: 1px solid var(--line);
  padding: 6px;
  background: var(--surface);
  box-shadow: var(--shadow);
  margin-bottom: 12px;
  border-radius: var(--radius);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.item-card:hover img {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--accent);
}

.item-card h3 {
  word-break: break-word;
  font-size: 15px;
  text-align: center;
  margin: 8px 0;
}

.meta-line {
  margin: 4px 0;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: max-content;
  margin: 10px auto;
  padding: 4px 10px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 600;
  border-radius: 99px;
  background: var(--surface-soft);
}

.status-pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--line-dark);
  display: inline-block;
}

.status-pill.done {
  color: #2D5A27;
  border-color: #C2E2BE;
  background: #E8F5E7;
}

.status-pill.done::before {
  background: #4CAF50;
}

.status-pill.error {
  color: var(--danger);
  border-color: #E2BEBE;
  background: #F5E7E7;
}

.status-pill.error::before {
  background: var(--danger);
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 12px;
}

.card-actions a {
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  color: var(--muted);
  border-bottom: 1px solid transparent;
  transition: all 0.2s ease;
}

.card-actions a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.download-icon {
  width: 14px;
  height: 14px;
  display: inline-block;
  position: relative;
  border-bottom: 2px solid currentColor;
  vertical-align: middle;
}

.download-icon::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 1px;
  width: 2px;
  height: 9px;
  background: currentColor;
}

.download-icon::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 5px;
  width: 6px;
  height: 6px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
}

.empty-state {
  border: 1px dashed var(--line-dark);
  background: rgba(255,255,255,.5);
  padding: 24px;
  color: var(--muted);
  text-align: center;
  border-radius: var(--radius);
}

.toolbar-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  gap: 10px;
  align-items: stretch;
  margin-bottom: 22px;
}

.toolbar-form button {
  width: auto;
  margin-top: 0;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 30px;
  color: var(--muted);
}

.auth-layout {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(390px, 0.72fr) minmax(620px, 1.28fr);
  background: var(--bg);
  overflow: hidden;
  position: relative;
}

.auth-layout::before {
  content: "";
  position: absolute;
  inset: 24px;
  border: 1px solid var(--line);
  pointer-events: none;
  z-index: 1;
}

.auth-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: clamp(42px, 6vw, 92px);
  color: var(--ink);
  background: var(--surface-soft);
  box-sizing: border-box;
  position: relative;
  z-index: 2;
  border-right: 1px solid var(--line);
}

.auth-panel h1,
.auth-panel p,
.auth-panel a {
  color: var(--ink);
}

.auth-panel .page-kicker {
  max-width: 370px;
  margin-bottom: 34px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.auth-panel .auth-card {
  width: min(100%, 380px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
  box-shadow: var(--shadow-hover);
}

.auth-panel label {
  color: var(--muted);
  font-weight: 600;
}

.auth-panel input {
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  height: 46px;
}

.auth-panel input:focus {
  border-color: var(--accent);
  background: var(--surface);
  outline: 2px solid rgba(154, 123, 86, 0.15);
}

.auth-links {
  width: min(100%, 380px);
  margin-top: 22px;
  text-align: center;
  color: var(--muted) !important;
}

.auth-links a {
  color: var(--accent) !important;
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px dashed var(--accent);
}

.auth-links a:hover {
  color: var(--accent-hover) !important;
  border-color: var(--accent);
}

.auth-visual {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(42px, 6vw, 92px);
  background: var(--bg);
}

.auth-visual-background {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.auth-bg-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  filter: brightness(0.95) saturate(0.98);
  display: block;
}

.auth-visual-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(250, 249, 246, 0.02) 0%, rgba(250, 249, 246, 0.15) 50%, rgba(250, 249, 246, 0.75) 100%);
  z-index: 2;
  pointer-events: none;
}

.auth-visual-caption {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: 420px;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.6;
  font-family: var(--font-serif);
  font-style: italic;
  background: rgba(250, 249, 246, 0.85);
  backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  padding: 16px 20px;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(20,20,18,0.04);
}

@media (max-width: 980px) {
  .app-shell,
  .auth-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    min-height: 0;
    border-right: none;
    border-bottom: 1px solid var(--line);
    flex-direction: column;
  }

  .sidebar-head {
    flex-basis: auto;
    border-right: none;
    border-bottom: 1px solid var(--line);
  }

  .nav {
    display: flex;
    overflow-x: auto;
  }

  .nav a {
    white-space: nowrap;
    border-bottom: none;
    border-right: 1px solid var(--line);
  }

  .sidebar-tabs {
    padding: 12px;
  }

  .sidebar-tab-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .sidebar-tab {
    white-space: nowrap;
  }

  .auth-visual {
    min-height: 280px;
    order: -1;
  }

  .auth-gallery-secondary,
  .auth-gallery-tertiary,
  .auth-visual-caption {
    display: none;
  }

  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .container,
  .workspace {
    padding: 28px 16px;
  }

  .topbar,
  .workspace-header {
    display: block;
  }

  .topbar-actions {
    justify-content: flex-start;
    margin-top: 18px;
  }

  .row,
  .stats,
  .toolbar-form {
    grid-template-columns: 1fr;
  }

  .auth-panel {
    padding: 42px 24px;
  }
}

/* Premium Scale Slider Styling */
.scale-slider-container {
  margin-top: 18px;
  width: 100%;
}

.scale-slider-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.scale-slider-header label {
  margin: 0;
}

.scale-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 99px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-family: var(--font-sans);
  transition: all 0.2s ease;
}

.scale-badge.neutral {
  background: var(--surface-soft);
  color: var(--muted);
  border: 1px solid var(--line);
}

.scale-badge.positive {
  background: rgba(154, 123, 86, 0.1);
  color: var(--accent);
  border: 1px solid rgba(154, 123, 86, 0.2);
}

.scale-badge.negative {
  background: rgba(166, 60, 60, 0.08);
  color: var(--danger);
  border: 1px solid rgba(166, 60, 60, 0.15);
}

.scale-slider-wrapper {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 8px 0;
}

.slider-side-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  user-select: none;
}

.premium-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100% !important;
  height: 4px;
  border-radius: 2px;
  background: var(--line);
  outline: none;
  padding: 0 !important;
  margin: 0;
  cursor: pointer;
  border: none !important;
  transition: background 0.2s ease;
}

.premium-slider:focus {
  outline: none !important;
  border: none !important;
}

.premium-slider::-webkit-slider-runnable-track {
  width: 100%;
  height: 4px;
  background: var(--line);
  border-radius: 2px;
}

.premium-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--surface);
  box-shadow: 0 2px 5px rgba(20, 20, 18, 0.15);
  margin-top: -6px;
  transition: transform 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275), background-color 0.2s;
}

.premium-slider:hover::-webkit-slider-thumb {
  transform: scale(1.25);
  background: var(--accent-hover);
}

.premium-slider::-moz-range-track {
  width: 100%;
  height: 4px;
  background: var(--line);
  border-radius: 2px;
}

.premium-slider::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--surface);
  box-shadow: 0 2px 5px rgba(20, 20, 18, 0.15);
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.2s;
}

.premium-slider:hover::-moz-range-thumb {
  transform: scale(1.25);
  background: var(--accent-hover);
}

.scale-slider-ticks {
  display: flex;
  justify-content: space-between;
  margin-left: 58px;
  margin-right: 52px;
  margin-top: 4px;
}

.scale-slider-ticks .tick {
  font-size: 10px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: all 0.2s ease;
  user-select: none;
}

.scale-slider-ticks .tick:hover {
  color: var(--ink);
  background: var(--surface-soft);
}

.scale-slider-ticks .tick.tick-center {
  font-weight: 600;
  color: var(--ink);
}

/* Custom Global Layout Zoom (Laptop Scaling Tweak) */
@media (min-width: 768px) {
  html {
    zoom: 0.65;
  }
  
  .brand, 
  .sidebar-tab, 
  .sidebar-section-title, 
  h1, h2, h3, h4, h5, h6, 
  .btn, 
  .tab-button, 
  button,
  input[type="submit"],
  input[type="button"],
  .button,
  .tooltip-icon {
    zoom: 1.23; /* 0.80 / 0.65 = 1.2307 => roughly 80% effective size */
  }

  /* Compact layout spacing on desktop/laptops to fit forms above the fold */
  .alert-strip {
    padding: 10px 20px;
  }
  
  .workspace {
    padding: 20px 30px 40px;
  }
  
  .workspace-header {
    padding-bottom: 12px;
    margin-bottom: 16px;
  }
  
  .page-kicker {
    margin: 0 0 16px;
  }
}

/* --- Floating Auth Card Layout V2 --- */

.auth-layout-v2 {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding-left: clamp(40px, 8vw, 120px);
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

.auth-bg-full {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.auth-bg-full img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}

.auth-bg-overlay-full {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.25); /* Subtle dark overlay to make card pop */
  z-index: 2;
  pointer-events: none;
}

.auth-card-floating {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 440px;
  background: rgba(250, 249, 246, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 20px;
  padding: 42px 36px 36px 36px;
  box-shadow: 0 30px 60px rgba(20, 20, 18, 0.15), 0 10px 25px rgba(20, 20, 18, 0.05);
  box-sizing: border-box;
}

.auth-card-floating .brand-v2 {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
  font-size: 11px;
  letter-spacing: 0.18em;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 12px;
}

.auth-card-floating .brand-v2 .star-mark {
  font-size: 12px;
  line-height: 1;
}

.auth-card-floating h1 {
  font-family: var(--font-serif);
  font-size: 38px;
  font-weight: 500;
  color: var(--ink);
  text-align: center;
  margin: 0 0 10px 0;
  line-height: 1.2;
}

.auth-card-floating .page-kicker-v2 {
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  margin: 0 0 24px 0;
  line-height: 1.6;
  max-width: 320px;
  margin-left: auto;
  margin-right: auto;
}

.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 22px 0;
  color: var(--line-dark);
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--line);
}

.auth-divider::before {
  margin-right: 14px;
}

.auth-divider::after {
  margin-left: 14px;
}

.auth-divider .divider-dot {
  font-size: 10px;
  color: var(--accent);
  opacity: 0.8;
}

.form-group-v2 {
  margin-bottom: 18px;
  display: flex;
  flex-direction: column;
}

.form-group-v2 label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
  text-align: left;
}

.input-wrapper-v2 {
  position: relative;
  display: flex;
  align-items: center;
}

.input-wrapper-v2 input {
  width: 100%;
  height: 48px;
  padding: 0 44px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 14px;
  color: var(--ink);
  font-family: var(--font-sans);
  transition: all 0.25s ease;
  box-sizing: border-box;
}

.input-wrapper-v2 input:focus {
  border-color: var(--accent);
  background: var(--surface);
  outline: none;
  box-shadow: 0 0 0 3px rgba(154, 123, 86, 0.12);
}

.input-wrapper-v2 .field-icon-left {
  position: absolute;
  left: 14px;
  color: var(--muted);
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.input-wrapper-v2 .toggle-password-btn {
  position: absolute;
  right: 14px;
  background: none;
  border: none;
  padding: 0;
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}

.input-wrapper-v2 .toggle-password-btn:hover {
  color: var(--ink);
}

.btn-submit-v2 {
  width: 100%;
  height: 48px;
  background: linear-gradient(135deg, #8A6F4E 0%, #5E4A32 100%);
  color: #FFFFFF;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(138, 111, 78, 0.15);
  margin-top: 6px;
}

.btn-submit-v2:hover {
  background: linear-gradient(135deg, #9C805D 0%, #6D563C 100%);
  box-shadow: 0 6px 16px rgba(138, 111, 78, 0.25);
  transform: translateY(-1px);
}

.btn-submit-v2:active {
  transform: translateY(0);
}

.auth-links-v2 {
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  margin: 18px 0 0 0;
}

.auth-links-v2 a {
  color: var(--accent) !important;
  text-decoration: none;
  font-weight: 600;
}

.auth-links-v2 a:hover {
  text-decoration: underline;
}

.auth-footer-v2 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 11px;
  color: var(--muted);
  margin-top: 20px;
  text-align: center;
}

.auth-footer-v2 svg {
  flex-shrink: 0;
}

/* Responsive adjustment */
@media (max-width: 600px) {
  .auth-layout-v2 {
    justify-content: center;
    padding-left: 20px;
    padding-right: 20px;
  }
  .auth-card-floating {
    padding: 32px 24px 24px 24px;
  }
}
