:root {
  color-scheme: dark;
  --bg: #101418;
  --panel: #151a20;
  --panel-2: #11161c;
  --panel-3: #1b222b;
  --text: #eef3f7;
  --muted: #91a0ad;
  --line: #26313a;
  --teal: #4fd1c5;
  --orange: #f97345;
  --blue: #6ea8fe;
  --yellow: #f4c95d;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  display: flex;
  color: var(--text);
  background: var(--bg);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.login-gate {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-content: center;
  padding: 24px;
  background:
    radial-gradient(circle at top left, rgb(79 209 197 / 14%), transparent 34%),
    var(--bg);
}

.login-card {
  width: min(500px, calc(100vw - 48px));
  display: grid;
  align-content: start;
  justify-items: stretch;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 34px;
  background: var(--panel);
  box-shadow: 0 28px 80px rgb(0 0 0 / 42%);
}

.login-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 28px;
  margin-bottom: 14px;
}

.login-brand .brand-logo {
  width: 185px;
  height: 70px;
  object-fit: contain;
  object-position: left center;
}

.login-brand-copy {
  display: grid;
  gap: 2px;
  margin-left: -88px;
  min-width: 0;
}

.login-brand-copy strong {
  color: var(--text);
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
}

.login-brand-copy span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.login-card h1 {
  margin: 0;
  font-size: 16px;
  text-align: center;
}

.login-card p {
  margin: 0;
  color: var(--muted);
}

.login-card label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 800;
}

.floating-field {
  position: relative;
  display: block;
}

.floating-field input {
  width: 100%;
  min-height: 57px;
  padding-top: 29px;
  padding-bottom: 14px;
}

.floating-field > span {
  position: absolute;
  top: 22px;
  left: 14px;
  z-index: 2;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  pointer-events: none;
  transition:
    top 0.16s ease,
    color 0.16s ease,
    font-size 0.16s ease;
}

.floating-field:focus-within > span,
.floating-field input:not(:placeholder-shown) + span,
.floating-password-field:has(input:not(:placeholder-shown)) > span {
  top: 9px;
  color: var(--teal);
  font-size: 11px;
}

.floating-password-field .password-field input {
  padding-right: 10px;
}

.login-card .form-message {
  position: static;
  margin: 0;
}

.login-submit {
  position: relative;
}

.login-submit i {
  display: none;
  width: 17px;
  height: 17px;
  border: 2px solid rgb(7 19 19 / 28%);
  border-top-color: #071313;
  border-radius: 999px;
  animation: login-spin 0.75s linear infinite;
}

.login-submit.is-loading {
  display: inline-grid;
  grid-template-columns: auto auto;
  place-content: center;
  gap: 10px;
}

.login-submit.is-loading i {
  display: inline-block;
}

@keyframes login-spin {
  to {
    transform: rotate(360deg);
  }
}

.login-footer {
  display: block;
  margin-top: 14px;
  color: color-mix(in srgb, var(--muted) 78%, transparent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.4;
  text-align: center;
}

button,
input,
select,
textarea {
  font: inherit;
}

input[readonly] {
  color: var(--muted);
  background: #0d1217;
  cursor: not-allowed;
}

button {
  cursor: pointer;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 25;
  width: 260px;
  height: 100vh;
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: #12171d;
  overflow: visible;
}

.brand,
.profile {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand {
  align-self: center;
  margin-bottom: 34px;
  border: 0;
  padding: 0;
  color: inherit;
  background: transparent;
  text-align: left;
  transform: translateX(-18px);
}

.brand:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 4px;
}

.brand-logo {
  display: block;
  width: 154px;
  height: 58px;
  object-fit: contain;
  object-position: left center;
}

.brand-copy {
  display: grid;
  gap: 2px;
  margin-left: -73px;
  min-width: 0;
}

.brand-copy strong {
  color: var(--text);
  font-size: 18px;
  line-height: 1;
}

.brand-logo-dark {
  display: none;
}

:where(html.light-theme, html.theme-light, html[data-theme="light"], body.light-theme, body.theme-light, body[data-theme="light"]) .brand-logo-light {
  display: none;
}

:where(html.light-theme, html.theme-light, html[data-theme="light"], body.light-theme, body.theme-light, body[data-theme="light"]) .brand-logo-dark {
  display: block;
}

.menu-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--text);
  background: #1e2630;
  font-weight: 800;
  letter-spacing: 0;
}

.menu-toggle svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 2;
}

.menu-close-icon,
.sidebar.menu-open .menu-open-icon {
  display: none;
}

.sidebar.menu-open .menu-close-icon {
  display: block;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--teal);
  color: #071313;
  font-weight: 900;
}

.brand span,
.profile span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.nav {
  display: grid;
  gap: 4px;
}

.nav-dropdown {
  position: relative;
  display: grid;
}

.nav-submenu {
  position: absolute;
  left: 100%;
  top: 0;
  z-index: 30;
  min-width: 190px;
  display: none;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px;
  background: var(--panel);
  box-shadow: 0 16px 40px rgb(0 0 0 / 30%);
}

.nav-dropdown:hover .nav-submenu,
.nav-dropdown:focus-within .nav-submenu {
  display: grid;
}

.nav-dropdown.is-direct .nav-submenu {
  display: none;
}

.nav-submenu button {
  height: 34px;
  border: 0;
  border-radius: 8px;
  padding: 0 10px;
  color: var(--muted);
  background: transparent;
  text-align: left;
}

.nav-submenu button:hover,
.nav-submenu button.active {
  color: var(--text);
  background: var(--panel-3);
}

.nav-dropdown:has(.active) > .nav-item {
  color: var(--text);
  background: var(--panel-3);
}

.nav-item {
  height: 38px;
  border: 0;
  border-radius: 8px;
  padding: 0 12px;
  text-align: left;
  color: var(--muted);
  background: transparent;
}

.settings-nav,
.logout-nav {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  justify-self: center;
  margin: 0;
  padding: 0;
  color: var(--muted);
  background: transparent;
  text-align: center;
  line-height: 1;
}

.settings-nav svg,
.logout-nav svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.nav-item.active,
.nav-item:hover,
.settings-nav.active,
.settings-nav:hover,
.logout-nav:hover {
  color: var(--text);
  background: #1e2630;
}

