:root { color-scheme: dark; --bg: #0a0a0a; --surface: #111; --line: #272727; --ink: #f2f2f2; --muted: #909090; --red: #c9332f; }
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink); font-family: Inter, "Segoe UI", Arial, sans-serif; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; border: 1px solid #323232; border-radius: 12px; padding: 12px 17px; background: #1b1b1b; color: var(--ink); cursor: pointer; transition: background .15s, border-color .15s; white-space: nowrap; }
button:hover { background: #282828; border-color: #525252; }
button:disabled { opacity: .4; cursor: default; }
button:focus-visible { outline: 2px solid #ee746c; outline-offset: 4px; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.primary { background: var(--red); border-color: var(--red); color: #fff; font-weight: 600; }
.primary:hover { background: #df443d; border-color: #df443d; }
.quiet { background: transparent; border-color: transparent; color: #a8a8a8; }
.danger { color: #f08a81; background: #241414; border-color: #542927; }
input, select, textarea { width: 100%; min-width: 0; padding: 13px 14px; border: 1px solid #303030; border-radius: 11px; background: #0b0b0b; color: var(--ink); outline: none; }
input::placeholder, textarea::placeholder { color: #666; }
input:focus, select:focus, textarea:focus { border-color: #c65048; box-shadow: 0 0 0 3px #c9332f15; }
label { display: block; margin: 16px 0 9px; font-size: 13px; color: #bdbdbd; }
p { line-height: 1.7; }
.muted { color: var(--muted); }
small { font-size: 12px; line-height: 1.7; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: 10px; font-weight: 600; letter-spacing: 2px; color: #a0a0a0; }
.red-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--red); }
h1 { margin: 14px 0; font-size: 40px; line-height: 1.15; letter-spacing: -1.7px; font-weight: 650; }
h2 { margin: 0; font-size: 21px; font-weight: 600; letter-spacing: -.6px; }
.title-dot { color: var(--red); }
.top { width: calc(100% - 96px); max-width: 1720px; height: 96px; margin: auto; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #1c1c1c; }
.brand { display: flex; align-items: center; gap: 13px; text-decoration: none; color: var(--ink); font-size: 20px; font-weight: 650; letter-spacing: -.6px; }
.brand img { width: 31px; height: 40px; object-fit: contain; }
.brand small { display: block; margin-top: 3px; color: #838383; font-size: 10px; font-weight: 400; letter-spacing: 1.5px; text-transform: uppercase; }
.access-badge { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #888; }
.access-badge svg { width: 14px; height: 14px; }
main { width: calc(100% - 96px); max-width: 1720px; margin: auto; padding: 48px 0 40px; }
.card { border: 1px solid var(--line); border-radius: 22px; background: var(--surface); }
.login { display: grid; grid-template-columns: minmax(0, 1fr) minmax(350px, 440px); align-items: center; gap: 80px; max-width: 1360px; min-height: calc(100dvh - 220px); margin: 0 auto; padding: 30px 40px; }
.login-intro { position: relative; min-height: 490px; display: flex; align-items: center; isolation: isolate; }
.login-art { position: absolute; inset: -35px -10px; overflow: hidden; z-index: -1; pointer-events: none; }
.pixo { position: absolute; object-fit: contain; filter: invert(1); opacity: .09; }
.pixo-top { width: 185px; height: 155px; top: -30px; left: 15px; transform: rotate(-8deg); }
.pixo-bottom { width: 360px; height: 180px; bottom: 0; right: 0; transform: rotate(-5deg); opacity: .13; }
.ghost-logo { position: absolute; width: 250px; height: 360px; object-fit: contain; top: 95px; right: -75px; filter: grayscale(1); opacity: .025; }
.intro-copy { padding: 30px 0; }
.login-intro h1 { font-size: clamp(48px, 4.6vw, 76px); letter-spacing: -3.5px; line-height: 1.08; margin: 25px 0 23px; }
.login-intro h1 span { color: #7f7f7f; }
.login-intro p { margin: 0; font-size: 15px; line-height: 1.85; color: #979797; }
.intro-types { display: flex; gap: 25px; margin-top: 38px; color: #858585; font-size: 11px; letter-spacing: .4px; }
.intro-types span + span::before { content: "/"; margin-right: 25px; color: #454545; }
.login-box { padding: 38px; box-shadow: 0 28px 80px #0003; }
.login-lock { display: flex; width: 44px; height: 44px; align-items: center; justify-content: center; margin-bottom: 26px; background: #1c1414; color: #d76159; border: 1px solid #3c2422; border-radius: 13px; }
.login-lock svg { width: 21px; height: 21px; }
.login-box .eyebrow { color: #838383; font-size: 9px; letter-spacing: 1.6px; }
.login-box h2 { font-size: 28px; letter-spacing: -1px; margin: 12px 0 10px; }
.login-box > p:not(.message) { font-size: 13px; color: var(--muted); margin: 0 0 28px; }
.pin-input { font-family: ui-monospace, Consolas, monospace; font-size: 30px; font-weight: 600; letter-spacing: 18px; text-align: center; padding: 16px 6px 16px 24px; height: 70px; }
.pin-input::placeholder { color: #4d4d4d; }
#pinHint { display: block; font-size: 11px; margin-top: 12px; color: #828282; }
.login form button { width: 100%; margin-top: 26px; min-height: 48px; font-size: 13px; justify-content: space-between; padding-inline: 18px; }
.heading { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-bottom: 32px; }
.heading h1 { margin: 12px 0; }
.heading p { margin: 0; font-size: 14px; }
.actions { display: flex; align-items: center; gap: 10px; }
.toolbar { display: flex; align-items: center; gap: 20px; padding: 14px; border-radius: 18px; }
.tabs { display: flex; gap: 4px; background: #0b0b0b; padding: 4px; border-radius: 11px; }
.tabs button { min-width: 84px; font-size: 13px; border-color: transparent; background: transparent; color: #8f8f8f; padding: 10px 18px; border-radius: 8px; }
.tabs .selected { background: #252525; color: #fff; border-color: #353535; }
.search { display: flex; gap: 8px; flex: 1; }
.search-field { position: relative; display: flex; flex: 1; min-width: 0; }
.search-field > svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: #707070; width: 17px; height: 17px; pointer-events: none; }
.search input { padding-left: 42px; font-size: 13px; }
.toolbar button { font-size: 13px; }
.message { min-height: 20px; margin: 16px 0; font-size: 13px; line-height: 1.6; color: #e79890; overflow-wrap: anywhere; }
.message:empty { min-height: 0; margin: 16px 0; }
.login-box .message:empty { margin: 0; }
.grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 18px; }
.texture { padding: 14px; min-width: 0; overflow: hidden; border-radius: 18px; }
.texture .canvas-wrap { display: flex; justify-content: center; align-items: center; position: relative; height: 215px; background: radial-gradient(ellipse at 50% 68%, #232323, #0c0c0c 72%); border-radius: 11px; }
.texture canvas { height: 182px; max-width: 100%; object-fit: contain; }
.texture h3 { margin: 17px 0 5px; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.texture small { color: #848484; font-size: 11px; }
.texture .actions { margin-top: 17px; padding-top: 13px; border-top: 1px solid #252525; }
.texture button { padding: 7px 11px; font-size: 11px; border-radius: 8px; }
.texture .remove { margin-left: auto; background: transparent; border-color: transparent; color: #a88682; }
.pagination { display: flex; justify-content: space-between; align-items: center; gap: 15px; margin-top: 26px; padding-top: 22px; border-top: 1px solid #202020; font-size: 12px; }
.pagination input { width: 63px; text-align: center; padding: 10px 5px; }
.pagination label { margin: 0; font-size: 12px; }
.pagination button { padding: 10px 13px; font-size: 12px; }
.empty { position: relative; display: flex; align-items: center; justify-content: center; min-height: 350px; padding: 45px 24px; text-align: center; overflow: hidden; }
.empty-pixo { position: absolute; width: 430px; height: 260px; left: 5%; bottom: -20px; object-fit: contain; filter: invert(1); opacity: .045; pointer-events: none; }
.empty-content { position: relative; }
.empty-mark { display: flex; width: 66px; height: 66px; justify-content: center; align-items: center; margin: 0 auto 23px; background: #191919; color: #767676; border: 1px solid #303030; border-radius: 18px; }
.empty-mark svg { width: 29px; height: 29px; stroke-width: 1.25; }
.empty h2 { font-size: 21px; }
.empty p { color: #8c8c8c; font-size: 13px; margin: 13px 0 23px; }
.empty button { font-size: 13px; min-width: 128px; }
dialog { max-width: 660px; width: calc(100% - 32px); max-height: calc(100dvh - 32px); padding: 27px; background: #121212; color: var(--ink); border: 1px solid #333; border-radius: 24px; box-shadow: 0 30px 100px #0009; }
dialog::backdrop { background: #000b; backdrop-filter: blur(6px); }
.dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 15px; margin-bottom: 20px; }
.close { font-size: 24px; color: #808080; width: 34px; height: 34px; padding: 0; border-radius: 9px; }
.editor-body { display: flex; gap: 26px; }
.preview-surface { flex: 0 0 185px; display: flex; align-items: center; flex-direction: column; padding-top: 14px; background: radial-gradient(ellipse at center, #272727, #0b0b0b 80%); border: 1px solid #242424; border-radius: 15px; overflow: hidden; }
.preview-surface canvas { width: 145px; height: 225px; object-fit: contain; }
.preview-surface p { max-width: 170px; font-size: 11px; text-align: center; }
.editor-fields { flex: 1; min-width: 0; }
.editor-fields label:first-child { margin-top: 0; }
.editor-fields small { display: block; margin-top: 8px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 24px; }
.dialog-actions button { font-size: 13px; }
#connection { max-width: 520px; }
#connection p { font-size: 13px; }
#connection button { margin-top: 12px; font-size: 13px; }
#confirmation { max-width: 440px; }
#confirmation p { font-size: 14px; }
#file { padding: 9px; font-size: 12px; }
#file::file-selector-button { background: #2b2b2b; border: 0; border-radius: 6px; color: var(--ink); padding: 7px; margin-right: 9px; cursor: pointer; }
[hidden] { display: none !important; }
@media (min-width: 2000px) { .login { gap: 140px; } }
@media (max-width: 1500px) { .grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } .login { gap: 50px; padding-inline: 28px; } }
@media (max-width: 1180px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } .top, main { width: calc(100% - 64px); } .login { padding-inline: 0; gap: 35px; grid-template-columns: minmax(0, 1fr) 390px; } .login-intro h1 { font-size: 54px; } }
@media (max-width: 900px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .login { grid-template-columns: 1fr; gap: 32px; max-width: 480px; min-height: 0; padding-top: 5px; }
  .login-intro { min-height: 190px; }
  .login-art { inset: -30px 0; }
  .pixo-top { width: 110px; left: auto; right: 0; top: 5px; opacity: .07; }
  .pixo-bottom { display: none; }
  .ghost-logo { height: 200px; right: 0; top: 0; }
  .intro-copy { padding: 0; }
  .login-intro h1 { margin: 18px 0; font-size: 46px; letter-spacing: -2px; }
  .login-intro p { font-size: 13px; }
  .intro-types { display: none; }
  .toolbar { gap: 12px; flex-wrap: wrap; }
  .search { order: 3; flex-basis: 100%; }
  .toolbar > .primary { margin-left: auto; }
  .heading { align-items: flex-start; }
  .heading > .actions { flex-direction: column; align-items: stretch; }
}
@media (max-width: 600px) {
  .top, main { width: calc(100% - 36px); }
  .top { height: 80px; }
  .brand { font-size: 18px; }
  .brand img { width: 27px; height: 35px; }
  .brand small { font-size: 8px; letter-spacing: 1px; }
  .access-badge { font-size: 10px; gap: 6px; }
  main { padding: 28px 0; }
  .login { padding: 0; gap: 30px; }
  .login-box { padding: 27px; border-radius: 20px; }
  .login-box h2 { font-size: 26px; }
  .login-intro { min-height: 190px; }
  .login-intro h1 { font-size: 43px; }
  .login-intro p br { display: none; }
  h1 { font-size: 31px; }
  .heading { gap: 16px; flex-direction: column; margin-bottom: 24px; }
  .heading > .actions { flex-direction: row; }
  .heading > .actions button { font-size: 12px; padding: 10px 13px; }
  .heading p { font-size: 13px; }
  .toolbar { padding: 11px; }
  .tabs button { min-width: 60px; padding: 9px 13px; font-size: 12px; }
  .toolbar > .primary { font-size: 12px; padding: 12px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .texture { padding: 10px; border-radius: 14px; }
  .texture .canvas-wrap { height: 165px; }
  .texture canvas { height: 148px; }
  .texture h3 { font-size: 13px; }
  .texture .actions { gap: 4px; }
  .texture button { padding: 7px; font-size: 11px; }
  .pagination { flex-direction: column; align-items: flex-start; }
  .pagination > .actions { width: 100%; display: grid; grid-template-columns: auto 63px auto auto; gap: 8px; }
  #previous { grid-column: 1/3; grid-row: 1; }
  #next { grid-column: 3/5; grid-row: 1; }
  .pagination label { grid-column: 1; grid-row: 2; }
  #page { grid-column: 2; grid-row: 2; }
  #pageCount { grid-column: 3; grid-row: 2; white-space: nowrap; }
  #go { grid-column: 4; grid-row: 2; }
  .empty { min-height: 310px; padding: 32px 20px; }
  .empty h2 { font-size: 19px; }
  .empty-pixo { left: -140px; }
  dialog { padding: 20px; }
  .editor-body { gap: 16px; }
  .preview-surface { flex: 0 0 100px; }
  .preview-surface canvas { width: 95px; }
}
@media (max-width: 360px) { .editor-body { flex-direction: column; } .preview-surface { flex-basis: auto; } .preview-surface canvas { height: 140px; } .login-box { padding: 22px; } .login-intro h1 { font-size: 38px; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
