:root {
  --ink: #1b1730;
  --ink-soft: #635f77;
  --brand: #f41c6b;
  --brand-dark: #c70f58;
  --violet: #6d15b2;
  --violet-deep: #48106f;
  --violet-dark: #26103e;
  --paper: #faf7fd;
  --surface: #ffffff;
  --surface-soft: #f4edf9;
  --surface-alt: #fff4f8;
  --line: #eadcf4;
  --shadow: 0 24px 60px rgba(65, 16, 95, .12);
  --shadow-soft: 0 13px 34px rgba(65, 16, 95, .08);
  --success: #128456;
  --success-soft: #eaf8f2;
  --danger: #c23b4f;
  --danger-soft: #fff0f2;
  --sidebar: 264px;
  --radius: 20px;
  --radius-sm: 13px;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--paper); }
body { margin: 0; min-height: 100vh; color: var(--ink); background: var(--paper); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 15px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
img, video, svg { display: block; max-width: 100%; }
svg { width: 20px; height: 20px; }
input, textarea { outline: none; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 80; width: var(--sidebar); display: flex; flex-direction: column; padding: 26px 18px 18px; border-right: 1px solid var(--line); background: rgba(255,255,255,.97); box-shadow: 10px 0 30px rgba(59, 19, 82, .035); }
.sidebar-brand { padding: 0 9px 25px; border-bottom: 1px solid var(--line); }
.sidebar-brand a { display: block; }
.sidebar-brand img { width: 205px; height: auto; }
.app-badge { display: inline-flex; margin-top: 14px; padding: 5px 9px; border-radius: 999px; background: linear-gradient(90deg, rgba(244,28,107,.09), rgba(109,21,178,.09)); color: var(--brand); font-size: .65rem; font-weight: 900; letter-spacing: .14em; }
.sidebar-nav { display: grid; gap: 7px; padding: 24px 0; }
.nav-item { display: flex; min-height: 48px; align-items: center; gap: 12px; padding: 0 13px; border-radius: 13px; color: #5e5870; font-weight: 720; transition: .18s ease; }
.nav-item:hover { background: var(--surface-alt); color: var(--brand); }
.nav-item.is-active { background: linear-gradient(100deg, rgba(244,28,107,.1), rgba(109,21,178,.09)); color: var(--brand); }
.nav-icon { display: grid; width: 30px; height: 30px; place-items: center; flex: 0 0 auto; }
.nav-icon svg { width: 20px; }
.sidebar-bottom { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 15px 8px 0; border-top: 1px solid var(--line); }
.sidebar-user { display: flex; min-width: 0; flex: 1; align-items: center; gap: 10px; }
.sidebar-user > div:last-child { min-width: 0; }
.sidebar-user strong, .sidebar-user small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user strong { font-size: .84rem; }
.sidebar-user small { color: var(--ink-soft); font-size: .69rem; }
.avatar { display: grid; width: 38px; height: 38px; flex: 0 0 auto; place-items: center; border-radius: 12px; background: linear-gradient(145deg, var(--brand), var(--violet)); color: #fff; font-weight: 850; box-shadow: 0 8px 18px rgba(109,21,178,.18); }
.logout-link { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 11px; color: #8a8297; transition: .18s; }
.logout-link:hover { background: var(--danger-soft); color: var(--danger); }

.main-area { grid-column: 2; min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 50; height: 76px; display: flex; align-items: center; gap: 16px; padding: 0 clamp(22px, 3vw, 44px); border-bottom: 1px solid rgba(234,220,244,.9); background: rgba(250,247,253,.88); backdrop-filter: blur(16px); }
.sidebar-toggle { display: none; width: 42px; height: 42px; place-items: center; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.topbar-copy { display: grid; line-height: 1.15; }
.topbar-copy span { color: #8b8399; font-size: .68rem; font-weight: 780; letter-spacing: .06em; text-transform: uppercase; }
.topbar-copy strong { margin-top: 4px; font-size: .9rem; }
.topbar-version { margin-left: auto; padding: 6px 9px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink-soft); font-size: .68rem; font-weight: 760; }
.content-wrap { width: min(100%, 1460px); margin: 0 auto; padding: 38px clamp(22px, 3vw, 44px) 70px; }

.page-heading { margin-bottom: 31px; }
.page-heading h1 { margin: 4px 0 8px; font-size: clamp(2rem, 3.3vw, 3rem); line-height: 1.05; letter-spacing: -.045em; font-weight: 720; }
.page-heading p { max-width: 730px; margin: 0; color: var(--ink-soft); font-size: .98rem; }
.page-kicker, .panel-kicker { display: inline-flex; color: var(--brand); font-size: .67rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.heading-with-action { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; }
.heading-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.breadcrumb { display: flex; align-items: center; gap: 8px; margin-bottom: 24px; color: #887f96; font-size: .8rem; }
.breadcrumb a { display: inline-flex; align-items: center; gap: 4px; color: var(--violet); font-weight: 760; }
.breadcrumb a:hover { color: var(--brand); }
.breadcrumb svg { width: 16px; }
.breadcrumb strong { color: var(--ink-soft); font-weight: 650; }

.btn { display: inline-flex; min-height: 46px; align-items: center; justify-content: center; gap: 8px; padding: 0 18px; border: 1px solid transparent; border-radius: 13px; font-weight: 800; font-size: .86rem; transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease; }
.btn svg { width: 18px; }
.btn:hover:not(:disabled) { transform: translateY(-2px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { border-color: var(--brand); background: var(--brand); color: #fff; box-shadow: 0 13px 28px rgba(244,28,107,.18); }
.btn-primary:hover:not(:disabled) { background: var(--brand-dark); border-color: var(--brand-dark); box-shadow: 0 17px 34px rgba(244,28,107,.23); }
.btn-gradient { border: 0; background: linear-gradient(105deg, var(--brand) 0%, #b91b8f 52%, var(--violet) 100%); color: #fff; box-shadow: 0 14px 30px rgba(108,21,178,.17); }
.btn-gradient:hover { box-shadow: 0 18px 36px rgba(108,21,178,.24); }
.btn-secondary { border-color: var(--line); background: #fff; color: #4b445d; box-shadow: 0 8px 18px rgba(66,20,92,.04); }
.btn-secondary:hover { border-color: rgba(244,28,107,.25); color: var(--brand); }
.btn-danger { border-color: rgba(194,59,79,.18); background: var(--danger-soft); color: var(--danger); }
.btn-danger:hover { border-color: var(--danger); background: #ffe6ea; }
.btn-small { min-height: 40px; padding: 0 15px; }
.btn-large { min-height: 54px; padding-inline: 24px; border-radius: 15px; }
.btn-block { width: 100%; }
.text-action { display: inline-flex; align-items: center; gap: 5px; color: var(--violet); font-size: .79rem; font-weight: 800; }
.text-action svg { width: 16px; transition: transform .18s; }
.text-action:hover { color: var(--brand); }
.text-action:hover svg { transform: translateX(3px); }
.text-button { padding: 0; border: 0; background: none; color: var(--brand); font-size: .78rem; font-weight: 800; }
.icon-btn { display: grid; width: 40px; height: 40px; place-items: center; flex: 0 0 auto; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--violet); }
.icon-btn:hover { border-color: rgba(244,28,107,.25); color: var(--brand); }

.panel { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-soft); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-bottom: 20px; }
.panel-head h2 { margin: 2px 0 0; font-size: 1.25rem; letter-spacing: -.025em; }
.panel-head p { margin: 5px 0 0; color: var(--ink-soft); font-size: .83rem; }

.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 22px; }
.stat-card { display: flex; min-height: 116px; align-items: center; gap: 16px; padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: 0 10px 26px rgba(65,16,95,.055); }
.stat-icon { display: grid; width: 50px; height: 50px; place-items: center; flex: 0 0 auto; border-radius: 14px; }
.stat-icon svg { width: 23px; height: 23px; }
.gradient-icon { background: linear-gradient(145deg, var(--brand), var(--violet)); color: #fff; box-shadow: 0 10px 22px rgba(109,21,178,.17); }
.soft-icon { background: linear-gradient(145deg, var(--surface-alt), var(--surface-soft)); color: var(--brand); }
.stat-card span, .stat-card strong { display: block; }
.stat-card span { margin-bottom: 1px; color: #81798f; font-size: .75rem; font-weight: 700; }
.stat-card strong { font-size: 1.65rem; line-height: 1.1; letter-spacing: -.04em; }
.dashboard-grid-main { display: grid; grid-template-columns: 1.08fr .92fr; gap: 20px; margin-bottom: 22px; }
.dashboard-grid-main > .panel { padding: 24px; }
.company-list, .recent-products { display: grid; }
.company-row, .recent-product-row { display: flex; align-items: center; gap: 13px; padding: 13px 4px; border-top: 1px solid #f0e7f6; transition: .18s; }
.company-row:first-child, .recent-product-row:first-child { border-top: 0; }
.company-row:hover, .recent-product-row:hover { padding-inline: 10px; border-radius: 13px; background: #fdfafd; }
.company-monogram { display: grid; width: 42px; height: 42px; place-items: center; flex: 0 0 auto; border-radius: 12px; background: linear-gradient(145deg, #fff0f6, #f2e7fb); color: var(--brand); font-weight: 850; }
.company-row-main { min-width: 0; flex: 1; }
.company-row-main strong, .company-row-main span, .recent-product-row strong, .recent-product-row span { display: block; }
.company-row-main strong, .recent-product-row strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .88rem; }
.company-row-main span, .recent-product-row span { color: #8c8398; font-size: .72rem; }
.row-arrow { color: #a59dac; }
.row-arrow svg { width: 17px; }
.recent-product-icon { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 11px; background: var(--surface-alt); color: var(--violet); }
.recent-product-row > div:nth-child(2) { min-width: 0; flex: 1; }
.media-mini-counts { display: flex; gap: 8px; }
.media-mini-counts span { display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; }
.media-mini-counts svg { width: 14px; }
.how-it-works { display: grid; grid-template-columns: .72fr 1.28fr; align-items: center; gap: 40px; padding: 34px; overflow: hidden; border-radius: 22px; background: linear-gradient(112deg, var(--violet-dark), #641393 57%, #a91b8d); color: #fff; box-shadow: var(--shadow); }
.how-copy h2 { margin: 5px 0 12px; font-size: 1.7rem; line-height: 1.12; letter-spacing: -.035em; }
.how-copy p { margin: 0; color: rgba(255,255,255,.73); font-size: .88rem; }
.how-it-works .page-kicker { color: #ffd0e5; }
.flow-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.flow-steps > div { min-height: 145px; padding: 18px; border: 1px solid rgba(255,255,255,.12); border-radius: 16px; background: rgba(255,255,255,.07); }
.flow-steps b, .flow-steps strong, .flow-steps span { display: block; }
.flow-steps b { margin-bottom: 28px; color: #ffb9da; font-size: .68rem; letter-spacing: .08em; }
.flow-steps strong { margin-bottom: 3px; font-size: .85rem; }
.flow-steps span { color: rgba(255,255,255,.62); font-size: .7rem; }

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: -3px 0 22px; }
.search-box { position: relative; width: min(100%, 430px); }
.search-box > svg { position: absolute; left: 15px; top: 50%; width: 18px; color: #93899e; transform: translateY(-50%); }
.search-box input { width: 100%; height: 47px; padding: 0 44px 0 44px; border: 1px solid var(--line); border-radius: 13px; background: #fff; color: var(--ink); box-shadow: 0 8px 20px rgba(66,20,92,.035); transition: .18s; }
.search-box input:focus { border-color: rgba(244,28,107,.4); box-shadow: 0 0 0 4px rgba(244,28,107,.08); }
.clear-search { position: absolute; right: 13px; top: 50%; display: grid; width: 24px; height: 24px; place-items: center; border-radius: 50%; color: #81788e; transform: translateY(-50%); }
.clear-search:hover { background: var(--surface-alt); color: var(--brand); }
.result-count { color: #897f95; font-size: .77rem; font-weight: 720; }
.cards-grid { display: grid; gap: 18px; }
.companies-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.company-card { padding: 24px; border: 1px solid rgba(109,21,178,.12); border-radius: 20px; background: #fff; box-shadow: var(--shadow-soft); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.company-card:hover { transform: translateY(-4px); border-color: rgba(244,28,107,.2); box-shadow: 0 19px 40px rgba(65,16,95,.105); }
.company-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; margin-bottom: 28px; }
.company-card-icon { display: grid; width: 52px; height: 52px; place-items: center; border-radius: 15px; background: linear-gradient(145deg, var(--brand), var(--violet)); color: #fff; font-size: 1.1rem; font-weight: 900; box-shadow: 0 13px 26px rgba(109,21,178,.18); }
.count-pill { display: inline-flex; align-items: center; min-height: 27px; padding: 0 10px; border-radius: 999px; background: var(--surface-alt); color: var(--brand); font-size: .68rem; font-weight: 820; }
.company-card h2 { margin: 0 0 6px; font-size: 1.23rem; letter-spacing: -.025em; }
.company-card > p { margin: 0 0 21px; color: var(--ink-soft); font-size: .8rem; }
.company-card-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 18px; }
.company-card-stats > div { padding: 12px 13px; border-radius: 12px; background: #fcf9fe; }
.company-card-stats span, .company-card-stats strong { display: block; }
.company-card-stats span { color: #91879d; font-size: .66rem; }
.company-card-stats strong { font-size: .98rem; }
.empty-panel { min-height: 330px; display: grid; place-items: center; padding: 30px; }
.empty-state { max-width: 430px; display: grid; justify-items: center; text-align: center; }
.empty-state .empty-icon { display: grid; width: 64px; height: 64px; place-items: center; margin-bottom: 16px; border-radius: 18px; background: var(--surface-alt); color: var(--brand); }
.empty-state .empty-icon.gradient-icon { background: linear-gradient(145deg, var(--brand), var(--violet)); color: #fff; }
.empty-state .empty-icon svg { width: 27px; height: 27px; }
.empty-state strong { font-size: 1.03rem; }
.empty-state p { margin: 7px 0 18px; color: var(--ink-soft); font-size: .83rem; }
.compact-empty { min-height: 205px; }
.compact-empty .empty-icon { width: 52px; height: 52px; border-radius: 15px; }
.company-title-group { display: flex; align-items: center; gap: 16px; }
.company-title-icon { display: grid; width: 62px; height: 62px; place-items: center; flex: 0 0 auto; border-radius: 18px; background: linear-gradient(145deg, var(--brand), var(--violet)); color: #fff; font-size: 1.35rem; font-weight: 900; box-shadow: 0 14px 28px rgba(109,21,178,.18); }
.company-heading h1 { margin-top: 2px; }

.product-cards-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.product-card { overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: #fff; box-shadow: var(--shadow-soft); transition: transform .2s, box-shadow .2s; }
.product-card:hover { transform: translateY(-4px); box-shadow: 0 20px 42px rgba(65,16,95,.11); }
.product-cover { position: relative; display: block; aspect-ratio: 1.52; overflow: hidden; background: #f6eff9; }
.product-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.product-card:hover .product-cover img { transform: scale(1.025); }
.cover-placeholder { width: 100%; height: 100%; display: grid; place-items: center; align-content: center; gap: 8px; color: #a394ad; }
.cover-placeholder svg { width: 34px; height: 34px; }
.cover-placeholder span { font-size: .72rem; font-weight: 700; }
.product-media-badge { position: absolute; right: 12px; bottom: 12px; padding: 6px 9px; border-radius: 999px; background: rgba(38,16,62,.82); color: #fff; font-size: .64rem; font-weight: 800; backdrop-filter: blur(8px); }
.product-card-body { padding: 20px; }
.product-title-line { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.product-title-line > div { min-width: 0; }
.product-company-label { display: block; margin-bottom: 4px; color: var(--brand); font-size: .61rem; font-weight: 900; letter-spacing: .11em; }
.product-title-line h2 { margin: 0; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: 1.08rem; line-height: 1.25; letter-spacing: -.02em; }
.product-counts { display: flex; flex-wrap: wrap; gap: 8px 13px; margin: 16px 0; color: #80778d; font-size: .7rem; }
.product-counts span { display: inline-flex; align-items: center; gap: 4px; }
.product-counts svg { width: 14px; }

.product-detail-heading .path-hint { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .76rem; }
.product-overview-grid { display: grid; grid-template-columns: 1fr 1fr 1.35fr; gap: 14px; margin-bottom: 20px; }
.product-stat { min-height: 98px; }
.product-stat .stat-icon { width: 46px; height: 46px; }
.url-stat { background: linear-gradient(115deg, #fff, #fdf8ff); }
.upload-panel { padding: 24px; margin-bottom: 32px; }
.upload-panel-head { align-items: flex-end; }
.upload-progress-compact { min-width: 220px; }
.upload-progress-compact > span, .upload-progress-compact > strong { font-size: .68rem; }
.upload-progress-compact > strong { float: right; color: var(--brand); }

.drop-zone { position: relative; display: grid; justify-items: center; padding: 36px 20px; border: 2px dashed #dec8ec; border-radius: 18px; background: linear-gradient(180deg, #fefcff, #fbf5fe); text-align: center; transition: .18s ease; }
.drop-zone:hover, .drop-zone.is-dragging { border-color: var(--brand); background: var(--surface-alt); box-shadow: inset 0 0 0 4px rgba(244,28,107,.035); }
.drop-zone:focus-visible { outline: 3px solid rgba(244,28,107,.18); outline-offset: 3px; }
.drop-icon { display: grid; width: 56px; height: 56px; place-items: center; margin-bottom: 14px; border-radius: 16px; background: linear-gradient(145deg, var(--brand), var(--violet)); color: #fff; box-shadow: 0 13px 26px rgba(109,21,178,.19); }
.drop-icon svg { width: 25px; }
.drop-zone strong { font-size: .98rem; }
.drop-zone p { margin: 3px 0 9px; color: var(--ink-soft); font-size: .79rem; }
.drop-zone p span { color: var(--brand); font-weight: 800; }
.drop-zone small { color: #968ba1; font-size: .68rem; }
.drop-zone-compact { grid-template-columns: auto 1fr auto; justify-items: start; align-items: center; gap: 16px; padding: 18px 20px; text-align: left; }
.drop-zone-compact .drop-icon { width: 46px; height: 46px; margin: 0; border-radius: 13px; }
.drop-zone-compact p { margin: 1px 0 0; }
.drop-zone-compact small { text-align: right; }

.media-section { margin-top: 34px; }
.section-title-line { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.section-title-line h2 { margin: 3px 0 0; font-size: 1.45rem; letter-spacing: -.03em; }
.media-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.media-card { overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: 0 10px 25px rgba(65,16,95,.06); }
.media-preview { aspect-ratio: 1.35; overflow: hidden; background: #f5eff8; }
.media-preview img { width: 100%; height: 100%; object-fit: contain; background: #f9f6fb; }
.media-card-body { padding: 16px; }
.media-name-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.media-name-row > div { min-width: 0; }
.media-name-row span:not(.file-size) { display: block; color: var(--brand); font-size: .58rem; font-weight: 900; letter-spacing: .1em; }
.media-name-row strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .79rem; }
.file-size { flex: 0 0 auto; color: #968b9f; font-size: .65rem; }
.url-field { display: grid; grid-template-columns: minmax(0, 1fr) 40px; overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: #fcf9fe; }
.url-field input { min-width: 0; height: 38px; padding: 0 10px; border: 0; background: transparent; color: #71687d; font-size: .67rem; }
.url-field button { display: grid; place-items: center; border: 0; border-left: 1px solid var(--line); background: #fff; color: var(--violet); }
.url-field button:hover { color: var(--brand); background: var(--surface-alt); }
.url-field button svg { width: 16px; }
.media-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 12px; }
.media-actions a, .media-actions button { display: inline-flex; align-items: center; gap: 4px; padding: 0; border: 0; background: none; font-size: .67rem; font-weight: 800; }
.media-actions a { color: var(--violet); }
.media-actions a:hover { color: var(--brand); }
.media-actions svg { width: 13px; }
.delete-link { color: #b34a59; }
.delete-link:hover { color: #d02d46; }
.small-empty-panel { min-height: 235px; }
.video-section { margin-bottom: 32px; }
.video-card { display: grid; grid-template-columns: minmax(320px, .9fr) 1.1fr; gap: 28px; padding: 22px; }
.video-player-wrap { overflow: hidden; border-radius: 15px; background: #160d1f; }
.video-player-wrap video { width: 100%; height: 100%; min-height: 240px; object-fit: contain; }
.video-info { display: flex; flex-direction: column; justify-content: center; min-width: 0; padding-right: 10px; }
.video-info h3 { margin: 4px 0 7px; overflow-wrap: anywhere; font-size: 1.25rem; }
.video-info > p { margin: 0 0 18px; color: var(--ink-soft); font-size: .8rem; }
.large-url-field { grid-template-columns: minmax(0,1fr) auto; }
.large-url-field button { display: inline-flex; align-items: center; gap: 6px; padding: 0 13px; font-size: .72rem; font-weight: 800; }
.urls-panel { padding: 24px; margin-top: 24px; }
.urls-panel textarea { width: 100%; min-height: 110px; padding: 14px; border: 1px solid var(--line); border-radius: 13px; background: #fcf9fe; color: #62596f; font: .72rem/1.7 ui-monospace, SFMono-Regular, Menlo, monospace; resize: vertical; }
.danger-zone { display: flex; align-items: center; justify-content: space-between; gap: 25px; margin-top: 30px; padding: 22px 24px; border-color: #f1d8dd; box-shadow: none; }
.danger-zone h3 { margin: 3px 0 3px; font-size: .98rem; }
.danger-zone p { margin: 0; color: var(--ink-soft); font-size: .75rem; }

.new-product-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.product-form-panel { grid-column: 1; padding: 25px; }
.save-product-panel { grid-column: 2; grid-row: 1 / span 2; position: sticky; top: 96px; padding: 24px; }
.form-step-head { display: flex; align-items: flex-start; gap: 13px; margin-bottom: 21px; }
.form-step-head > span { display: grid; width: 34px; height: 34px; place-items: center; flex: 0 0 auto; border-radius: 11px; background: linear-gradient(145deg, var(--brand), var(--violet)); color: #fff; font-size: .68rem; font-weight: 900; }
.form-step-head h2 { margin: 0 0 2px; font-size: 1.18rem; }
.form-step-head p { margin: 0; color: var(--ink-soft); font-size: .75rem; }
.field { display: grid; gap: 7px; }
.field > span { color: #4c445b; font-size: .75rem; font-weight: 800; }
.field > span small { color: #9a90a5; font-weight: 600; }
.field input, .field select, .field textarea { width: 100%; min-height: 48px; padding: 0 13px; border: 1px solid #e5d9ed; border-radius: 12px; background: #fcfaff; transition: .18s; }
.field textarea { min-height: 110px; padding-block: 11px; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(244,28,107,.08); background: #fff; }
.product-title-field input { min-height: 54px; font-size: 1rem; }
.field-help { margin: -2px 0 0; color: #8d8298; font-size: .7rem; }
.filename-preview { display: grid; grid-template-columns: auto 1fr 1fr; align-items: center; gap: 9px; margin-top: 16px; padding: 12px; border-radius: 12px; background: #faf5fc; }
.filename-preview > span { color: #8f8499; font-size: .65rem; font-weight: 720; }
.filename-preview code { overflow: hidden; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--violet); text-overflow: ellipsis; white-space: nowrap; font-size: .67rem; }
.pending-files { margin-top: 18px; }
.pending-files-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 9px; }
.pending-files-head strong { font-size: .8rem; }
.pending-files-list { display: grid; gap: 7px; max-height: 315px; overflow-y: auto; padding-right: 3px; }
.pending-file { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.pending-file-icon { display: grid; width: 34px; height: 34px; place-items: center; flex: 0 0 auto; border-radius: 9px; background: var(--surface-alt); color: var(--brand); }
.pending-file-icon svg { width: 17px; }
.pending-file-copy { min-width: 0; flex: 1; }
.pending-file-copy strong, .pending-file-copy span { display: block; }
.pending-file-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .72rem; }
.pending-file-copy span { color: #94899e; font-size: .63rem; }
.pending-file-remove { display: grid; width: 30px; height: 30px; place-items: center; border: 0; border-radius: 8px; background: transparent; color: #9a8fa4; }
.pending-file-remove:hover { background: var(--danger-soft); color: var(--danger); }
.save-product-panel h2 { margin: 5px 0 16px; font-size: 1.25rem; }
.save-summary { display: grid; gap: 2px; margin-bottom: 20px; }
.save-summary > div { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 11px 0; border-bottom: 1px solid #f0e7f6; }
.save-summary span { color: #8d8297; font-size: .7rem; }
.save-summary strong { max-width: 190px; overflow: hidden; color: #433b50; text-overflow: ellipsis; white-space: nowrap; font-size: .75rem; }
.save-note { margin: 13px 0 0; color: #94899e; font-size: .66rem; line-height: 1.55; }
.upload-progress-wrap { margin-top: 18px; }
.progress-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; color: #756b81; font-size: .68rem; }
.progress-meta strong { color: var(--brand); }
.progress-track { height: 7px; overflow: hidden; border-radius: 999px; background: #f0e4f5; }
.progress-track > div { width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--brand), var(--violet)); transition: width .18s ease; }

.form-stack { display: grid; gap: 15px; }
.form-grid { display: grid; gap: 12px; }
.form-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-section-title { display: flex; align-items: center; gap: 8px; margin-top: 5px; color: var(--violet); font-size: .72rem; font-weight: 850; text-transform: uppercase; letter-spacing: .07em; }
.form-section-title span { display: grid; width: 27px; height: 27px; place-items: center; border-radius: 8px; background: var(--surface-alt); color: var(--brand); font-size: .6rem; }

.modal { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 20px; opacity: 0; visibility: hidden; transition: opacity .18s, visibility .18s; }
.modal.is-open { opacity: 1; visibility: visible; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(28, 13, 39, .56); backdrop-filter: blur(4px); }
.modal-dialog { position: relative; z-index: 1; width: min(100%, 520px); padding: 25px; border: 1px solid var(--line); border-radius: 21px; background: #fff; box-shadow: 0 30px 80px rgba(25,9,38,.24); transform: translateY(8px) scale(.99); transition: .18s; }
.modal.is-open .modal-dialog { transform: translateY(0) scale(1); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; margin-bottom: 20px; }
.modal-head h2 { margin: 3px 0 0; font-size: 1.3rem; }
.modal-close { display: grid; width: 36px; height: 36px; place-items: center; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: #8f8499; font-size: 1.25rem; }
.modal-close:hover { background: var(--surface-alt); color: var(--brand); }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 5px; }
body.modal-open { overflow: hidden; }

.flash { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; padding: 12px 14px; border: 1px solid transparent; border-radius: 12px; font-size: .78rem; font-weight: 700; }
.flash button { padding: 0 4px; border: 0; background: transparent; color: inherit; font-size: 1.1rem; }
.flash-success { border-color: #cbe9dc; background: var(--success-soft); color: #116a49; }
.flash-error { border-color: #f0ccd2; background: var(--danger-soft); color: #a53649; }
.flash-info { border-color: #ddd0ef; background: #f6f0fb; color: var(--violet); }
.toast-region { position: fixed; right: 22px; bottom: 22px; z-index: 300; display: grid; gap: 8px; width: min(360px, calc(100vw - 30px)); }
.toast { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 13px; background: #fff; box-shadow: 0 18px 50px rgba(37,13,51,.18); animation: toastIn .22s ease both; }
.toast::before { content: ""; width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; background: var(--brand); }
.toast.is-error::before { background: var(--danger); }
.toast span { font-size: .76rem; font-weight: 720; }
@keyframes toastIn { from { opacity:0; transform: translateY(8px); } to { opacity:1; transform:none; } }

.update-card { width: min(100%, 720px); display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 22px; padding: 28px; }
.update-card > .flash { grid-column: 1 / -1; margin-bottom: 0; }
.update-mark { display: grid; width: 64px; height: 64px; place-items: center; border-radius: 18px; background: linear-gradient(145deg, var(--brand), var(--violet)); color: #fff; box-shadow: 0 14px 30px rgba(109,21,178,.18); }
.update-mark svg { width: 27px; height: 27px; }
.update-copy h2 { margin: 3px 0; font-size: 1.15rem; }
.update-copy p { margin: 0; color: var(--ink-soft); font-size: .78rem; }

.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 28px; background: linear-gradient(135deg, #f7eefb 0%, #fff 42%, #fff2f7 100%); }
.auth-shell { width: min(100%, 1080px); min-height: 620px; display: grid; grid-template-columns: 1.05fr .95fr; overflow: hidden; border: 1px solid var(--line); border-radius: 30px; background: #fff; box-shadow: 0 35px 90px rgba(60,17,84,.17); }
.auth-visual { position: relative; display: flex; min-height: 620px; flex-direction: column; padding: 40px; overflow: hidden; background: linear-gradient(118deg, #ef1f67 0%, #b7198c 48%, #64149b 100%); color: #fff; }
.auth-visual::before { content:""; position:absolute; width:390px; height:390px; right:-190px; top:-80px; border:1px solid rgba(255,255,255,.14); border-radius:50%; box-shadow:0 0 0 55px rgba(255,255,255,.045),0 0 0 110px rgba(255,255,255,.028); }
.auth-logo { position: relative; z-index: 1; width: 205px; padding: 9px 12px; border-radius: 10px; background: rgba(255,255,255,.94); }
.auth-visual-copy { position: relative; z-index: 1; margin: auto 0; }
.eyebrow-light { color: #ffd5e8; font-size: .7rem; font-weight: 900; letter-spacing: .13em; }
.auth-visual h1 { max-width: 520px; margin: 14px 0 18px; font-size: clamp(2.25rem, 4.2vw, 3.4rem); line-height: 1.04; letter-spacing: -.05em; font-weight: 630; }
.auth-visual p { max-width: 480px; margin: 0; color: rgba(255,255,255,.78); font-size: .9rem; line-height: 1.7; }
.auth-visual-points { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 8px; }
.auth-visual-points span { padding: 7px 10px; border: 1px solid rgba(255,255,255,.15); border-radius: 999px; background: rgba(255,255,255,.08); color: rgba(255,255,255,.84); font-size: .65rem; font-weight: 700; }
.auth-card { display: flex; flex-direction: column; justify-content: center; padding: 48px; }
.auth-card-head { margin-bottom: 25px; }
.step-pill { display: inline-flex; min-height: 27px; align-items: center; padding: 0 9px; border-radius: 999px; background: linear-gradient(90deg, rgba(244,28,107,.1), rgba(109,21,178,.1)); color: var(--brand); font-size: .63rem; font-weight: 900; letter-spacing: .1em; }
.auth-card h2 { margin: 11px 0 5px; font-size: 1.75rem; letter-spacing: -.035em; }
.auth-card-head p { margin: 0; color: var(--ink-soft); font-size: .8rem; }
.auth-footnote { margin: 20px 0 0; color: #a095aa; font-size: .64rem; text-align: center; }
.install-shell { width: min(100%, 1160px); }
.install-card { justify-content: flex-start; max-height: 90vh; overflow-y: auto; padding: 38px 44px; }
.install-card .auth-card-head { margin-bottom: 18px; }
.install-ready { display: flex; align-items: center; gap: 13px; margin: 18px 0 22px; padding: 16px; border: 1px solid #d2ebdf; border-radius: 14px; background: var(--success-soft); }
.ready-icon { display: grid; width: 42px; height: 42px; place-items: center; flex: 0 0 auto; border-radius: 12px; background: var(--success); color: #fff; }
.install-ready strong, .install-ready p { display: block; margin: 0; }
.install-ready p { color: #4b7665; font-size: .72rem; }
.install-note { margin: 15px 0 0; color: #948a9f; font-size: .66rem; text-align: center; }

.sidebar-backdrop { display: none; }

@media (max-width: 1180px) {
  .companies-grid, .product-cards-grid, .media-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .flow-steps { grid-template-columns: repeat(2, 1fr); }
  .flow-steps > div { min-height: 122px; }
  .flow-steps b { margin-bottom: 18px; }
  .new-product-layout { grid-template-columns: minmax(0, 1fr) 300px; }
}

@media (max-width: 960px) {
  :root { --sidebar: 260px; }
  .app-shell { display: block; }
  .sidebar { transform: translateX(-105%); transition: transform .22s ease; }
  .sidebar.is-open { transform: translateX(0); }
  .main-area { min-width: 0; }
  .sidebar-toggle { display: grid; }
  .sidebar-backdrop { position: fixed; inset: 0; z-index: 70; background: rgba(28,13,39,.45); opacity: 0; visibility: hidden; display: block; transition: .2s; }
  .sidebar-backdrop.is-open { opacity: 1; visibility: visible; }
  .dashboard-grid-main { grid-template-columns: 1fr; }
  .how-it-works { grid-template-columns: 1fr; }
  .new-product-layout { grid-template-columns: 1fr; }
  .product-form-panel { grid-column: 1; }
  .save-product-panel { grid-column: 1; grid-row: auto; position: static; }
  .video-card { grid-template-columns: 1fr; }
  .video-player-wrap video { min-height: 300px; }
  .auth-shell { grid-template-columns: 1fr; width: min(100%, 620px); min-height: 0; }
  .auth-visual { min-height: 340px; padding: 32px; }
  .auth-visual-copy { margin: 50px 0; }
  .auth-visual h1 { font-size: 2.6rem; }
  .auth-card { padding: 38px; }
  .install-card { max-height: none; }
}

@media (max-width: 700px) {
  .content-wrap { padding: 27px 16px 50px; }
  .topbar { height: 68px; padding: 0 16px; }
  .topbar-copy span { display: none; }
  .heading-with-action { align-items: stretch; flex-direction: column; }
  .heading-actions { justify-content: flex-start; }
  .heading-actions .btn { flex: 1; }
  .page-heading h1 { font-size: 2.15rem; }
  .stats-grid, .product-overview-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .url-stat { grid-column: 1 / -1; }
  .stat-card { min-height: 92px; padding: 15px; }
  .stat-icon { width: 43px; height: 43px; border-radius: 12px; }
  .stat-card strong { font-size: 1.35rem; }
  .companies-grid, .product-cards-grid, .media-grid { grid-template-columns: 1fr; }
  .toolbar { align-items: stretch; flex-direction: column; gap: 9px; }
  .search-box { width: 100%; }
  .result-count { padding-left: 2px; }
  .how-it-works { padding: 25px 20px; }
  .flow-steps { grid-template-columns: 1fr 1fr; }
  .company-title-group { align-items: flex-start; }
  .company-title-icon { width: 52px; height: 52px; border-radius: 15px; }
  .drop-zone-compact { grid-template-columns: auto 1fr; }
  .drop-zone-compact small { grid-column: 1 / -1; text-align: left; }
  .upload-panel-head { align-items: stretch; flex-direction: column; }
  .upload-progress-compact { width: 100%; min-width: 0; }
  .video-player-wrap video { min-height: 210px; }
  .danger-zone { align-items: stretch; flex-direction: column; }
  .danger-zone .btn { width: 100%; }
  .filename-preview { grid-template-columns: 1fr; }
  .filename-preview > span { margin-bottom: 1px; }
  .form-grid-2 { grid-template-columns: 1fr; }
  .update-card { grid-template-columns: auto 1fr; }
  .update-card form { grid-column: 1 / -1; }
  .update-card .btn { width: 100%; }
  .auth-page { padding: 0; background: #fff; }
  .auth-shell { width: 100%; border: 0; border-radius: 0; box-shadow: none; }
  .auth-visual { min-height: 300px; border-radius: 0 0 24px 24px; }
  .auth-logo { width: 180px; }
  .auth-visual-copy { margin: 40px 0; }
  .auth-visual h1 { font-size: 2.25rem; }
  .auth-card { padding: 30px 22px 40px; }
  .install-card { padding: 30px 22px 40px; }
  .modal { padding: 12px; }
  .modal-dialog { padding: 20px; border-radius: 18px; }
  .modal-actions { flex-direction: column-reverse; }
  .modal-actions .btn { width: 100%; }
}

@media (max-width: 460px) {
  .stats-grid { grid-template-columns: 1fr; }
  .product-overview-grid { grid-template-columns: 1fr; }
  .url-stat { grid-column: auto; }
  .flow-steps { grid-template-columns: 1fr; }
  .flow-steps > div { min-height: 105px; }
  .media-mini-counts { display: none; }
  .company-heading .heading-actions, .product-detail-heading .heading-actions { display: grid; grid-template-columns: 1fr; }
  .heading-actions .btn { width: 100%; }
  .video-info { padding: 0; }
  .large-url-field { grid-template-columns: minmax(0,1fr) 42px; }
  .large-url-field button { padding: 0; justify-content: center; font-size: 0; }
  .large-url-field button svg { margin: 0; }
  .toast-region { right: 15px; bottom: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* === Usuários | v1.0.2 === */
.users-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.user-card { padding: 22px; transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease; }
.user-card:hover { transform: translateY(-3px); box-shadow: 0 20px 45px rgba(63,18,88,.10); }
.user-card.is-inactive { opacity: .72; }
.user-card-head { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 20px; }
.user-avatar { display: grid; width: 50px; height: 50px; place-items: center; border-radius: 15px; background: linear-gradient(145deg, var(--brand), var(--violet)); color: #fff; font-size: 1.05rem; font-weight: 900; box-shadow: 0 12px 24px rgba(109,21,178,.18); }
.status-badge { display: inline-flex; min-height: 27px; align-items: center; padding: 0 10px; border-radius: 999px; font-size: .63rem; font-weight: 850; letter-spacing: .04em; text-transform: uppercase; }
.status-badge.is-active { background: var(--success-soft); color: var(--success); }
.status-badge.is-inactive { background: #f2eef5; color: #8b8194; }
.user-card-copy { margin-bottom: 22px; }
.user-title-line { display: flex; align-items: center; gap: 8px; }
.user-card h2 { margin: 0; font-size: 1.12rem; letter-spacing: -.02em; }
.user-card-copy p { margin: 5px 0 10px; color: var(--ink-soft); font-size: .8rem; overflow-wrap: anywhere; }
.user-card-copy small { color: #9a90a4; font-size: .66rem; }
.me-badge { display: inline-flex; min-height: 20px; align-items: center; padding: 0 7px; border-radius: 999px; background: var(--surface-alt); color: var(--brand); font-size: .54rem; font-weight: 900; letter-spacing: .08em; }
.user-card-actions { display: flex; align-items: center; gap: 8px; padding-top: 16px; border-top: 1px solid var(--line); }
.user-card-actions form { margin-left: auto; }
.user-card-actions .btn { min-height: 39px; padding-inline: 13px; font-size: .72rem; }

@media (max-width: 1180px) {
  .users-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .users-grid { grid-template-columns: 1fr; }
  .user-card-actions { align-items: stretch; flex-direction: column; }
  .user-card-actions form { width: 100%; margin-left: 0; }
  .user-card-actions .btn { width: 100%; }
}
