@media(max-width:1199px) {

  .workspace-main {
    padding: 28px 25px;
  }

  .workspace-topbar {
    padding-inline: 25px;
  background: #0e130f;
  }

  .stats-grid {
    gap: 12px;
  }

  .metric-card {
    padding: 18px;
  }

  .metric-value {
    font-size: 26px;
  }

  .dashboard-split {
    gap: 18px;
    grid-template-columns: minmax(0,1.65fr) minmax(240px,1fr);
  }

  .dashboard-bottom {
    gap: 18px;
  }

  .panel,.table-card {
    padding: 20px;
  }

  .page-heading h1 {
    font-size: 25px;
  }

  .page-heading p {
    font-size: 11px;
  }
}

@media(max-width:1023px) {

  .sidebar {
    transform: translateX(-100%);
    transition: transform .22s;
    box-shadow: 10px 0 30px #0001;
  background: #0c110e;
  border-right: 1px solid var(--line);
  }

  .workspace.menu-open .sidebar {
    transform: translateX(0);
  }

  .workspace.menu-open .workspace-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: #03060399;
    backdrop-filter: blur(3px);
    z-index: 40;
  }

  .workspace-body {
    margin-left: 0;
  }

  .workspace-menu {
    display: flex;
    flex-shrink: 0;
  }

  .workspace-topbar {
    height: 68px;
    gap: 14px;
  background: #0e130f;
  }

  .workspace-breadcrumb {
    margin-right: auto;
  }

  .workspace-main {
    padding: 26px;
  }
}