.profile {
  margin-top: auto;
  width: 140px;
  margin-left: auto;
  margin-right: auto;
  padding: 10px;
  display: grid;
  grid-template-columns: 30px 40px 30px;
  justify-content: center;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.profile .settings-nav,
.profile .logout-nav {
  position: relative;
  width: 30px;
  height: 30px;
  flex-basis: 30px;
  align-self: center;
}

.profile .settings-nav svg,
.profile .logout-nav svg {
  width: 19px;
  height: 19px;
}

.avatar-button {
  position: relative;
  width: 40px;
  height: 40px;
  flex-basis: 40px;
  align-self: center;
}

.avatar-button {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0;
  overflow: hidden;
  background: transparent;
}

.avatar-button::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  padding: 0;
  color: var(--text);
  background: rgb(0 0 0 / 62%);
  font-size: 10px;
  font-weight: 900;
  opacity: 0;
  transition: opacity 0.16s ease;
}

.avatar-button:hover::after,
.avatar-button:focus-visible::after {
  opacity: 1;
}

.profile .avatar {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  margin-top: 0;
  border-radius: 10px;
  background: var(--teal);
  color: #071313;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
}

.avatar img {
  display: block;
  width: 40px;
  height: 40px;
  object-fit: cover;
}

.profile-photo-input {
  display: none;
}

.shell {
  min-width: 0;
  flex: 1;
  margin-left: 260px;
}

.topbar {
  min-height: 92px;
  padding: 10px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  margin-top: 4px;
  font-size: 22px;
}

.link-tree {
  min-height: 18px;
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
}

.link-tree button {
  border: 0;
  padding: 0;
  color: var(--muted);
  background: transparent;
  font-weight: 700;
}

.link-tree button:hover {
  color: var(--teal);
}

.link-tree span:last-child {
  color: var(--muted);
  font-weight: 500;
}

