/* Shared invoice generator (home, templates, country pages). */
.gen{max-width:1180px;margin:0 auto;padding:32px 20px;display:grid;grid-template-columns:minmax(0,1fr) 400px;gap:28px;align-items:start;font-family:'Public Sans',system-ui,sans-serif;color:#0f172a}
@media(max-width:920px){.gen{grid-template-columns:minmax(0,1fr)}}
.gen *{box-sizing:border-box}
.gen [hidden]{display:none!important}
.gen .g-card{background:#fff;border:1px solid #e2e8f0;border-radius:12px;padding:24px}
.gen .g-st{font-size:11px;font-weight:600;color:#64748b;text-transform:uppercase;letter-spacing:.5px;margin:20px 0 12px;padding-bottom:8px;border-bottom:1px solid #f1f5f9}
.gen .g-st:first-child{margin-top:0}
.gen .g-row{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:10px}
.gen .g-row.one{grid-template-columns:1fr}
.gen .g-f{display:flex;flex-direction:column;gap:4px;min-width:0}
.gen label{font-size:11px;font-weight:600;color:#64748b;text-transform:uppercase;letter-spacing:.4px}
.gen label .opt{font-weight:500;text-transform:none;letter-spacing:0;color:#94a3b8}
.gen input,.gen select,.gen textarea{border:1px solid #e2e8f0;border-radius:6px;padding:9px 11px;font-size:14px;color:#0f172a;font-family:inherit;outline:none;background:#fff;width:100%;min-width:0}
.gen input:focus,.gen select:focus,.gen textarea:focus{border-color:#2563eb;box-shadow:0 0 0 3px rgba(37,99,235,.12)}
.gen textarea{resize:vertical;min-height:64px}
.gen select{appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2364748b' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 10px center;padding-right:28px}
.gen .g-ih,.gen .g-ir{display:grid;grid-template-columns:minmax(0,1fr) 64px 92px 92px 30px;gap:6px}
.gen .g-ih{margin-bottom:5px}
.gen .g-ih span{font-size:10px;font-weight:600;color:#64748b;text-transform:uppercase;letter-spacing:.4px}
.gen .g-ir{margin-bottom:6px;align-items:center}
.gen .g-lt{font-size:13px;font-weight:600;text-align:right;padding:9px 0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.gen .g-del{background:none;border:none;color:#94a3b8;cursor:pointer;font-size:18px;padding:3px;border-radius:4px;line-height:1}
.gen .g-del:hover{color:#dc2626}
.gen .g-add{background:none;border:1px dashed #cbd5e1;border-radius:6px;padding:8px;width:100%;color:#475569;font-size:13px;font-weight:500;cursor:pointer;margin-bottom:6px;font-family:inherit}
.gen .g-add:hover{border-color:#2563eb;color:#2563eb;background:#eff6ff}
.gen .g-link{background:none;border:none;color:#2563eb;font-size:13px;font-weight:500;cursor:pointer;padding:2px 0;font-family:inherit}
.gen .g-totals{border-top:1px solid #f1f5f9;padding-top:10px;margin-top:10px}
.gen .g-trow{display:flex;justify-content:space-between;padding:4px 0;font-size:14px;color:#475569}
.gen .g-trow.grand{font-size:17px;font-weight:700;color:#0f172a;padding-top:8px;border-top:2px solid #e2e8f0;margin-top:4px}
.gen .g-colors{display:flex;gap:8px;flex-wrap:wrap;margin:4px 0 4px}
.gen .g-dot{width:26px;height:26px;border-radius:50%;cursor:pointer;border:3px solid transparent;padding:0}
.gen .g-dot.on{border-color:#0f172a}
.gen .g-pdf{width:100%;padding:14px;background:#2563eb;border:none;border-radius:8px;color:#fff;font-size:15px;font-weight:700;cursor:pointer;margin-top:18px;font-family:inherit}
.gen .g-pdf:hover{background:#1d4ed8}
.gen .g-pdf:disabled{background:#93c5fd;cursor:default}
.gen .g-small{display:block;margin-top:6px;font-size:12px;color:#64748b;line-height:1.5}
.gen .g-chip{display:inline-block;margin-left:6px;padding:1px 6px;border-radius:4px;background:#eff6ff;color:#2563eb;font-size:9px;font-weight:700;letter-spacing:.4px;vertical-align:1px}
.gen input[type=file]{font-size:12px;padding:8px}
.gen .g-preview{background:#fff;border:1px solid #e2e8f0;border-radius:12px;overflow:hidden;position:sticky;top:78px}
.gen .g-ph{padding:12px 18px;border-bottom:1px solid #f1f5f9;display:flex;justify-content:space-between;align-items:center;font-size:11px;font-weight:600;color:#64748b;text-transform:uppercase;letter-spacing:.4px}
.gen .g-ph span:last-child{font-weight:500;text-transform:none;letter-spacing:0;color:#94a3b8}
.gen iframe{width:100%;height:600px;border:none;background:#f8fafc;display:block}
.gen .g-pro{padding:14px 18px;background:#fffbeb;border-top:1px solid #fde68a;display:flex;align-items:center;gap:12px;font-size:12px;color:#92400e;line-height:1.5}
.gen .g-pro p{flex:1;margin:0}
.gen .g-pro a{white-space:nowrap;background:#2563eb;color:#fff;border-radius:6px;padding:7px 12px;font-weight:600;text-decoration:none}
.gen .g-pro.active{background:#f0fdf4;border-color:#bbf7d0;color:#166534}
@media(max-width:920px){.gen .g-preview{position:static}.gen iframe{height:520px}}
@media(max-width:600px){
  .gen{padding:16px 12px}
  .gen .g-card{padding:18px}
  .gen .g-row{grid-template-columns:1fr}
  .gen input,.gen select,.gen textarea{font-size:16px}
  .gen .g-ih{display:none}
  .gen .g-ir{grid-template-columns:1fr 1fr 1fr 28px;row-gap:6px;padding-bottom:8px;border-bottom:1px solid #f1f5f9}
  .gen .g-ir > input:first-child{grid-column:1/-1}
  .gen iframe{height:460px}
}
.gen{scroll-margin-top:72px}
