.templates-main{padding:42px 42px 70px}.templates-inner{max-width:1640px;margin:auto}.templates-heading{padding:26px;border-radius:18px;background:#111;border:1px solid #171717;margin-bottom:24px}.templates-heading h1{font-size:23px;letter-spacing:-.7px;margin:0 0 7px;display:flex;align-items:center;gap:10px}.templates-heading h1 img{width:24px}.templates-heading p{color:#929292;font-size:14px;margin:0;line-height:1.6}.templates-tabs{display:flex;align-items:center;gap:8px;background:#111;border:1px solid #1b1b1b;padding:9px 11px;border-radius:32px;margin-bottom:18px}.templates-tabs a{padding:11px 12px;color:#eee;font-size:14px;white-space:nowrap;border-radius:24px;text-decoration:none}.templates-tabs a[aria-current=page]{background:#222}.templates-tabs .template-primary{margin-left:auto}.template-primary{background:#492a18;border:2px solid #874a23;color:white;border-radius:25px;padding:10px 16px;cursor:pointer;font:inherit;font-size:14px;display:inline-flex;gap:7px;align-items:center;justify-content:center}.template-primary:hover{background:#65391f}.template-primary:disabled{cursor:not-allowed;opacity:.5}.template-primary img{width:17px;filter:brightness(0) invert(1)}.templates-toolbar{display:flex;gap:10px;margin-bottom:25px}.templates-search{flex:1;display:flex;min-width:0;border:1px solid #202020;border-radius:25px;overflow:hidden;background:#111}.templates-search input{width:100%;min-width:0;background:transparent;border:0;color:#fff;padding:12px 17px;font:inherit;font-size:14px;outline-offset:-3px}.templates-search button{border:0;background:#1b1b1b;width:56px;cursor:pointer;color:#bbb}.templates-sort{width:250px;display:flex;gap:10px;align-items:center;border:1px solid #202020;border-radius:16px;background:#111;padding:0 12px;color:#888}.templates-sort select{appearance:auto;border:0;flex:1;min-width:0;background:#111;color:#eee;padding:11px 0;font:inherit;font-size:14px}.template-icon-button{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:46px;min-height:44px;border:1px solid #202020;border-radius:15px;background:#111;color:#bbb;cursor:pointer}.template-icon-button svg,.templates-search svg,.templates-sort svg{width:23px;height:23px}.templates-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:20px}.template-card{min-width:0;background:#111;border:2px solid #1c1c1c;border-radius:17px;overflow:hidden;display:flex;flex-direction:column}.template-cover{position:relative;background:#080808;aspect-ratio:1.56;overflow:hidden}.template-cover>img{width:100%;height:100%;object-fit:cover;display:block}.template-star{position:absolute;top:8px;right:9px;padding:3px;border:0;background:#1118;color:#ffc300;border-radius:8px;cursor:pointer}.template-star svg{width:29px;height:29px;fill:transparent}.template-star[aria-pressed=true] svg{fill:currentColor}.template-premium{position:absolute;bottom:10px;left:12px;background:#22180fe8;color:#ffc18b;padding:5px 9px;border:1px solid #9b5b26;border-radius:18px;font-size:12px}.template-card-body{padding:22px 19px 19px;display:flex;flex:1;flex-direction:column;gap:14px}.template-author{display:flex;align-items:center;gap:10px;min-width:0}.template-author>img{width:44px;height:44px;border-radius:50%;object-fit:cover}.template-author>div{min-width:0}.template-author h2{font-size:18px;margin:0 0 3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;letter-spacing:-.4px}.template-author p{font-size:14px;color:#aaa;margin:0}.template-stats{display:flex;gap:10px;flex-wrap:wrap;align-items:center;color:#999;font-size:13px}.template-tags{display:flex;flex-wrap:wrap;gap:6px;min-height:27px}.template-tag{background:#442b1e;color:#f6e8df;border:0;border-radius:18px;padding:6px 10px;font-size:12px;cursor:pointer}.template-actions{display:flex;gap:8px;align-items:center;margin-top:auto}.template-actions>.template-primary{flex:1;padding:8px;font-size:13px}.template-actions .template-icon-button{background:none;border:0;width:28px;min-height:32px}.template-delete{border:0;background:transparent;color:#ba9a87;cursor:pointer;text-align:left;padding:0;font:inherit;font-size:12px}.templates-count{font-size:15px;margin:27px 3px 16px;color:#eee}.templates-count span{color:#777}.templates-empty{text-align:center;color:#999;padding:65px 20px;grid-column:1/-1}.templates-error{color:#ffac92;font-size:14px}.templates-load{display:block;margin:24px auto 0;background:#181818;border:1px solid #333;border-radius:22px;color:#eee;padding:11px 24px;cursor:pointer}.templates-dialog{width:min(505px,calc(100vw - 28px));max-height:calc(100dvh - 44px);overflow:auto;box-sizing:border-box;background:#111;color:#eee;border:1px solid #222;border-radius:22px;padding:16px}.templates-dialog::backdrop{background:#000b}.templates-dialog-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px}.templates-dialog h2{font-size:15px;margin:0}.templates-close{border:0;background:none;color:#aaa;font-size:24px;cursor:pointer}.templates-dialog p{font-size:14px;color:#aaa;line-height:1.55}.templates-dialog label{display:block;margin:16px 0 7px;font-size:14px;font-weight:500}.templates-dialog input[type=text],.templates-dialog select{box-sizing:border-box;width:100%;background:#090909;border:1px solid transparent;border-radius:16px;padding:13px;color:#eee;font:inherit;font-size:14px}.templates-upload{display:flex!important;aspect-ratio:2.75;border:2px solid #1b1b1b;border-radius:12px;flex-direction:column;align-items:center;justify-content:center;cursor:pointer;color:#888;overflow:hidden;gap:10px}.templates-upload svg{width:36px;height:36px;color:#eee}.templates-upload img{width:100%;height:100%;object-fit:cover}.templates-dialog .template-primary{width:100%;margin-top:10px;box-sizing:border-box}.templates-premium-note{padding:12px;text-align:center;border-radius:15px;background:#492a18;border:2px solid #874a23;margin-top:15px}.templates-premium-note strong{font-size:16px}.templates-premium-note p{margin:6px 0 0;color:#d8bfae}.templates-dialog-preview{width:100%;aspect-ratio:1.78;object-fit:cover;border-radius:18px}.templates-selected{padding:18px;border-radius:20px;background:#151515;border:1px solid #202020;margin:12px 0;font-size:18px;font-weight:600}.templates-selected small{display:block;color:#999;font-size:13px;margin-top:4px;font-weight:400}.templates-modes{display:grid;grid-template-columns:1fr 1fr;gap:10px}.templates-mode{cursor:pointer;text-align:left;background:#161616;border:2px solid #242424;border-radius:17px;color:#eee;padding:12px;font-size:13px}.templates-mode[aria-pressed=true]{background:#332117;border-color:#814623}.templates-mode span{display:block;font-size:12px;color:#aaa;line-height:1.4;margin-top:4px}.templates-resources{display:flex;gap:14px;flex-wrap:wrap;margin:12px 0}.templates-resources label{font-size:13px;display:flex;gap:6px;margin:0}.templates-preview-link{display:flex;gap:7px;justify-content:center;align-items:center;color:#eee;text-decoration:none;background:#141414;border:2px solid #202020;border-radius:24px;padding:11px;margin-top:14px;font-size:14px}.templates-preview-link svg{width:20px;height:20px}.templates-dialog-actions{display:flex;gap:10px}.templates-dialog [hidden],.templates-inner [hidden]{display:none!important}.templates-dialog :focus-visible,.templates-inner :focus-visible{outline:2px solid #ff9b54;outline-offset:3px}.templates-status{min-height:20px;font-size:13px;color:#c8a78d}.templates-active-filter{display:flex;gap:8px;align-items:center;margin:0 0 15px;color:#aaa;font-size:13px}.templates-active-filter button{background:#242424;color:#ddd;border:0;border-radius:12px;padding:5px 9px;cursor:pointer}
@media(min-width:1750px){.templates-grid{gap:20px}}@media(max-width:1500px){.templates-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.templates-main{padding:30px 26px}.templates-tabs{flex-wrap:wrap}}@media(max-width:1120px){.templates-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.templates-tabs .template-primary{margin-left:0}}@media(max-width:650px){.templates-main{padding:20px 14px 45px}.templates-heading{padding:19px}.templates-heading h1{font-size:20px}.templates-tabs{border-radius:19px;gap:1px}.templates-tabs a{font-size:12px;padding:10px}.templates-tabs .template-primary{width:100%;margin-top:6px}.templates-toolbar{flex-wrap:wrap;gap:8px}.templates-search{flex-basis:100%}.templates-sort{flex:1}.templates-grid{grid-template-columns:1fr;gap:18px}.template-cover{aspect-ratio:1.78}.template-card-body{padding:20px}.templates-dialog{max-height:calc(100dvh - 26px)}.templates-modes{gap:7px}}

body[data-page="templates"] .nav-item[href="/templates"] .nav-icon-image{filter:none}
#templates-refresh{margin-bottom:8px}#template-file{max-width:100%;font-size:12px;color:#999}
@media(max-width:760px){body[data-page="templates"] .app{display:block}body[data-page="templates"] .mobile-top{display:flex;align-items:center;justify-content:space-between;position:sticky;top:0;z-index:90;height:64px;padding:10px 16px;background:#0a0a09;border-bottom:1px solid #222}body[data-page="templates"] .mobile-top .brand{padding:0;font-size:22px}body[data-page="templates"] .sidebar{position:fixed;top:64px;left:0;bottom:0;width:min(285px,85vw);height:calc(100dvh - 64px);z-index:85;overflow-y:auto;transform:translateX(-100%);visibility:hidden;pointer-events:none;transition:transform .18s ease,visibility .18s ease}body[data-page="templates"] .sidebar.open{transform:translateX(0);visibility:visible;pointer-events:auto}body[data-page="templates"] .main{width:100%}}
