﻿@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@300;400;500;600;700&family=Poppins:wght@400;600;700;800&display=swap');

  :root {
    color-scheme: dark;
    --page-bg: #05070a;
    --text-strong: #f7f9f8;
    --text-soft: rgba(247,249,248,0.9);
    --text-muted: rgba(235, 240, 238, 0.75);
    --panel-bg: linear-gradient(145deg, rgba(7, 13, 16, 0.66), rgba(7, 13, 16, 0.42));
    --panel-border: rgba(255,255,255,0.24);
    --control-bg: rgba(255,255,255,0.07);
    --control-border: rgba(255,255,255,0.22);
    --accent: #74e0b7;
    --accent-strong: #b7f5e0;
    --accent-ink: #06251b;
  }

  html[data-theme="light"] {
    color-scheme: light;
    --page-bg: #eef7f1;
    --text-strong: #102019;
    --text-soft: rgba(16,32,25,0.9);
    --text-muted: rgba(16,32,25,0.68);
    --panel-bg: linear-gradient(145deg, rgba(255,255,255,0.84), rgba(245,251,247,0.64));
    --panel-border: rgba(35,69,51,0.2);
    --control-bg: rgba(255,255,255,0.54);
    --control-border: rgba(35,69,51,0.22);
    --accent: #237d22;
    --accent-strong: #2f8f25;
    --accent-ink: #f7fff8;
  }

  * { margin: 0; padding: 0; box-sizing: border-box; }

  html, body {
    width: 100%;
    height: 100%;
    font-family: 'Manrope', sans-serif;
    background: var(--page-bg);
    overflow: hidden;
  }

  .stage {
    position: relative;
    width: 100vw;
    height: 100vh;
    min-height: 100dvh;
  }

  .bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
  }

  .scrim {
    position: absolute;
    inset: 0;
    background:
      linear-gradient(95deg, rgba(2,4,7,0.82) 0%, rgba(2,4,7,0.55) 28%, rgba(2,4,7,0.08) 55%, rgba(2,4,7,0) 70%),
      linear-gradient(0deg, rgba(2,4,7,0.6) 0%, rgba(2,4,7,0.05) 34%, rgba(2,4,7,0) 60%, rgba(2,4,7,0.35) 100%);
  }

  html[data-theme="light"] .scrim {
    background:
      linear-gradient(95deg, rgba(255,255,255,0.86) 0%, rgba(255,255,255,0.6) 30%, rgba(255,255,255,0.08) 58%, rgba(255,255,255,0) 76%),
      linear-gradient(0deg, rgba(238,247,241,0.56) 0%, rgba(238,247,241,0.05) 42%, rgba(238,247,241,0) 70%, rgba(255,255,255,0.42) 100%);
  }

  .top-nav {
    position: absolute;
    top: 28px;
    left: 5.5vw;
    right: 5.5vw;
    z-index: 4;
    display: grid;
    grid-template-columns: minmax(120px, 1fr) minmax(420px, 1.8fr) minmax(120px, 1fr);
    align-items: center;
    gap: 28px;
  }

  .top-nav::before {
    content: "";
    position: absolute;
    inset: -12px -18px;
    z-index: -1;
    border: 1px solid rgba(255,255,255,0.16);
    border-radius: 999px;
    background: linear-gradient(120deg, rgba(4, 9, 11, 0.64), rgba(4, 9, 11, 0.34));
    box-shadow: 0 18px 46px rgba(0,0,0,0.22);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-4px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    backdrop-filter: blur(14px) saturate(130%);
    -webkit-backdrop-filter: blur(14px) saturate(130%);
  }

  .top-nav:hover::before {
    opacity: 1;
    transform: translateY(0);
  }

  .brand-mark {
    grid-column: 1;
    justify-self: start;
    position: relative;
    z-index: 1;
    display: block;
    text-decoration: none;
    opacity: 0.78;
  }

  .brand-mark img {
    width: clamp(118px, 11vw, 158px);
    height: auto;
    object-fit: contain;
    display: block;
    transition: opacity 0.2s ease;
  }

  .nav-menu {
    grid-column: 2;
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(6, minmax(max-content, 1fr));
    align-items: center;
    justify-content: center;
    gap: clamp(10px, 1.6vw, 30px);
  }

  .nav-item {
    position: relative;
    display: flex;
    justify-content: center;
  }

  .nav-actions {
    grid-column: 3;
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: clamp(14px, 1.8vw, 28px);
    justify-self: end;
  }

  .nav-link {
    position: relative;
    color: var(--text-soft);
    padding: 10px 14px;
    font-family: 'Manrope', sans-serif;
    font-size: clamp(12px, 1.05vw, 15px);
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    text-align: center;
    transition: color 0.2s ease, opacity 0.2s ease;
    white-space: nowrap;
  }

  .nav-link:hover,
  .nav-item:hover .nav-link,
  .nav-item:focus-within .nav-link,
  .nav-link.is-active {
    color: var(--accent-strong);
  }

  .nav-dropdown {
    position: fixed;
    top: 78px;
    left: 0;
    right: 0;
    min-height: 250px;
    transform: translateY(8px);
    display: block;
    padding: 30px 7vw 34px;
    border-top: 1px solid rgba(255,255,255,0.14);
    border-bottom: 1px solid rgba(255,255,255,0.14);
    background: linear-gradient(145deg, rgba(7, 13, 16, 0.88), rgba(7, 13, 16, 0.68));
    box-shadow: 0 34px 80px rgba(0,0,0,0.36);
    backdrop-filter: blur(22px) saturate(130%);
    -webkit-backdrop-filter: blur(22px) saturate(130%);
    text-align: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
  }

  .nav-dropdown::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -28px;
    height: 28px;
  }

  .nav-item:hover .nav-dropdown,
  .nav-item:focus-within .nav-dropdown {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
  }

  .nav-dropdown a {
    border-radius: 6px;
    color: rgba(247,249,248,0.82);
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.18s ease, color 0.18s ease;
  }

  .nav-dropdown a:hover,
  .nav-dropdown a:focus {
    background: rgba(183, 245, 224, 0.14);
    color: #b7f5e0;
    outline: none;
  }

  .mega-tabs {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0;
    margin-bottom: 20px;
  }

  .mega-tabs a {
    padding: 0 clamp(18px, 2.1vw, 34px);
    border-radius: 0;
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    font-weight: 700;
  }

  .mega-tabs a:first-child { padding-left: 0; }

  .mega-tabs a + a {
    border-left: 1px solid rgba(255,255,255,0.28);
  }

  .mega-tabs a:hover,
  .mega-tabs a:focus {
    background: transparent;
    color: #b7f5e0;
  }

  .mega-title {
    margin: 0 0 22px;
    color: rgba(247,249,248,0.92);
    font-family: 'Poppins', sans-serif;
    font-size: clamp(1.05rem, 1.45vw, 1.55rem);
    font-weight: 500;
  }

  .mega-list {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0;
    max-width: 1180px;
    margin: 0 auto;
  }

  .mega-list a {
    padding: 0 clamp(18px, 2.1vw, 34px);
    border-radius: 0;
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    font-weight: 700;
  }

  .mega-list a + a {
    border-left: 1px solid rgba(255,255,255,0.28);
  }

  .mega-list a:hover,
  .mega-list a:focus {
    background: transparent;
    color: #b7f5e0;
  }

  .icon-button {
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: rgba(247,249,248,0.9);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: color 0.2s ease, transform 0.2s ease;
  }

  .icon-button:hover {
    color: #b7f5e0;
    transform: translateY(-1px);
  }

  .icon-button svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
  }

  .theme-toggle .sun-icon,
  html[data-theme="light"] .theme-toggle .moon-icon {
    display: none;
  }

  html[data-theme="light"] .theme-toggle .sun-icon {
    display: block;
  }

  .portal-float {
    position: absolute;
    right: 5.5vw;
    bottom: 5vh;
    z-index: 4;
    border: 1px solid rgba(255,255,255,0.22);
    border-radius: 999px;
    background: rgba(255,255,255,0.07);
    color: rgba(247,249,248,0.88);
    padding: 12px 18px;
    font-family: 'Manrope', sans-serif;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    backdrop-filter: blur(8px);
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
  }

  .portal-float:hover {
    background: rgba(183, 245, 224, 0.16);
    border-color: rgba(183, 245, 224, 0.48);
    color: #f7f9f8;
    transform: translateY(-1px);
  }

  .content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 10vh 5.5vw 6vh;
  }

  .hero { max-width: 660px; }

  .page { display: none; }

  .page.is-active { display: flex; }

  .dev-page {
    position: relative;
    z-index: 2;
    height: 100%;
    align-items: center;
    justify-content: center;
    padding: 12vh 24px 6vh;
    text-align: center;
  }

  .dev-page h1 {
    font-size: clamp(2rem, 5vw, 4.6rem);
    animation: fadeUp 0.8s ease-out 0.1s forwards;
  }

  .nowrap-line {
    display: inline-block;
    white-space: nowrap;
  }

  .eyebrow {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
    opacity: 0;
    animation: fadeUp 1s ease-out 0.3s forwards;
  }

  .eyebrow .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #b7f5e0;
    box-shadow: 0 0 12px 3px rgba(183, 245, 224, 0.7);
  }

  .eyebrow span {
    font-size: 12px;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: rgba(235, 240, 238, 0.75);
    font-weight: 500;
  }

  h1 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-style: normal;
    font-size: clamp(1.7rem, 3.6vw, 2.9rem);
    line-height: 1.18;
    color: #f7f9f8;
    letter-spacing: -0.01em;
    opacity: 0;
    animation: fadeUp 1.2s ease-out 0.5s forwards;
  }

  h1 .accent {
    font-weight: 800;
    background: linear-gradient(100deg, #d9fff0 0%, #8ee8c9 45%, #5fd6ae 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }

  .rotator-wrap {
    display: inline-block;
    position: relative;
    vertical-align: bottom;
  }

  .rotator {
    display: inline-block;
    font-weight: 800;
    font-style: normal;
    background: linear-gradient(100deg, #d9fff0 0%, #8ee8c9 45%, #5fd6ae 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    transition: opacity 0.45s ease, transform 0.45s ease, filter 0.45s ease;
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }

  .rotator.is-swapping {
    opacity: 0;
    transform: translateY(6px);
    filter: blur(3px);
  }

  .rule {
    margin-top: 34px;
    width: 68px;
    height: 1px;
    background: rgba(255,255,255,0.4);
    opacity: 0;
    animation: growLine 1s ease-out 1.05s forwards;
  }

  @keyframes fadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
  }

  @keyframes growLine {
    from { opacity: 0; width: 0; }
    to   { opacity: 1; width: 68px; }
  }

  .notify {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 30px;
    opacity: 0;
    animation: fadeUp 1s ease-out 1.15s forwards;
  }

  .notify input {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.28);
    border-radius: 999px;
    padding: 13px 22px;
    font-family: 'Manrope', sans-serif;
    font-size: 13.5px;
    color: #f4f6f5;
    width: 260px;
    max-width: 60vw;
    outline: none;
    backdrop-filter: blur(6px);
  }

  .notify input::placeholder { color: rgba(240,244,242,0.55); }

  .notify button {
    background: linear-gradient(120deg, #b7f5e0, #6fdcb2);
    border: none;
    border-radius: 999px;
    padding: 13px 24px;
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #06251b;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    white-space: nowrap;
  }

  .notify button:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 22px -6px rgba(111, 220, 178, 0.55);
  }

  .notify-msg {
    margin-top: 10px;
    font-size: 12.5px;
    color: rgba(183, 245, 224, 0.9);
    min-height: 16px;
    opacity: 0;
    transition: opacity 0.3s ease;
  }

  .notify-msg.show { opacity: 1; }

  .modal {
    position: fixed;
    inset: 0;
    z-index: 10;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(2, 4, 7, 0.42);
    backdrop-filter: blur(8px);
  }

  .modal.is-open { display: flex; }

  .modal-panel {
    width: min(100%, 430px);
    border: 1px solid rgba(255,255,255,0.24);
    border-radius: 8px;
    background: linear-gradient(145deg, rgba(7, 13, 16, 0.66), rgba(7, 13, 16, 0.42));
    box-shadow: 0 28px 90px rgba(0,0,0,0.42);
    padding: 28px;
    color: #f7f9f8;
    backdrop-filter: blur(22px) saturate(130%);
    -webkit-backdrop-filter: blur(22px) saturate(130%);
  }

  .modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 20px;
  }

  .modal-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.25rem;
    line-height: 1.25;
    font-weight: 700;
  }

  .modal-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.22);
    background: rgba(255,255,255,0.06);
    color: #f7f9f8;
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
  }

  .modal-form {
    display: grid;
    gap: 14px;
  }

  .modal-form label {
    display: grid;
    gap: 7px;
    font-size: 12px;
    color: rgba(235, 240, 238, 0.72);
  }

  .modal-form label.inline-check {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .modal-form input {
    width: 100%;
    border: 1px solid rgba(255,255,255,0.24);
    border-radius: 999px;
    background: rgba(255,255,255,0.11);
    padding: 13px 18px;
    font-family: 'Manrope', sans-serif;
    font-size: 14px;
    color: #f7f9f8;
    outline: none;
  }

  .modal-form input::placeholder { color: rgba(240,244,242,0.48); }

  .modal-form button {
    margin-top: 4px;
    border: none;
    border-radius: 999px;
    background: linear-gradient(120deg, #b7f5e0, #6fdcb2);
    padding: 13px 22px;
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: #06251b;
    cursor: pointer;
  }

  .modal-form button:disabled {
    cursor: wait;
    opacity: 0.7;
  }

  .socials {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 26px;
    opacity: 0;
    animation: fadeUp 1s ease-out 1.35s forwards;
  }

  .socials a {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.28);
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #f2f4f3;
    text-decoration: none;
    transition: background 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
  }

  .socials a:hover {
    background: rgba(183, 245, 224, 0.18);
    border-color: rgba(183, 245, 224, 0.55);
    transform: translateY(-3px);
  }

  .socials svg { width: 18px; height: 18px; }

  .portal-page {
    position: absolute;
    inset: 0;
    z-index: 3;
    height: auto;
    width: 100%;
    padding: 24px;
    color: var(--text-strong);
    overflow: hidden;
  }

  .modal-form input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--accent-strong);
  }

  .portal-page.is-active {
    display: block;
  }

  .portal-shell {
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 8px;
    background: linear-gradient(145deg, rgba(7,13,16,0.72), rgba(7,13,16,0.48));
    box-shadow: 0 28px 90px rgba(0,0,0,0.34);
    overflow: hidden;
    backdrop-filter: blur(22px) saturate(130%);
    -webkit-backdrop-filter: blur(22px) saturate(130%);
  }

  .portal-shell.is-dragging {
    border-color: rgba(116,224,183,0.72);
    box-shadow: 0 28px 90px rgba(0,0,0,0.34), inset 0 0 0 2px rgba(116,224,183,0.24);
  }

  .portal-shell.is-dragging .portal-main::after {
    content: "Solte os arquivos para enviar nesta pasta";
    position: absolute;
    inset: 24px;
    z-index: 4;
    display: grid;
    place-items: center;
    border: 2px dashed rgba(116,224,183,0.68);
    border-radius: 8px;
    background: rgba(7,13,16,0.52);
    color: var(--text-strong);
    font-family: 'Poppins', sans-serif;
    font-size: clamp(1rem, 2vw, 1.45rem);
    font-weight: 700;
    text-align: center;
    backdrop-filter: blur(10px);
  }

  .top-nav.is-system .nav-menu {
    grid-template-columns: repeat(1, minmax(max-content, 180px));
    justify-content: center;
  }

  .top-nav.is-system .nav-dropdown,
  .top-nav.is-system .commerce-action {
    display: none;
  }

  .top-nav.is-system .nav-link {
    color: var(--text-soft);
  }

  .top-nav.is-system .nav-link.is-active {
    color: var(--accent-strong);
  }

  body.is-portal .portal-float {
    display: none;
  }

  body.is-portal .top-nav {
    display: none;
  }

  .portal-sidebar {
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-height: 0;
    padding: 24px;
    border-right: 1px solid rgba(255,255,255,0.14);
  }

  .portal-logo {
    width: min(170px, 80%);
    height: auto;
    display: block;
    margin: 0 auto 20px;
    cursor: pointer;
  }

  .portal-logo:focus-visible {
    outline: 2px solid rgba(44, 141, 38, 0.55);
    outline-offset: 8px;
    border-radius: 8px;
  }

  .portal-kicker {
    color: var(--accent-strong);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
  }

  .portal-sidebar h2,
  .portal-main h2 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.18rem;
    line-height: 1.2;
  }

  .portal-user {
    margin-top: auto;
    flex: 0 0 auto;
    display: grid;
    gap: 4px;
    color: var(--text-muted);
    font-size: 12px;
  }

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

  .portal-tree {
    display: grid;
    gap: 6px;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 4px 0 12px;
    scrollbar-width: thin;
  }

  .tree-list {
    display: grid;
    gap: 5px;
    list-style: none;
  }

  .tree-list .tree-list {
    margin-left: 10px;
    padding-left: 10px;
    border-left: 1px solid rgba(255,255,255,0.14);
  }

  .tree-item {
    min-width: 0;
  }

  .tree-button {
    width: 100%;
    min-height: 34px;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--text-soft);
    padding: 8px 10px;
    font-family: 'Manrope', sans-serif;
    font-size: 13px;
    font-weight: 800;
    text-align: left;
    cursor: pointer;
  }

  .tree-button.is-main {
    min-height: 38px;
  }

  .tree-button.is-sub {
    min-height: 30px;
    padding: 7px 8px;
    font-size: 12px;
    font-weight: 750;
  }

  .tree-caret {
    flex: 0 0 auto;
    width: 12px;
    color: var(--text-muted);
    font-size: 11px;
  }

  .tree-button:hover,
  .tree-button.is-active {
    background: rgba(116,224,183,0.14);
    color: var(--text-strong);
  }

  .tree-icon {
    flex: 0 0 auto;
    width: 26px;
    height: 26px;
    border-radius: 6px;
    display: grid;
    place-items: center;
    background: rgba(116,224,183,0.14);
    color: var(--accent-strong);
  }

  .tree-icon svg {
    width: 15px;
    height: 15px;
    stroke: currentColor;
    stroke-width: 1.9;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .tree-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .portal-main {
    position: relative;
    min-width: 0;
    display: grid;
    grid-template-rows: auto auto auto minmax(0, 1fr);
    padding: 24px;
    overflow: hidden;
  }

  .portal-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
  }

  .portal-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
  }

  .portal-actions.is-hidden,
  .portal-sort.is-hidden,
  .portal-breadcrumb.is-hidden {
    display: none;
  }

  .portal-button {
    min-height: 38px;
    border: 1px solid var(--control-border);
    border-radius: 999px;
    background: var(--control-bg);
    color: var(--text-strong);
    padding: 10px 14px;
    font-family: 'Manrope', sans-serif;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
  }

  .portal-button:hover {
    border-color: rgba(116,224,183,0.5);
    background: rgba(116,224,183,0.14);
    transform: translateY(-1px);
  }

  .portal-button.primary {
    border: none;
    background: linear-gradient(120deg, var(--accent-strong), var(--accent));
    color: var(--accent-ink);
  }

  .portal-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    margin-bottom: 14px;
    color: var(--text-muted);
    font-size: 13px;
    overflow-x: auto;
  }

  .portal-breadcrumb button {
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    white-space: nowrap;
  }

  .portal-grid {
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: stretch;
    justify-content: flex-start;
    overflow-y: auto;
    padding-right: 4px;
  }

  .dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
  }

  .dashboard-card {
    min-height: 118px;
    border: 1px solid rgba(255,255,255,0.16);
    border-radius: 8px;
    background: rgba(255,255,255,0.07);
    padding: 16px;
    display: grid;
    align-content: space-between;
    gap: 12px;
  }

  .dashboard-card span {
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 800;
  }

  .dashboard-card strong {
    color: var(--text-strong);
    font-family: 'Poppins', sans-serif;
    font-size: 1.55rem;
  }

  .dashboard-card small {
    color: var(--text-muted);
    line-height: 1.45;
  }
  .site-admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
  }

  .site-manager-panel {
    border: 1px solid rgba(255,255,255,0.16);
    border-radius: 8px;
    background: rgba(255,255,255,0.07);
    padding: 18px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
  }

  .site-manager-copy span {
    color: var(--accent-strong);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
  }

  .site-manager-copy h3 {
    margin: 8px 0 6px;
    color: var(--text-strong);
    font-family: 'Poppins', sans-serif;
    font-size: 1.35rem;
  }

  .site-manager-copy p {
    max-width: 620px;
    margin: 0;
    color: var(--text-muted);
    line-height: 1.55;
  }

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

  .site-workflow-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
  }

  .site-workflow-list article {
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 8px;
    background: rgba(255,255,255,0.05);
    padding: 14px;
    display: grid;
    gap: 6px;
  }

  .site-workflow-list strong {
    color: var(--text-strong);
    font-family: 'Poppins', sans-serif;
  }

  .site-workflow-list span {
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.45;
  }
  .import-calc-panel {
    display: grid;
    gap: 10px;
  }

  .import-calc-head {
    border: 1px solid rgba(255,255,255,0.16);
    border-radius: 8px;
    background: rgba(255,255,255,0.07);
    padding: 12px 14px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 380px);
    gap: 14px;
    align-items: center;
  }

  .import-calc-head span {
    color: var(--accent-strong);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
  }

  .import-calc-head h3 {
    margin: 4px 0 3px;
    color: var(--text-strong);
    font-family: 'Poppins', sans-serif;
    font-size: 1.18rem;
  }

  .import-calc-head p,
  .import-calc-note {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.35;
    font-size: 13px;
  }

  .import-calc-note {
    border-left: 2px solid var(--accent-strong);
    padding-left: 10px;
    font-size: 12px;
  }

  .import-head-side {
    display: grid;
    justify-items: start;
    gap: 8px;
  }

  .import-dollar-action {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
  }

  .import-dollar-action strong {
    color: var(--accent-strong);
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
  }

  .import-budget-strip {
    border: 1px solid rgba(255,255,255,0.16);
    border-radius: 8px;
    background: rgba(255,255,255,0.06);
    padding: 10px 12px;
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr) minmax(130px, 190px);
    gap: 10px;
  }

  .import-budget-strip label,
  .import-calc-form label {
    display: grid;
    gap: 5px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 800;
  }

  .import-budget-strip input,
  .import-calc-form input,
  .import-calc-form select,
  .import-items-row input {
    width: 100%;
    border: 1px solid var(--control-border);
    border-radius: 8px;
    background: var(--control-bg);
    color: var(--text-strong);
    padding: 8px 10px;
    font: inherit;
    font-weight: 700;
  }

  .import-calc-layout {
    display: grid;
    grid-template-columns: minmax(260px, 330px) minmax(0, 1fr);
    gap: 10px;
    align-items: start;
  }

  .import-calc-form,
  .import-calc-results,
  .import-items-section {
    border: 1px solid rgba(255,255,255,0.16);
    border-radius: 8px;
    background: rgba(255,255,255,0.06);
    padding: 12px;
  }

  .import-calc-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .import-calc-form .drive-section-title,
  .import-calc-form .quick-actions,
  .import-calc-toolbar {
    grid-column: 1 / -1;
  }

  .quick-actions.is-tight {
    margin-top: 0;
  }

  .import-calc-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
  }

  .import-calc-toolbar span {
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 800;
  }

  .import-calc-toolbar span[data-tone="success"] {
    color: var(--accent-strong);
  }

  .import-calc-toolbar span[data-tone="warn"] {
    color: #d97706;
  }

  .import-calc-results {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .import-result-card {
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 8px;
    background: rgba(255,255,255,0.06);
    padding: 11px 12px;
    display: grid;
    gap: 5px;
  }

  .import-result-card.is-main {
    background: rgba(116,224,183,0.12);
    border-color: rgba(116,224,183,0.35);
  }

  .import-result-card span,
  .import-breakdown span {
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 800;
  }

  .import-result-card strong {
    color: var(--text-strong);
    font-family: 'Poppins', sans-serif;
    font-size: 1.12rem;
  }

  .import-result-card small {
    color: var(--text-muted);
    line-height: 1.3;
  }

  .import-breakdown {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px 10px;
  }

  .import-breakdown div {
    border-top: 1px solid rgba(255,255,255,0.12);
    padding-top: 7px;
    display: flex;
    justify-content: space-between;
    gap: 10px;
  }

  .import-breakdown strong {
    color: var(--text-strong);
    white-space: nowrap;
  }

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

  .import-items-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    flex-wrap: wrap;
  }

  .import-items-head p {
    margin: 2px 0 0;
    color: var(--text-muted);
    font-size: 12px;
  }

  .import-items-table {
    display: grid;
    gap: 6px;
    overflow-x: auto;
  }

  .import-items-row {
    min-width: 900px;
    display: grid;
    grid-template-columns: minmax(220px, 1.3fr) 72px 115px minmax(220px, 1fr) 82px 94px 86px;
    gap: 6px;
    align-items: center;
  }

  .import-items-row.is-head {
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .import-dims {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
  }

  .import-items-row strong {
    color: var(--text-strong);
    white-space: nowrap;
  }

  .import-saved-list {
    display: grid;
    gap: 8px;
  }
  .quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
  }

  .folder-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    align-items: start;
    align-content: start;
    gap: 12px;
  }

  .file-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

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

  .thumb-card {
    border: 1px solid rgba(255,255,255,0.16);
    border-radius: 8px;
    background: rgba(255,255,255,0.07);
    overflow: hidden;
    color: var(--text-strong);
  }

  .thumb-preview {
    height: 150px;
    background: rgba(116,224,183,0.08);
    display: grid;
    place-items: center;
    overflow: hidden;
  }

  .thumb-preview iframe,
  .thumb-preview img {
    width: 100%;
    height: 100%;
    border: 0;
    object-fit: cover;
    pointer-events: none;
  }

  .thumb-fallback {
    font-weight: 900;
    color: var(--accent-strong);
  }

  .thumb-info {
    display: grid;
    gap: 8px;
    padding: 12px;
  }

  .supplier-list {
    display: grid;
    gap: 0;
    border: 1px solid rgba(255,255,255,0.16);
    border-radius: 8px;
    overflow: hidden;
  }

  .supplier-card {
    border: 0;
    border-bottom: 1px solid rgba(255,255,255,0.16);
    border-radius: 0;
    background: rgba(255,255,255,0.05);
    padding: 16px;
    display: grid;
    grid-template-columns: minmax(220px, 1.2fr) minmax(240px, 1.6fr) minmax(160px, 0.8fr) auto;
    gap: 16px;
    align-items: center;
  }

  .supplier-card:last-child {
    border-bottom: 0;
  }

  .supplier-card header {
    display: contents;
  }

  .supplier-card h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
  }

  .supplier-column {
    min-width: 0;
    display: grid;
    gap: 4px;
  }

  .supplier-column-label {
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
  }

  .supplier-items {
    display: none;
  }

  .supplier-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    color: var(--text-muted);
    font-size: 13px;
  }

  .modal-panel.is-wide {
    width: min(1040px, calc(100vw - 32px));
  }

  #supplierItemsModal .modal-panel.is-wide {
    width: min(1500px, calc(100vw - 28px));
    max-height: calc(100vh - 28px);
  }

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

  .form-grid .is-full {
    grid-column: 1 / -1;
  }

  .supplier-products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
    max-height: 74vh;
    overflow-y: auto;
    padding-right: 4px;
  }

  .supplier-product {
    border: 1px solid rgba(255,255,255,0.16);
    border-radius: 8px;
    background: rgba(255,255,255,0.07);
    overflow: hidden;
  }

  .supplier-product img {
    width: 100%;
    height: 190px;
    object-fit: cover;
    display: block;
    background: rgba(116,224,183,0.08);
    cursor: zoom-in;
  }

  .supplier-product-body {
    display: grid;
    gap: 8px;
    padding: 12px;
  }

  .spec-list {
    display: grid;
    gap: 4px;
    color: var(--text-muted);
    font-size: 12px;
  }

  .image-viewer-panel {
    width: min(1280px, calc(100vw - 28px));
    max-height: calc(100vh - 28px);
    padding: 20px;
  }

  .image-viewer-frame {
    border: 1px solid rgba(255,255,255,0.16);
    border-radius: 8px;
    background: rgba(255,255,255,0.08);
    overflow: auto;
    max-height: calc(100vh - 150px);
  }

  .image-viewer-frame img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    background: #fff;
  }

  .drive-section {
    display: grid;
    gap: 10px;
  }

  .drive-section + .drive-section {
    margin-top: 10px;
  }

  .drive-section-title {
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
  }

  .drive-card {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    min-height: 72px;
    border: 1px solid rgba(255,255,255,0.16);
    border-radius: 8px;
    background: rgba(255,255,255,0.06);
    padding: 12px 14px;
    color: var(--text-strong);
  }

  .drive-card.is-folder {
    grid-template-columns: 42px minmax(0, 1fr);
    align-content: start;
    min-height: 148px;
    align-items: start;
    max-width: 240px;
  }

  .drive-card.is-folder .drive-card-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
    padding-left: 56px;
  }

  .drive-card-icon {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    background: rgba(116,224,183,0.14);
    color: var(--accent-strong);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  .drive-card-icon.is-pdf {
    background: rgba(239,68,68,0.14);
    color: #ef4444;
  }

  .drive-card-icon.is-doc {
    background: rgba(59,130,246,0.14);
    color: #3b82f6;
  }

  .drive-card-icon.is-sheet {
    background: rgba(34,197,94,0.14);
    color: #22a35a;
  }

  .drive-card-icon.is-image {
    background: rgba(168,85,247,0.14);
    color: #a855f7;
  }

  .drive-card-info {
    min-width: 0;
  }

  .drive-card-name {
    min-width: 0;
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .drive-card-meta {
    color: var(--text-muted);
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .drive-card.is-folder .drive-card-meta {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }

  .drive-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
  }

  .drive-card-actions button {
    border: 1px solid var(--control-border);
    border-radius: 999px;
    background: transparent;
    color: var(--text-strong);
    padding: 7px 10px;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
  }

  .portal-empty {
    border: 1px dashed rgba(255,255,255,0.24);
    border-radius: 8px;
    padding: 34px;
    color: var(--text-muted);
    text-align: center;
  }

  .portal-sort {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
    margin: -4px 0 14px;
  }

  .portal-sort label {
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 800;
  }

  .portal-select {
    min-height: 36px;
    border: 1px solid var(--control-border);
    border-radius: 999px;
    background: var(--control-bg);
    color: var(--text-strong);
    padding: 0 12px;
    font-family: 'Manrope', sans-serif;
    font-size: 13px;
    font-weight: 800;
    outline: none;
  }

  .editor-panel {
    width: min(96vw, 1480px);
    max-height: 92vh;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    overflow: hidden;
  }

  .editor-panel .modal-header {
    margin-bottom: 16px;
  }

  .editor-panel #fileModalBody {
    min-height: 0;
    overflow: hidden;
  }

  .editor-area {
    width: 100%;
    min-height: 54vh;
    resize: vertical;
    border: 1px solid var(--control-border);
    border-radius: 8px;
    background: rgba(255,255,255,0.08);
    color: var(--text-strong);
    padding: 16px;
    font-family: Consolas, 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.35;
    outline: none;
  }

  .preview-frame,
  .preview-image {
    width: 100%;
    height: 76vh;
    border: 1px solid var(--control-border);
    border-radius: 8px;
    background: rgba(255,255,255,0.08);
  }

  .preview-image {
    object-fit: contain;
  }

  html[data-theme="light"] .portal-shell {
    border-color: rgba(35,69,51,0.18);
    background: linear-gradient(145deg, rgba(255,255,255,0.9), rgba(244,251,247,0.74));
    box-shadow: 0 28px 90px rgba(36,74,51,0.18);
  }

  html[data-theme="light"] .portal-sidebar {
    border-right-color: rgba(35,69,51,0.16);
  }

  html[data-theme="light"] .drive-card {
    border-color: rgba(35,69,51,0.16);
    background: rgba(255,255,255,0.58);
  }

  html[data-theme="light"] .portal-empty {
    border-color: rgba(35,69,51,0.24);
  }

  html[data-theme="light"] .nav-dropdown {
    border-top-color: rgba(35,69,51,0.18);
    border-bottom-color: rgba(35,69,51,0.18);
    background: linear-gradient(145deg, rgba(255,255,255,0.88), rgba(242,249,244,0.74));
    box-shadow: 0 34px 80px rgba(36,74,51,0.18);
  }

  html[data-theme="light"] .top-nav::before {
    border-color: rgba(35,69,51,0.16);
    background: linear-gradient(120deg, rgba(255,255,255,0.88), rgba(244,251,247,0.62));
    box-shadow: 0 18px 46px rgba(36,74,51,0.16);
  }

  html[data-theme="light"] .nav-dropdown a,
  html[data-theme="light"] .mega-title,
  html[data-theme="light"] .icon-button,
  html[data-theme="light"] .portal-float,
  html[data-theme="light"] h1,
  html[data-theme="light"] .socials a {
    color: var(--text-strong);
  }

  html[data-theme="light"] .nav-link,
  html[data-theme="light"] .eyebrow span,
  html[data-theme="light"] .modal-form label {
    color: var(--text-muted);
  }

  html[data-theme="light"] .nav-link:hover,
  html[data-theme="light"] .nav-item:hover .nav-link,
  html[data-theme="light"] .nav-item:focus-within .nav-link,
  html[data-theme="light"] .nav-link.is-active,
  html[data-theme="light"] .nav-dropdown a:hover,
  html[data-theme="light"] .nav-dropdown a:focus,
  html[data-theme="light"] .mega-list a:hover,
  html[data-theme="light"] .mega-list a:focus,
  html[data-theme="light"] .icon-button:hover,
  html[data-theme="light"] .notify-msg {
    color: var(--accent-strong);
  }

  html[data-theme="light"] .portal-float,
  html[data-theme="light"] .notify input,
  html[data-theme="light"] .modal-form input,
  html[data-theme="light"] .modal-close,
  html[data-theme="light"] .socials a {
    border-color: var(--control-border);
    background: var(--control-bg);
  }

  html[data-theme="light"] .notify input,
  html[data-theme="light"] .modal-form input {
    color: var(--text-strong);
  }

  html[data-theme="light"] .notify input::placeholder,
  html[data-theme="light"] .modal-form input::placeholder {
    color: var(--text-muted);
  }

  html[data-theme="light"] .notify button,
  html[data-theme="light"] .modal-form button {
    background: linear-gradient(120deg, var(--accent-strong), var(--accent));
    color: var(--accent-ink);
  }

  html[data-theme="light"] .modal-panel {
    border-color: var(--panel-border);
    background: var(--panel-bg);
    color: var(--text-strong);
    box-shadow: 0 28px 90px rgba(36,74,51,0.2);
  }

  html[data-theme="light"] .modal-close {
    color: var(--text-strong);
  }

  @media (max-width: 720px) {
    .brand-mark {
      top: 14px;
      left: 18px;
    }

    .brand-mark img {
      width: 112px;
    }

    .top-nav {
      top: 56px;
      left: 18px;
      right: 18px;
      display: grid;
      grid-template-columns: 1fr;
      gap: 10px;
      overflow-x: auto;
      padding-bottom: 6px;
    }

    .nav-menu {
      grid-column: 1;
      display: flex;
      gap: 8px;
    }

    .nav-item {
      flex: 0 0 auto;
    }

    .nav-dropdown {
      top: 104px;
      left: 0;
      right: 0;
      transform: translateY(8px);
      max-height: calc(100vh - 120px);
      min-height: 0;
      overflow-y: auto;
      padding: 22px 20px 26px;
    }

    .nav-item:hover .nav-dropdown,
    .nav-item:focus-within .nav-dropdown {
      transform: translateY(0);
    }

    .mega-tabs {
      display: grid;
      gap: 8px;
      margin-bottom: 16px;
    }

    .mega-tabs a {
      border-left: 0;
      padding: 8px 0;
    }

    .mega-tabs a + a {
      border-left: 0;
      border-top: 1px solid rgba(255,255,255,0.16);
    }

    .mega-list {
      display: grid;
      gap: 8px;
    }

    .mega-list a {
      padding: 8px 0;
      font-size: 15px;
    }

    .mega-list a + a {
      border-left: 0;
      border-top: 1px solid rgba(255,255,255,0.16);
    }

    .nav-actions {
      position: fixed;
      top: 12px;
      right: 16px;
      z-index: 6;
      gap: 8px;
    }

    .nav-actions::before {
      content: "";
      position: absolute;
      inset: -6px -8px;
      z-index: -1;
      border: 1px solid rgba(255,255,255,0.16);
      border-radius: 999px;
      background: linear-gradient(120deg, rgba(4, 9, 11, 0.64), rgba(4, 9, 11, 0.34));
      box-shadow: 0 14px 34px rgba(0,0,0,0.22);
      opacity: 0;
      pointer-events: none;
      transform: translateY(-3px);
      transition: opacity 0.2s ease, transform 0.2s ease;
      backdrop-filter: blur(14px) saturate(130%);
      -webkit-backdrop-filter: blur(14px) saturate(130%);
    }

    .nav-actions:hover::before {
      opacity: 1;
      transform: translateY(0);
    }

    html[data-theme="light"] .nav-actions::before {
      border-color: rgba(35,69,51,0.16);
      background: linear-gradient(120deg, rgba(255,255,255,0.88), rgba(244,251,247,0.62));
      box-shadow: 0 14px 34px rgba(36,74,51,0.16);
    }

    .nav-link {
      padding: 9px 13px;
      font-size: 12px;
    }

    .icon-button {
      width: 34px;
      height: 34px;
    }

    .portal-float {
      right: 18px;
      bottom: 18px;
      padding: 11px 15px;
      font-size: 12px;
    }

    .content { padding: 11vh 24px 5vh; justify-content: center; }
    h1 { font-size: clamp(1.6rem, 6.4vw, 2.4rem); }
    .nowrap-line { white-space: normal; }
    .notify { flex-wrap: wrap; }
    .notify input { width: 100%; max-width: 100%; }
    .notify button { width: 100%; }
    .modal-panel { padding: 24px; }
    .dev-page { padding-top: 16vh; }
    .portal-page {
      padding: 104px 12px 12px;
      overflow-y: auto;
    }
    .portal-shell {
      min-height: 100%;
      height: auto;
      grid-template-columns: 1fr;
    }
    .portal-sidebar {
      border-right: 0;
      border-bottom: 1px solid rgba(255,255,255,0.14);
    }
    .portal-tree {
      max-height: 220px;
    }
    .portal-main {
      min-height: 560px;
    }
    .portal-toolbar {
      align-items: flex-start;
      flex-direction: column;
    }
    .portal-grid {
      overflow-y: visible;
    }
    .import-calc-head,
    .import-budget-strip,
    .import-calc-layout,
    .import-calc-form,
    .import-calc-results,
    .import-breakdown {
      grid-template-columns: 1fr;
    }
    .import-breakdown div {
      flex-direction: column;
      align-items: flex-start;
    }
    .drive-card {
      grid-template-columns: 42px minmax(0, 1fr);
    }
    .drive-card-actions {
      grid-column: 1 / -1;
      justify-content: flex-start;
      padding-left: 56px;
    }
    .editor-area {
      min-height: 48vh;
    }
    .preview-frame,
    .preview-image {
      height: 62vh;
    }
    .editor-panel {
      width: min(100%, 96vw);
      max-height: 94vh;
    }
  }







  .supplier-picker {
    position: relative;
    z-index: 6;
  }

  .supplier-suggestions {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    display: none;
    max-height: 260px;
    overflow-y: auto;
    border: 1px solid rgba(35,69,51,0.16);
    border-radius: 8px;
    background: rgba(255,255,255,0.96);
    box-shadow: 0 18px 45px rgba(19,31,26,0.18);
    padding: 6px;
  }

  .supplier-suggestions.is-open {
    display: grid;
    gap: 4px;
  }

  .supplier-suggestions button {
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--text-strong);
    cursor: pointer;
    display: grid;
    gap: 2px;
    padding: 9px 10px;
    text-align: left;
    font: inherit;
  }

  .supplier-suggestions button:hover {
    background: rgba(34,197,94,0.12);
  }

  .supplier-suggestions strong {
    font-size: 13px;
  }

  .supplier-suggestions span {
    color: var(--text-muted);
    font-size: 11px;
    line-height: 1.3;
  }

  .import-save-quote-bar {
    position: sticky;
    bottom: 12px;
    z-index: 15;
    display: flex;
    justify-content: flex-end;
    pointer-events: none;
  }

  .import-save-quote-bar .portal-button {
    pointer-events: auto;
    min-width: 150px;
    box-shadow: 0 14px 35px rgba(22,101,52,0.25);
  }

  .import-quotes-list {
    display: grid;
    gap: 10px;
  }

  .import-quote-values {
    display: grid;
    gap: 2px;
    justify-items: end;
    min-width: 150px;
  }

  .import-quote-values span {
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 800;
  }

  .import-quote-values strong {
    color: var(--text-strong);
    font-size: 13px;
  }

