.pcrm-portal{direction:rtl;max-width:1180px;margin:30px auto;font-family:inherit;color:#172033}.pcrm-portal *{box-sizing:border-box}.pcrm-portal-head{display:flex;align-items:center;justify-content:space-between;padding:24px 28px;background:linear-gradient(135deg,#0f172a,#1e3a8a);color:#fff;border-radius:18px 18px 0 0}.pcrm-portal-head span{font-size:13px;opacity:.75}.pcrm-portal-head h2{margin:3px 0 0;color:#fff}.pcrm-portal-head a{color:#fff;text-decoration:none;border:1px solid rgba(255,255,255,.35);border-radius:8px;padding:7px 12px}.pcrm-portal-nav{display:flex;gap:4px;background:#fff;border:1px solid #e2e8f0;border-top:0;padding:10px;overflow:auto}.pcrm-portal-nav a{white-space:nowrap;text-decoration:none;color:#475569;padding:9px 14px;border-radius:9px}.pcrm-portal-nav a.is-active{background:#2563eb;color:#fff}.pcrm-portal-main{background:#f8fafc;border:1px solid #e2e8f0;border-top:0;border-radius:0 0 18px 18px;padding:24px;min-height:420px}.pcrm-alert{padding:13px 16px;border-radius:10px;margin-bottom:12px}.pcrm-alert.is-success{background:#dcfce7;color:#166534}.pcrm-alert.is-error{background:#fee2e2;color:#991b1b}.pcrm-portal-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin-bottom:18px}.pcrm-portal-stats>div{background:#fff;border:1px solid #e2e8f0;border-radius:14px;padding:18px;display:flex;flex-direction:column;gap:8px}.pcrm-portal-stats span{color:#64748b;font-size:13px}.pcrm-portal-stats strong{font-size:22px}.pcrm-panel{background:#fff;border:1px solid #e2e8f0;border-radius:14px;padding:20px;margin-bottom:16px}.pcrm-panel-head{display:flex;justify-content:space-between;align-items:center;gap:14px;margin-bottom:16px}.pcrm-panel-head h3{margin:0}.pcrm-panel-head>div span{color:#64748b;font-size:12px}.pcrm-panel-head>div h3{margin:2px 0 0}.pcrm-panel-head a{text-decoration:none}.pcrm-client-list>div{display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid #eef2f7;padding:12px 0}.pcrm-client-list>div:last-child{border:0}.pcrm-client-list div div{display:flex;flex-direction:column}.pcrm-client-list small,.pcrm-responsive-table small{display:block;color:#64748b;margin-top:4px}.pcrm-responsive-table{overflow:auto}.pcrm-responsive-table table{width:100%;border-collapse:collapse}.pcrm-responsive-table th,.pcrm-responsive-table td{text-align:right;padding:12px;border-bottom:1px solid #e2e8f0}.pcrm-responsive-table th{font-size:12px;color:#64748b;background:#f8fafc}.pcrm-responsive-table a{text-decoration:none}.pcrm-client-status{display:inline-flex;border-radius:999px;padding:5px 9px;font-size:11px;font-weight:700;background:#e2e8f0;color:#334155;white-space:nowrap}.pcrm-status-paid,.pcrm-status-completed,.pcrm-status-done,.pcrm-status-resolved{background:#dcfce7;color:#166534}.pcrm-status-overdue,.pcrm-status-cancelled{background:#fee2e2;color:#991b1b}.pcrm-status-issued,.pcrm-status-running,.pcrm-status-doing,.pcrm-status-waiting_staff{background:#dbeafe;color:#1d4ed8}.pcrm-status-partial,.pcrm-status-paused,.pcrm-status-review,.pcrm-status-waiting_customer{background:#fef3c7;color:#92400e}.pcrm-invoice-meta{display:flex;gap:20px;flex-wrap:wrap;color:#64748b;font-size:13px;margin:12px 0 18px}.pcrm-client-totals{max-width:360px;margin:18px 0 18px auto}.pcrm-client-totals p{display:flex;justify-content:space-between;padding:8px 0;border-bottom:1px solid #e2e8f0;margin:0}.pcrm-pay-box{background:#eff6ff;border:1px solid #bfdbfe;border-radius:12px;padding:16px;margin-top:18px}.pcrm-pay-box h4{margin:0 0 12px}.pcrm-pay-actions{display:flex;gap:8px;flex-wrap:wrap}.pcrm-button{display:inline-flex;align-items:center;justify-content:center;background:#2563eb;color:#fff!important;text-decoration:none;border:0;border-radius:9px;padding:10px 16px;cursor:pointer;font:inherit}.pcrm-progress{height:8px;border-radius:99px;background:#e2e8f0;overflow:hidden}.pcrm-progress span{display:block;height:100%;background:#2563eb}.pcrm-task-list{margin-top:16px}.pcrm-task-list>div{display:flex;align-items:center;gap:10px;padding:10px 0;border-bottom:1px solid #eef2f7}.pcrm-task-list>div>div{flex:1;display:flex;flex-direction:column}.pcrm-task-list small{color:#64748b}.pcrm-task-check{width:18px;height:18px;border:2px solid #94a3b8;border-radius:50%}.pcrm-task-check.is-done{background:#22c55e;border-color:#22c55e;box-shadow:inset 0 0 0 4px #fff}.pcrm-ticket-cards{display:flex;flex-direction:column}.pcrm-ticket-cards>a{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:14px 0;border-bottom:1px solid #e2e8f0;text-decoration:none;color:#172033}.pcrm-ticket-cards>a>div{display:flex;flex-direction:column}.pcrm-ticket-cards small{color:#64748b;margin-top:4px}.pcrm-client-thread{display:flex;flex-direction:column;gap:12px;margin-bottom:20px}.pcrm-client-thread article{max-width:78%;border-radius:14px;padding:14px;background:#f1f5f9}.pcrm-client-thread article.is-client{margin-right:auto;background:#dbeafe}.pcrm-client-thread article header{display:flex;justify-content:space-between;gap:12px;font-size:12px}.pcrm-client-thread article header span{color:#64748b}.pcrm-client-thread article p{margin:10px 0}.pcrm-client-form{display:flex;flex-direction:column;gap:13px}.pcrm-client-form label{display:flex;flex-direction:column;gap:6px;font-weight:600}.pcrm-client-form input,.pcrm-client-form select,.pcrm-client-form textarea{width:100%;border:1px solid #cbd5e1;border-radius:9px;padding:10px;background:#fff;font:inherit}.pcrm-form-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.pcrm-login{max-width:520px;background:#fff;border:1px solid #e2e8f0;border-radius:16px;padding:28px}.pcrm-login input{width:100%}.pcrm-empty{text-align:center;color:#64748b;padding:25px}.pcrm-note{color:#64748b}
@media(max-width:720px){.pcrm-portal{margin:10px}.pcrm-portal-head,.pcrm-portal-main{padding:16px}.pcrm-portal-stats{grid-template-columns:1fr}.pcrm-client-thread article{max-width:94%}.pcrm-form-grid{grid-template-columns:1fr}.pcrm-panel{padding:15px}}

/* Sadra CRM 1.1 customer invoice */
.pcrm-client-invoice-tools{display:flex;justify-content:flex-end;margin-bottom:10px}.pcrm-print-button{background:#0f172a}.pcrm-client-invoice{position:relative;overflow:hidden;padding:0}.pcrm-client-invoice-accent{height:7px;background:linear-gradient(90deg,#0f172a 0 38%,#2563eb 38% 72%,#0ea5e9 72%)}.pcrm-client-invoice-head{display:flex;align-items:flex-start;justify-content:space-between;gap:24px;padding:26px;border-bottom:1px solid #e2e8f0}.pcrm-client-invoice-brand{display:flex;align-items:center;gap:14px}.pcrm-client-invoice-logo{width:78px;height:78px;object-fit:contain;border:1px solid #e2e8f0;border-radius:14px;padding:8px;background:#fff}.pcrm-client-invoice-brand span,.pcrm-client-invoice-title span,.pcrm-client-invoice-summary span,.pcrm-client-invoice-note>span{display:block;color:#64748b;font-size:11px;font-weight:700;margin-bottom:4px}.pcrm-client-invoice-brand h3,.pcrm-client-invoice-title h3{margin:0 0 5px}.pcrm-client-invoice-brand small{display:block;color:#64748b;line-height:1.7}.pcrm-client-invoice-title{text-align:left;border-right:3px solid #2563eb;padding-right:16px}.pcrm-client-invoice-title .pcrm-client-status{margin-top:8px}.pcrm-client-invoice-summary{display:grid;grid-template-columns:1.4fr .7fr .7fr;gap:12px;margin:20px 26px;padding:16px;background:#f8fafc;border:1px solid #e2e8f0;border-radius:12px}.pcrm-client-invoice-summary>div{display:flex;flex-direction:column}.pcrm-client-invoice-summary small{color:#64748b;margin-top:4px}.pcrm-client-invoice-table{margin:0 26px;border:1px solid #e2e8f0;border-radius:12px}.pcrm-client-invoice-table th{background:#0f172a;color:#fff}.pcrm-client-invoice-bottom{display:grid;grid-template-columns:1fr minmax(300px,.7fr);gap:22px;align-items:start;padding:22px 26px}.pcrm-client-invoice-note{border:1px dashed #cbd5e1;border-radius:12px;padding:16px;min-height:120px}.pcrm-client-invoice-note p{margin:0;color:#475569;line-height:1.8}.pcrm-client-totals{max-width:none;margin:0;border:1px solid #e2e8f0;border-radius:12px;overflow:hidden}.pcrm-client-totals p{padding:9px 12px;background:#fff}.pcrm-client-totals .is-total{background:#0f172a;color:#fff;font-size:16px}.pcrm-client-totals .is-remaining{background:#eff6ff;color:#1d4ed8}.pcrm-client-invoice .pcrm-pay-box{margin:0 26px 22px}.pcrm-client-invoice-footer{padding:12px 26px;background:#f8fafc;border-top:1px solid #e2e8f0;color:#64748b;font-size:11px;text-align:left;direction:ltr}
@media(max-width:720px){.pcrm-client-invoice-head{flex-direction:column}.pcrm-client-invoice-title{text-align:right}.pcrm-client-invoice-summary,.pcrm-client-invoice-bottom{grid-template-columns:1fr}.pcrm-client-invoice-summary,.pcrm-client-invoice-table{margin-left:15px;margin-right:15px}.pcrm-client-invoice-bottom{padding:16px 15px}.pcrm-client-invoice .pcrm-pay-box{margin-left:15px;margin-right:15px}}
@media print{@page{size:A4 portrait;margin:10mm}body *{visibility:hidden!important}.pcrm-client-invoice,.pcrm-client-invoice *{visibility:visible!important}.pcrm-client-invoice{position:absolute!important;top:0!important;right:0!important;width:100%!important;margin:0!important;border:0!important;border-radius:0!important;box-shadow:none!important;-webkit-print-color-adjust:exact;print-color-adjust:exact}.pcrm-client-invoice-tools,.pcrm-client-invoice .pcrm-pay-box{display:none!important}.pcrm-client-invoice-head{padding:20px}.pcrm-client-invoice-summary{grid-template-columns:1.4fr .7fr .7fr;margin:14px 20px}.pcrm-client-invoice-table{margin:0 20px;overflow:visible}.pcrm-client-invoice-bottom{grid-template-columns:1fr 300px;padding:18px 20px}.pcrm-client-invoice-table tr,.pcrm-client-invoice-summary,.pcrm-client-invoice-bottom{break-inside:avoid;page-break-inside:avoid}}

/* Sadra CRM 1.2 customer dashboard */
.pcrm-portal .pcrm-dashboard-stats{grid-template-columns:repeat(4,minmax(0,1fr))}
.pcrm-portal .pcrm-dashboard-stats strong{font-size:20px;overflow-wrap:anywhere}
.pcrm-portal .pcrm-quick-actions{display:flex;align-items:center;flex-wrap:wrap;gap:16px;margin-bottom:20px}
.pcrm-portal .pcrm-task-filters{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:16px}
.pcrm-portal .pcrm-task-filters a,.pcrm-portal .pcrm-pagination a{padding:8px 12px;border:1px solid #cbd5e1;border-radius:8px;text-decoration:none;color:#334155}
.pcrm-portal .pcrm-task-filters a.is-active{background:#2563eb;color:#fff;border-color:#2563eb}
.pcrm-portal .pcrm-task-overdue{color:#b91c1c}
.pcrm-portal .pcrm-task-description{white-space:normal;overflow-wrap:anywhere;line-height:1.9;margin-bottom:20px}
.pcrm-portal .pcrm-pagination{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:14px;margin-top:20px}
.pcrm-portal .pcrm-client-invoice-tools{gap:16px;align-items:center}
.pcrm-portal a:focus-visible,.pcrm-portal button:focus-visible{outline:3px solid #f59e0b;outline-offset:3px}
.pcrm-portal .pcrm-client-thread article p{overflow-wrap:anywhere}
@media(max-width:960px){.pcrm-portal .pcrm-dashboard-stats{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:520px){.pcrm-portal .pcrm-dashboard-stats{grid-template-columns:1fr}.pcrm-portal .pcrm-client-list>div{gap:10px;flex-wrap:wrap}.pcrm-portal .pcrm-panel-head{flex-wrap:wrap}}
