[hidden]{display:none!important}
:root{
  --blue:#0b86e6;--blue-2:#159ef0;--cyan:#15c4d4;--navy:#17243a;--ink:#1c2a3f;--muted:#718198;
  --line:#dbe6f0;--line-strong:#cbdceb;--bg:#f4f8fc;--panel:#ffffff;--soft:#f8fbfe;
  --good:#1f9b65;--bad:#cb4057;--warn:#d17c24;
  --shadow-sm:0 8px 24px rgba(29,75,118,.07);--shadow:0 22px 60px rgba(29,75,118,.11);--shadow-lg:0 34px 90px rgba(23,59,96,.18);
  --ease:cubic-bezier(.2,.75,.25,1);
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
html,body{margin:0;min-height:100%;font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;color:var(--ink);background:var(--bg)}
body{position:relative;overflow-x:hidden;background:
  radial-gradient(circle at 10% 8%,rgba(30,169,236,.10),transparent 25%),
  radial-gradient(circle at 91% 13%,rgba(24,197,212,.09),transparent 20%),
  linear-gradient(180deg,#f9fcff 0%,#f1f6fb 52%,#eef4f9 100%)}
body:before,body:after{content:"";position:fixed;pointer-events:none;z-index:0;border:1px solid rgba(55,136,201,.08);border-radius:50%}
body:before{width:560px;height:560px;left:-360px;top:140px;box-shadow:0 0 0 90px rgba(255,255,255,.18)}
body:after{width:700px;height:700px;right:-470px;bottom:-350px;box-shadow:0 0 0 110px rgba(255,255,255,.14)}
button,input,textarea{font:inherit}
button,a,input,textarea,summary,.dropzone{transition:color .24s var(--ease),background-color .24s var(--ease),border-color .24s var(--ease),box-shadow .28s var(--ease),transform .28s var(--ease),opacity .24s var(--ease)}

/* Header */
.topbar{position:sticky;top:0;z-index:50;padding:0;background:rgba(255,255,255,.92);border-bottom:1px solid rgba(206,221,234,.9);box-shadow:0 7px 26px rgba(33,72,108,.07);backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px)}
.topbar:before{content:"";position:absolute;inset:0 0 auto;height:4px;background:linear-gradient(90deg,#13c7d4 0%,#0c98ea 48%,#0876d4 100%)}
.topbar-inner{width:min(1440px,calc(100% - 40px));height:76px;margin:auto;display:flex;align-items:center;justify-content:space-between;gap:24px}
.brand{display:flex;align-items:center;gap:13px;min-width:0}
.brand-mark{width:52px;height:52px;flex:0 0 52px;display:grid;place-items:center;border-radius:15px;background:#fff;border:1px solid #dce7f0;box-shadow:0 8px 22px rgba(30,80,124,.08);overflow:hidden}
.brand-mark img{display:block!important;width:42px!important;height:46px!important;max-width:42px!important;max-height:46px!important;object-fit:contain!important}
.brand h1{margin:0;font-size:20px;line-height:1.15;font-weight:800;letter-spacing:-.025em;color:#172740;white-space:nowrap}
.topbar-actions{display:flex;align-items:center;gap:12px}
.language-switch{display:inline-flex;align-items:center;padding:4px;border-radius:14px;background:#f0f5fa;border:1px solid #d8e4ee;box-shadow:inset 0 1px 0 rgba(255,255,255,.8)}
.lang-btn{position:relative;min-width:46px;border:0;padding:8px 13px;border-radius:10px;background:transparent;color:#62758c;font-size:12px;font-weight:900;letter-spacing:.04em;cursor:pointer;overflow:hidden}
.lang-btn:hover{color:#0c78c8;background:rgba(255,255,255,.72);box-shadow:0 5px 16px rgba(30,105,164,.10)}
.lang-btn.active{background:#fff;color:#0a78c9;box-shadow:0 6px 16px rgba(31,94,145,.14)}
.lang-btn.active:after{content:"";position:absolute;left:25%;right:25%;bottom:3px;height:2px;border-radius:999px;background:linear-gradient(90deg,#1ac3d5,#0d88e7)}
.health{height:40px;padding:0 13px;border:1px solid #d9e6ef;border-radius:13px;background:#fff;color:#52677d;font-weight:750;font-size:12px;display:flex;align-items:center;gap:8px;box-shadow:0 5px 15px rgba(35,72,110,.05)}
.health-dot{width:8px;height:8px;border-radius:50%;background:#e9b43d;box-shadow:0 0 0 5px rgba(233,180,61,.12)}
.health.ok .health-dot{background:#28ad73;box-shadow:0 0 0 5px rgba(40,173,115,.12)}
.health.bad .health-dot{background:#e25467;box-shadow:0 0 0 5px rgba(226,84,103,.12)}

/* Layout */
.page{position:relative;z-index:1;width:min(1380px,calc(100% - 36px));margin:28px auto 64px;display:grid;gap:22px}
.panel{background:rgba(255,255,255,.96);border:1px solid rgba(210,223,234,.94);border-radius:24px;box-shadow:var(--shadow);backdrop-filter:blur(10px);overflow:hidden}
.upload-panel,.list-panel{padding:28px}
.section-title{display:flex;align-items:flex-start;justify-content:space-between;gap:22px;margin-bottom:22px}
.section-title h2{margin:5px 0 0;font-size:27px;line-height:1.15;letter-spacing:-.035em;color:#172740}
.eyebrow{font-size:10px;font-weight:950;letter-spacing:.16em;color:#1478c3}
.privacy{font-size:12px;color:#3e725c;background:#f0faf5;border:1px solid #d4ede1;padding:8px 12px;border-radius:999px;white-space:nowrap}

/* Share-link feature */
.source-card{position:relative;border:1px solid #d7e7f3;border-radius:21px;background:linear-gradient(145deg,#ffffff 0%,#f6fbff 62%,#f1fbfc 100%);padding:21px;overflow:hidden}
.source-card:after{content:"";position:absolute;right:-90px;top:-120px;width:270px;height:270px;border-radius:50%;background:radial-gradient(circle,rgba(17,168,233,.10),rgba(17,168,233,0) 68%);pointer-events:none}
.featured-source{box-shadow:inset 4px 0 0 #1498ed,0 10px 28px rgba(39,104,155,.05)}
.source-heading{position:relative;z-index:1;display:flex;align-items:center;gap:13px;margin-bottom:16px}
.source-icon{width:44px;height:44px;border-radius:14px;display:grid;place-items:center;background:linear-gradient(145deg,#e8f7ff,#e8fcfc);color:#1288d7;font-size:21px;font-weight:900;border:1px solid #d8ebf7;box-shadow:0 8px 20px rgba(22,120,184,.07)}
.source-heading>div:last-child{display:flex;align-items:center;gap:9px;flex-wrap:wrap}
.source-heading h3{margin:0;font-size:18px;letter-spacing:-.02em}
.beta-badge{padding:5px 8px;border-radius:999px;background:#e8f4ff;color:#1d73b8;border:1px solid #cae4f8;font-size:9px;font-weight:950;letter-spacing:.08em}
.field{display:grid;gap:7px;min-width:0}.field>span{font-size:13px;font-weight:800;color:#20334b}.field small{font-weight:500;color:var(--muted)}
input,textarea{width:100%;border:1px solid #d4e1ec;border-radius:13px;padding:12px 14px;color:var(--ink);background:#fff;outline:none;min-width:0;box-shadow:inset 0 1px 0 rgba(20,53,84,.02)}
input:hover,textarea:hover{border-color:#bfd5e6}
input:focus,textarea:focus{border-color:#52a7eb;box-shadow:0 0 0 4px rgba(20,145,230,.10),0 8px 20px rgba(29,97,151,.05)}
.share-import-fields{position:relative;z-index:1;display:grid;grid-template-columns:minmax(0,1.7fr) minmax(240px,.78fr) auto;gap:12px;align-items:end}
.share-import-button{min-height:45px;white-space:nowrap}
.share-import-note{position:relative;z-index:1;margin:12px 0 0;color:#76889d;font-size:11px}.share-import-note:before{content:"ⓘ ";color:#1a7fc7;font-weight:900}
.share-url-field input{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:12px}
.import-divider{display:flex;align-items:center;gap:13px;margin:23px 0 19px;color:#8a99ab;font-size:10px;font-weight:900;letter-spacing:.15em}.import-divider:before,.import-divider:after{content:"";height:1px;flex:1;background:#e1e9f0}
.file-upload-form{padding:0 1px}
.drop-grid{display:grid;grid-template-columns:1fr 1fr;gap:17px;margin-top:17px}
.dropzone{position:relative;min-height:190px;padding:24px 19px;border:1.5px dashed #c5d8e8;border-radius:20px;background:linear-gradient(180deg,#fbfdff,#f7fbfe);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;text-align:center;cursor:pointer;outline:none;overflow:hidden}
.dropzone:before{content:"";position:absolute;inset:-60%;background:radial-gradient(circle at center,rgba(21,155,236,.13),transparent 42%);opacity:0;transform:scale(.7);transition:opacity .35s var(--ease),transform .35s var(--ease);pointer-events:none}
.dropzone:hover,.dropzone.dragging{border-color:#56a9e9;background:#f2f9ff;transform:translateY(-2px);box-shadow:0 16px 34px rgba(31,111,173,.10)}
.dropzone:hover:before,.dropzone.dragging:before{opacity:1;transform:scale(1)}
.dropzone:focus-visible{border-color:#238fe1;box-shadow:0 0 0 4px rgba(21,153,245,.12)}
.dropzone input{display:none}.dropzone strong{position:relative;font-size:17px;letter-spacing:-.015em}.dropzone .drop-icon{position:relative;width:46px;height:46px;border-radius:15px;display:grid;place-items:center;background:#eaf5ff;color:#0e86dc;font-size:24px;font-weight:900;border:1px solid #d9ebf8;box-shadow:0 8px 18px rgba(26,112,170,.06)}
.dropzone .drop-instruction{position:relative;color:var(--muted);font-size:13px}
.dropzone.dragging{border-style:solid}.dropzone.dragging .drop-icon{transform:translateY(-3px) scale(1.08);background:#128ee6;color:#fff;box-shadow:0 0 0 7px rgba(18,142,230,.10),0 12px 28px rgba(18,142,230,.22)}
.dropzone.has-file{border-style:solid;border-color:#5baaf2;background:linear-gradient(180deg,#fcfeff,#eef8ff);box-shadow:0 12px 28px rgba(32,106,160,.08)}.dropzone.has-file .drop-icon{background:#29a36d;color:#fff;border-color:#29a36d}.dropzone.invalid{border-color:#d64f62;background:#fff6f7}
.file-state{position:relative;display:none;width:min(100%,430px);align-items:center;gap:10px;margin-top:8px;padding:10px 12px;border:1px solid #cfe1f2;border-radius:13px;background:#fff;box-shadow:0 7px 17px rgba(38,63,102,.06);text-align:left;color:var(--ink)}.dropzone.has-file .file-state,.dropzone.invalid .file-state{display:flex}.file-check{width:27px;height:27px;flex:0 0 27px;border-radius:50%;display:grid;place-items:center;background:#e6f7ef;color:#20845b;font-weight:900}.file-details{min-width:0;display:grid;gap:2px}.file-details b{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px;color:#1f4267}.file-details em{font-style:normal;font-size:11px;color:var(--muted)}
.form-actions{display:flex;align-items:flex-end;justify-content:space-between;gap:18px;margin-top:19px}.advanced-settings{min-width:280px;border:1px solid #dce5ef;border-radius:14px;background:#fbfdff;padding:0}.advanced-settings summary{cursor:pointer;padding:11px 13px;font-size:12px;font-weight:850;color:#52647b}.advanced-settings summary:hover{color:#1677bd;background:#f5faff;border-radius:14px}.advanced-settings[open] summary{border-bottom:1px solid #e5ebf2;border-radius:14px 14px 0 0}.advanced-settings .field{padding:12px}.api-key{width:min(390px,100%)}

/* Buttons and micro-interactions */
button,.primary-link,.download-button{position:relative;border:none;border-radius:13px;padding:11px 16px;font-weight:850;cursor:pointer;text-decoration:none;overflow:hidden}
button:before,.primary-link:before,.download-button:before{content:"";position:absolute;top:-70%;left:-45%;width:42%;height:240%;background:linear-gradient(90deg,transparent,rgba(255,255,255,.52),transparent);transform:translateX(-180%) rotate(15deg);transition:transform .65s var(--ease);pointer-events:none}
button:hover:before,.primary-link:hover:before,.download-button:hover:before{transform:translateX(430%) rotate(15deg)}
.primary{background:linear-gradient(90deg,#159af4,#0b82df);color:#fff;box-shadow:0 9px 22px rgba(17,139,224,.20)}
.primary:hover,.primary-link:hover{transform:translateY(-2px);box-shadow:0 15px 32px rgba(17,139,224,.29),0 0 0 5px rgba(17,139,224,.07)}
.primary:active,.primary-link:active{transform:translateY(0) scale(.985)}
.secondary{background:#fff;color:#39536f;border:1px solid #d6e1eb;box-shadow:0 4px 12px rgba(31,64,99,.04)}.secondary:hover{border-color:#9ec8e8;color:#0e79c7;transform:translateY(-1px);box-shadow:0 10px 25px rgba(35,102,155,.10),0 0 0 4px rgba(24,143,220,.05)}
.primary:disabled,button:disabled{opacity:.48;cursor:not-allowed;transform:none!important;box-shadow:none!important}.icon-text-btn{display:flex;align-items:center;gap:7px}
.progress{display:flex;align-items:center;gap:14px;margin-top:18px;padding:16px;border-radius:16px;background:#eff8ff;border:1px solid #dceefa;box-shadow:0 8px 24px rgba(28,102,154,.06)}.spinner{width:32px;height:32px;border:4px solid #cde8fb;border-top-color:#118be5;border-radius:50%;animation:spin .9s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.progress p{margin:3px 0;color:var(--muted)}.message{margin-top:16px;padding:13px 14px;border-radius:14px;background:#fff1f3;color:#9d2f42;border:1px solid #f3cad1}

/* Library */
.project-list{display:grid;gap:12px}.project{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:17px;border:1px solid #dfe8f0;border-radius:18px;background:linear-gradient(180deg,#fff,#fbfdff);box-shadow:0 5px 15px rgba(34,72,108,.025)}.project:hover{border-color:#bdd7e9;transform:translateY(-2px);box-shadow:0 15px 32px rgba(31,89,137,.09)}.project h3{margin:0 0 8px;font-size:16px;letter-spacing:-.015em}.meta{display:flex;gap:7px;flex-wrap:wrap}.meta span,.status{padding:5px 8px;border-radius:999px;background:#edf3fa;color:#52647d;font-size:10px;font-weight:850}.status.validated,.status.published{background:#e8f8f0;color:#21764f}.status.needs_review,.status.failed{background:#fff0f2;color:#aa3549}.project-actions{display:flex;gap:7px;flex-wrap:wrap;justify-content:flex-end}.project-actions button,.project-actions a{position:relative;font-size:11px;padding:8px 11px;border-radius:11px;border:1px solid #d7e1ec;background:#fff;color:#36506e;text-decoration:none;font-weight:850;cursor:pointer;overflow:hidden}.project-actions button:hover,.project-actions a:hover{border-color:#9fc8e7;color:#0b76c2;background:#f7fbff;transform:translateY(-1px);box-shadow:0 8px 18px rgba(25,99,156,.09),0 0 0 4px rgba(24,142,219,.05)}.project-actions .details{background:#edf7ff;color:#176ba9;border-color:#cbe3f6}.project-actions .delete{color:#a93247}.project-actions .delete:hover{border-color:#e5b4be;background:#fff7f8;color:#b3233e}.empty{padding:36px;text-align:center;color:var(--muted)}

dialog{border:none;padding:0;border-radius:24px;box-shadow:0 32px 90px rgba(23,39,63,.28);max-height:94vh}dialog::backdrop{background:rgba(31,42,60,.48);backdrop-filter:blur(5px)}.close{position:absolute;right:17px;top:15px;width:38px;height:38px;border-radius:50%;font-size:22px;background:#eef3f8;color:#42536b;padding:0;z-index:5}.review-dialog{width:min(1480px,96vw);padding:24px;overflow:auto}.review-dialog header h2{margin:5px 0}.review-dialog header p{margin:0 0 18px;color:var(--muted)}.review-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}.preview-card{border:1px solid var(--line);border-radius:18px;padding:12px;background:#f8fafc}.preview-card h3{margin:0 0 10px;font-size:15px}.image-stage{height:540px;overflow:auto;display:grid;place-items:center;background:#fff;border-radius:12px}.image-stage img{max-width:100%;max-height:100%;object-fit:contain}.preview-card iframe{width:100%;height:540px;border:0;border-radius:12px;background:#fff}.diagnostics,.label-editor{margin-top:16px;padding:17px;border:1px solid var(--line);border-radius:18px}.diagnostic-head{display:flex;align-items:center;justify-content:space-between}.diagnostic-head h3,.label-editor h3{margin:0}.badge{padding:7px 10px;border-radius:999px;font-size:12px;font-weight:900}.badge.good{background:#e9f8f0;color:#21764f}.badge.bad{background:#ffedf0;color:#a53247}.metric-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:9px;margin-top:13px}.metric{padding:12px;border-radius:13px;background:#f2f6fb;text-align:center}.metric b{display:block;font-size:22px}.metric span{font-size:10px;color:var(--muted);font-weight:800}.issue-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}.issue-grid h4{margin-bottom:6px}.issue-grid ul{margin:0;padding-left:20px;color:var(--muted);min-height:20px}.validation-shot{display:block;max-width:100%;max-height:360px;margin:14px auto 0;border:1px solid var(--line);border-radius:12px}.label-editor p{color:var(--muted)}.branch-inputs{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:12px 0}.label-actions{display:flex;gap:9px;flex-wrap:wrap}.review-actions{display:flex;align-items:center;gap:12px;margin-top:17px}.review-actions a{color:#2279ca;font-weight:800}.published-dialog{width:min(760px,94vw);padding:30px;overflow:auto}.published-dialog h2{text-align:center;margin-bottom:6px}.published-dialog>p{text-align:center;color:var(--muted);margin-top:0}.success{display:grid;place-items:center;margin:auto;width:58px;height:58px;border-radius:50%;background:#e6f7ef;color:#21815a;font-size:28px}.published-fields{display:grid;gap:12px;margin-top:16px}.published-dialog label{display:grid;gap:6px;font-weight:800}.published-dialog label>span{font-size:13px}.copy-row{display:flex;gap:7px}.copy-row input,.copy-row textarea{flex:1;min-width:0}.copy-row textarea{height:78px;resize:vertical}.copy-row button,.download-button{background:#edf5fc;color:#2e618e;white-space:nowrap}.download-button{display:inline-flex;align-items:center;justify-content:center}.primary-link{display:block;margin-top:18px;text-align:center;background:linear-gradient(90deg,#1599f5,#0b83df);color:#fff}.copy-row .copied{background:#e5f7ef;color:#21764f}


/* Dialog polish */
dialog{border-radius:24px!important;box-shadow:var(--shadow-lg)!important;border:1px solid rgba(215,225,235,.85)!important}
dialog::backdrop{background:rgba(25,38,57,.46)!important;backdrop-filter:blur(7px)!important;-webkit-backdrop-filter:blur(7px)!important}
.close:hover{background:#e4f2fc!important;color:#0e78c3!important;transform:rotate(6deg) scale(1.04);box-shadow:0 8px 20px rgba(25,95,149,.12)}
.preview-card,.diagnostics,.label-editor{background:#fbfdff!important;border-color:#dbe6ef!important}
.copy-row button,.download-button{background:#edf6fd!important;color:#2d628e!important}.copy-row button:hover,.download-button:hover{background:#e2f1fc!important;color:#0f77bf!important;box-shadow:0 8px 20px rgba(24,104,164,.10)}
.primary-link{background:linear-gradient(90deg,#159af4,#0b82df)!important;color:#fff!important;box-shadow:0 9px 22px rgba(17,139,224,.20)}

@media(max-width:1050px){
  .share-import-fields{grid-template-columns:1fr}.share-import-button{width:100%}.drop-grid,.review-grid,.issue-grid{grid-template-columns:1fr}.form-actions{display:grid}.advanced-settings,.api-key{width:100%;min-width:0}.metric-grid{grid-template-columns:repeat(2,1fr)}.branch-inputs{grid-template-columns:1fr}.project{align-items:flex-start;flex-direction:column}.image-stage,.preview-card iframe{height:430px}.section-title{align-items:flex-start}.privacy{display:none}
}
@media(max-width:760px){
  .topbar-inner{width:min(100% - 24px,1440px);height:auto;min-height:72px;padding:10px 0;gap:10px}.brand-mark{width:46px;height:46px;flex-basis:46px}.brand-mark img{width:37px!important;height:41px!important;max-width:37px!important;max-height:41px!important}.brand h1{font-size:17px}.health{display:none}.page{width:min(100% - 20px,1380px);margin-top:18px}.upload-panel,.list-panel{padding:20px}.section-title h2{font-size:23px}.topbar-actions{gap:8px}.lang-btn{min-width:42px;padding:8px 10px}.copy-row{flex-wrap:wrap}.copy-row button,.download-button{flex:1}.published-dialog{padding:22px}.project-actions{justify-content:flex-start}
}
@media(max-width:480px){
  .brand h1{font-size:15px;white-space:normal}.brand{gap:9px}.brand-mark{width:42px;height:42px;flex-basis:42px;border-radius:13px}.brand-mark img{width:34px!important;height:38px!important;max-width:34px!important;max-height:38px!important}.language-switch{padding:3px}.lang-btn{font-size:11px;min-width:38px;padding:7px 8px}.source-card{padding:17px}.dropzone{min-height:170px}.section-title{margin-bottom:17px}
}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{scroll-behavior:auto!important;animation-duration:.001ms!important;animation-iteration-count:1!important;transition-duration:.001ms!important}}