.import-quote-card {
  grid-template-columns: 42px minmax(0, 1fr) minmax(150px, auto);
  align-items: start;
  row-gap: 12px;
}

.import-quote-card .drive-card-actions {
  grid-column: 2 / -1;
  justify-content: flex-start;
  padding-left: 0;
}

.import-quote-card .drive-card-actions button {
  min-width: 82px;
  white-space: nowrap;
  background: rgba(255,255,255,0.5);
}

.import-quote-card .drive-card-actions button.is-danger {
  color: #b91c1c;
  border-color: rgba(185,28,28,0.26);
}

.import-quote-card .drive-card-actions button.is-danger:hover {
  background: rgba(185,28,28,0.08);
}

@media (max-width: 860px) {
  .import-quote-card {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .import-quote-card .import-quote-values,
  .import-quote-card .drive-card-actions {
    grid-column: 1 / -1;
    justify-items: start;
  }
}
.portal-theme-button {
  font-weight: 800;
}
.purchase-order-detail {
  display: grid;
  gap: 16px;
}

.purchase-order-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
  border: 1px solid rgba(116,224,183,0.22);
  border-radius: 8px;
  background: rgba(255,255,255,0.08);
}

.purchase-order-head span {
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.purchase-order-head h3 {
  margin: 4px 0;
  font-size: 28px;
}

.purchase-order-head p {
  margin: 0;
  color: var(--text-muted);
}

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

.purchase-order-table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 8px;
}