.actions,
.form-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-editor-select {
  min-width: 260px;
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.header-editor-select select {
  height: 38px;
  min-height: 38px;
  text-transform: none;
}

.primary,
.ghost {
  height: 38px;
  border-radius: 8px;
  border: 1px solid var(--line);
  padding: 0 14px;
  color: var(--text);
  background: var(--panel);
}

.primary {
  border-color: transparent;
  color: #071313;
  background: var(--teal);
  font-weight: 800;
}

.ghost:hover {
  background: #202934;
}

.dashboard-panel,
.settings-panel,
.post-panel,
.performance-panel,
.projects-panel,
.clients-panel,
.directory-panel,
.history-panel {
  margin: 18px 28px 28px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.dashboard-panel h2,
.settings-panel h2,
.post-panel h2,
.performance-panel h2,
.projects-panel h2,
.clients-panel h2,
.directory-panel h2,
.history-panel h2 {
  margin-top: 6px;
  font-size: 24px;
}

.dashboard-panel p,
.settings-panel p,
.post-panel p,
.performance-panel p,
.projects-panel p,
.clients-panel p,
.directory-panel p,
.history-panel p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 14px;
}

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

.is-hidden {
  display: none !important;
}

.form-message {
  position: sticky;
  top: 10px;
  z-index: 40;
  margin: 14px 28px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  font-weight: 800;
  box-shadow: 0 18px 44px rgb(0 0 0 / 28%);
  outline: none;
  animation: message-pop 220ms ease-out;
}

.form-message.success {
  color: #d7fffa;
  border-color: rgb(79 209 197 / 45%);
  background: rgb(79 209 197 / 12%);
}

.form-message.error {
  color: #ffd6dd;
  border-color: rgb(251 113 133 / 45%);
  background: rgb(251 113 133 / 12%);
}

.modal-form-message {
  position: static;
  grid-column: 1 / -1;
  margin: 0;
  box-shadow: none;
}

@keyframes message-pop {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.metrics article,
.dashboard-panel,
.settings-panel,
.performance-panel,
.directory-panel,
.home-panel,
.action-card,
.flow-card,
.detail,
.detail-grid > div,
.detail-block,
.compact-item,
.catalog-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.metrics article {
  padding: 16px;
}

.metrics span,
.metrics small,
.detail-grid span {
  color: var(--muted);
  font-size: 12px;
}

.metrics strong {
  display: block;
  margin: 10px 0 2px;
  font-size: 28px;
}

.system-version {
  display: block;
  margin-top: 16px;
  color: color-mix(in srgb, var(--muted) 78%, transparent);
  font-size: 10px;
  line-height: 1;
  text-align: right;
}

.home-panel {
  margin: 18px 28px 28px;
  padding: 18px;
}

.home-panel h2 {
  margin-top: 6px;
  font-size: 24px;
}

.home-panel p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 14px;
}

.home-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.home-separator {
  grid-column: 1 / -1;
  height: 1px;
  margin: 4px 0;
  background: var(--line);
}

.library-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

.action-card {
  min-height: 124px;
  padding: 16px;
  text-align: left;
  color: var(--text);
  background: var(--panel-2);
  transition:
    border-color 160ms ease,
    transform 160ms ease,
    background 160ms ease;
}

.action-card:hover {
  border-color: rgb(79 209 197 / 52%);
  background: var(--panel-3);
  transform: translateY(-1px);
}

.action-card:disabled,
.primary:disabled,
.ghost:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.action-card:disabled:hover {
  border-color: var(--line);
  background: var(--panel-2);
  transform: none;
}

.action-card strong {
  display: block;
  font-size: 18px;
}

.action-card span {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.workspace {
  width: min(980px, calc(100vw - 40px));
  max-height: min(860px, calc(100vh - 40px));
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  color: var(--text);
  background: var(--panel);
}

.workspace::backdrop {
  background: rgb(0 0 0 / 62%);
}

.flow-dialog .modal-card {
  gap: 14px;
}

.flow-dialog .modal-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  min-height: 78px;
}

.flow-modal-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.flow-modal-actions .icon-button {
  width: 48px;
  height: 48px;
}

.flow-title-group {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.flow-title-text {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 4px;
}

.flow-title-text h2 {
  overflow-wrap: anywhere;
  line-height: 1.05;
}

.flow-code-chip {
  box-sizing: border-box;
  display: inline-grid;
  place-items: center;
  width: 78px;
  height: 64px;
  min-height: 64px;
  margin: 0;
  min-width: 78px;
  padding: 0 16px;
  border-radius: 10px;
  color: var(--text);
  border: 1px solid var(--line);
  background: var(--panel-2);
  font-size: 17px;
  line-height: 1;
}

.main-flow {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

.flow-card {
  min-width: 0;
  overflow: hidden;
}

.flow-card.wide {
  grid-column: 1 / -1;
}

.card-header {
  min-height: 82px;
  padding: 16px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
}

.card-header p,
.detail-header p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.step,
.status-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 26px;
  min-width: 26px;
  margin-bottom: 8px;
  border-radius: 8px;
  padding: 0 8px;
  color: #071313;
  background: var(--teal);
  font-size: 12px;
  font-weight: 900;
}

.status-chip {
  color: #d7fffa;
  border: 1px solid rgb(79 209 197 / 22%);
  background: rgb(79 209 197 / 12%);
  white-space: nowrap;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px 14px;
  padding: 16px;
}

.nested-form {
  grid-column: 1 / -1;
  padding: 0;
}

.project-grid {
  grid-template-columns: 1fr;
}

label {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.form-grid > label {
  grid-column: span 3;
}

.user-create-form > .form-section-title,
.user-create-form > .user-access-layout {
  grid-column: 1 / -1;
}

.user-access-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 26px;
  align-items: start;
}

.user-create-form.is-editing-user .user-access-layout {
  grid-template-columns: 132px minmax(0, 1fr);
}

.user-access-fields {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
}

.user-access-fields > label {
  grid-column: span 3;
}

.user-create-form.is-editing-user .user-access-fields > label:has(#userCreateRole) {
  display: none;
}

.user-create-form.is-editing-user .user-full-name-field {
  grid-column: span 4;
}

.user-full-name-field,
.user-password-field {
  grid-column: 1 / -1;
}

.icon-button.user-password-shortcut {
  grid-column: span 2;
  align-self: end;
  display: inline-flex;
  width: fit-content;
  min-width: 148px;
  height: 40px;
  min-height: 40px;
  padding: 0 14px;
  gap: 8px;
  align-items: center;
  justify-content: center;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.user-create-form:not(.is-editing-user) .icon-button.user-password-shortcut {
  width: 100%;
}

.icon-button.user-password-shortcut svg {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
}

.form-section-title {
  grid-column: 1 / -1;
  margin-top: 6px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.form-section-title:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.project-grid > label {
  grid-column: 1;
}

.project-grid > .span-2,
.project-grid > .checkbox-group,
.project-grid > .project-upload-box {
  grid-column: 1 / -1;
  width: 100%;
}

fieldset {
  min-width: 0;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.checkbox-group {
  grid-column: span 3;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.checkbox-group legend {
  padding: 0 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.checkbox-options {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.product-checkbox-options {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 12px 18px;
}

.checkbox-group label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.product-checkbox-options label {
  min-width: 0;
  width: 100%;
  white-space: nowrap;
}

.project-upload-box {
  min-width: 0;
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.upload-suggestion {
  position: relative;
  min-height: 72px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  gap: 4px 12px;
  border: 1px dashed rgb(79 209 197 / 42%);
  border-radius: 8px;
  padding: 14px;
  color: var(--text);
  background: rgb(79 209 197 / 7%);
  cursor: pointer;
}

.upload-suggestion:hover {
  border-color: var(--teal);
  background: rgb(79 209 197 / 11%);
}

.upload-suggestion input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.upload-suggestion svg {
  grid-row: span 2;
  width: 28px;
  height: 28px;
  color: var(--teal);
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.upload-suggestion strong {
  font-size: 15px;
}

.upload-suggestion small {
  color: var(--muted);
  font-size: 12px;
}

.checkbox-group input {
  width: 16px;
  height: 16px;
  accent-color: var(--teal);
}

.checkbox-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.checkbox-inline input {
  width: 16px;
  height: 16px;
  accent-color: var(--teal);
}

.input-action {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.password-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  align-items: stretch;
}

.password-field input {
  min-width: 0;
  border-radius: 8px 0 0 8px;
}

.password-eye {
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-left: 0;
  border-radius: 0 8px 8px 0;
  color: var(--muted);
  background: var(--panel-2);
}

.password-eye:hover,
.password-eye:active {
  color: var(--accent);
}

.password-eye svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.password-rules {
  grid-column: 1 / -1;
  margin: -4px 0 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.password-change-form {
  grid-template-columns: 1fr;
  max-width: 560px;
  margin: 0 auto;
}

.password-change-form > label,
.password-change-form .password-rules,
.password-change-form .form-actions {
  grid-column: 1;
}

.password-change-form .form-actions {
  justify-content: center;
}

.library-modal.client-edit-modal.compact-password-modal {
  width: min(590px, calc(100vw - 40px));
}

.compact-password-modal .modal-card {
  width: 100%;
}

.delivery-format {
  grid-column: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.option-column {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.option-column > span {
  width: 100%;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.option-column label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.option-column input {
  width: 16px;
  height: 16px;
  accent-color: var(--teal);
}

.span-2 {
  grid-column: span 3;
}

.third-field {
  grid-column: span 2;
}

.field-hint {
  min-height: 14px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.field-hint[data-tone="loading"] {
  color: var(--yellow);
}

.field-hint[data-tone="success"] {
  color: var(--teal);
}

.field-hint[data-tone="error"] {
  color: #fb7185;
}

.muted-line {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--text);
  outline: none;
  background: var(--panel-2);
}

select {
  appearance: none;
  padding-right: 42px;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 24px) 50%, calc(100% - 18px) 50%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

select:invalid {
  color: rgb(237 242 247 / 56%);
}

input,
select {
  height: 40px;
}

textarea {
  min-height: 88px;
  padding-top: 10px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 2px rgb(79 209 197 / 12%);
}

input[readonly] {
  color: var(--teal);
  font-weight: 900;
}

.form-actions {
  grid-column: 1 / -1;
  justify-content: flex-end;
}

.user-delete-button {
  margin-right: auto;
}

.address-source-field {
  display: none;
}

.conditional-hidden {
  display: none;
}

.autocomplete-field {
  position: relative;
}

.suggestion-list {
  position: absolute;
  z-index: 20;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 240px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 18px 40px rgb(0 0 0 / 28%);
}

.suggestion-item {
  display: block;
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 11px 12px;
  color: var(--text);
  text-align: left;
  background: transparent;
}

.suggestion-item:hover {
  background: var(--panel-3);
}

.suggestion-item span,
.suggestion-empty {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.suggestion-empty {
  padding: 12px;
}

.suggestion-empty strong {
  display: block;
  color: var(--muted);
}

.suggestion-action {
  width: 100%;
  min-height: 36px;
  margin-top: 10px;
  border: 1px solid color-mix(in srgb, var(--teal) 45%, var(--line));
  border-radius: 8px;
  padding: 0 12px;
  color: #071313;
  background: var(--teal);
  font-weight: 900;
}

.suggestion-action:hover {
  filter: brightness(1.05);
}

.product-toolbar {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 10px;
  align-items: end;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.product-toolbar .autocomplete-field {
  grid-column: span 2;
}

.product-preview {
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 10px;
  background: var(--panel-2);
}

.product-preview span {
  display: block;
  color: var(--muted);
  font-size: 10px;
}

.product-preview strong {
  display: block;
  margin-top: 1px;
  font-size: 13px;
}

.table {
  overflow-x: auto;
}

.table-head,
.row {
  display: grid;
  grid-template-columns: 1fr 1.15fr 0.35fr 0.5fr 0.55fr 0.72fr;
  min-width: 820px;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
}

.post-table {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.post-head,
.post-row {
  grid-template-columns: 300px 160px minmax(120px, 1fr) 150px 218px;
  min-width: 960px;
  box-sizing: border-box;
}

.post-title-cell {
  width: 300px;
  min-height: 38px;
}

.editor-post-view .post-head,
.editor-post-view .post-row {
  grid-template-columns: 300px 160px minmax(92px, 1fr) 150px 44px;
  min-width: 780px;
}

.performance-tools {
  grid-template-columns: minmax(180px, 220px) minmax(160px, 180px) minmax(260px, 1fr) minmax(240px, 0.55fr);
  grid-template-rows: auto auto;
  align-items: start;
}

.performance-search {
  grid-column: 1 / 4;
  grid-row: 2;
}

.performance-score-wrap {
  grid-column: 4;
  grid-row: 1 / 3;
  align-self: stretch;
  display: grid;
  align-content: start;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.performance-score-wrap > span {
  min-height: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.performance-score {
  height: 113px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 16px;
  background: var(--panel-2);
}

.performance-score span {
  color: var(--muted);
  font-size: 21px;
  font-weight: 900;
  line-height: 1.05;
}

.performance-score strong {
  color: var(--text);
  font-size: 42px;
  line-height: 0.9;
}

.performance-head,
.performance-row {
  grid-template-columns: 300px 160px 150px 160px 90px;
  min-width: 860px;
}

.performance-row .row-actions {
  justify-content: flex-start;
}

.post-row:nth-child(even) {
  background: rgba(255, 255, 255, 0.024);
}

.post-row:nth-child(odd) {
  background: rgba(255, 255, 255, 0.006);
}

.status-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  justify-content: center;
}

.adjustment-counters {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.adjustment-counters strong {
  color: var(--text);
  font-size: 13px;
}

.history-head,
.history-row {
  grid-template-columns: 150px 180px 170px minmax(280px, 1fr);
  min-width: 780px;
}

.history-row strong {
  display: block;
}

.history-row:nth-child(even) {
  background: rgba(255, 255, 255, 0.025);
}

.history-row:nth-child(odd) {
  background: rgba(255, 255, 255, 0.006);
}

.history-action {
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}

.row-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.post-row .row-actions {
  flex-wrap: nowrap;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 150px;
  min-height: 42px;
  border: 1px solid rgb(79 209 197 / 28%);
  border-radius: 8px;
  padding: 8px 10px;
  color: #d7fffa;
  background: rgb(79 209 197 / 10%);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.12;
  text-align: center;
}

.status-finalizado {
  color: #bbf7d0;
  border-color: rgb(34 197 94 / 42%);
  background: rgb(34 197 94 / 12%);
}

.status-backup-feito,
.status-ajustado {
  color: #e9d5ff;
  border-color: rgb(168 85 247 / 42%);
  background: rgb(168 85 247 / 12%);
}

.status-aguardando-editor,
.status-aguardando-editor-revisor,
.status-aguardando-revisao,
.status-editando,
.status-revisando,
.status-editado-aguardando-revisor,
.status-aprovado-aguardando-envio,
.status-enviado-aguardando-cliente {
  color: #d7fffa;
  border-color: rgb(79 209 197 / 34%);
  background: rgb(79 209 197 / 10%);
}

.status-ajustes-do-cliente,
.status-ajustes-do-editor,
.status-ajustes-do-revisor {
  color: #fed7aa;
  border-color: rgb(251 146 60 / 42%);
  background: rgb(251 146 60 / 12%);
}

.status-aguardando-liberacao {
  color: #fde68a;
  border-color: rgb(250 204 21 / 42%);
  background: rgb(250 204 21 / 12%);
}

.status-evento-futuro {
  color: #bfdbfe;
  border-color: rgb(96 165 250 / 42%);
  background: rgb(96 165 250 / 12%);
}

.flow-button {
  width: 132px;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.025);
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.flow-button-icon {
  width: 42px;
  display: inline-grid;
  place-items: center;
}

.flow-button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.flow-button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.025);
  cursor: pointer;
}

.icon-button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.danger-icon:hover,
.icon-mini-button.danger-icon:hover {
  border-color: #f97345;
  color: #ffb199;
  background: rgb(249 115 69 / 10%);
}

.icon-button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.product-edit-form.deadline-only .product-edit-control {
  display: none;
}

.deadline-summary {
  grid-column: 1 / -1;
  display: grid;
  gap: 18px;
}

.deadline-hero {
  padding: 8px 0 6px;
}

.deadline-hero span {
  display: block;
  color: var(--muted);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.22em;
}

.deadline-hero h3 {
  margin: 10px 0 6px;
  color: var(--text);
  font-size: clamp(34px, 5vw, 58px);
  line-height: 0.95;
  letter-spacing: 0;
}

.deadline-hero p {
  margin: 0;
  color: var(--muted);
  font-size: 20px;
}

.adjustment-hero {
  padding-bottom: 0;
}

.adjustment-hero h3 {
  font-size: clamp(34px, 7vw, 48px);
}

.adjustment-comment-field textarea {
  min-height: 180px;
}

#productAdjustmentCommentModal .form-grid {
  grid-template-columns: 1fr;
}

#productAdjustmentCommentModal .span-2,
#productAdjustmentCommentModal .deadline-summary {
  grid-column: 1;
}

#productAdjustmentCommentModal .product-edit-actions {
  width: 100%;
  justify-content: space-between;
}

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

.deadline-meta-grid div {
  min-height: 78px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
}

.deadline-meta-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.deadline-meta-grid strong {
  display: block;
  margin-top: 9px;
  font-size: 18px;
}

.product-edit-form.deadline-only label:has(#editProductCustomDeadline) {
  grid-column: 1 / -1;
  padding: 12px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: rgba(76, 211, 201, 0.08);
}

.product-edit-form.deadline-only #editProductCustomDeadline {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(76, 211, 201, 0.22);
}

.product-edit-form.deadline-only .product-edit-actions {
  grid-column: 1 / -1;
  justify-content: center;
}

.projects-heading {
  display: none;
}

.clients-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.client-tools {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 220px;
  gap: 12px;
  margin-top: 18px;
}

.client-tools.performance-tools {
  grid-template-columns: minmax(180px, 220px) minmax(160px, 180px) minmax(260px, 1fr) minmax(240px, 0.55fr);
  grid-template-rows: auto auto;
  align-items: start;
}

.post-tools {
  grid-template-columns: minmax(260px, 1.35fr) repeat(3, minmax(150px, 0.75fr));
  align-items: end;
}

.clients-table {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.clients-head,
.client-row,
.directory-head,
.directory-row,
.project-list-head,
.project-list-row {
  grid-template-columns: minmax(190px, 1.25fr) 145px 145px 130px 70px 180px;
  min-width: 0;
}

.project-list-head,
.project-list-row {
  grid-template-columns: minmax(220px, 1.35fr) minmax(160px, 1fr) 110px 120px 80px 140px;
}

.directory-head,
.directory-row {
  grid-template-columns: minmax(190px, 1.25fr) 110px 145px 90px 90px;
  min-width: 0;
}

.client-row span,
.directory-row span,
.project-list-row span {
  overflow-wrap: anywhere;
}

.client-row span:last-child,
.project-list-row span:last-child {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.count-link {
  border: 0;
  padding: 0;
  color: var(--accent);
  background: transparent;
  font-weight: 900;
  cursor: pointer;
}

.directory-type {
  font-size: 10px;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: 0;
  text-transform: uppercase;
}

.name-link {
  border: 0;
  padding: 0;
  color: var(--text);
  background: transparent;
  text-align: left;
  font-weight: 900;
}

.name-link:hover {
  color: var(--teal);
}

.instagram-link {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: var(--panel);
}

.instagram-link:hover {
  color: var(--teal);
  border-color: rgb(79 209 197 / 45%);
  background: rgb(79 209 197 / 10%);
}

.instagram-link svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
}

.detail-modal {
  width: min(760px, calc(100vw - 40px));
}

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

.item-detail-grid div {
  min-width: 0;
}

.item-detail-grid strong {
  overflow-wrap: anywhere;
}

.muted-action {
  color: var(--muted);
  font-size: 12px;
}

.danger {
  border-color: rgb(248 113 113 / 50%);
  color: #fecaca;
}

.danger:hover {
  background: rgb(248 113 113 / 12%);
}

.client-edit-modal {
  width: min(980px, calc(100vw - 40px));
}

.client-edit-modal .modal-card {
  width: 100%;
}

.client-edit-modal .form-grid {
  width: 100%;
}

.client-edit-actions {
  justify-content: space-between;
}

.year-controls,
.header-year-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.year-controls strong,
.header-year-controls strong {
  min-width: 76px;
  text-align: center;
  font-size: 20px;
}

.header-year-controls .icon-button {
  font-size: 18px;
  font-weight: 900;
}

.header-year-controls .icon-button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.project-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.month-column {
  min-height: 250px;
  border: 1px solid rgb(79 209 197 / 12%);
  border-radius: 8px;
  padding: 12px;
  background: #0c1204;
}

.month-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.month-header h3 {
  font-size: 18px;
  letter-spacing: 0.04em;
}

.month-header span {
  color: var(--muted);
  font-weight: 800;
}

.month-cards {
  display: grid;
  gap: 10px;
}

.project-card {
  width: 100%;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 12px;
  color: var(--text);
  background: #24262a;
  text-align: left;
}

.project-card:hover {
  border-color: rgb(79 209 197 / 50%);
  background: #2b2e33;
}

.project-card strong,
.project-card span {
  display: block;
}

.project-card strong {
  font-size: 17px;
  line-height: 1.25;
}

.project-card span {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

.project-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
  color: var(--muted);
}

.project-card-meta small {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
}

.project-card-meta svg {
  width: 12px;
  height: 12px;
  fill: currentColor;
}

.month-empty {
  padding: 14px;
}

.project-extra-section {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--panel-2);
}

.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.section-title-row span {
  color: var(--muted);
  font-weight: 800;
}

.project-extra-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 10px;
}

.table-head {
  height: 38px;
  color: var(--muted);
  font-size: 12px;
  border-bottom: 1px solid var(--line);
}

.row {
  min-height: 58px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
}

.row small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

.empty-row {
  padding: 22px 16px;
  color: var(--muted);
  font-size: 13px;
}

.detail {
  max-height: calc(100vh - 140px);
  overflow: auto;
  padding: 16px;
  background: rgb(21 26 32 / 68%);
}

.detail-block {
  margin-bottom: 14px;
  padding: 14px;
}

.detail-header h2 {
  margin-top: 6px;
  font-size: 22px;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

.detail-grid > div {
  padding: 12px;
  background: var(--panel-2);
}

.detail-grid strong {
  display: block;
  min-height: 18px;
  margin-top: 8px;
  overflow-wrap: anywhere;
  font-size: 13px;
}

.timeline-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.timeline-title span {
  color: var(--muted);
  font-size: 12px;
}

.compact-list,
.catalog-list {
  display: grid;
  gap: 8px;
}

.compact-item {
  width: 100%;
  padding: 10px;
  text-align: left;
  color: var(--text);
  background: var(--panel-2);
}

.compact-item:hover,
.compact-item.selected {
  border-color: rgb(79 209 197 / 50%);
  background: var(--panel-3);
}

.compact-item span,
.catalog-item span,
.empty {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.catalog-list {
  max-height: 310px;
  overflow: auto;
  padding-right: 4px;
}

.catalog-item {
  padding: 10px;
  background: var(--panel-2);
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 14px;
  margin-top: 18px;
}

.settings-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  overflow: hidden;
}

.manual-copy {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border: 1px solid rgb(79 209 197 / 35%);
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--text);
  background: rgb(79 209 197 / 10%);
}

.manual-copy span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.manual-copy input {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--text);
  background: var(--panel);
}

.product-settings-card {
  grid-column: 1 / -1;
}

.import-export-card {
  grid-column: 1 / -1;
}

.import-export-grid {
  display: grid;
  grid-template-columns: minmax(150px, 190px) 118px minmax(340px, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.backup-restore-grid {
  grid-template-columns: 170px minmax(340px, 1fr) auto;
  margin-top: 2px;
}

.import-export-grid .mini-button,
.import-export-grid .primary {
  height: 40px;
  margin-top: 21px;
}

.backup-restore-grid .mini-button,
.backup-restore-grid .primary {
  margin-top: 21px;
}

.import-download-button {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  justify-content: center;
  padding: 0 11px;
  font-size: 12px;
}

.import-download-button svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.import-file-field {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.import-file-picker {
  min-height: 40px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 5px;
  background: var(--panel);
}

.import-file-picker span {
  display: inline-grid;
  place-items: center;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 10px;
  color: var(--text);
  background: var(--panel-3);
  font-size: 12px;
  font-weight: 800;
}

.import-file-picker strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.import-file-field input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
}

.settings-section-title {
  grid-column: 1 / -1;
  padding-top: 10px;
}

.settings-section-title.compact-title {
  padding-top: 4px;
}

.settings-section-title h3 {
  margin-top: 4px;
  font-size: 20px;
}

.settings-section-title.compact-title h3 {
  font-size: 15px;
}

.settings-toggle {
  width: 100%;
  min-height: 54px;
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  align-items: center;
  border: 0;
  padding: 14px;
  color: var(--text);
  background: transparent;
  text-align: left;
}

.settings-toggle:hover {
  background: var(--panel-3);
}

.settings-toggle span {
  font-size: 18px;
  font-weight: 800;
}

.settings-toggle small {
  color: var(--muted);
  font-size: 12px;
}

.settings-toggle strong {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 1px solid rgb(79 209 197 / 45%);
  border-radius: 999px;
  color: var(--teal);
  background: rgb(79 209 197 / 10%);
  font-size: 18px;
  line-height: 1;
}

.settings-toggle svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.settings-body {
  display: none;
  padding: 0 14px 14px;
}

.settings-card.is-open .settings-body {
  display: block;
}

.settings-items {
  display: grid;
  gap: 8px;
}

.settings-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}

.settings-product-row {
  grid-template-columns: minmax(220px, 1.2fr) 80px 90px minmax(300px, 1.6fr) 150px;
  padding: 8px 0;
  border-bottom: 1px solid rgb(148 163 184 / 10%);
}

.settings-product-row.is-dragging {
  opacity: 0.45;
}

.settings-product-row.is-drag-over {
  border-color: var(--accent);
  background: rgb(79 209 197 / 8%);
}

.settings-product-head {
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) 80px 90px minmax(300px, 1.6fr) 150px;
  gap: 8px;
  padding: 8px 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.settings-row-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.settings-row-actions .drag-handle {
  cursor: grab;
}

.settings-row-actions .drag-handle:active {
  cursor: grabbing;
}

.product-applies-text {
  max-width: 100%;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.25;
  text-transform: uppercase;
}

.icon-mini-button {
  width: 32px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: var(--panel);
  cursor: pointer;
}

.icon-mini-button:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--panel-3);
}

.icon-mini-button svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.product-config-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 120px 120px;
  gap: 12px;
  margin: 4px 0 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
}

.product-application-group {
  grid-column: 1 / -1;
}

.product-application-options {
  width: 100%;
}

.product-config-actions {
  padding: 0;
}

.add-product-type-button {
  margin-top: 12px;
}

.settings-row input {
  height: 36px;
}

.settings-add {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-top: 12px;
}

.settings-product-add {
  grid-template-columns: 1fr 90px 90px auto;
}

.user-add {
  grid-template-columns: minmax(160px, 1fr) minmax(180px, 1fr) 160px auto;
}

.users-card {
  grid-column: 1 / -1;
}

.permissions-card {
  grid-column: 1 / -1;
}

.permission-matrix {
  display: grid;
  gap: 12px;
}

.permission-group {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.permission-group h3 {
  margin: 0;
  color: var(--text);
  font-size: 13px;
}

.permission-table {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
}

.permission-table-head,
.permission-table-row {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) repeat(4, minmax(92px, 120px));
  align-items: center;
  gap: 8px;
  min-height: 42px;
  border-bottom: 1px solid var(--line);
  padding: 8px 12px;
}

.permission-table-row:last-child {
  border-bottom: 0;
}

.permission-table-head {
  color: var(--muted);
  background: #111923;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.permission-table-row > span {
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
}

.permission-checkbox {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 26px;
}

.permission-checkbox input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--teal);
}

.user-list {
  display: grid;
  gap: 0;
  margin-top: 8px;
}

.user-head,
.user-row {
  display: grid;
  grid-template-columns: 46px minmax(260px, 1fr) 190px 86px 152px;
  column-gap: 16px;
  align-items: center;
}

.user-head {
  padding: 0 8px 7px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.user-row {
  min-height: 48px;
  padding: 6px 8px;
  border-bottom: 1px solid rgb(255 255 255 / 5%);
}

.user-row:nth-child(odd) {
  background: rgb(255 255 255 / 2.5%);
}

.user-row:nth-child(even) {
  background: rgb(79 209 197 / 4%);
}

.user-row small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.user-list-avatar {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--teal) 28%, var(--line));
  border-radius: 10px;
  color: #071313;
  background: var(--teal);
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
}

.user-list-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-row select {
  height: 32px;
  min-height: 32px;
  padding: 0 28px 0 10px;
  font-size: 11px;
}

.user-access {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 86px;
  min-height: 32px;
  padding: 0 8px;
  border: 1px solid color-mix(in srgb, var(--teal) 35%, var(--line));
  border-radius: 8px;
  color: var(--teal);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.user-access.is-blocked {
  border-color: color-mix(in srgb, #f97345 35%, var(--line));
  color: #ffb199;
  background: rgb(249 115 69 / 8%);
}

.user-actions {
  display: inline-flex;
  gap: 6px;
  justify-content: flex-end;
  align-items: center;
  white-space: nowrap;
}

.icon-mini-spacer {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
}

.user-actions .icon-mini-button.is-disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.user-actions .icon-mini-button.is-disabled:hover {
  color: var(--text);
  border-color: var(--line);
  background: var(--panel);
}

.user-add {
  grid-template-columns: minmax(220px, 1fr) 180px auto;
}

.user-photo-field {
  min-width: 0;
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.user-photo-preview {
  display: grid;
  place-items: center;
  width: 110px;
  height: 110px;
  border: 1px solid var(--line);
  border-radius: 50%;
  padding: 0;
  overflow: hidden;
  color: #071313;
  background: var(--teal);
  font-size: 32px;
  font-weight: 900;
  box-shadow: 0 0 0 3px rgb(79 209 197 / 12%);
}

.user-photo-preview img {
  width: 110px;
  height: 110px;
  display: block;
  object-fit: cover;
}

#userPhotoInput {
  display: none;
}

.photo-crop-layout {
  display: grid;
  gap: 14px;
  padding: 0 16px;
}

.photo-crop-frame {
  position: relative;
  width: min(280px, calc(100vw - 104px));
  aspect-ratio: 1;
  justify-self: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #080d12;
  cursor: grab;
  touch-action: none;
}

.photo-crop-frame:active {
  cursor: grabbing;
}

.photo-crop-frame img {
  position: absolute;
  top: 50%;
  left: 50%;
  max-width: none;
  user-select: none;
  -webkit-user-drag: none;
  transform-origin: center;
}

.photo-zoom-control {
  grid-column: 1;
}

.add-user-button {
  width: 100%;
  margin-top: 12px;
}

.mini-button {
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  color: var(--text);
  background: var(--panel);
}

.mini-button:hover {
  background: var(--panel-3);
}

.library-modal {
  width: min(760px, calc(100vw - 40px));
  max-height: min(780px, calc(100vh - 40px));
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: var(--panel);
}

.library-modal.client-edit-modal {
  width: min(980px, calc(100vw - 40px));
}

.library-modal#productEditModal {
  width: min(760px, calc(100vw - 40px));
}

.library-modal#projectEditModal {
  width: min(880px, calc(100vw - 40px));
}

.library-modal#productAdjustmentCommentModal {
  width: min(560px, calc(100vw - 40px));
}

.library-modal#profilePhotoCropModal {
  width: min(420px, calc(100vw - 40px));
}

.library-modal.confirm-modal {
  width: min(420px, calc(100vw - 40px));
}

.project-edit-actions {
  justify-content: flex-end;
  gap: 10px;
}

.library-modal::backdrop {
  background: rgb(0 0 0 / 62%);
}

.modal-card {
  display: grid;
  gap: 14px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.modal-copy {
  color: var(--muted);
}

.confirm-modal .modal-card {
  justify-items: center;
  gap: 16px;
  text-align: center;
}

.confirm-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 1px solid rgb(249 115 69 / 38%);
  border-radius: 14px;
  color: #ffb199;
  background: rgb(249 115 69 / 11%);
}

.confirm-icon svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.danger-action {
  background: #f97345;
}

.danger-action:hover {
  background: #ff8a61;
}

.confirmation-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.confirm-modal .confirm-actions {
  width: 250px;
  max-width: 100%;
  grid-template-columns: repeat(2, 112px);
  justify-content: center;
  justify-self: center;
}

.confirm-modal .confirm-actions button {
  width: 112px;
  min-width: 112px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.project-modal {
  width: min(1120px, calc(100vw - 36px));
  max-height: min(860px, calc(100vh - 36px));
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: #202226;
}

.project-modal::backdrop {
  background: rgb(0 0 0 / 70%);
}

.project-modal-shell {
  display: grid;
}

.project-modal-top {
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 22px;
  border-bottom: 1px solid #343840;
}

.month-pill {
  border-radius: 6px;
  padding: 6px 10px;
  color: var(--text);
  background: #4a4d55;
  font-weight: 800;
}

.project-modal-main {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.9fr);
  min-height: 620px;
}

.project-modal-content {
  display: grid;
  align-content: start;
  gap: 22px;
  padding: 34px 42px;
}

.project-modal-content h2 {
  margin-top: 8px;
  font-size: 34px;
}

.project-modal-content p,
.description-editor span {
  color: var(--muted);
}

.project-modal-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

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

.project-modal-stats div {
  border: 1px solid #3a3f47;
  border-radius: 8px;
  padding: 12px;
}

.project-modal-stats span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.project-modal-stats strong {
  display: block;
  margin-top: 6px;
}

.description-editor {
  display: grid;
  gap: 8px;
}

.description-editor textarea {
  min-height: 130px;
  resize: vertical;
}

.product-info-detail-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 0;
}

.product-info-detail-grid > div {
  background: transparent;
}

.project-activity {
  border-left: 1px solid #343840;
  padding: 34px 22px;
  background: #151719;
}

.activity-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.comment-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-bottom: 18px;
}

.comment-list {
  display: grid;
  gap: 14px;
}

.comment-item {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 10px;
}

.comment-avatar {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--text);
  background: #5942b8;
  font-weight: 900;
}

.comment-item span {
  display: block;
  margin-top: 2px;
  color: var(--blue);
  font-size: 12px;
}

.comment-item p {
  margin-top: 6px;
  color: var(--text);
}

@media (max-width: 1380px) {
  .client-tools.performance-tools,
  .performance-tools {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(220px, 0.72fr);
    grid-template-rows: auto auto;
  }

  .performance-search {
    grid-column: 1 / 3;
    grid-row: 2;
    min-width: 0;
  }

  .performance-score-wrap {
    grid-column: 3;
    grid-row: 1 / 3;
    min-width: 0;
  }
}

@media (max-width: 1180px) {
  body {
    display: block;
  }

  .sidebar {
    position: sticky;
    top: 0;
    inset: auto;
    z-index: 50;
    width: 100%;
    height: 86px;
    min-height: auto;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    overflow: visible;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .brand,
  .profile {
    flex: 0 0 auto;
    margin: 0;
  }

  .brand {
    align-self: center;
    justify-self: start;
    transform: none;
  }

  .menu-toggle {
    display: inline-flex;
    justify-self: end;
  }

  .profile {
    width: auto;
    min-width: 0;
    justify-self: end;
  }

  .shell {
    margin-left: 0;
  }

  .nav {
    position: absolute;
    top: 76px;
    right: 14px;
    z-index: 80;
    display: none;
    width: min(280px, calc(100vw - 28px));
    margin: 0;
    gap: 4px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 8px;
    background: var(--panel);
    box-shadow: 0 16px 40px rgb(0 0 0 / 28%);
  }

  .sidebar.menu-open .nav {
    display: grid;
  }

  .nav-item {
    width: 100%;
  }

  .nav-submenu {
    position: absolute;
    top: 0;
    right: 100%;
    left: auto;
    min-width: 190px;
    margin-right: 6px;
    box-shadow: 0 16px 40px rgb(0 0 0 / 30%);
  }

  .main-flow {
    grid-template-columns: 1fr;
  }

  .project-board {
    grid-template-columns: repeat(2, minmax(240px, 1fr));
  }

  .project-extra-grid {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }

  .detail {
    max-height: none;
  }
}

@media (max-width: 520px) {
  .sidebar {
    grid-template-columns: auto 1fr auto;
    gap: 8px;
  }

  .brand-logo {
    width: 82px;
    height: 44px;
  }

  .brand-copy strong {
    font-size: 15px;
  }

  .brand-copy {
    margin-left: -34px;
  }

  .brand-copy span {
    max-width: 82px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .settings-nav,
  .logout-nav {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
  }

  .nav-submenu {
    position: static;
    min-width: 0;
    margin-top: 4px;
    margin-right: 0;
    box-shadow: none;
  }
}

@media (max-width: 420px) {
  .login-card {
    aspect-ratio: auto;
    padding: 28px;
  }

  .brand-logo {
    width: 56px;
    height: 40px;
  }

  .brand-copy strong {
    font-size: 13px;
  }

  .brand-copy {
    margin-left: -24px;
  }

  .brand-copy span {
    max-width: 70px;
    font-size: 10px;
  }

  .menu-toggle {
    width: 44px;
    justify-content: center;
    padding: 0;
  }

  .menu-toggle span {
    display: none;
  }
}

@media (max-width: 820px) {
  .topbar,
  .actions,
  .library-actions {
    height: auto;
    align-items: stretch;
    flex-direction: column;
  }

  .topbar {
    padding: 18px;
  }

  .metrics,
  .workspace {
    padding-left: 18px;
    padding-right: 18px;
  }

  .home-panel,
  .dashboard-panel,
  .settings-panel,
  .post-panel,
  .performance-panel,
  .projects-panel,
  .clients-panel,
  .directory-panel,
  .form-message {
    margin-left: 18px;
    margin-right: 18px;
  }

  .metrics,
  .home-actions,
  .settings-grid,
  .permission-matrix,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .settings-product-row,
  .settings-product-head,
  .settings-product-add,
  .user-head,
  .user-row,
  .user-add {
    grid-template-columns: 1fr;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .projects-heading,
  .clients-heading,
  .year-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .project-board,
  .project-extra-grid,
  .client-tools {
    grid-template-columns: 1fr;
  }

  .client-tools.performance-tools,
  .performance-tools {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: auto auto auto;
  }

  .performance-search {
    grid-column: 1 / -1;
    grid-row: 3;
  }

  .performance-score-wrap {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .performance-score {
    height: auto;
    min-height: 92px;
  }

  .project-modal-main {
    grid-template-columns: 1fr;
  }

  .project-activity {
    border-left: 0;
    border-top: 1px solid #343840;
  }

  .form-grid > label,
  .form-grid > .third-field,
  .span-2,
  .third-field,
  .checkbox-group,
  .delivery-format {
    grid-column: 1;
  }

  .delivery-format {
    grid-template-columns: 1fr;
  }

  .user-access-layout,
  .user-access-fields {
    grid-template-columns: 1fr;
  }

  .user-create-form.is-editing-user .user-access-layout {
    grid-template-columns: 1fr;
  }

  .user-access-fields > label {
    grid-column: 1;
  }

  .import-export-grid {
    grid-template-columns: 1fr;
  }

  .confirmation-actions {
    grid-template-columns: 1fr;
  }

.product-toolbar {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .client-tools.performance-tools,
  .performance-tools {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .performance-search,
  .performance-score-wrap {
    grid-column: 1;
    grid-row: auto;
  }
}

.app-tooltip {
  position: fixed;
  z-index: 2147483647;
  max-width: 260px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: #0b1117;
  box-shadow: 0 10px 24px rgb(0 0 0 / 34%);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  pointer-events: none;
  opacity: 0;
  transform: translateY(2px);
  transition: opacity 80ms ease, transform 80ms ease;
}

.app-tooltip.is-visible {
  opacity: 1;
  transform: translateY(0);
}