@media(max-width:767px) {

  .feature-icon {
    margin-bottom: 19px;
  background: #1b241a;
  color: var(--lime);
  }

  .workspace-topbar {
    padding-inline: 18px;
    height: 65px;
    gap: 11px;
  background: #0e130f;
  }

  .workspace-breadcrumb {
    font-size: 10px;
    gap: 8px;
  }

  .workspace-breadcrumb>span:first-child {
    display: none;
  }

  .workspace-breadcrumb>.ui-icon {
    display: none;
  }

  .workspace-topbar-actions {
    gap: 11px;
  }

  .workspace-topbar-actions>a {
    display: none;
  }

  .role-label {
    font-size: 8px;
    padding: 5px 8px;
  background: #1b241a;
  color: #bec8b4;
  }

  .workspace-topbar-actions>.user-avatar {
    height: 28px;
    width: 28px;
    font-size: 9px;
  }

  .workspace-main {
    padding: 24px 18px 35px;
  }

  .page-heading {
    align-items: start;
    flex-direction: column;
    gap: 18px;
    margin-bottom: 23px;
  }

  .page-heading h1 {
    font-size: 25px;
  }

  .page-heading p {
    font-size: 11px;
    max-width: 430px;
  }

  .page-heading-actions {
    width: 100%;
  }

  .page-heading-actions .ui-button {
    font-size: 11px;
    padding: 10px 13px;
  }

  .stats-grid,.stats-grid.three {
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 12px;
    margin-bottom: 19px;
  }

  .stats-grid.three .metric-featured {
    grid-column: span 2;
  }

  .metric-card {
    padding: 17px;
  }

  .metric-topline {
    font-size: 10px;
    gap: 5px;
  }

  .metric-icon {
    width: 25px;
    height: 25px;
  background: #1b241a;
  color: #bec8b4;
  }

  .metric-icon svg {
    width: 14px;
    height: 14px;
  }

  .metric-value {
    font-size: 28px;
    margin-top: 13px;
  }

  .metric-sub {
    font-size: 9px;
    margin-top: 7px;
  color: var(--muted);
  }

  .stats-grid.three .metric-featured .metric-value {
    font-size: 33px;
  }

  .quota-summary {
    flex-wrap: wrap;
    gap: 18px;
    padding: 19px;
    margin-bottom: 19px;
  }

  .quota-summary-title {
    min-width: unset;
    flex: 1;
  }

  .quota-summary-progress {
    order: 3;
    flex-basis: 100%;
  }

  .quota-summary .ui-button {
    font-size: 10px;
    padding: 8px 11px;
  }

  .dashboard-split,.dashboard-bottom {
    grid-template-columns: 1fr;
    gap: 19px;
    margin-bottom: 19px;
  }

  .panel,.table-card {
    padding: 20px 17px;
  }

  .panel-header {
    margin-bottom: 21px;
  }

  .panel-header h2 {
    font-size: 12px;
  }

  .panel-header>a {
    font-size: 9px;
  color: var(--lime);
  }

  .period-label {
    font-size: 8px;
    padding: 5px 7px;
    gap: 4px;
  }

  .period-label svg {
    width: 12px;
  }

  .chart-wrap {
    height: 210px;
  }

  .start-panel {
    padding: 23px;
  background: #172011;
  border: 1px solid #303b2c;
  }

  .start-panel>.feature-icon {
    margin-bottom: 18px;
  background: #303b2c;
  color: #d3ddc8;
  border: 1px solid #46573a;
  }

  .start-panel h2 {
    font-size: 23px;
    max-width: 350px;
  }

  .start-panel p {
    max-width: 400px;
  }

  .start-panel .protocol-pills {
    margin-block: 18px 22px;
  }

  .stock-card {
    padding: 24px;
  background: #202d15;
  border: 1px solid #43552a;
  }

  .stock-amount {
    font-size: 39px;
    margin-top: 17px;
  color: #d3ddc8;
  }

  .stock-note {
    padding-top: 20px;
    font-size: 10px;
  }

  .data-table {
    font-size: 10px;
    min-width: 480px;
  }

  .data-table th {
    font-size: 9px;
  }

  .data-table td {
    padding-block: 14px;
  }

  .workspace-notice {
    padding: 12px 18px;
    font-size: 11px;
  background: #1b241a;
  color: #d3ddc8;
  border-bottom: 1px solid #46573a;
  }

  .workspace-main .ui-card {
    max-width: 100%;
  }

  .workspace-main .flex>input[readonly] {
    min-width: 0;
  }

  .workspace-main form .font-mono {
    overflow-wrap: anywhere;
  }

  .workspace-main .ui-button {
    max-width: 100%;
    white-space: normal;
  }

  .workspace-main .ui-button-small {
    white-space: nowrap;
  }

  .workspace-main .flex.items-center.justify-between {
    flex-wrap: wrap;
    row-gap: 12px;
  }

  .workspace-main .grid.lg\:grid-cols-5 {
    gap: 20px;
  }

  #gen-actions {
    width: 100%;
  }

  #gen-result {
    min-height: 320px;
  background: #0b100c;
  color: #d3ddc8;
  border-color: #303b2c;
  }

  .modal-overlay {
    padding: 16px;
  background: #030603cc;
  }

  .modal-dialog {
    max-height: 90dvh;
  background: #111812;
  border: 1px solid #46573a;
  box-shadow: 0 24px 80px #00000050;
  }

  .modal-heading {
    padding: 18px 20px;
  }

  .modal-body {
    padding: 21px 20px;
  }

  .modal-footer {
    padding: 16px 20px;
    flex-wrap: wrap;
  }

  .modal-footer .ui-button {
    font-size: 11px;
  }

  .docs-layout {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-block: 30px 55px;
  }

  .docs-sidebar {
    padding: 0 0 20px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .docs-sidebar-label {
    margin-bottom: 13px;
  }

  .docs-sidebar>nav {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
  }

  .docs-sidebar a {
    font-size: 11px;
    margin: 0;
    padding: 8px 10px;
  }

  .prose-docs h1 {
    font-size: 25px;
  }

  .prose-docs h2 {
    font-size: 20px;
  }

  .prose-docs {
    font-size: 12px;
  }

  .ui-input {
    font-size: 16px;
  background: #0e130f;
  color: var(--ink);
  border: 1px solid #303b2c;
  }

  .ui-label {
    font-size: 12px;
  color: #d3ddc8;
  }

  .workspace-main .ui-input {
    padding: 10px 12px;
  }

  .generator-intro {
    font-size: 11px;
  }
}

@media(max-width:374px) {

  .workspace-main {
    padding-inline: 14px;
  }

  .workspace-topbar {
    padding-inline: 14px;
  background: #0e130f;
  }

  .metric-card {
    padding: 14px;
  }

  .metric-value {
    font-size: 25px;
  }

  .metric-icon {
    display: none;
  background: #1b241a;
  color: #bec8b4;
  }

  .role-label {
    display: none;
  background: #1b241a;
  color: #bec8b4;
  }
}

@media(prefers-reduced-motion:reduce) {

  html {
    scroll-behavior: auto;
  background: var(--paper);
  }

  *,*:before,*:after {
    animation: none!important;
    transition: none!important;
  }

  .fade-in {
    opacity: 1;
  }

  .ui-button:hover {
    transform: none;
  }
}

@media(max-width:1199px) {

  .topup-grid {
    grid-template-columns: minmax(250px,1fr) minmax(0,1.5fr);
  }
}

@media(max-width:767px) {

  .topup-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .topup-purchase {
    padding: 23px;
  }

  .topup-purchase .quantity-options button {
    flex: 1;
  }

  .topup-history {
    min-height: 290px;
  }
}

@media(max-width:767px) {

  .credential-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .credential-controls>.ui-input {
    grid-column: 1/-1;
  }

  .credential-controls>.ui-button {
    width: 100%;
  }

  .workspace-main .topup-purchase>h2 {
    font-size: 24px;
  }
}