.purchase-order-table th,
.purchase-order-table td {
  padding: 11px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
  text-align: left;
  font-size: 13px;
}

.purchase-order-table th {
  color: var(--accent-strong);
  background: rgba(116,224,183,0.1);
  font-weight: 900;
}

.purchase-order-table tfoot td {
  font-weight: 900;
  color: var(--text-strong);
}

html[data-theme="light"] .purchase-order-head {
  border-color: rgba(35,69,51,0.16);
  background: rgba(255,255,255,0.58);
}

html[data-theme="light"] .purchase-order-table th,
html[data-theme="light"] .purchase-order-table td {
  border-bottom-color: rgba(35,69,51,0.14);
}
.portal-user-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.portal-user-row strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portal-user-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}

.portal-icon-action {
  width: 32px;
  height: 32px;
  border: 1px solid var(--control-border);
  border-radius: 999px;
  background: var(--control-bg);
  color: var(--text-strong);
  display: grid;
  place-items: center;
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease, transform .2s ease;
}

.portal-icon-action:hover {
  border-color: rgba(116,224,183,0.5);
  background: rgba(116,224,183,0.14);
  transform: translateY(-1px);
}

.portal-theme-button {
  font-weight: 900;
}
/* EMOVE responsive final pass */
@media (max-width: 1180px) {
  .top-nav {
    left: 24px;
    right: 24px;
    grid-template-columns: minmax(132px, auto) minmax(0, 1fr) auto;
    gap: 16px;
  }

  .brand-mark img {
    width: 130px;
  }

  .nav-menu {
    display: flex;
    justify-content: center;
    gap: 6px;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: thin;
  }

  .nav-item {
    flex: 0 0 auto;
  }

  .nav-link {
    padding: 9px 12px;
    font-size: 12px;
    white-space: nowrap;
  }

  .content {
    padding-inline: 36px;
  }

  .hero {
    max-width: min(640px, 76vw);
  }

  .portal-page {
    padding: 18px;
  }

  .portal-shell {
    grid-template-columns: 260px minmax(0, 1fr);
  }

  .portal-sidebar {
    padding: 20px 16px;
  }

  .portal-logo {
    width: min(150px, 82%);
  }

  .portal-main {
    padding: 22px;
  }

  .dashboard-grid,
  .site-admin-grid {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  }

  .dashboard-card {
    min-height: 108px;
    padding: 14px;
  }

  .dashboard-card strong {
    font-size: 1.35rem;
  }

  .import-calc-head,
  .import-budget-strip {
    gap: 10px;
  }

  .import-calc-layout {
    gap: 14px;
  }

  .import-items-table {
    margin-right: -4px;
    padding-bottom: 4px;
  }

  .import-items-row {
    min-width: 960px;
  }

  .purchase-order-head {
    flex-wrap: wrap;
  }
}

