*{box-sizing:border-box}body,html{margin:0;padding:0;font-family:Inter,Arial,Noto Sans Arabic,sans-serif;background:#f6f7fb;color:#171923}html[dir=rtl] body{font-family:Noto Sans Arabic,Inter,Arial,sans-serif}a{color:inherit;text-decoration:none}button,input,select,textarea{font:inherit}button:disabled{opacity:.55;cursor:not-allowed}h1{margin:0 0 18px;font-size:30px}h2{margin:0 0 14px;font-size:20px}.shell{display:grid;grid-template-columns:270px minmax(0,1fr);min-height:100vh}.sidebar{background:var(--brand-color,#111827);color:#fff;padding:22px 16px;position:sticky;top:0;height:100dvh;overflow-y:auto;overscroll-behavior:contain;z-index:40;scrollbar-width:thin}.sidebarHead{display:flex;align-items:center;justify-content:space-between;gap:12px}.brand{font-weight:800;font-size:20px;margin:2px 10px 22px;line-height:1.3}.brand img{display:block;max-width:190px;max-height:54px}.nav{display:flex;flex-direction:column;gap:5px}.nav a{padding:10px 12px;border-radius:9px;color:#d1d5db;transition:background .15s,color .15s}.nav a.active,.nav a:hover{background:rgba(255,255,255,.1);color:#fff}.nav a.active{font-weight:700}.navTitle{margin:16px 12px 4px;color:#9ca3af;font-size:11px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}.logoutBtn{margin-top:12px!important;background:transparent!important;color:#fff!important;border-color:rgba(255,255,255,.28)!important}.content{min-width:0;padding:28px 32px}.topbar{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:26px;padding-bottom:14px;border-bottom:1px solid #e5e7eb}.topbarActions{flex-wrap:wrap;justify-content:flex-end}.topbarActions a{font-size:14px}.localeActive{font-weight:800;text-decoration:underline}.companySwitcher{max-width:230px}.card{background:#fff;border:1px solid #e5e7eb;border-radius:14px;padding:20px;box-shadow:0 2px 8px rgba(0,0,0,.03)}.card+.card{margin-top:16px}.grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}.metric{font-size:28px;font-weight:800;margin-top:8px}.muted{color:#6b7280}.small{font-size:12px}.btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;background:var(--brand-color,#111827);color:white;border:1px solid transparent;border-radius:9px;padding:9px 13px;cursor:pointer;white-space:nowrap}.btn.secondary{background:white;color:#111827;border-color:#d1d5db}.btn.danger{background:#991b1b;color:#fff}.btn.successBtn{background:#166534}.btn.smallBtn{padding:6px 9px;font-size:13px}.iconBtn{border:1px solid #d1d5db;background:#fff;border-radius:8px;padding:7px 10px;cursor:pointer}.input{width:100%;padding:10px 12px;border:1px solid #d1d5db;border-radius:9px;background:#fff;color:#111827}.input:focus{outline:2px solid color-mix(in srgb,var(--brand-color,#111827) 24%,transparent);border-color:var(--brand-color,#111827)}textarea.input{min-height:90px;resize:vertical}.input.compact{padding:7px 8px;min-width:110px}.form,.formGrid{display:grid;gap:12px}.formGrid{grid-template-columns:repeat(2,minmax(0,1fr))}.formGrid.threeCols{grid-template-columns:repeat(3,minmax(0,1fr))}.field{display:grid;gap:5px}.field>label,.field>span{font-size:13px;font-weight:600;color:#4b5563}.row{display:flex;gap:10px;align-items:center}.wrap{flex-wrap:wrap}.grow{flex:1 1 auto}.tableWrap{width:100%;overflow:auto;border-radius:10px}.table{width:100%;border-collapse:collapse;background:#fff;min-width:680px}.table td,.table th{text-align:start;padding:11px 12px;border-bottom:1px solid #e5e7eb;vertical-align:top}.table th{font-size:12px;text-transform:uppercase;letter-spacing:.03em;color:#6b7280;background:#fafafa;position:sticky;top:0}.table tr:last-child td{border-bottom:0}.badge{display:inline-block;background:#eef2ff;color:#3730a3;padding:4px 8px;border-radius:999px;font-size:12px}.badge.draft{background:#f3f4f6;color:#374151}.badge.approved,.badge.issued{background:#dbeafe;color:#1e40af}.badge.sent,.badge.viewed{background:#e0e7ff;color:#3730a3}.badge.accepted,.badge.paid,.badge.valid{background:#dcfce7;color:#166534}.badge.cancelled,.badge.invalid,.badge.overdue,.badge.rejected{background:#fee2e2;color:#991b1b}.badge.partial{background:#fef3c7;color:#92400e}.login{max-width:440px;margin:10vh auto;padding:28px}.error{background:#fee2e2;color:#991b1b}.error,.success{padding:10px 12px;border-radius:8px;margin-bottom:12px}.success{background:#dcfce7;color:#166534}.warning{background:#fef3c7;color:#92400e;padding:10px 12px;border-radius:8px}.toolbar{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:16px}.toolbar h1{margin:0}.two{grid-template-columns:repeat(2,minmax(0,1fr))}.three,.two{display:grid;gap:16px}.three{grid-template-columns:repeat(3,minmax(0,1fr))}.listRow{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:12px 0;border-bottom:1px solid #e5e7eb}.listRow:last-child{border-bottom:0}.actions{display:flex;gap:7px;flex-wrap:wrap}.lineEditor{border:1px solid #e5e7eb;border-radius:10px;padding:12px;display:grid;grid-template-columns:minmax(170px,2fr) minmax(80px,.7fr) minmax(90px,.8fr) minmax(90px,.8fr) auto;gap:8px;align-items:end}.summaryBox{margin-inline-start:auto;max-width:360px;display:grid;gap:7px}.summaryRow{display:flex;justify-content:space-between;gap:20px}.summaryRow.total{font-size:18px;font-weight:800;border-top:1px solid #e5e7eb;padding-top:8px}.panelHeader{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px}.empty{padding:30px;text-align:center;color:#6b7280}.authLoading{min-height:100vh;display:grid;place-items:center}.spinner{width:34px;height:34px;border-radius:50%;border:4px solid #e5e7eb;border-top-color:#111827;animation:spin .8s linear infinite}@keyframes spin{to{transform:rotate(1turn)}}.mobileOnly,.sidebarBackdrop{display:none}.loginLinks{display:flex;justify-content:space-between;gap:12px;margin-top:16px;font-size:14px}.loginLinks a{text-decoration:underline}.securitySummary .card{min-height:96px}pre{white-space:pre-wrap;word-break:break-word;overflow:auto}code{word-break:break-all}.danger{color:#991b1b}.positive{color:#166534}.publicDocument{max-width:900px;margin:5vh auto}.publicDocumentHeader{display:flex;justify-content:space-between;gap:20px;align-items:start}.publicTotals{max-width:360px;margin-inline-start:auto;margin-top:20px}.stickyActions{position:sticky;bottom:12px;background:rgba(255,255,255,.95);-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);padding:10px;border:1px solid #e5e7eb;border-radius:12px;margin-top:16px}.sidebar::-webkit-scrollbar{width:8px}.sidebar::-webkit-scrollbar-thumb{background:rgba(255,255,255,.18);border-radius:10px}@media(max-width:1100px){.formGrid.threeCols,.grid{grid-template-columns:repeat(2,minmax(0,1fr))}.content{padding:22px}}@media(max-width:900px){.shell{display:block}.mobileOnly{display:inline-flex}.sidebar{position:fixed;inset-block:0;inset-inline-start:0;width:min(86vw,300px);height:100dvh;transform:translateX(-110%);transition:transform .2s ease;box-shadow:0 0 30px rgba(0,0,0,.25)}html[dir=rtl] .sidebar{transform:translateX(110%)}.sidebar.open{transform:translateX(0)!important}.sidebarBackdrop{display:block;position:fixed;inset:0;background:rgba(0,0,0,.35);border:0;z-index:30;width:100%}.content{padding:16px}.topbar{align-items:flex-start}.topbarActions,.topbarIdentity{flex-wrap:wrap}.formGrid,.formGrid.threeCols,.three,.two{grid-template-columns:1fr}.lineEditor{grid-template-columns:1fr 1fr}.lineEditor>:first-child{grid-column:1/-1}.grid{grid-template-columns:1fr 1fr}}@media(max-width:560px){.grid{grid-template-columns:1fr}.publicDocumentHeader,.toolbar,.topbar{flex-direction:column;align-items:stretch}.row.wrap{align-items:stretch}.actions .btn{flex:1 1 auto}.lineEditor{grid-template-columns:1fr}.lineEditor>:first-child{grid-column:auto}.content{padding:12px}.card{padding:15px}}.companyAdminStats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin-bottom:16px}.statCard{min-height:118px}.metricText{font-size:20px;line-height:1.35;word-break:break-word}.companyFilters{margin-top:0}.companyAdminTable{min-width:1100px}.companyCellTitle{font-weight:800;margin-bottom:4px}.overrideBadge{margin-top:7px;background:#fef3c7;color:#92400e}.paginationBar{display:flex;align-items:center;justify-content:center;gap:14px;padding-top:16px}.companyDetailHeader{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;margin-bottom:18px}.companyAdminColumns{align-items:start}.sectionHeader{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:16px}.sectionHeader h2{margin:0 0 4px}.planSummary{display:flex;gap:14px;flex-wrap:wrap;margin-top:14px;padding:12px;border:1px solid #e5e7eb;border-radius:10px;background:#fafafa}.usageMeter{display:grid;gap:8px;padding:4px 0}.progressTrack{height:9px;border-radius:999px;background:#e5e7eb;overflow:hidden}.progressFill{height:100%;border-radius:inherit;background:var(--brand-color,#111827);transition:width .2s ease}.featureGroups{display:grid;gap:18px;margin-top:22px}.featureGroup{border-top:1px solid #e5e7eb;padding-top:16px}.featureGroup:first-child{border-top:0;padding-top:0}.featureGroup h3{margin:0 0 12px;font-size:16px}.featureGrid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.featureCard{border:1px solid #e5e7eb;border-radius:11px;padding:12px;background:#fff;display:grid;gap:10px}.featureCardHeader{display:flex;justify-content:space-between;gap:10px;align-items:flex-start}.metricList{display:grid}.compactPre{margin:0;max-width:520px;font-size:11px;line-height:1.4;max-height:160px}.companyAdminTable .actions{min-width:190px}.companyAdminTable td{vertical-align:middle}@media(max-width:1200px){.companyAdminStats,.featureGrid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:760px){.companyAdminStats,.featureGrid{grid-template-columns:1fr}.companyDetailHeader{flex-direction:column}.companyDetailHeader .actions,.companyDetailHeader .actions .btn{width:100%}.sectionHeader{flex-direction:column}.paginationBar{justify-content:space-between}}.billingPage{display:grid;gap:20px;max-width:1500px;margin:0 auto}.billingHero{display:flex;align-items:flex-end;justify-content:space-between;gap:24px;padding:4px 0 2px}.billingHero h1{font-size:34px;margin:5px 0 8px}.billingHero p{margin:0;color:#6b7280;max-width:720px;line-height:1.6}.billingEyebrow{font-size:12px;font-weight:800;letter-spacing:.12em;text-transform:uppercase;color:var(--brand-color,#111827)}.billingCycleSwitch{display:inline-flex;gap:4px;padding:4px;border:1px solid #d1d5db;border-radius:12px;background:#fff;box-shadow:0 2px 8px rgba(0,0,0,.03)}.billingCycleSwitch button{border:0;background:transparent;color:#4b5563;border-radius:8px;padding:9px 15px;font-weight:700;cursor:pointer}.billingCycleSwitch button.active{background:var(--brand-color,#111827);color:#fff}.billingLoading{min-height:220px;justify-content:center}.billingErrorRow,.billingLoading{display:flex;align-items:center;gap:14px}.billingErrorRow,.currentSubscriptionCard{justify-content:space-between}.currentSubscriptionCard{background:linear-gradient(135deg,#fff,#f9fafb);border:1px solid #e5e7eb;border-radius:16px;padding:22px;display:flex;align-items:center;gap:24px;box-shadow:0 6px 24px rgba(17,24,39,.05)}.billingSectionLabel{font-size:12px;font-weight:800;text-transform:uppercase;letter-spacing:.08em;color:#6b7280}.currentPlanName{font-size:28px;font-weight:900;margin:5px 0}.subscriptionFacts{display:flex;gap:28px;flex-wrap:wrap;margin-top:16px}.subscriptionFacts>div{display:grid;gap:3px}.subscriptionFacts span{font-size:12px;color:#6b7280}.subscriptionFacts strong{font-size:14px}.subscriptionActions{display:flex;align-items:center;justify-content:flex-end;gap:9px;flex-wrap:wrap;max-width:440px}.billingCancelButton{color:#991b1b!important;border-color:#fecaca!important}.planGrid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;align-items:stretch}.planCard{position:relative;background:#fff;border:1px solid #e5e7eb;border-radius:18px;padding:22px;display:flex;flex-direction:column;min-height:590px;box-shadow:0 4px 18px rgba(17,24,39,.04);transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease}.planCard:hover{transform:translateY(-2px);box-shadow:0 10px 32px rgba(17,24,39,.08)}.planCard.currentPlanCard{border:2px solid var(--brand-color,#111827);padding:21px}.planCard.recommendedPlanCard{box-shadow:0 10px 34px rgba(17,24,39,.1)}.planCardTop{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;min-height:60px}.planCard h2{font-size:22px;margin:8px 0 0}.planBadges{display:flex;gap:6px;flex-wrap:wrap;min-height:21px}.planBadge{display:inline-flex;align-items:center;border-radius:999px;padding:4px 8px;font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.04em}.planBadge.current{background:#e5e7eb;color:#111827}.planBadge.recommended{background:#ecfdf5;color:#047857}.planPrice{display:flex;align-items:flex-end;gap:7px;margin:10px 0 4px}.planPrice strong{font-size:34px;line-height:1;font-weight:900;letter-spacing:-.02em}.planPrice span{font-size:13px;color:#6b7280;padding-bottom:3px}.yearlyLine{min-height:24px;display:flex;justify-content:space-between;gap:8px;font-size:12px;color:#6b7280}.yearlyLine strong{color:#047857}.planLimits{display:grid;grid-template-columns:1fr;gap:8px;margin:18px 0;padding:14px 0;border-top:1px solid #eef0f3;border-bottom:1px solid #eef0f3}.planLimits>div{display:grid;grid-template-columns:22px auto 1fr;align-items:center;gap:6px}.planLimits strong{font-size:14px}.planLimits small{color:#6b7280;font-size:12px}.planFeaturesTitle{font-size:12px;font-weight:800;color:#4b5563;text-transform:uppercase;letter-spacing:.05em;margin-bottom:8px}.planFeatureList{display:grid;gap:8px;margin-bottom:20px}.planFeatureList>div{display:grid;grid-template-columns:18px minmax(0,1fr) auto;gap:7px;align-items:center;font-size:13px}.planFeatureList>div>span:first-child{font-weight:900}.planFeatureList .enabled>span:first-child{color:#047857}.planFeatureList .disabled{color:#9ca3af}.planFeatureList small{font-size:10px;color:#9ca3af}.planActionButton{margin-top:auto;width:100%;border-radius:10px;border:1px solid transparent;padding:11px 12px;font-weight:800;cursor:pointer;background:var(--brand-color,#111827);color:#fff}.planActionButton.current{background:#f3f4f6;color:#6b7280;border-color:#e5e7eb}.planActionButton.change,.planActionButton.downgrade{background:#fff;color:#111827;border-color:#d1d5db}.planActionButton:disabled{cursor:not-allowed;opacity:.7}.planActionHint{text-align:center;margin-top:7px;font-size:10px;color:#6b7280}.secureBillingCard{display:flex;align-items:flex-start;gap:14px;background:#fff;border:1px solid #e5e7eb;border-radius:16px;padding:20px}.secureBillingIcon{width:38px;height:38px;border-radius:50%;display:grid;place-items:center;background:#ecfdf5;color:#047857;font-weight:900;flex:0 0 auto}.secureBillingCard h2{margin:0 0 5px;font-size:17px}.secureBillingCard p{margin:0 0 4px;color:#4b5563;line-height:1.5}.secureBillingCard small{color:#6b7280}.billingPage[dir=rtl] .planPrice{direction:rtl}@media(max-width:1320px){.planGrid{grid-template-columns:repeat(2,minmax(0,1fr))}.planCard{min-height:540px}}@media(max-width:800px){.billingHero,.currentSubscriptionCard{align-items:stretch;flex-direction:column}.billingCycleSwitch{align-self:flex-start}.subscriptionActions{justify-content:flex-start;max-width:none}.planGrid{grid-template-columns:1fr}.planCard{min-height:auto}.subscriptionFacts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.billingErrorRow{align-items:stretch;flex-direction:column}}@media(max-width:480px){.billingHero h1{font-size:28px}.billingCycleSwitch{width:100%}.billingCycleSwitch button{flex:1 1}.currentSubscriptionCard,.planCard{padding:16px}.currentPlanName{font-size:24px}.subscriptionFacts{grid-template-columns:1fr}.planPrice strong{font-size:30px}.planFeatureList>div{grid-template-columns:18px 1fr}.planFeatureList small{display:none}}