@font-face{font-family:Cairo;src:url('../fonts/Cairo-Regular.ttf') format('truetype');font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:Cairo;src:url('../fonts/Cairo-Medium.ttf') format('truetype');font-weight:500;font-style:normal;font-display:swap}
@font-face{font-family:Cairo;src:url('../fonts/Cairo-SemiBold.ttf') format('truetype');font-weight:600;font-style:normal;font-display:swap}
@font-face{font-family:Cairo;src:url('../fonts/Cairo-Bold.ttf') format('truetype');font-weight:700;font-style:normal;font-display:swap}
:root{--bg:#f5f7fb;--surface:#fff;--surface-2:#f8fafc;--text:#0f172a;--muted:#64748b;--line:#e5eaf2;--primary:#2563eb;--primary-2:#1d4ed8;--orange:#f97316;--navy:#0b1220;--green:#16a34a;--shadow:0 18px 50px rgba(15,23,42,.08);--shadow-soft:0 10px 30px rgba(15,23,42,.05);--radius:22px}
html[data-theme="dark"]{--bg:#070b14;--surface:#0e1626;--surface-2:#111c2f;--text:#f8fafc;--muted:#94a3b8;--line:#23304a;--primary:#3b82f6;--primary-2:#2563eb;--navy:#050914;--shadow:0 22px 60px rgba(0,0,0,.35);--shadow-soft:0 12px 36px rgba(0,0,0,.22)}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;font-family:Cairo,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;background:var(--bg);color:var(--text);min-height:100vh;transition:background .25s,color .25s}button,input,select,textarea{font:inherit}button{cursor:pointer}.icon{width:20px;height:20px;display:inline-block;flex:0 0 auto}.app-header{position:sticky;top:0;z-index:40;background:rgba(11,18,32,.94);backdrop-filter:blur(16px);border-bottom:1px solid rgba(255,255,255,.07)}.header-inner{max-width:1540px;margin:auto;min-height:76px;padding:0 28px;display:flex;align-items:center;justify-content:space-between;gap:24px}.brand{display:flex;align-items:center;gap:12px;color:#fff;text-decoration:none}.brand-logo-wrap{display:flex;align-items:center}.brand-img{max-width:126px;max-height:44px;object-fit:contain}.logo-dark{display:none}html[data-theme="dark"] .logo-light{display:none}html[data-theme="dark"] .logo-dark{display:block}.app-logo.fallback{width:42px;height:42px;border-radius:13px;display:grid;place-items:center;background:linear-gradient(135deg,var(--orange),#fb923c);font-weight:800;color:#fff;box-shadow:0 8px 22px rgba(249,115,22,.28)}.brand-copy{display:flex;flex-direction:column;line-height:1.1}.brand-copy strong{font-size:18px}.brand-copy small{font-size:11px;color:#b8c2d3;margin-top:4px}.header-actions{display:flex;align-items:center;gap:10px}.icon-btn{height:42px;border:1px solid rgba(255,255,255,.12);background:rgba(255,255,255,.06);color:#e5edf8;border-radius:12px;display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:0 13px;text-decoration:none;transition:.2s}.icon-btn:hover{background:rgba(255,255,255,.12);transform:translateY(-1px)}.icon-btn.square{width:42px;padding:0}.theme-moon{display:none}html[data-theme="dark"] .theme-sun{display:none}html[data-theme="dark"] .theme-moon{display:inline-flex}.tool-main{max-width:1540px;margin:auto;padding:42px 28px 34px}.hero{text-align:center;padding:10px 16px 38px}.hero-icon{display:grid;place-items:center;width:58px;height:58px;margin:0 auto 15px;border-radius:18px;background:linear-gradient(135deg,#fff7ed,#ffedd5);color:var(--orange);box-shadow:0 10px 28px rgba(249,115,22,.16)}html[data-theme="dark"] .hero-icon{background:linear-gradient(135deg,#2a170b,#3b1d0a)}.hero-icon .icon{width:28px;height:28px}.hero h1{font-size:clamp(27px,3vw,42px);line-height:1.25;margin:0;font-weight:700;letter-spacing:-.02em}.hero p{margin:10px auto 18px;color:var(--muted);max-width:780px;font-size:15px}.hero-badges{display:flex;justify-content:center;flex-wrap:wrap;gap:9px}.hero-badges span{display:inline-flex;align-items:center;gap:7px;padding:7px 11px;border-radius:999px;border:1px solid var(--line);background:var(--surface);color:var(--muted);font-size:12px;box-shadow:var(--shadow-soft)}.hero-badges span:first-child{color:#15803d;background:#f0fdf4;border-color:#dcfce7}html[data-theme="dark"] .hero-badges span:first-child{background:#10261a;border-color:#1f5132;color:#86efac}.hero-badges .icon{width:15px;height:15px}.workspace{display:grid;grid-template-columns:minmax(0,1.07fr) minmax(460px,.93fr);gap:24px;align-items:start}.builder-column{display:grid;gap:18px}.section-card,.preview-column{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow-soft)}.section-card{padding:22px}.section-title{display:flex;align-items:center;gap:12px;margin-bottom:20px}.section-title .step{width:30px;height:30px;border-radius:9px;background:var(--primary);color:#fff;display:grid;place-items:center;font-weight:700;font-size:13px}.section-title .section-icon{width:38px;height:38px;border-radius:12px;background:color-mix(in srgb,var(--primary) 10%,transparent);color:var(--primary);display:grid;place-items:center}.section-title h2{margin:0;font-size:16px}.section-title p{margin:3px 0 0;color:var(--muted);font-size:11.5px}.form-grid{display:grid;gap:14px}.form-grid.two{grid-template-columns:1fr 1fr}.form-grid.three{grid-template-columns:1fr 1fr 1fr}.form-grid.four{grid-template-columns:repeat(4,1fr)}.span-2{grid-column:span 2}.span-3{grid-column:span 3}label{display:grid;gap:7px;font-size:11.5px;font-weight:600;color:var(--muted)}input,select,textarea{width:100%;border:1px solid var(--line);background:var(--surface-2);color:var(--text);border-radius:12px;padding:11px 12px;outline:none;transition:.18s}input:focus,select:focus,textarea:focus{border-color:color-mix(in srgb,var(--primary) 65%,white);box-shadow:0 0 0 3px color-mix(in srgb,var(--primary) 12%,transparent);background:var(--surface)}textarea{resize:vertical;min-height:88px}.business-grid{display:grid;grid-template-columns:160px 1fr;gap:16px}.logo-picker{position:relative;min-height:150px;border:1.5px dashed color-mix(in srgb,var(--primary) 38%,var(--line));background:color-mix(in srgb,var(--primary) 4%,var(--surface-2));border-radius:16px;display:flex;align-items:center;justify-content:center;text-align:center;flex-direction:column;gap:5px;overflow:hidden;color:var(--muted);cursor:pointer}.logo-picker input{position:absolute;inset:0;opacity:0;cursor:pointer}.logo-picker-icon{width:42px;height:42px;border-radius:13px;background:var(--surface);display:grid;place-items:center;color:var(--primary);box-shadow:var(--shadow-soft)}.logo-picker small{font-size:10px}.logo-picker img{display:none;position:absolute;inset:10px;width:calc(100% - 20px);height:calc(100% - 20px);object-fit:contain;background:var(--surface);border-radius:11px}.items-header,.item-row{display:grid;grid-template-columns:minmax(180px,1.8fr) 90px 120px 120px 42px;gap:10px;align-items:center}.items-header{padding:0 4px 8px;color:var(--muted);font-size:10.5px;font-weight:600}.item-row{padding:8px 0}.item-total{font-weight:700;color:var(--text);font-size:12px;text-align:center}.delete-item{width:38px;height:38px;border:1px solid #fecaca;background:#fff1f2;color:#e11d48;border-radius:11px;display:grid;place-items:center}.delete-item .icon{width:17px}.add-item-btn{margin-top:10px;border:1px dashed color-mix(in srgb,var(--primary) 45%,var(--line));background:color-mix(in srgb,var(--primary) 4%,transparent);color:var(--primary);border-radius:12px;padding:10px 14px;display:inline-flex;gap:7px;align-items:center;font-weight:700}.add-item-btn:hover{background:color-mix(in srgb,var(--primary) 9%,transparent)}.export-bar{position:sticky;bottom:12px;z-index:20;display:flex;align-items:center;gap:10px;background:color-mix(in srgb,var(--surface) 90%,transparent);backdrop-filter:blur(18px);border:1px solid var(--line);border-radius:18px;padding:10px;box-shadow:0 18px 50px rgba(15,23,42,.16)}.format-group{display:flex;gap:5px;padding:4px;background:var(--surface-2);border-radius:12px}.format-btn{border:0;background:transparent;color:var(--muted);border-radius:9px;padding:8px 10px;font-size:11px;font-weight:700}.format-btn.active{background:var(--orange);color:#fff;box-shadow:0 6px 14px rgba(249,115,22,.2)}.btn-primary,.btn-secondary{height:42px;border-radius:12px;border:0;display:inline-flex;align-items:center;justify-content:center;gap:8px;font-weight:700}.btn-primary{margin-inline-start:auto;background:linear-gradient(135deg,var(--orange),#fb8c35);color:#fff;padding:0 16px;box-shadow:0 10px 24px rgba(249,115,22,.25)}.btn-primary strong{padding-inline-start:8px;margin-inline-start:2px;border-inline-start:1px solid rgba(255,255,255,.3);font-size:10px}.btn-secondary{background:var(--surface-2);color:var(--text);border:1px solid var(--line);padding:0 13px}.preview-column{position:sticky;top:98px;padding:16px;background:color-mix(in srgb,var(--surface) 97%,var(--primary) 3%)}.preview-head{display:flex;align-items:center;justify-content:space-between;padding:2px 4px 13px;font-size:12px;font-weight:700}.preview-head>div{display:flex;align-items:center;gap:7px}.preview-head .icon{width:17px}.live-dot{display:inline-flex;align-items:center;gap:6px;color:var(--green);font-size:10px}.live-dot i{width:7px;height:7px;border-radius:50%;background:var(--green);box-shadow:0 0 0 5px color-mix(in srgb,var(--green) 12%,transparent)}.invoice-paper{background:#fff;color:#0f172a;border-radius:16px;min-height:760px;padding:28px;box-shadow:0 18px 45px rgba(15,23,42,.12);overflow:hidden}.invoice-top{display:flex;justify-content:space-between;gap:22px;padding-bottom:22px;border-bottom:1px solid #e5e7eb}.invoice-brand{display:flex;align-items:flex-start;gap:12px;min-width:0}.preview-logo{width:44px;height:44px;border-radius:12px;background:linear-gradient(135deg,#f97316,#fb923c);color:#fff;display:grid;place-items:center;font-weight:800;overflow:hidden;flex:0 0 auto}.preview-logo img{width:100%;height:100%;object-fit:contain;background:#fff}.invoice-brand h3{margin:1px 0 4px;font-size:14px}.invoice-brand p{margin:2px 0;color:#64748b;font-size:8.5px;word-break:break-word}.invoice-meta{text-align:end;min-width:180px}.invoice-meta h2{margin:0 0 8px;font-size:23px;letter-spacing:.02em}.invoice-meta dl{margin:0;display:grid;gap:3px}.invoice-meta dl div{display:flex;justify-content:flex-end;gap:7px;font-size:8.5px}.invoice-meta dt{color:#94a3b8}.invoice-meta dd{margin:0;font-weight:600}.status-pill{display:inline-block;margin-top:8px;padding:5px 9px;border-radius:999px;background:#ecfdf5;color:#15803d;font-size:8px;font-weight:700}.party-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:20px 0}.party-grid>div{background:#f8fafc;border:1px solid #eef2f7;border-radius:12px;padding:12px}.party-grid span{display:block;color:#94a3b8;font-size:8px;margin-bottom:4px}.party-grid strong{display:block;font-size:10px}.party-grid p{margin:3px 0;color:#64748b;font-size:8px}.preview-table-wrap{overflow:auto}.preview-table{width:100%;border-collapse:separate;border-spacing:0;font-size:8.5px}.preview-table thead th{background:#f8fafc;color:#64748b;font-weight:700;padding:8px;border-bottom:1px solid #e5e7eb;text-align:start}.preview-table tbody td{padding:9px 8px;border-bottom:1px solid #eef2f7}.invoice-bottom{display:grid;grid-template-columns:1fr 220px;gap:18px;margin-top:20px}.notes-box span{display:block;font-size:9px;font-weight:700;margin-bottom:5px}.notes-box p{margin:0;background:#f8fafc;border-radius:10px;padding:10px;color:#64748b;font-size:8px;min-height:70px}.totals-box{display:grid;gap:5px}.totals-box>div{display:flex;justify-content:space-between;gap:12px;font-size:8.5px;padding:4px 8px}.totals-box>div span{color:#64748b}.totals-box .grand{margin-top:3px;background:#eff6ff;border-radius:9px;padding:8px;color:#1d4ed8;font-size:10px}.totals-box .grand span{color:#1d4ed8;font-weight:700}.invoice-footer{text-align:center;color:#94a3b8;font-size:7.5px;margin-top:32px;padding-top:12px;border-top:1px solid #f1f5f9}.tool-footer{max-width:1540px;margin:0 auto 28px;padding:0 28px;display:flex;align-items:center;justify-content:space-between;color:var(--muted);font-size:11px}.tool-footer>div{display:flex;align-items:center;gap:8px}.tool-footer a{color:var(--primary);text-decoration:none;font-weight:700}.font-note{border:1px solid var(--line);background:var(--surface);padding:6px 9px;border-radius:999px}.maintenance-page{min-height:100vh;display:grid;place-items:center;padding:24px;background:radial-gradient(circle at top right,rgba(249,115,22,.13),transparent 34%),var(--bg)}.maintenance-card{max-width:560px;width:100%;background:var(--surface);border:1px solid var(--line);border-radius:28px;padding:48px;text-align:center;box-shadow:var(--shadow)}.maintenance-card .app-logo{margin:auto}.maintenance-pill{display:inline-block;margin-top:18px;padding:5px 10px;border-radius:999px;background:#fff7ed;color:#c2410c;font-size:11px;font-weight:700}.maintenance-card h1{font-size:32px;margin:12px 0 7px}.maintenance-card p{color:var(--muted);line-height:1.9}.toast{position:fixed;left:50%;bottom:26px;transform:translate(-50%,20px);background:#0f172a;color:#fff;border-radius:12px;padding:11px 16px;font-size:12px;box-shadow:0 14px 35px rgba(0,0,0,.22);opacity:0;pointer-events:none;transition:.25s;z-index:100}.toast.show{opacity:1;transform:translate(-50%,0)}
@media(max-width:1180px){.workspace{grid-template-columns:1fr}.preview-column{position:relative;top:auto}.invoice-paper{min-height:680px}.form-grid.four{grid-template-columns:1fr 1fr}.preview-column{order:-1}.invoice-paper{max-width:760px;margin:auto}}
@media(max-width:760px){.header-inner,.tool-main,.tool-footer{padding-left:16px;padding-right:16px}.header-inner{min-height:66px}.brand-copy small,.admin-link span{display:none}.icon-btn{padding:0 10px}.tool-main{padding-top:26px}.hero{padding-bottom:24px}.workspace{gap:14px}.section-card{padding:16px;border-radius:18px}.section-title{align-items:flex-start}.section-title p{display:none}.business-grid{grid-template-columns:1fr}.logo-picker{min-height:120px}.form-grid.two,.form-grid.three,.form-grid.four{grid-template-columns:1fr}.span-2,.span-3{grid-column:auto}.items-header{display:none}.item-row{grid-template-columns:1fr 70px 100px 42px}.item-row .item-total{grid-column:1/-1;text-align:end;padding-inline-end:8px}.export-bar{position:relative;bottom:auto;flex-wrap:wrap}.format-group{width:100%;justify-content:center}.btn-primary{margin-inline-start:0;flex:1}.btn-secondary{flex:1}.preview-column{padding:10px}.invoice-paper{padding:18px;min-height:620px}.invoice-top{flex-direction:column}.invoice-meta{text-align:start}.invoice-meta dl div{justify-content:flex-start}.party-grid{grid-template-columns:1fr}.invoice-bottom{grid-template-columns:1fr}.tool-footer{flex-direction:column;gap:10px;text-align:center}.sep{display:none}}

/* v1.1.0 - Managed footer links */
.tool-footer{display:block}.footer-links{display:flex;justify-content:center;align-items:center;gap:9px;flex-wrap:wrap;padding:0 0 16px;margin-bottom:15px;border-bottom:1px solid var(--line)}.footer-link-card{display:inline-flex;align-items:center;gap:7px;min-height:36px;padding:8px 12px;border:1px solid var(--line);border-radius:12px;background:var(--surface);color:var(--text);text-decoration:none;font-size:11px;font-weight:700;box-shadow:0 6px 18px rgba(15,23,42,.04);transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease}.footer-link-card .icon{width:14px;height:14px;color:var(--primary)}.footer-link-card:hover{transform:translateY(-2px);border-color:#b7c9ee;box-shadow:0 10px 26px rgba(15,23,42,.08)}.footer-meta{display:flex;justify-content:space-between;align-items:center;width:100%;gap:18px}.footer-meta>div{display:flex;align-items:center;gap:9px;flex-wrap:wrap}.footer-meta a{color:var(--primary);text-decoration:none}.footer-meta a:hover{text-decoration:underline}[data-theme="dark"] .footer-link-card{box-shadow:none}[data-theme="dark"] .footer-link-card:hover{border-color:#49648d}
@media(max-width:760px){.footer-links{gap:7px;padding-bottom:13px;margin-bottom:13px}.footer-link-card{padding:7px 10px;font-size:10.5px}.footer-meta{flex-direction:column;gap:8px;text-align:center}.footer-meta>div{justify-content:center}}
