:root{--ink:#181818;--muted:#6d6a64;--paper:#f6f3ec;--card:#fff;--line:#ded9ce;--accent:#db342d;--accent-dark:#ad251f;--soft:#ebe5d9}*{box-sizing:border-box}html{background:var(--paper);color:var(--ink);font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}body{margin:0}a{color:inherit}.container{width:min(1180px,calc(100% - 36px));margin:0 auto;min-height:calc(100vh - 150px)}.site-header{height:76px;padding:0 max(18px,calc((100vw - 1180px)/2));display:flex;align-items:center;justify-content:space-between;background:#111;color:white;position:sticky;top:0;z-index:20}.brand{text-decoration:none;font-weight:850;letter-spacing:-.03em;font-size:21px}.brand span{color:#f34a42}.site-header nav{display:flex;gap:22px;align-items:center}.site-header nav a,.link-button{text-decoration:none;font-weight:650;font-size:14px}.inline{display:inline}.link-button{border:0;background:none;color:white;cursor:pointer;padding:0}.button{display:inline-flex;align-items:center;justify-content:center;text-decoration:none;border:0;border-radius:8px;background:var(--accent);color:white;padding:13px 18px;font:700 14px/1 inherit;cursor:pointer}.button:hover{background:var(--accent-dark)}.button.secondary{background:#fff;color:#171717;border:1px solid var(--line)}.site-header .button.secondary,.site-header .button{border:0}.button.small{padding:9px 13px;font-size:13px}.button.wide{width:100%}.hero{display:grid;grid-template-columns:1.25fr .75fr;gap:52px;align-items:center;padding:90px 0 70px}.eyebrow{font-weight:850;font-size:12px;letter-spacing:.14em;color:var(--accent)}h1,h2,h3,p{margin-top:0}h1{font-size:clamp(42px,6vw,72px);line-height:.96;letter-spacing:-.055em;margin:12px 0 22px}h2{letter-spacing:-.03em}.lead{font-size:20px;line-height:1.55;color:#504d47;max-width:760px}.actions{display:flex;gap:12px;margin-top:25px}.actions.wrap{flex-wrap:wrap}.hero-card,.panel,.card,.feature,.empty,.note{background:var(--card);border:1px solid var(--line);border-radius:14px}.hero-card{padding:10px 28px}.step{display:flex;gap:16px;padding:22px 0;border-bottom:1px solid #eee}.step:last-child{border-bottom:0}.step b{width:32px;height:32px;border-radius:50%;background:#111;color:white;display:flex;align-items:center;justify-content:center}.step span{display:flex;flex-direction:column;gap:4px}.step small,.muted{color:var(--muted)}.section{padding:55px 0 80px;border-top:1px solid var(--line)}.section-heading h2,.page-head h1{font-size:42px;margin:8px 0 12px}.feature-grid,.cards,.design-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}.feature,.card{padding:26px}.page-head{padding:58px 0 32px}.page-head p{color:var(--muted);max-width:760px;line-height:1.6}.row-between{display:flex;align-items:end;justify-content:space-between;gap:24px}.template-icon{width:54px;height:54px;background:#111;color:white;border-radius:10px;display:flex;align-items:center;justify-content:center;font-weight:900;margin-bottom:24px}.meta{font-size:13px;color:var(--muted);margin-top:18px}.note{padding:20px;margin:28px 0 60px;background:#fffaf0}.auth-shell{max-width:560px;margin:60px auto}.panel{padding:28px}.form{display:flex;flex-direction:column;gap:18px}.form h1{font-size:42px;margin:4px 0}.form label{display:flex;flex-direction:column;gap:7px;font-weight:700;font-size:14px}.form input,.form select{width:100%;padding:13px 14px;border:1px solid #cfc9bd;border-radius:8px;background:white;font:inherit}.form input:focus,.form select:focus{outline:2px solid #e66a64;outline-offset:1px}.two{display:grid;grid-template-columns:1fr 1fr;gap:14px}.check{flex-direction:row!important;align-items:center}.check input{width:auto}.alert{padding:13px 15px;border-radius:8px;margin:20px 0}.alert.success{background:#e7f7ec;color:#175d2d}.alert.error{background:#fdeaea;color:#922621}.drop{border:2px dashed #ccc4b7;padding:28px;border-radius:12px;background:#fbfaf7}.drop-title{font-size:18px}.progress{height:9px;background:#e6e1d7;border-radius:99px;overflow:hidden}.progress div{height:100%;width:0;background:var(--accent);transition:width .2s}.hidden{display:none}.empty{text-align:center;padding:60px;margin-bottom:60px}.empty.compact{padding:32px;margin:0}.design-grid{margin-bottom:70px}.design-card{background:white;border:1px solid var(--line);border-radius:14px;overflow:hidden}.preview{display:block;aspect-ratio:4/3;background:#eee}.preview img{width:100%;height:100%;object-fit:cover}.preview-placeholder{height:100%;display:flex;align-items:center;justify-content:center;color:#777;font-weight:800;letter-spacing:.08em}.design-body{padding:19px}.design-body h2{margin:8px 0 4px}.design-body p{color:var(--muted)}.status{display:inline-block;font-size:11px;font-weight:850;text-transform:uppercase;letter-spacing:.08em;padding:5px 8px;border-radius:99px;background:#eee}.status.ready{background:#e2f4e7;color:#17602d}.status.error{background:#fae4e4;color:#8b2323}.design-detail{display:grid;grid-template-columns:2fr 1fr;gap:22px;margin-bottom:70px}.full-preview{display:block;max-width:100%;margin:auto;border-radius:8px}dl{display:grid;grid-template-columns:100px 1fr;gap:13px;margin:24px 0}dt{font-weight:800}dd{margin:0;color:var(--muted);word-break:break-word}.viewer{height:650px;background:#eee;border:1px solid var(--line);border-radius:14px;margin-bottom:70px;position:relative;overflow:hidden}.viewer canvas{display:block}.viewer-message{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;padding:30px;text-align:center;color:var(--muted)}code{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;background:#ece8df;padding:2px 5px;border-radius:4px}.site-footer{padding:25px max(18px,calc((100vw - 1180px)/2));background:#111;color:#aaa;display:flex;justify-content:space-between;font-size:13px}@media(max-width:800px){.site-header nav>a:not(.button),.link-button{display:none}.hero{grid-template-columns:1fr;padding-top:55px}.feature-grid,.cards,.design-grid,.design-detail{grid-template-columns:1fr}.row-between{align-items:flex-start;flex-direction:column}.two{grid-template-columns:1fr}h1{font-size:44px}.page-head h1{font-size:38px}.viewer{height:480px}}
.button.disabled{opacity:.45;cursor:not-allowed;pointer-events:none}

.button.danger{background:#8f1f1a}.button.danger:hover{background:#6f1713}

.button:disabled,.button.disabled{opacity:.45;cursor:not-allowed;pointer-events:none;background:#8f8b84!important}

/* Consistent action button sizing */
.button{min-height:46px}
.button.small{min-height:38px}
.actions .inline{display:inline-flex}
.actions .inline>.button{height:100%}

/* Design cart controls */
.design-cart-add{border-top:1px solid #eee;margin-top:18px;padding-top:16px}
.design-cart-top{font-size:14px;margin-bottom:10px}
.design-cart-fields{display:grid;grid-template-columns:minmax(130px,1fr) 78px auto;gap:9px;align-items:end}
.design-cart-fields label{display:flex;flex-direction:column;gap:5px;font-size:12px;font-weight:800;color:var(--muted)}
.design-cart-fields select,.design-cart-fields input{width:100%;height:38px;border:1px solid #cfc9bd;border-radius:7px;background:#fff;padding:6px 9px;font:inherit;color:var(--ink)}
.design-cart-fields .button{white-space:nowrap}
.cart-feedback{min-height:18px;margin-top:8px;font-size:12px;font-weight:700;color:#17602d}
.error-text{color:#922621!important}
.detail-cart-box{border-top:1px solid var(--line);margin-top:24px;padding-top:22px}
.detail-cart-box h3{margin-bottom:8px}
.detail-cart-fields{grid-template-columns:1fr 80px;margin:14px 0}

/* Design cart page */
.cart-layout{display:grid;grid-template-columns:minmax(0,2fr) minmax(280px,.8fr);gap:24px;margin-bottom:70px;align-items:start}
.cart-lines{display:flex;flex-direction:column;gap:14px}
.cart-line{display:grid;grid-template-columns:120px minmax(0,1fr) 190px;gap:18px;align-items:center;background:#fff;border:1px solid var(--line);border-radius:14px;padding:16px}
.cart-thumb{width:120px;aspect-ratio:4/3;background:#f0ede6;border-radius:9px;overflow:hidden}
.cart-thumb img{width:100%;height:100%;object-fit:cover}
.cart-line-main h2{font-size:20px;margin:0 0 4px}
.cart-line-main p{margin:0 0 8px;color:var(--muted)}
.cart-option{font-size:13px}
.cart-line-controls{display:flex;flex-direction:column;align-items:flex-end;gap:8px}
.cart-price{font-size:13px;color:var(--muted)}
.cart-line-total{font-size:22px;font-weight:850}
.cart-qty-form{display:flex;align-items:end;gap:7px}
.cart-qty-form label{display:flex;flex-direction:column;gap:4px;font-size:11px;font-weight:800;color:var(--muted)}
.cart-qty-form input{width:64px;height:38px;border:1px solid #cfc9bd;border-radius:7px;padding:6px 8px;font:inherit}
.text-danger{border:0;background:none;color:#8f1f1a;font:700 12px/1 inherit;cursor:pointer;padding:5px}
.cart-summary{position:sticky;top:96px}
.cart-summary-row{display:flex;justify-content:space-between;gap:20px;font-size:18px;padding:22px 0;border-bottom:1px solid var(--line);margin-bottom:18px}
.cart-summary-row strong{font-size:24px}
.cart-note{font-size:12px;line-height:1.5;margin:14px 0 0}
.compact-alert{margin:10px 0 0;padding:9px 10px;font-size:12px}

@media(max-width:800px){
  .design-cart-fields{grid-template-columns:1fr 72px}.design-cart-fields .button{grid-column:1/-1}
  .cart-layout{grid-template-columns:1fr}.cart-summary{position:static}
  .cart-line{grid-template-columns:90px 1fr}.cart-thumb{width:90px}.cart-line-controls{grid-column:1/-1;align-items:stretch}.cart-qty-form{justify-content:flex-end}
}

/* Template download cards */
.template-card{
    display:flex;
    flex-direction:column;
}

.template-system-logo{
    display:flex;
    align-items:center;
    margin-bottom:22px;
}

.template-system-logo img{
    width:100%;
    height:150px;
    object-fit:contain;
    object-position:center;
    display:block;
}

.template-downloads{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:12px;
    margin-top:24px;
}

.template-download{
    display:flex;
    align-items:center;
    gap:12px;
    min-height:72px;
    padding:12px 14px;
    border:1px solid var(--line);
    border-radius:10px;
    background:#fff;
    text-decoration:none;
    transition:transform .15s ease,border-color .15s ease,box-shadow .15s ease;
}

.template-download:hover{
    transform:translateY(-2px);
    border-color:#bbb3a5;
    box-shadow:0 5px 14px rgba(0,0,0,.06);
}

.template-download img{
    width:42px;
    height:42px;
    object-fit:contain;
    flex:0 0 42px;
}

.template-download span{
    display:flex;
    flex-direction:column;
    gap:3px;
}

.template-download strong{
    font-size:14px;
}

.template-download small{
    font-size:12px;
    color:var(--muted);
}

@media(max-width:800px){
    .template-downloads{
        grid-template-columns:1fr;
    }
}

/* Dashboard pagination */
.dashboard-toolbar{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:16px;
    margin:-4px 0 18px;
}

.dashboard-count{
    color:var(--muted);
    font-size:14px;
}

.dashboard-per-page{
    display:flex;
    align-items:center;
    gap:10px;
    font-size:14px;
    color:var(--muted);
}

.dashboard-per-page select{
    height:38px;
    border:1px solid #cfc9bd;
    border-radius:8px;
    background:#fff;
    padding:6px 12px;
    font:inherit;
    color:var(--ink);
}

.pagination-wrap{
    display:flex;
    justify-content:center;
    margin:8px 0 70px;
}

.pagination{
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    justify-content:center;
    gap:8px;
}

.pagination-link,
.pagination-ellipsis{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-width:40px;
    min-height:40px;
    padding:0 12px;
    border:1px solid var(--line);
    border-radius:10px;
    background:#fff;
    color:var(--ink);
    text-decoration:none;
    font-weight:700;
}

.pagination-link:hover{
    border-color:#bbb3a5;
    background:#faf8f3;
}

.pagination-link.active{
    background:#111;
    color:#fff;
    border-color:#111;
}

.pagination-link.disabled{
    opacity:.45;
    pointer-events:none;
}

@media(max-width:800px){
    .dashboard-toolbar{
        align-items:flex-start;
        flex-direction:column;
    }
}