@media (max-width: 1023px) {
  .portal-float {
    position: fixed;
    right: 14px;
    bottom: 14px;
    display: inline-flex !important;
    padding: 10px 14px;
    font-size: 12px;
  }

  body.is-portal .portal-float {
    display: none !important;
  }

  .nav-dropdown {
    max-width: calc(100vw - 36px);
  }

  .portal-shell {
    grid-template-columns: 230px minmax(0, 1fr);
  }

  .portal-main {
    padding: 18px;
  }

  .portal-toolbar {
    gap: 12px;
  }

  .site-manager-panel,
  .purchase-order-head {
    grid-template-columns: 1fr;
  }

  .site-manager-actions,
  .purchase-order-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 720px) {
  .portal-page {
    padding: 88px 10px 10px;
  }

  .portal-shell {
    border-radius: 8px;
  }

  .portal-sidebar {
    padding: 18px 14px;
  }

  .portal-main {
    padding: 16px 14px 20px;
    min-height: 520px;
  }

  .portal-user-row {
    align-items: center;
  }

  .portal-tree {
    max-height: 260px;
  }

  .dashboard-grid,
  .site-admin-grid {
    grid-template-columns: 1fr;
  }

  .site-manager-panel {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .site-manager-actions {
    justify-content: flex-start;
  }

  .import-save-quote-bar {
    position: sticky;
    bottom: 8px;
    justify-content: stretch;
  }

  .import-save-quote-bar .portal-button {
    width: 100%;
  }

  .import-items-table {
    border-radius: 8px;
    overscroll-behavior-x: contain;
  }

  .import-items-row {
    min-width: 860px;
  }

  .import-quote-card {
    align-items: start;
  }

  .purchase-order-head {
    padding: 14px;
  }

  .purchase-order-head h3 {
    font-size: 22px;
  }

  .purchase-order-actions {
    width: 100%;
  }

  .purchase-order-actions .portal-button {
    flex: 1 1 140px;
  }
}

@media (max-width: 480px) {
  .brand-mark img {
    width: 102px;
  }

  .top-nav {
    left: 12px;
    right: 12px;
  }

  .nav-link {
    padding: 8px 10px;
    font-size: 11px;
  }

  .content {
    padding: 105px 16px 24px;
  }

  .notify {
    gap: 10px;
  }

  .socials {
    gap: 10px;
  }

  .socials a {
    width: 48px;
    height: 48px;
  }

  .modal-panel {
    width: min(100%, calc(100vw - 24px));
  }

  .portal-page {
    padding-inline: 8px;
  }

  .portal-main h2 {
    font-size: 1.35rem;
  }

  .portal-button,
  .outline-button {
    min-height: 40px;
  }
}